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


##########
ql/src/java/org/apache/hadoop/hive/ql/io/BatchToRowReader.java:
##########
@@ -518,7 +521,8 @@ public static TimestampWritableV2 
nextTimestamp(ColumnVector vector,
         result = (TimestampWritableV2) previous;
       }
       TimestampColumnVector tcv = (TimestampColumnVector) vector;
-      result.setInternal(tcv.time[row], tcv.nanos[row]);
+      result.set(Timestamp.ofEpochSecond(Math.floorDiv(tcv.time[row], 1000L), 
tcv.nanos[row],
+          tcv.isUTC() ? ZoneOffset.UTC : ZoneId.systemDefault()));

Review Comment:
   1. You've opened a PR for Hive, not Spark.
   2. Likewise. Please note that it's generally a bad practice to open a PR for 
an issue that's already being worked on by someone else.
   3. The problem is also in ORC, so it's not solely a Hive issue. Without the 
hack in `RecordReaderImpl` I'd be fine with merging, but it wouldn't actually 
address your issue. 
   Additionally, this isn't a regression, as Hive-3 behaved the same way. 
   5. The approach using `ReaderContext` would also be compatible with the fix 
proposed in [ORC#2300](https://github.com/apache/orc/pull/2300).



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