ygf11 commented on issue #4914:
URL: 
https://github.com/apache/arrow-datafusion/issues/4914#issuecomment-1385350697

   The `DecorrelateWhereExists` also has same problem.
   ```sql
   ❯ explain verbose
   select *
   from t1
   where exists
   (
       select 1 from t2 where t1.a = t2.a
   )
         and exists
   (
       select 1 from t2 where t1.b = t2.b
   )
         and t1.c > 0;
   
   | logical_plan after decorrelate_where_exists                | Projection: 
t1.a, t1.b, t1.c                                                                
                                          |
   |                                                            |   Filter: 
t1.c > Int32(0) --- filter                                                      
                                                      |
   |                                                            |     LeftSemi 
Join: t1.b = t2.b                                                               
                                         |
   |                                                            |       Filter: 
t1.c > Int32(0) ---filter                                                       
                                                 |
   |                                                            |         
LeftSemi Join: t1.a = t2.a                                                      
                                              |
   |                                                            |           
TableScan: t1                                                                   
                                            |
   |                                                            |           
TableScan: t2                                                                   
                                            |
   |                                                            |       
TableScan: t2  
   ```


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