RussellSpitzer commented on a change in pull request #1744:
URL: https://github.com/apache/iceberg/pull/1744#discussion_r521779472



##########
File path: core/src/main/java/org/apache/iceberg/avro/PruneColumns.java
##########
@@ -90,12 +92,18 @@ public Schema record(Schema record, List<String> names, 
List<Schema> fields) {
       } else if (fieldSchema != null) {
         hasChange = true;
         filteredFields.add(copyField(field, fieldSchema, fieldId));
+      } else if (emptyStructIds.contains(fieldId)) {
+        // This field does not require any known sub-fields but is required in 
the projection so keep it without
+        // any of it's subfields
+        hasChange = true;
+        Schema empty = AvroSchemaUtil.removeFields(field);

Review comment:
       CopyRecord does not work on UnionTypes :(




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

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