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



##########
File path: core/src/main/java/org/apache/iceberg/avro/PruneColumns.java
##########
@@ -95,7 +95,7 @@ public Schema record(Schema record, List<String> names, 
List<Schema> fields) {
 
     if (hasChange) {
       return copyRecord(record, filteredFields);
-    } else if (filteredFields.size() == record.getFields().size()) {
+    } else if (record.getFields().size() != 0 && filteredFields.size() == 
record.getFields().size()) {

Review comment:
       This is what keeps "data_file" from being pruned on Unpartitioned tables 
(since partitionType would be an empty struct)




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