rdblue commented on code in PR #17433:
URL: https://github.com/apache/iceberg/pull/17433#discussion_r3779912890


##########
core/src/main/java/org/apache/iceberg/V4ManifestReader.java:
##########
@@ -252,6 +272,29 @@ Builder project(Schema newProjection) {
       return this;
     }
 
+    /**
+     * Reads content stats for the given table field IDs instead of for every 
field. Stats for
+     * fields referenced by the {@link #filter(Expression) filter} are always 
read.
+     *
+     * <p>Passing no field IDs reads only the stats that the filter needs.
+     */
+    Builder projectStats(int... fieldIds) {
+      Preconditions.checkArgument(fieldIds != null, "Invalid stats projection 
for field IDs: null");

Review Comment:
   I don't think this error message makes sense. The stats projection isn't 
invalid for null field IDs, the ids passed to the method are invalid because 
they are null. This should be `"Invalid field IDs: null"`.



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