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

eldenmoon pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-2.0 by this push:
     new 5a3a9208820 [bugfix](topn) fix coredump in copy_column_data_to_block 
when nullable mismatch
5a3a9208820 is described below

commit 5a3a9208820821c4437b19e0ced907f63399ad4f
Author: Kang <kxiao.ti...@gmail.com>
AuthorDate: Wed Nov 29 19:43:03 2023 +0800

    [bugfix](topn) fix coredump in copy_column_data_to_block when nullable 
mismatch
    
    return RuntimeError if copy_column_data_to_block nullable mismatch to avoid 
coredump in input_col_ptr->filter_by_selector(sel_rowid_idx, select_size, 
raw_res_ptr) .
    
    The problem is reported by a doris user but I can not reproduce it, so 
there is no testcase added currently.
---
 be/src/vec/core/block.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/be/src/vec/core/block.h b/be/src/vec/core/block.h
index ebb0f6e23d9..939597d50b6 100644
--- a/be/src/vec/core/block.h
+++ b/be/src/vec/core/block.h
@@ -154,6 +154,12 @@ public:
                     
reinterpret_cast<vectorized::ColumnNullable*>(raw_res_ptr.get());
             
col_ptr_nullable->get_null_map_column().insert_many_defaults(select_size);
             raw_res_ptr = col_ptr_nullable->get_nested_column_ptr();
+        } else if (!raw_res_ptr->is_nullable() && 
input_col_ptr->is_nullable()) {
+            LOG(WARNING) << "nullable mismatch for raw_res_column: "
+                         << this->get_by_position(block_cid).dump_structure()
+                         << " input_column: " << 
input_col_ptr->dump_structure()
+                         << " block_cid: " << block_cid << " select_size: " << 
select_size;
+            return Status::RuntimeError("copy_column_data_to_block nullable 
mismatch");
         }
 
         return input_col_ptr->filter_by_selector(sel_rowid_idx, select_size, 
raw_res_ptr);


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

Reply via email to