malwaregarry opened a new issue, #36346:
URL: https://github.com/apache/doris/issues/36346

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no 
similar issues.
   
   
   ### Version
   
   2.1.4
   
   ### What's Wrong?
   
   could be related to #36342 
   
   Given the tables:
   ```
   CREATE TABLE t0(c0 INT ) DISTRIBUTED BY HASH (c0) PROPERTIES 
("replication_num" = "1");
   CREATE TABLE t1(c0 INT ) DISTRIBUTED BY HASH (c0) PROPERTIES 
("replication_num" = "1");
   INSERT INTO t1 (c0) VALUES (1);
   INSERT INTO t0 (c0) VALUES (1);
   ```
   
   This returns 1 row:
   `SELECT * FROM  t0 LEFT JOIN t1 ON false;`
   
   This returns false:
   `SELECT 5 IN (t1.c0, 2) from t1;`
   
   However, both queries do not query any rows:
   ```
   SELECT * FROM  t0 LEFT JOIN t1 ON false WHERE (NOT (5 IN (t1.c0, 2)));
   SELECT * FROM  t0 LEFT JOIN t1 ON false WHERE (5 NOT IN (t1.c0, 2));
   ```
   
   ### What You Expected?
   
   The queries return the row
   ```
   SELECT * FROM  t0 LEFT JOIN t1 ON false WHERE (NOT (5 IN (t1.c0, 2)));
   SELECT * FROM  t0 LEFT JOIN t1 ON false WHERE (5 NOT IN (t1.c0, 2));
   ```
   
   ### How to Reproduce?
   
   ```
   DROP DATABASE IF EXISTS doris2;
   CREATE DATABASE doris2;
   USE doris2;
   CREATE TABLE t0(c0 INT ) DISTRIBUTED BY HASH (c0) PROPERTIES 
("replication_num" = "1");
   CREATE TABLE t1(c0 INT ) DISTRIBUTED BY HASH (c0) PROPERTIES 
("replication_num" = "1");
   INSERT INTO t1 (c0) VALUES (1);
   INSERT INTO t0 (c0) VALUES (1);
   SELECT * FROM  t0 LEFT JOIN t1 ON false;
   SELECT * FROM  t0 LEFT JOIN t1 ON false WHERE (NOT (5 IN (t1.c0, 2)));
   SELECT * FROM  t0 LEFT JOIN t1 ON false WHERE (5 NOT IN (t1.c0, 2));
   ```
   
   ### Anything Else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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: commits-unsubscr...@doris.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to