jayzhan211 commented on issue #24960:
URL: https://github.com/apache/datafusion/issues/24960#issuecomment-6367423894

   On main (ebf4858189) the `IN`/`NOT IN` forms still return wrong rows rather 
than a "not implemented" error:
   
   ```sql
   CREATE TABLE t1(a INT) AS VALUES (1),(2);
   CREATE TABLE t2(a INT, b INT) AS VALUES (1,10),(1,NULL);
   SELECT a FROM t1 WHERE 0 IN (SELECT count(*) FROM t2 WHERE t2.a = t1.a);     
 -- returns no rows, expected 2
   SELECT a FROM t1 WHERE 0 NOT IN (SELECT count(*) FROM t2 WHERE t2.a = t1.a); 
 -- returns 1, 2, expected 1
   SELECT a, 0 IN (SELECT count(*) FROM t2 WHERE t2.a = t1.a) FROM t1;          
 -- a = 2 gives false, expected true
   ```
   
   The IN path never turns on the count bug handling 
(`decorrelate_predicate_subquery.rs`, `build_join` runs the pull up with it on 
only for `EXISTS`).
   


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