rdblue commented on a change in pull request #1184:
URL: https://github.com/apache/iceberg/pull/1184#discussion_r460261628
##########
File path:
data/src/main/java/org/apache/iceberg/data/parquet/BaseParquetReaders.java
##########
@@ -345,6 +352,25 @@ public LocalDateTime read(LocalDateTime reuse) {
}
}
+ private static class TimestampInt96Reader extends
ParquetValueReaders.PrimitiveReader<LocalDateTime> {
+ private static final long UNIX_EPOCH_JULIAN = 2_440_588L;
+
+ private TimestampInt96Reader(ColumnDescriptor desc) {
+ super(desc);
+ }
+
+ @Override
+ public LocalDateTime read(LocalDateTime reuse) {
+ final ByteBuffer byteBuffer =
column.nextBinary().toByteBuffer().order(ByteOrder.LITTLE_ENDIAN);
Review comment:
Note for reviewers (and future me): `toByteBuffer` returns a duplicate
of the internal buffer so that it is safe for uses of it to modify the buffer's
position with methods like `getLong`.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]