xiangfu0 commented on code in PR #20060:
URL: https://github.com/apache/pinot/pull/20060#discussion_r4392763066
##########
pinot-plugins/pinot-input-format/pinot-parquet/src/main/java/org/apache/pinot/plugin/inputformat/parquet/ParquetNativeRecordExtractor.java:
##########
@@ -181,8 +185,9 @@ private Object extractValue(Group from, int fieldIndex,
Type fieldType, int inde
case INT96: {
// INT96 has no Parquet logical-type spec, but its physical encoding
(nanos-of-day + Julian day) is
// nanosecond-precision, so nanos is the natural raw unit.
- long nanos =
ParquetUtils.convertInt96ToEpochNanos(from.getInt96(fieldIndex,
index).getBytes());
- return _extractRawTimeValues ? nanos :
TimestampUtils.fromNanosSinceEpoch(nanos);
+ byte[] bytes = from.getInt96(fieldIndex, index).getBytes();
+ return _extractRawTimeValues ?
ParquetUtils.convertInt96ToEpochNanos(bytes)
+ : ParquetUtils.convertInt96ToTimestamp(bytes);
Review Comment:
Applied in `10245ec94d`: the native extractor uses the same multiline
ternary formatting. All 51 focused tests and quality checks pass.
--
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]