RussellSpitzer commented on code in PR #14040: URL: https://github.com/apache/iceberg/pull/14040#discussion_r2373139462
########## parquet/src/main/java/org/apache/iceberg/data/parquet/InternalReader.java: ########## @@ -46,11 +52,48 @@ public static <T extends StructLike> ParquetValueReader<T> create( return (ParquetValueReader<T>) INSTANCE.createReader(expectedSchema, fileSchema, idToConstant); } + public static Parquet.ReadBuilder.ReaderFunction readerFunction() { + InternalReader<?> reader = new InternalReader<>(); + + return new Parquet.ReadBuilder.ReaderFunction() { + private Schema schema; + + @Override + public Function<MessageType, ParquetValueReader<?>> apply() { + return messageType -> reader.createReader(schema, messageType); + } + + @Override + public Parquet.ReadBuilder.ReaderFunction withSchema(Schema schema) { + this.schema = schema; + return this; + } + + @Override + public Parquet.ReadBuilder.ReaderFunction withCustomTypes( Review Comment: 🤷 Yeah I'm not sure it's worth standardizing since this is only called by Parquet.java anyway -- 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