Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
review: fix potential bug
  • Loading branch information
2010YOUY01 committed Aug 6, 2026
commit 084f633eefead6041cd1ee4aa229ce3dc810cde7
8 changes: 7 additions & 1 deletion datafusion/physical-plan/src/aggregates/hash_stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1155,7 +1155,13 @@ impl FinalHashAggregateStream {
return Self::break_with_err(e);
}

if self.hit_soft_group_limit(&hash_table) {
// Soft group limits are usually small and rarely coincide with
// spilling. Once spilling has occurred, skip this optimization to
// make the internal logic simpler.
let spilled = spill_context
.as_ref()
.is_some_and(|context| context.has_spills());
if self.hit_soft_group_limit(&hash_table) && !spilled {
let timer = elapsed_compute.timer();
let result = self.start_output(&mut hash_table);
timer.done();
Expand Down
Loading