xieshuaihu opened a new issue, #6931:
URL: https://github.com/apache/paimon/issues/6931

   ### Search before asking
   
   - [x] I searched in the [issues](https://github.com/apache/paimon/issues) 
and found nothing similar.
   
   
   ### Paimon version
   
   Latest version,  1.4-SNAPSHOT
   
   ### Compute Engine
   
   Spark
   
   ### Minimal reproduce step
   
   Step 1: prepare data
   ```SQL
   CREATE TABLE T (a INT, b INT);
   INSERT INTO T VALUES (1, null);
   ```
   
   Step 2: this result is true
   ```
   SELECT !(b <=> 1) FROM T;
   ```
   
   Step 3: but this return empty rows
   ```
   SELECT a, b FROM T WHERE !(b <=> 1);
   ```
   
   ### What doesn't meet your expectations?
   
   After filter pushdown, the result is not correct.
   
   Spark supports `Equal (i.e. =)` and `EqualNullSafe (i.e. <=>)`. After 
pushdown, paimon treat both as `Equal` and simplify `Not Equal (two predicate 
expressions)` as `NotEqual (one predicate expression)`.
   
   This are differences between spark and paimon when col is null:
   
   ||WHERE col = 1|WHERE col <=> 1|WHERE !(col = 1)|WHERE !(col <=> 1)|
   |-|-|-|-|-|
   |spark|false|false|false|**true**|
   |paimon|false|false|false|**false**|
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [x] I'm willing to submit a PR!


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

Reply via email to