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



##########
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:
       I think there is a reasonable argument that `BuildAvroProjection` should 
do what your describe, since it is creating the final schema that will be 
requested from Avro.
   
   If that's adding back the empty structs, then why change the behavior of 
`PruneColumns` here?




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