Skip to content

Commit

Permalink
Do not skip partial aggregates in case where there are no aggregate e…
Browse files Browse the repository at this point in the history
…xpressions
  • Loading branch information
andygrove committed Aug 7, 2024
1 parent 1ecdf90 commit ce300c7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions datafusion/physical-plan/src/aggregates/row_hash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -463,11 +463,13 @@ impl GroupedHashAggregateStream {
// - aggregation mode is Partial
// - input is not ordered by GROUP BY expressions,
// since Final mode expects unique group values as its input
// - there is at least one accumulator
// - all accumulators support input batch to intermediate
// aggregate state conversion
// - there is only one GROUP BY expressions set
let skip_aggregation_probe = if agg.mode == AggregateMode::Partial
&& matches!(group_ordering, GroupOrdering::None)
&& !accumulators.is_empty()
&& accumulators
.iter()
.all(|acc| acc.supports_convert_to_state())
Expand Down

0 comments on commit ce300c7

Please sign in to comment.