Skip to content

Commit

Permalink
[fix](compaction)Fix cluster key column duplicated in value columns g…
Browse files Browse the repository at this point in the history
…roup

`key_columns` will be used after move.
This will cause skip in construction of `value_columns` useless.
  • Loading branch information
qidaye committed Nov 26, 2024
1 parent ac6cd94 commit 33cc312
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions be/src/olap/merger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,10 +199,6 @@ void Merger::vertical_split_columns(const TabletSchema& tablet_schema,
}
VLOG_NOTICE << "sequence_col_idx=" << sequence_col_idx
<< ", delete_sign_idx=" << delete_sign_idx;
// for duplicate no keys
if (!key_columns.empty()) {
column_groups->emplace_back(std::move(key_columns));
}

std::vector<uint32_t> value_columns;

Expand All @@ -220,6 +216,10 @@ void Merger::vertical_split_columns(const TabletSchema& tablet_schema,
value_columns.push_back(i);
}

// for duplicate no keys
if (!key_columns.empty()) {
column_groups->emplace_back(std::move(key_columns));
}
if (!value_columns.empty()) {
column_groups->push_back(value_columns);
}
Expand Down

0 comments on commit 33cc312

Please sign in to comment.