diff --git a/be/src/vec/olap/vcollect_iterator.cpp b/be/src/vec/olap/vcollect_iterator.cpp index b34893b6309f40..6112f30a47f8d6 100644 --- a/be/src/vec/olap/vcollect_iterator.cpp +++ b/be/src/vec/olap/vcollect_iterator.cpp @@ -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); } }