This is an automated email from the ASF dual-hosted git repository.

caiconghui pushed a commit to branch block_core
in repository https://gitbox.apache.org/repos/asf/doris.git

commit 42f916c7e1b5a6c1b8e01c6a8f9a9d093271c8c2
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 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/be/src/vec/exec/scan/scanner_scheduler.cpp 
b/be/src/vec/exec/scan/scanner_scheduler.cpp
index 023f46cf2c1..52a30e991fd 100644
--- a/be/src/vec/exec/scan/scanner_scheduler.cpp
+++ b/be/src/vec/exec/scan/scanner_scheduler.cpp
@@ -410,10 +410,12 @@ void ScannerScheduler::_scanner_scan(ScannerScheduler* 
scheduler, ScannerContext
             ctx->return_free_block(std::move(block));
         } else {
             if (!blocks.empty() && blocks.back()->rows() + block->rows() <= 
state->batch_size()) {
-                status = 
vectorized::MutableBlock(blocks.back().get()).merge(*block);
+                vectorized::MutableBlock mutable_block(blocks.back().get());
+                status = mutable_block.merge(*block);
                 if (!status.ok()) {
                     break;
                 }
+                
blocks.back()->set_columns(std::move(mutable_block.mutable_columns()));
                 ctx->return_free_block(std::move(block));
             } else {
                 blocks.push_back(std::move(block));


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to