deniskuzZ commented on code in PR #5952:
URL: https://github.com/apache/hive/pull/5952#discussion_r2198870831


##########
serde/src/java/org/apache/hadoop/hive/serde2/lazybinary/LazyBinaryTimestamp.java:
##########
@@ -52,6 +55,28 @@ public class LazyBinaryTimestamp extends
    */
   @Override
   public void init(ByteArrayRef bytes, int start, int length) {
-    data.set(bytes.getData(), start);
+    if (!legacyConversionEnabled) {
+      // Hive 3.x default: interpret as UTC
+      data.set(bytes.getData(), start);
+    } else {
+      // Legacy Hive 2.x behavior: interpret as local time
+      data.set(bytes.getData(), start);
+
+      // Convert to java.sql.Timestamp
+      Timestamp ts = data.getTimestamp();

Review Comment:
   if that is already handled by other file formats, can't we reuse/extract the 
conversion logic into util class?



-- 
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