deniskuzZ commented on code in PR #5868:
URL: https://github.com/apache/hive/pull/5868#discussion_r2164683681
##########
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:
sorry, I was wrong, it's set in `org.apache.orc.impl.TreeReaderFactory` for
non-vectorized orc read,
````
public void nextVector(ColumnVector previousVector, boolean[] isNull, int
batchSize, FilterContext filterContext, TypeReader.ReadPhase readPhase) throws
IOException {
TimestampColumnVector result =
(TimestampColumnVector)previousVector;
result.changeCalendar(this.fileUsesProleptic, false);
super.nextVector(previousVector, isNull, batchSize,
filterContext, readPhase);
result.setIsUTC(this.context.getUseUTCTimestamp());
if (filterContext.isSelectedInUse()) {
this.nextVector(result, isNull, filterContext, batchSize);
} else {
this.nextVector(result, isNull, batchSize);
}
}
````
--
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]