aokolnychyi commented on a change in pull request #3578:
URL: https://github.com/apache/iceberg/pull/3578#discussion_r752799663



##########
File path: 
api/src/main/java/org/apache/iceberg/expressions/StrictMetricsEvaluator.java
##########
@@ -392,7 +392,12 @@ public Boolean or(Boolean leftResult, Boolean rightResult) 
{
       Types.NestedField field = struct.field(id);
       Preconditions.checkNotNull(field, "Cannot filter by nested column: %s", 
schema.findField(id));
 
-      if (containsNullsOnly(id) || containsNaNsOnly(id)) {
+      if (canContainNulls(id)) {
+        // NOT null IN (1, 2) -> NOT null -> null -> false in filters
+        return ROWS_MIGHT_NOT_MATCH;
+      }
+
+      if (containsNaNsOnly(id)) {

Review comment:
       I have a question about the NaN semantics. Do we consider `NaN == NaN`? 
Looks like not. I think most databases consider NaN values equivalent even 
though it is against the standard. I guess Spark follows Postgres.
   
   @yyanyy, could you clarify?




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