This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 2325118cdb2 [fix](agg) Fix nullptr access (#34440)
2325118cdb2 is described below
commit 2325118cdb24238b25d4c00c79a51ffe971f2a49
Author: Gabriel <[email protected]>
AuthorDate: Mon May 6 23:03:00 2024 +0800
[fix](agg) Fix nullptr access (#34440)
---
be/src/pipeline/exec/aggregation_source_operator.cpp | 5 ++++-
be/src/vec/common/hash_table/hash_map_context.h | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/be/src/pipeline/exec/aggregation_source_operator.cpp
b/be/src/pipeline/exec/aggregation_source_operator.cpp
index 2045d0e62ff..33e095b9612 100644
--- a/be/src/pipeline/exec/aggregation_source_operator.cpp
+++ b/be/src/pipeline/exec/aggregation_source_operator.cpp
@@ -654,8 +654,11 @@ Status AggLocalState::close(RuntimeState* state) {
// Do nothing
},
[&](auto& agg_method) {
-
COUNTER_SET(_hash_table_size_counter,
+ if (agg_method.hash_table) {
+ COUNTER_SET(
+
_hash_table_size_counter,
int64_t(agg_method.hash_table->size()));
+ }
}},
_shared_state->agg_data->method_variant);
}
diff --git a/be/src/vec/common/hash_table/hash_map_context.h
b/be/src/vec/common/hash_table/hash_map_context.h
index f52be441dd6..e607eba6c18 100644
--- a/be/src/vec/common/hash_table/hash_map_context.h
+++ b/be/src/vec/common/hash_table/hash_map_context.h
@@ -48,7 +48,7 @@ struct MethodBaseInner {
using Value = typename HashMap::value_type;
using HashMapType = HashMap;
- std::shared_ptr<HashMap> hash_table;
+ std::shared_ptr<HashMap> hash_table = nullptr;
bool inited_iterator = false;
Key* keys = nullptr;
Arena arena;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]