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

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


The following commit(s) were added to refs/heads/master by this push:
     new 7086956b4fa [bugfix](topn) fix coredump in copy_column_data_to_block 
when nullable mismatch (#28597)
7086956b4fa is described below

commit 7086956b4fa30e245a6f78161087a4d7f9b25fa8
Author: Kang <[email protected]>
AuthorDate: Tue Dec 19 11:30:02 2023 +0800

    [bugfix](topn) fix coredump in copy_column_data_to_block when nullable 
mismatch (#28597)
    
    * [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.
    
    * clang format
---
 be/src/olap/rowset/segment_v2/segment_iterator.cpp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/be/src/olap/rowset/segment_v2/segment_iterator.cpp 
b/be/src/olap/rowset/segment_v2/segment_iterator.cpp
index 5b45f0d79fd..baf54a095bc 100644
--- a/be/src/olap/rowset/segment_v2/segment_iterator.cpp
+++ b/be/src/olap/rowset/segment_v2/segment_iterator.cpp
@@ -2069,6 +2069,11 @@ Status 
SegmentIterator::copy_column_data_by_selector(vectorized::IColumn* input_
         auto col_ptr_nullable = 
reinterpret_cast<vectorized::ColumnNullable*>(output_col.get());
         
col_ptr_nullable->get_null_map_column().insert_many_defaults(select_size);
         output_col = col_ptr_nullable->get_nested_column_ptr();
+    } else if (!output_col->is_nullable() && input_col_ptr->is_nullable()) {
+        LOG(WARNING) << "nullable mismatch for output_column: " << 
output_col->dump_structure()
+                     << " input_column: " << input_col_ptr->dump_structure()
+                     << " select_size: " << select_size;
+        return Status::RuntimeError("copy_column_data_by_selector nullable 
mismatch");
     }
 
     return input_col_ptr->filter_by_selector(sel_rowid_idx, select_size, 
output_col);


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to