devinjdangelo opened a new pull request, #9623:
URL: https://github.com/apache/arrow-datafusion/pull/9623
## Which issue does this PR close?
Follow on to #9606
## Rationale for this change
Based on review comment from @seddonm1 I wanted to see if I could make the
following examples like the following pass in unparser:
```
Sort: COUNT(*) ASC NULLS LAST
Projection: person.id, COUNT(*), person.first_name
Filter: COUNT(*) > Int64(5)
Aggregate: groupBy=[[person.first_name, person.id]], aggr=[[COUNT(*)]]
TableScan: person
```
```SQL
select id, count(*), first_name
from person
group by first_name, id
having count(*)>5
order by count(*)
```
## What changes are included in this PR?
1. Simplifies the logic from #9606 to support aggregation plans (no more
lookaheads needed)
2. Adds logic to filter plan to SQL to determine (at least in some cases) if
it is actually a HAVING clause
## Are these changes tested?
Yes
## Are there any user-facing changes?
Having queries can be deserialized back to SQL from LogicalPlan (at least
sometimes) now
--
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]