korowa commented on issue #10583:
URL: https://github.com/apache/datafusion/issues/10583#issuecomment-2280113266

   I'll just add one more example here in order to show that the problem is 
related not only to non-correlated subqueries
   ```sql
   CREATE TABLE IF NOT EXISTS test_table(c1 INT, c2 INT) AS VALUES
   (1, 1),
   (2, 2),
   (3, 3),
   (4, null),
   (4, 7),
   (null, 0);
   
   SELECT * FROM test_table t1 WHERE c1 NOT IN (SELECT c2 FROM test_table t2 
where t1.c1 = t2.c1);
   +----+----+
   | c1 | c2 |
   +----+----+
   | 4  |    |
   | 4  | 7  |
   |    | 0  |
   +----+----+
   ```
   
   while PG returns
   ```sql
   CREATE TABLE
   INSERT 0 6
    c1 | c2 
   ----+----
       |  0
   (1 row)
   ```


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