Skip to content
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
8 changes: 8 additions & 0 deletions be/src/pipeline/exec/aggregation_source_operator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,14 @@ size_t AggSourceOperatorX::get_estimated_memory_size_for_merging(RuntimeState* s
return size;
}

Status AggSourceOperatorX::reset_hash_table(RuntimeState* state) {
auto& local_state = get_local_state(state);
auto& ss = *local_state.Base::_shared_state;
RETURN_IF_ERROR(ss.reset_hash_table());
ss.agg_arena_pool.clear(true);
return Status::OK();
}

void AggLocalState::_emplace_into_hash_table(vectorized::AggregateDataPtr* places,
vectorized::ColumnRawPtrs& key_columns,
uint32_t num_rows) {
Expand Down
2 changes: 2 additions & 0 deletions be/src/pipeline/exec/aggregation_source_operator.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ class AggSourceOperatorX : public OperatorX<AggLocalState> {

size_t get_estimated_memory_size_for_merging(RuntimeState* state, size_t rows) const;

Status reset_hash_table(RuntimeState* state);

private:
friend class AggLocalState;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ Status PartitionedAggSourceOperatorX::get_block(RuntimeState* state, vectorized:
if (!local_state._shared_state->spill_partitions.empty()) {
local_state._current_partition_eos = false;
local_state._need_to_merge_data_for_current_partition = true;
status = local_state._shared_state->in_mem_shared_state->reset_hash_table();
status = _agg_source_operator->reset_hash_table(runtime_state);
RETURN_IF_ERROR(status);
*eos = false;
}
Expand Down
Loading