anesterenok opened a new issue, #18124:
URL: https://github.com/apache/iceberg/issues/18124

   ### Apache Iceberg version
   
   1.11.0 (latest release)
   
   ### Query engine
   
   None
   
   ### Please describe the bug 🐞
   
   Repro in 
[EvaluatorTest.java](https://github.com/user-attachments/files/32233759/EvaluatorTest.java)
   
   Issue: when filtering by condition "\<field> IN (X, Y)", if record field is 
null and has type "string", `Evaluator` fails with the following NPE:
   ```
   Invalid object: null
   java.lang.NullPointerException: Invalid object: null
        at 
org.apache.iceberg.relocated.com.google.common.base.Preconditions.checkNotNull(Preconditions.java:974)
        at org.apache.iceberg.util.WrapperSet.contains(WrapperSet.java:72)
        at 
org.apache.iceberg.util.CharSequenceSet.contains(CharSequenceSet.java:24)
        at 
org.apache.iceberg.expressions.Evaluator$EvalVisitor.in(Evaluator.java:141)
        at 
org.apache.iceberg.expressions.Evaluator$EvalVisitor.in(Evaluator.java:51)
        at 
org.apache.iceberg.expressions.ExpressionVisitors$BoundVisitor.predicate(ExpressionVisitors.java:313)
        at 
org.apache.iceberg.expressions.ExpressionVisitors.visitEvaluator(ExpressionVisitors.java:390)
        at 
org.apache.iceberg.expressions.Evaluator$EvalVisitor.eval(Evaluator.java:56)
   ``` 
   
   This doesn't seem right, as other field types filter just fine for the same 
condition. 
   In repro, null and not-null int fields run without errors, as does not-null 
string field, but null string field fails.
   
   I believe this has to do with `WrapperSet.contains()` impl - though the IN 
set itself may be optimized to not contain nulls, it's hardly possible for 
input data.
   
   ### Willingness to contribute
   
   - [ ] I can contribute a fix for this bug independently
   - [ ] I would be willing to contribute a fix for this bug with guidance from 
the Iceberg community
   - [x] I cannot contribute a fix for this bug at this time


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