stevenzwu commented on PR #6377: URL: https://github.com/apache/iceberg/pull/6377#issuecomment-1345457933
@hililiwei @chenjunjiedada don't want to use random data. The purpose of this util class is to generate Flink `RowData`, Iceberg `GenericRecord`, and Avro `GenericRecord` (internal code) with the same schema and values. Then we can compare the expected and actual values after applying converter. With random values, we can not do `assertEquals`. The goal the util class is to cover different field types (primitives and complex nested). Random values are really important for that purpose. ``` protected void testConverter(DataGenerator dataGenerator) throws Exception { RowDataToAvroGenericRecordConverter converter = RowDataToAvroGenericRecordConverter.fromAvroSchema(dataGenerator.avroSchema()); GenericRecord expected = dataGenerator.generateAvroGenericRecord(); GenericRecord actual = converter.apply(dataGenerator.generateFlinkRowData()); Assert.assertEquals(expected, actual); } ``` -- 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