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


##########
ql/src/java/org/apache/hadoop/hive/ql/io/BatchToRowReader.java:
##########
@@ -526,6 +530,28 @@ public static TimestampWritableV2 
nextTimestamp(ColumnVector vector,
     }
   }
 
+  public static TimestampLocalTZWritable nextTimestampLocalTZ(ColumnVector 
vector,
+                                                  int row,
+                                                  ZoneId timeZone,
+                                                  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;
+      result.set(new TimestampTZ(tcv.time[row] / 1000, tcv.nanos[row], 
timeZone));

Review Comment:
   `Math.floorDiv()` should be used here as well?



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