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



##########
File path: api/src/main/java/org/apache/iceberg/types/PruneColumns.java
##########
@@ -27,10 +27,23 @@
 
 class PruneColumns extends TypeUtil.SchemaVisitor<Type> {
   private final Set<Integer> selected;
+  private final boolean onlySelected;
+
+  /**
+   * Visits a schema and returns only those element's whose id's have been 
passed as selected
+   * @param selected ids of elements to return
+   * @param onlySelected whether to return only elements which have been 
selected, no sub elements

Review comment:
       After thinking about this and reading more of the PR, I think that the 
boolean should be `selectFullTypes` so that it is clear how maps and lists are 
handled. Additionally, when `selectFullTypes` is `false`, only struct IDs 
should be supported. Maps and lists should not be explicitly selected or else 
there is a problem.




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