stevenzwu commented on PR #6377:
URL: https://github.com/apache/iceberg/pull/6377#issuecomment-1341418873

   Example usage
   
   ```
   public class TestRowDataToAvroGenericRecordConverter  {
   
     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);
     }
   
     @Test
     public void testPrimitiveTypes() throws Exception {
       testConverter(new DataGenerators.Primitives());
     }
   
     @Test
     public void testStructOfPrimitive() throws Exception {
       testConverter(new DataGenerators.StructOfPrimitive());
     }
   
     @Test
     public void testStructOfArray() throws Exception {
       testConverter(new DataGenerators.StructOfArray());
     }
   
     @Test
     public void testStructOfMap() throws Exception {
       testConverter(new DataGenerators.StructOfMap());
     }
   
     @Test
     public void testStructOfStruct() throws Exception {
       testConverter(new DataGenerators.StructOfStruct());
     }
   
     @Test
     public void testArrayOfPrimitive() throws Exception {
       testConverter(new DataGenerators.ArrayOfPrimitive());
     }
   
     @Test
     public void testArrayOfArray() throws Exception {
       testConverter(new DataGenerators.ArrayOfArray());
     }
   
     @Test
     public void testArrayOfMap() throws Exception {
       testConverter(new DataGenerators.ArrayOfMap());
     }
   
     @Test
     public void testArrayOfStruct() throws Exception {
       testConverter(new DataGenerators.ArrayOfStruct());
     }
   
     @Test
     public void testMapOfPrimitives() throws Exception {
       testConverter(new DataGenerators.MapOfPrimitives());
     }
   
     @Test
     public void testMapOfArray() throws Exception {
       testConverter(new DataGenerators.MapOfArray());
     }
   
     @Test
     public void testMapOfMap() throws Exception {
       testConverter(new DataGenerators.MapOfMap());
     }
   
     @Test
     public void testMapOfStruct() throws Exception {
       testConverter(new DataGenerators.MapOfStruct());
     }
   }
   
   ```


-- 
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

Reply via email to