This is an automated email from the ASF dual-hosted git repository. lihaopeng pushed a commit to branch branch-1.2-lts in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-1.2-lts by this push: new 120d69a37b1 [fix](block) fix be core while mutable block merge may cause different row size between columns in origin block (#28850) 120d69a37b1 is described below commit 120d69a37b1fa53ebd3c7ec7f7d761be4f47e634 Author: caiconghui <55968745+caicong...@users.noreply.github.com> AuthorDate: Fri Dec 22 16:00:36 2023 +0800 [fix](block) fix be core while mutable block merge may cause different row size between columns in origin block (#28850) Co-authored-by: caiconghui1 <caicongh...@jd.com> --- be/src/vec/exec/scan/scanner_scheduler.cpp | 4 +++- be/src/vec/exec/vunion_node.cpp | 11 +++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/be/src/vec/exec/scan/scanner_scheduler.cpp b/be/src/vec/exec/scan/scanner_scheduler.cpp index 7b7e3aeac50..32cefe6e822 100644 --- a/be/src/vec/exec/scan/scanner_scheduler.cpp +++ b/be/src/vec/exec/scan/scanner_scheduler.cpp @@ -269,7 +269,9 @@ void ScannerScheduler::_scanner_scan(ScannerScheduler* scheduler, ScannerContext ctx->return_free_block(block); } else { if (!blocks.empty() && blocks.back()->rows() + block->rows() <= state->batch_size()) { - vectorized::MutableBlock(blocks.back()).merge(*block); + vectorized::MutableBlock mutable_block(blocks.back()); + mutable_block.merge(*block); + blocks.back()->set_columns(std::move(mutable_block.mutable_columns())); ctx->return_free_block(block); } else { blocks.push_back(block); diff --git a/be/src/vec/exec/vunion_node.cpp b/be/src/vec/exec/vunion_node.cpp index 8afe5bce8df..199782b577b 100644 --- a/be/src/vec/exec/vunion_node.cpp +++ b/be/src/vec/exec/vunion_node.cpp @@ -171,9 +171,9 @@ Status VUnionNode::get_next_materialized(RuntimeState* state, Block* block) { } } - if (!mem_reuse) { - block->swap(mblock.to_block()); - } + + block->swap(mblock.to_block()); + DCHECK_LE(_child_idx, _children.size()); return Status::OK(); @@ -204,9 +204,8 @@ Status VUnionNode::get_next_const(RuntimeState* state, Block* block) { } } - if (!mem_reuse) { - block->swap(mblock.to_block()); - } + + block->swap(mblock.to_block()); // some insert query like "insert into string_test select 1, repeat('a', 1024 * 1024);" // the const expr will be in output expr cause the union node return a empty block. so here we --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org