neilconway opened a new pull request, #22780: URL: https://github.com/apache/datafusion/pull/22780
## Which issue does this PR close? - Closes #22779 ## Rationale for this change A partial aggregate with no group by expression emits one row per output partition, even for input partitions that did not receive any rows. The stats code gets this incorrect, and claims that the partial agg outputs `Exact(0)` rows in this scenario. This is off by a factor of `partition_count`, which can lead to suboptimal planning decisions downstream. ## What changes are included in this PR? * Pass the requested partition into `statistics_inner` and adjust `statistics_inner` as described above * Tighten optimizer metadata for grouping sets queries (minor correctness fix) * Add/extend existing unit tests ## Are these changes tested? Yes; new tests added. ## 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]
