sercanCyberVision commented on PR #5952:
URL: https://github.com/apache/hive/pull/5952#issuecomment-3134099822

   @deniskuzZ 
   I'm encountering an issue with timestamp conversion in legacy mode.
   When timestamps are read from a table (e.g., during a join) and rewritten, 
they undergo multiple unintended conversions.
   
   I added ZoneID to Timestamp class to use it as condition (if zoneIDs are the 
same, do not convert anymore), but I am losing the ZoneID at some point (I 
assume during the serialization), and it keeps re-converting.
   
   For example:
   ```
   SET hive.rcfile.timestamp.legacy.conversion=true;
   CREATE TABLE t1 (c1 TIMESTAMP, c2 TIMESTAMP);
   CREATE TABLE t2 (c1 TIMESTAMP, c2 TIMESTAMP) STORED AS RCFILE;
   INSERT INTO t1 VALUES ('2025-07-29 00:00:01','2025-07-29 00:00:01');
   INSERT INTO t2 VALUES ('2025-07-29 00:00:01','2025-07-29 00:00:01');
   
   
   INSERT OVERWRITE TABLE t2
   SELECT
       ext.c1,
       mng.c2
   FROM
       t1 AS ext
     FULL OUTER JOIN
       t2 AS mng
     ON
       1 = 1;
   
   
   SELECT * FROM t1;
   SELECT * FROM t2;
   ```
   returns;
   ```
   hive> SELECT * FROM t1;
   OK
   2025-07-29 00:00:01  2025-07-29 00:00:01
   Time taken: 0.169 seconds, Fetched: 1 row(s)
   hive> SELECT * FROM t2;
   OK
   2025-07-29 04:00:01  2025-07-29 06:00:01
   Time taken: 0.165 seconds, Fetched: 1 row(s)
   hive>
   ```
   Could you please give me any suggestion?


-- 
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: gitbox-unsubscr...@hive.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org
For additional commands, e-mail: gitbox-h...@hive.apache.org

Reply via email to