mingmwang opened a new issue, #5492:
URL: https://github.com/apache/arrow-datafusion/issues/5492

   **Is your feature request related to a problem or challenge? Please describe 
what you are trying to do.**
   <!--
   A clear and concise description of what the problem is. Ex. I'm always 
frustrated when [...] 
   (This section helps Arrow developers understand the context and *why* for 
this feature, in addition to  the *what*)
   -->
   
   In the current DataFusion, it has very limited support for correlated 
subqueries. It can only decorrelate the (NOT) IN/Exists predicate subqueries to 
Semi/Anti Joins.  Even in the simplest IN/Exists cases, if the correlated 
expressions are not in the Filter/Join conditions, the current decorrelate 
rules will not support them.
   
   In the paper "Unnesting Arbitrary Queries" by T. Neumann; A. Kemper
   
(http://www.btw-2015.de/res/proceedings/Hauptband/Wiss/Neumann-Unnesting_Arbitrary_Querie.pdf).
 It raise a mechanism to unnest arbitrary queries.   This  was already 
implemented by the Hyper DB:
   
   For example:
   select * from  orders
   where 1 in (select 1 from part left join (select l_partkey from lineitem 
where o_orderkey = 2) lineitem on p_partkey = lineitem.l_partkey)
   
   https://hyper-db.de/interface.html#
   
   Both SparkSQL and PostgreSQL do not support decorrelate such kind of queries.
   
   **Describe the solution you'd like**
   <!--
   A clear and concise description of what you want to happen.
   -->
   
   
   **Describe alternatives you've considered**
   <!--
   A clear and concise description of any alternative solutions or features 
you've considered.
   -->
   
   **Additional context**
   <!--
   Add any other context or screenshots about the feature request here.
   -->
   


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