rdblue commented on code in PR #12298: URL: https://github.com/apache/iceberg/pull/12298#discussion_r2373035049
########## core/src/main/java/org/apache/iceberg/avro/Avro.java: ########## @@ -625,62 +796,56 @@ public Stream<FieldMetrics> metrics() { } } + /** + * @deprecated Since 1.10.0, will be removed in 1.11.0. Use the {@link + * FormatModelRegistry#readBuilder(FileFormat, Class, InputFile)} instead. + */ + @Deprecated public static ReadBuilder read(InputFile file) { return new ReadBuilder(file); } + /** + * @deprecated Since 1.10.0, will be removed in 1.11.0. Use the {@link + * FormatModelRegistry#readBuilder(FileFormat, Class, InputFile)} instead. + */ + @Deprecated public static class ReadBuilder implements InternalData.ReadBuilder { - private final InputFile file; - private final Map<String, String> renames = Maps.newLinkedHashMap(); - private final Map<Integer, Class<? extends StructLike>> typeMap = Maps.newHashMap(); - private Class<? extends StructLike> rootType = null; - private ClassLoader loader = Thread.currentThread().getContextClassLoader(); - private NameMapping nameMapping; - private boolean reuseContainers = false; - private org.apache.iceberg.Schema schema = null; - private Function<Schema, DatumReader<?>> createReaderFunc = null; - private BiFunction<org.apache.iceberg.Schema, Schema, DatumReader<?>> createReaderBiFunc = null; - private Function<org.apache.iceberg.Schema, DatumReader<?>> createResolvingReaderFunc = null; - - @SuppressWarnings("UnnecessaryLambda") - private final Function<org.apache.iceberg.Schema, DatumReader<?>> defaultCreateReaderFunc = - readSchema -> { - GenericAvroReader<?> reader = GenericAvroReader.create(readSchema); - reader.setClassLoader(loader); - return reader; - }; - - private Long start = null; - private Long length = null; + private final ReadBuilderImpl<?, ?> impl; Review Comment: Is it necessary to change these? I would prefer to leave them as-is and remove them when we can. We don't need to rewrite them to use the replacements. -- 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