From 3f86a1d27135a59ecac47b43afac2020de2855d7 Mon Sep 17 00:00:00 2001 From: Xin Liao Date: Mon, 28 Oct 2024 10:24:17 +0800 Subject: [PATCH] [fix](agg) Aggregating string types with null values may result in incorrect result when compaction (#42512) Follow-up for #42067. --- be/src/vec/olap/vertical_block_reader.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/be/src/vec/olap/vertical_block_reader.cpp b/be/src/vec/olap/vertical_block_reader.cpp index ee2f52462f830d..dd2c167324f16c 100644 --- a/be/src/vec/olap/vertical_block_reader.cpp +++ b/be/src/vec/olap/vertical_block_reader.cpp @@ -317,10 +317,10 @@ size_t VerticalBlockReader::_copy_agg_data() { auto& dst_column = _stored_data_columns[idx]; if (_stored_has_variable_length_tag[idx]) { //variable length type should replace ordered + dst_column->clear(); for (size_t i = 0; i < copy_size; i++) { auto& ref = _stored_row_ref[i]; - dst_column->replace_column_data(*ref.block->get_by_position(idx).column, - ref.row_pos, i); + dst_column->insert_from(*ref.block->get_by_position(idx).column, ref.row_pos); } } else { for (auto& it : _temp_ref_map) {