Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BugFix] Fix chunk accumulator miss assign _max_size (backport #52579) #52596

Merged
merged 3 commits into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Status SpillableAggregateBlockingSourceOperator::prepare(RuntimeState* state) {
RETURN_IF_ERROR(AggregateBlockingSourceOperator::prepare(state));
RETURN_IF_ERROR(_stream_aggregator->prepare(state, state->obj_pool(), _unique_metrics.get()));
RETURN_IF_ERROR(_stream_aggregator->open(state));
_accumulator.set_max_size(state->chunk_size());
return Status::OK();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ Status SpillableAggregateDistinctBlockingSourceOperator::prepare(RuntimeState* s
RETURN_IF_ERROR(AggregateDistinctBlockingSourceOperator::prepare(state));
RETURN_IF_ERROR(_stream_aggregator->prepare(state, state->obj_pool(), _unique_metrics.get()));
RETURN_IF_ERROR(_stream_aggregator->open(state));
_accumulator.set_max_size(state->chunk_size());
return Status::OK();
}

Expand Down
1 change: 1 addition & 0 deletions be/src/exec/pipeline/hash_partition_context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ Status HashPartitionContext::prepare(RuntimeState* state, RuntimeProfile* profil
_has_nullable_key = _has_nullable_key || _partition_types[i].is_nullable;
}

_acc.set_max_size(state->chunk_size());
_chunks_partitioner = std::make_unique<ChunksPartitioner>(_has_nullable_key, _partition_exprs, _partition_types);
return _chunks_partitioner->prepare(state, profile);
}
Expand Down
2 changes: 1 addition & 1 deletion test/sql/test_spill/R/test_spill_aggregate
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ insert into t2 select sum(k1),k2 from t1 group by k2;
select * from t2;
-- result:
1 1
-- !result
-- !result
2 changes: 1 addition & 1 deletion test/sql/test_spill/T/test_spill_aggregate
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ DUPLICATE KEY(k1)
DISTRIBUTED BY HASH(k1) PROPERTIES('replication_num'='1');
insert into t1 values (1,"1");
insert into t2 select sum(k1),k2 from t1 group by k2;
select * from t2;
select * from t2;
Loading