You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "hudi-bot (via GitHub)" <gi...@apache.org> on 2025/11/30 13:43:57 UTC

[I] Hive is not displaying the timestamp value in micro seconds [hudi]

hudi-bot opened a new issue, #17329:
URL: https://github.com/apache/hudi/issues/17329

   When we query the hudi table using Hive engine, in hive micro seconds value are truncated.
   
   Steps to reproduce the issue:
   {code:java}
   create table test_timestamp(id int, time timestamp) using hudi;
   insert into test_timestamp values(1,timestamp('2024-11-28 12:00:00.123456'));
   select time from test_timestamp;
   {code}
    
   
   *Result from spark:*
   {code:java}
   2024-11-28 12:00:00.123456{code}
   *Result from hive:*
   {code:java}
   2024-11-28 12:00:00.123{code}
   More details - https://github.com/apache/hudi/issues/12370
   
   ## JIRA info
   
   - Link: https://issues.apache.org/jira/browse/HUDI-8677
   - Type: Sub-task
   - Parent: https://issues.apache.org/jira/browse/HUDI-9113
   - Fix version(s):
     - 1.1.0


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Hive is not displaying the timestamp value in micro seconds [hudi]

Posted by "rangareddy (via GitHub)" <gi...@apache.org>.
rangareddy commented on issue #17329:
URL: https://github.com/apache/hudi/issues/17329#issuecomment-5351232340

   This issue was reviewed as part of the JIRA-migrated backlog triage (HUDI-8677).
   
   **Findings: needs a Hive runtime to decide - I could not settle this from the source.**
   
   First, a note that may otherwise mislead someone reading the thread: the linked GitHub issue [#12370](https://github.com/apache/hudi/issues/12370) is **closed**, but it was closed only because this JIRA was filed as its follow-up. Its last comment (2024-12-09) is *"Created Hudi Jira - https://issues.apache.org/jira/browse/HUDI-8677"*. So the closed state of #12370 is not evidence that the truncation was fixed.
   
   On the code: searching `hudi-hadoop-common` and the Hive sync modules for microsecond/`TimestampMicros` precision handling turned up nothing that decides the question either way. The root `pom.xml` still pins `<hive.version>2.3.10</hive.version>`.
   
   What would settle it is running the reproduction from the description against a current build with a real Hive engine:
   
   ```sql
   create table test_timestamp(id int, time timestamp) using hudi;
   insert into test_timestamp values(1, timestamp('2024-11-28 12:00:00.123456'));
   select time from test_timestamp;
   ```
   
   and comparing the Spark result (`2024-11-28 12:00:00.123456`) against the Hive one (reported as `2024-11-28 12:00:00.123`). Worth also recording whether the truncation happens at write time, in the synced Hive schema, or only in Hive's display path, since those imply very different fixes.
   
   Keeping this open.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org