Skip to content

Commit 3c4948f

Browse files
committed
Update aggregate probe to be locked only if skipping
1 parent 10706ae commit 3c4948f

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

datafusion/physical-plan/src/aggregates/row_hash.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,9 @@ impl SkipAggregationProbe {
194194
if self.input_rows >= self.probe_rows_threshold {
195195
self.should_skip = self.num_groups as f64 / self.input_rows as f64
196196
>= self.probe_ratio_threshold;
197-
self.is_locked = true;
197+
// Set is_locked to true only if we have decided to skip, otherwise we can try to skip
198+
// during processing the next record_batch.
199+
self.is_locked = self.should_skip;
198200
}
199201
}
200202

0 commit comments

Comments
 (0)