rdblue commented on code in PR #11904: URL: https://github.com/apache/iceberg/pull/11904#discussion_r1925901471
########## parquet/src/main/java/org/apache/iceberg/data/parquet/BaseParquetReaders.java: ########## @@ -76,6 +70,46 @@ protected ParquetValueReader<T> createReader( protected abstract ParquetValueReader<T> createStructReader( List<Type> types, List<ParquetValueReader<?>> fieldReaders, Types.StructType structType); + protected ParquetValueReader<?> fixedReader(ColumnDescriptor desc) { + return new GenericParquetReaders.FixedReader(desc); + } + + protected ParquetValueReader<?> dateReader(ColumnDescriptor desc) { + return new GenericParquetReaders.DateReader(desc); + } + + protected ParquetValueReader<?> timeReader( + ColumnDescriptor desc, LogicalTypeAnnotation.TimeUnit unit) { + switch (unit) { + case MICROS: + return new GenericParquetReaders.TimeReader(desc); + case MILLIS: + return new GenericParquetReaders.TimeMillisReader(desc); + default: + throw new UnsupportedOperationException("Unsupported Unit: " + unit); Review Comment: Error messages should use sentence case, so this should be `"Unsupported unit for time: "`. It is also nice to give additional context in the message (the "for time" part). -- 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