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); }