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


##########
core/src/main/java/org/apache/iceberg/FieldStatsStruct.java:
##########
@@ -143,18 +143,38 @@ public boolean tightBounds() {
     return tightBounds;
   }
 
+  @Override
+  public boolean hasValueCount() {
+    return valueCount != null;
+  }
+
   @Override
   public long valueCount() {
+    Preconditions.checkState(hasValueCount(), "Field %s does not track a value 
count", fieldId);

Review Comment:
   I think this and similar checks should be removed. We don't need extra 
checks in tight loops that are only going to slow down scan planning. If this 
is called when the value count is missing then it is a bug in the caller.



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