rdblue commented on a change in pull request #4218:
URL: https://github.com/apache/iceberg/pull/4218#discussion_r818136288



##########
File path: 
parquet/src/main/java/org/apache/iceberg/data/parquet/GenericParquetReaders.java
##########
@@ -53,21 +53,23 @@ private GenericParquetReaders() {
   }
 
   private static class RecordReader extends StructReader<Record, Record> {
-    private final StructType structType;
+    private final GenericRecord template;
 
     RecordReader(List<Type> types,
                  List<ParquetValueReader<?>> readers,
                  StructType struct) {
       super(types, readers);
-      this.structType = struct;
+      this.template = struct != null ? GenericRecord.create(struct) : null;

Review comment:
       Should these also have preconditions that validate the struct is not 
null?




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to