deniskuzZ commented on code in PR #5868: URL: https://github.com/apache/hive/pull/5868#discussion_r2165127166
########## 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: I'm not questioning that Hive currently ignores the UTC flag and always treats it as true. My concern is about how the flag is being set. `TreeReaderFactory` is using `ReaderContext` to propagate the flag into the `TimestampColumnVector` vector. ```` result.setIsUTC(this.context.getUseUTCTimestamp()); ```` Rather than passing the context to the vector, we loop through all column vectors, searching for `TimestampColumnVector` and setting the flag manually in the RecordReaderImpl constructor. While I agree that apache/orc#2300 is a proper fix, can we do the refactor in the meantime. Additionally, it would be nice to reuse the timestamp conversion function to avoid code duplication -- 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