jackwener commented on PR #4767:
URL: 
https://github.com/apache/arrow-datafusion/pull/4767#issuecomment-1402157951

   ```sql
   #[test]
   fn exists_subquery() {
       let sql = "SELECT id FROM person p WHERE EXISTS \
               (SELECT first_name FROM person \
               WHERE last_name = p.last_name \
               AND state = p.state)";
   
       let expected = "Projection: p.id\
           \n  Filter: EXISTS (<subquery>)\
           \n    Subquery:\
           \n      Projection: person.first_name\
           \n        Filter: person.last_name = p.last_name AND person.state = 
p.state\
           \n          TableScan: person\
           \n    SubqueryAlias: p\
           \n      TableScan: person";
       quick_test(sql, expected);
   }
   ```
   
   looks like `exists` subquery also can  generate a Subquery Alias. @mingmwang 


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