rdblue commented on code in PR #11904: URL: https://github.com/apache/iceberg/pull/11904#discussion_r1927629344
########## parquet/src/main/java/org/apache/iceberg/parquet/ParquetValueReaders.java: ########## @@ -412,6 +446,41 @@ public byte[] read(byte[] ignored) { } } + private static class TimestampInt96Reader extends UnboxedReader<Long> { + + private TimestampInt96Reader(ColumnDescriptor desc) { + super(desc); + } + + @Override + public Long read(Long ignored) { + return readLong(); + } + + @Override + public long readLong() { + final ByteBuffer byteBuffer = + column.nextBinary().toByteBuffer().order(ByteOrder.LITTLE_ENDIAN); + return ParquetUtil.extractTimestampInt96(byteBuffer); + } + } + + private static class TimestampMillisReader extends UnboxedReader<Long> { + private TimestampMillisReader(ColumnDescriptor desc) { + super(desc); + } + + @Override + public Long read(Long ignored) { + return readLong(); + } + + @Override + public long readLong() { + return 1000L * column.nextInteger(); Review Comment: This is valid for `time` but not for `timestamp`. I may have mixed up the `timestamp` reader and `time` reader in an earlier comment. This needs to be `nextLong`. -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org