tanishq-chugh commented on code in PR #6761:
URL: https://github.com/apache/hive/pull/6761#discussion_r4026793060


##########
ql/src/java/org/apache/hadoop/hive/ql/io/orc/RecordReaderImpl.java:
##########
@@ -466,6 +469,28 @@ static TimestampWritableV2 nextTimestamp(ColumnVector 
vector,
     }
   }
 
+  static TimestampLocalTZWritable nextTimestampLocalTZ(ColumnVector vector,
+                                                        int row,
+                                                        Object previous) {
+    if (vector.isRepeating) {
+      row = 0;
+    }
+    if (vector.noNulls || !vector.isNull[row]) {
+      TimestampLocalTZWritable result;
+      if (previous == null || previous.getClass() != 
TimestampLocalTZWritable.class) {
+        result = new TimestampLocalTZWritable();
+      } else {
+        result = (TimestampLocalTZWritable) previous;
+      }
+      TimestampColumnVector tcv = (TimestampColumnVector) vector;
+      long epochSecond = Math.floorDiv(tcv.time[row], 1000L);
+      result.set(new TimestampTZ(epochSecond, tcv.nanos[row], 
ZoneId.systemDefault()));

Review Comment:
   Hi @vikramahuja1001 
   Checked out the PR and the changes look good, but this comment from Copilot 
seems to make sense as the value returned to the end-user should be as per its 
local time zone if set and not the JVM default in that case, Could you please 
check on this too?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to