Skip to content

Commit

Permalink
[Fix](topn opt) prevent from merge __TEMP__ column in segment iterator (
Browse files Browse the repository at this point in the history
  • Loading branch information
eldenmoon authored Dec 27, 2023
1 parent dd92160 commit d2bf26e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion be/src/vec/olap/vcollect_iterator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -256,11 +256,14 @@ Status VCollectIterator::_topn_next(Block* block) {

auto clone_block = block->clone_empty();
MutableBlock mutable_block = vectorized::MutableBlock::build_mutable_block(&clone_block);
// clear TMPE columns to avoid column align problem in mutable_block.add_rows bellow
// clear TEMP columns to avoid column align problem in mutable_block.add_rows bellow
auto all_column_names = mutable_block.get_names();
for (auto& name : all_column_names) {
if (name.rfind(BeConsts::BLOCK_TEMP_COLUMN_PREFIX, 0) == 0) {
mutable_block.erase(name);
// clear TEMP columns from block to prevent from storage engine merge with this
// fake column
block->erase(name);
}
}

Expand Down

0 comments on commit d2bf26e

Please sign in to comment.