manuzhang commented on code in PR #15064:
URL: https://github.com/apache/iceberg/pull/15064#discussion_r2706928017


##########
api/src/main/java/org/apache/iceberg/expressions/ManifestEvaluator.java:
##########
@@ -400,6 +416,40 @@ public <T> Boolean notStartsWith(BoundReference<T> ref, 
Literal<T> lit) {
       return ROWS_MIGHT_MATCH;
     }
 
+    /**
+     * Returns the partition field's single value if all partitions contain 
the same value. Defined
+     * as a partition field with no nulls, no NaNs, and lower bound equals 
upper bound. Returns null
+     * otherwise.
+     */
+    private <T> T uniqueValue(BoundReference<T> ref) {
+      int pos = Accessors.toPosition(ref.accessor());
+      PartitionFieldSummary fieldStats = stats.get(pos);
+
+      if (fieldStats.containsNull()) {
+        return null;
+      }
+
+      if (fieldStats.containsNaN() == null || fieldStats.containsNaN()) {

Review Comment:
   I think we can just combine the above two cases (`if`s)



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