devinjdangelo opened a new pull request, #9606:
URL: https://github.com/apache/arrow-datafusion/pull/9606

   ## Which issue does this PR close?
   
   works on #8661
   
   ## Rationale for this change
   
   See issue
   
   ## What changes are included in this PR?
   
   Adds support for aggregation and subquery plan nodes converting to a SQL AST
   
   For example, one can now convert
   
   ```
   Projection: p1.id, COUNT(*) AS cnt
     Aggregate: groupBy=[[p1.id]], aggr=[[COUNT(*)]]
       Projection: p1.id
         Inner Join:  Filter: p1.id = p2.id
           SubqueryAlias: p1
             TableScan: person
           SubqueryAlias: p2
             TableScan: person
   ```
   
   to
   ```sql
   SELECT p1.id, COUNT(*) AS cnt 
   FROM (
       SELECT p1.id 
       FROM person AS p1 
       JOIN person AS p2 
       ON (p1.id = p2.id)
   ) 
   GROUP BY p1.id
   ```
   
   ## Are these changes tested?
   
   Yes, new roundtrip tests are added
   
   ## Are there any user-facing changes?
   
   More plans supported


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