Skip to content

Commit 76f5aba

Browse files
committed
tmp
1 parent 809ddc9 commit 76f5aba

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

datafusion/functions-aggregate-common/src/aggregate/groups_accumulator.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,7 @@ impl GroupsAccumulatorAdapter {
132132
let new_accumulators = input_batch_size - self.convert_state_buffer.len();
133133
for _ in 0..new_accumulators {
134134
let accumulator = (self.factory)()?;
135-
let state = AccumulatorState::new(accumulator);
136-
self.add_allocation(state.size());
137-
self.states.push(state);
135+
self.convert_state_buffer.push(accumulator);
138136
}
139137

140138
self.adjust_allocation(

datafusion/sqllogictest/test_files/aggregate_skip_partial.slt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,17 @@ GROUP BY 1, 2 ORDER BY 1 LIMIT 5;
117117
-2117946883 d -2117946883 NULL NULL NULL
118118
-2098805236 c -2098805236 NULL NULL NULL
119119

120+
query I
121+
SELECT MEDIAN(c5)
122+
FROM aggregate_test_100
123+
GROUP BY c1 ORDER BY c1 LIMIT 5;
124+
----
125+
623103518
126+
41423756
127+
-382483011
128+
16122795
129+
427197269
130+
120131
# Prepare settings to always skip aggregation after couple of batches
121132
statement ok
122133
set datafusion.execution.skip_partial_aggregation_probe_rows_threshold = 10;

0 commit comments

Comments
 (0)