Skip to content

Commit efd0f55

Browse files
committed
Optimize deferred batch handling in StringAggGroupsAccumulator
1 parent 1d84b45 commit efd0f55

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

datafusion/functions-aggregate/src/string_agg.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -629,9 +629,7 @@ impl GroupsAccumulator for StringAggGroupsAccumulator {
629629
self.values.resize(total_num_groups, None);
630630
let array = apply_filter_as_nulls(&values[0], opt_filter)?;
631631

632-
if self.deferred.is_some() {
633-
self.defer_batch(array, group_indices)?;
634-
} else if self.should_promote(&array, total_num_groups) {
632+
if self.deferred.is_some() || self.should_promote(&array, total_num_groups) {
635633
self.defer_batch(array, group_indices)?;
636634
} else {
637635
self.append_eager_batch(&array, group_indices)?;

0 commit comments

Comments
 (0)