From b35171b58271b45d58d97171bd81b3aac0cd286b Mon Sep 17 00:00:00 2001 From: Gabriel Date: Thu, 28 Sep 2023 14:01:26 +0800 Subject: [PATCH] [pipelineX](bug) fix distinct streaming agg (#24995) --- .../exec/distinct_streaming_aggregation_sink_operator.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/be/src/pipeline/exec/distinct_streaming_aggregation_sink_operator.cpp b/be/src/pipeline/exec/distinct_streaming_aggregation_sink_operator.cpp index 4fa798194c..9f0fafeb54 100644 --- a/be/src/pipeline/exec/distinct_streaming_aggregation_sink_operator.cpp +++ b/be/src/pipeline/exec/distinct_streaming_aggregation_sink_operator.cpp @@ -175,8 +175,9 @@ void DistinctStreamingAggSinkLocalState::_emplace_into_hash_table_to_distinct( agg_method.data.prefetch_by_hash( _hash_values[i + HASH_MAP_PREFETCH_DIST]); } - auto result = state.emplace_with_key(agg_method.data, keys[i], - _hash_values[i], i); + auto result = state.emplace_with_key( + agg_method.data, state.pack_key_holder(keys[i], *_agg_arena_pool), + _hash_values[i], i); if (result.is_inserted()) { distinct_row.push_back(i); }