blaginin opened a new pull request, #13326: URL: https://github.com/apache/datafusion/pull/13326
## Which issue does this PR close? Closes #12773 ## Rationale for this change When parsing a query into a logical plan, aggregation precedes projection. But optimiser can eliminate projection, leaving aggregation as a top node. This is not expected by `select_to_sql_recursively` because it always handles projection and aggregation together. ## What changes are included in this PR? Added a separate branch if aggregation is the top node. ## Are these changes tested? Yes, added a new test ## Are there any user-facing changes? No -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
