jbonofre commented on code in PR #11430: URL: https://github.com/apache/iceberg/pull/11430#discussion_r1830478303
########## flink/v1.20/flink/src/test/java/org/apache/iceberg/flink/data/AbstractTestFlinkAvroReaderWriter.java: ########## @@ -80,20 +79,27 @@ private void writeAndValidate(Schema schema, List<Record> expectedRecords, int n // Write the expected records into AVRO file, then read them into RowData and assert with the // expected Record list. - try (FileAppender<Record> writer = + try (FileAppender<org.apache.iceberg.data.Record> writer = Avro.write(Files.localOutput(recordsFile)) .schema(schema) .createWriterFunc(DataWriter::create) .build()) { writer.addAll(expectedRecords); } - try (CloseableIterable<RowData> reader = + Avro.ReadBuilder builder = Avro.read(Files.localInput(recordsFile)) .project(schema) - .createResolvingReader(FlinkPlannedAvroReader::create) - .build()) { - Iterator<Record> expected = expectedRecords.iterator(); + .createReaderFunc(FlinkAvroReader::new); + if (useAvroPlannedReader) { + builder = + Avro.read(Files.localInput(recordsFile)) + .project(schema) + .createResolvingReader(FlinkPlannedAvroReader::create); + } Review Comment: Good idea. Let me do that. Thanks ! -- 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