shardulm94 commented on a change in pull request #778: ORC: Implement TestGenericData and fix reader and writer issues URL: https://github.com/apache/incubator-iceberg/pull/778#discussion_r378501653
########## File path: data/src/main/java/org/apache/iceberg/data/orc/GenericOrcReader.java ########## @@ -172,14 +208,13 @@ public Double convert(ColumnVector vector, int row) { } } - private static class TimestampConverter implements Converter<Long> { - private Long convert(TimestampColumnVector vector, int row) { - // compute microseconds past 1970. - return (vector.time[row] / 1000) * 1_000_000 + vector.nanos[row] / 1000; + private static class TimestampTzConverter implements Converter<OffsetDateTime> { + private OffsetDateTime convert(TimestampColumnVector vector, int row) { + return EPOCH.plus(vector.time[row], ChronoUnit.MILLIS).plus(vector.nanos[row] % 1_000_000, ChronoUnit.NANOS); Review comment: I also made a small change to not use millis from vector.time and rather use millis from vector.nanos. This is consistent with other places where we are handling ORC timestamps. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org