Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions datafusion/physical-plan/src/aggregates/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,17 @@ pub enum AggregateMode {
/// This reduces shuffling traffic in a distributed setting. See
/// <https://github.com/datafusion-contrib/datafusion-distributed/issues/360>
/// for details.
///
/// # Best-Effort Reduction

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@njsmith and @gabotechs does this match your understanding of what PartialReduce is supposed to do?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does yeah

///
/// `PartialReduce` is meant as an optimization: it reduces the volume of
/// intermediate state (for example, before sending it over the network),
/// and thus its output may not be fully reduced. In particular, an
/// implementation may emit partially merged state, or pass its input
/// through unchanged (for example, under memory pressure), so the same
/// group key may appear in multiple output batches. Consumers must merge
/// the output of a `PartialReduce` aggregation exactly as they would
/// merge the output of a `Partial` aggregation.
PartialReduce,
}

Expand Down