ashleycoxley commented on a change in pull request #487: Add TIME_MICROS
support to GenericParquetReaders
URL: https://github.com/apache/incubator-iceberg/pull/487#discussion_r326836155
##########
File path:
data/src/main/java/org/apache/iceberg/data/parquet/GenericParquetReaders.java
##########
@@ -366,6 +365,15 @@ public OffsetDateTime read(OffsetDateTime reuse) {
}
}
+ private static class TimeReader extends PrimitiveReader<LocalTime> {
+ private TimeReader(ColumnDescriptor desc) {
+ super(desc);
+ }
+
+ @Override
+ public LocalTime read(LocalTime reuse) { return
LocalTime.MIN.plus(column.nextLong(), ChronoUnit.MICROS); }
Review comment:
@rdblue I did update to the alternative implementation suggested, but I
actually think conversion is covered by existing tests, since I added a line to
`DataTest` - there was already a case match in
`RandomGenericData.generatePrimitive` for the `TIME` type. Existing tests write
this to the database as a `Long` and then read the result as `Time`. Do you
think that's enough?
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]