alamb opened a new pull request, #24640: URL: https://github.com/apache/datafusion/pull/24640
## Which issue does this PR close? - Related to #22710 and #24486 - Follow on to #20019 ## Rationale for this change When `AggregateMode::PartialReduce` was added in #20019, the intention was always that it is purely a best-effort optimization: it reduces the volume of intermediate aggregate state (for example, before sending it over the network in a distributed plan), but its output carries the same contract as `Partial` output — it is not required to be fully reduced, and consumers must merge it regardless. However, this contract was never explicitly written down, which came up while reviewing #24486: the valid strategies for handling memory pressure in `PartialReduce` (such as emitting accumulated state early, or passing input through unchanged, rather than erroring) follow directly from this contract, so it is worth documenting explicitly. ## What changes are included in this PR? Documentation only (no code changes): add a "Best-Effort Reduction" section to the `AggregateMode::PartialReduce` variant docs stating the output contract. ## Are these changes tested? Covered by CI docs checks (`cargo doc` passes with `-D warnings`). ## Are there any user-facing changes? Documentation only. -- 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]
