Skip to content

Commit 64bde86

Browse files
liaoxin01xiaokang
authored andcommitted
[fix](agg) Aggregating string types with null values may result in incorrect result when compaction (#42512)
Follow-up for #42067.
1 parent 4a6b26e commit 64bde86

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

be/src/vec/olap/vertical_block_reader.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -317,10 +317,10 @@ size_t VerticalBlockReader::_copy_agg_data() {
317317
auto& dst_column = _stored_data_columns[idx];
318318
if (_stored_has_variable_length_tag[idx]) {
319319
//variable length type should replace ordered
320+
dst_column->clear();
320321
for (size_t i = 0; i < copy_size; i++) {
321322
auto& ref = _stored_row_ref[i];
322-
dst_column->replace_column_data(*ref.block->get_by_position(idx).column,
323-
ref.row_pos, i);
323+
dst_column->insert_from(*ref.block->get_by_position(idx).column, ref.row_pos);
324324
}
325325
} else {
326326
for (auto& it : _temp_ref_map) {

0 commit comments

Comments
 (0)