docs: Document expectations of PartialReduce aggregate mode - #24640
Merged
Conversation
alamb
commented
Aug 24, 2026
| /// <https://github.com/datafusion-contrib/datafusion-distributed/issues/360> | ||
| /// for details. | ||
| /// | ||
| /// # Best-Effort Reduction |
Contributor
Author
There was a problem hiding this comment.
@njsmith and @gabotechs does this match your understanding of what PartialReduce is supposed to do?
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #24640 +/- ##
==========================================
- Coverage 81.43% 81.43% -0.01%
==========================================
Files 1118 1118
Lines 399414 399414
Branches 399414 399414
==========================================
- Hits 325278 325275 -3
Misses 55145 55145
- Partials 18991 18994 +3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
2010YOUY01
approved these changes
Aug 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Rationale for this change
When
AggregateMode::PartialReducewas added in #20019 from @njsmith, I believe the intention was 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 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 I was reviewing #24486 from @2010YOUY01
What changes are included in this PR?
Documentation only (no code changes): add a "Best-Effort Reduction" section to
the
AggregateMode::PartialReducevariant docs stating the output contract.Are these changes tested?
Covered by CI docs checks (
cargo docpasses with-D warnings).Are there any user-facing changes?
Documentation only.