CuteChuanChuan opened a new pull request, #27307: URL: https://github.com/apache/datafusion/pull/27307
## Which issue does this PR close? - Closes #27220. ## Rationale for this change As stated in #27220, `count(*) FILTER (WHERE ...)` over an aggregate subquery fails to plan with an internal error from `aggregate_statistics`. ## What changes are included in this PR? As pointed out in the issue, `take_optimizable` now stops at the first `AggregateExec` below a `Final` and uses it only if it is usable (raw input, no `GROUP BY`, no filter). ## What is the testing strategy for this PR? Added tests provided in issue into `aggregate.slt`. ## 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]
