joyhaldar commented on code in PR #14593:
URL: https://github.com/apache/iceberg/pull/14593#discussion_r2544091881


##########
api/src/main/java/org/apache/iceberg/expressions/InclusiveMetricsEvaluator.java:
##########
@@ -381,6 +404,28 @@ public <T> Boolean in(Bound<T> term, Set<T> literalSet) {
     public <T> Boolean notIn(Bound<T> term, Set<T> literalSet) {
       // because the bounds are not necessarily a min or max value, this 
cannot be answered using
       // them. notIn(col, {X, ...}) with (X, Y) doesn't guarantee that X is a 
value in col.
+      // However, when min == max and the file has no nulls or NaN values, we 
can safely prune
+      // if that value is in the exclusion set.
+      int id = term.ref().fieldId();

Review Comment:
   Thank you for the suggestion Manu. I was trying to keep the logic inline to 
match the existing code style in this file.
   
   For example, the methods `eq()`, `in()`, `lt()`, `ltEq()`, `gt()`, `gtEq()`, 
all have similar inline checks
   
   I thought extracting it would be inconsistent with how other methods are 
structured.
   
   However, if you feel this is important for maintainability, I'm happy to 
extract it. Let me know your preference.
   



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