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



##########
File path: api/src/main/java/org/apache/iceberg/types/PruneColumns.java
##########
@@ -22,12 +22,14 @@
 import java.util.List;
 import java.util.Set;
 import org.apache.iceberg.Schema;
+import org.apache.iceberg.relocated.com.google.common.base.Preconditions;
 import org.apache.iceberg.relocated.com.google.common.collect.Lists;
 
 class PruneColumns extends TypeUtil.SchemaVisitor<Type> {
   private final Set<Integer> selected;
 
   PruneColumns(Set<Integer> selected) {
+    Preconditions.checkNotNull(selected, "Selected cannot be null");

Review comment:
       Rather than just using the name of the variable, I think this should 
give more context to users when it happens. "Field id set" or "Selected field 
ids" would be better.




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