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

morningman pushed a commit to branch dev-1.0.1
in repository https://gitbox.apache.org/repos/asf/doris.git

commit a59b7ab13d8f5943621b4d62c0b96e7236ef00aa
Author: wangbo <[email protected]>
AuthorDate: Thu Jun 23 12:37:43 2022 +0800

    [fixbug]opt nullable (#10346)
    
    Co-authored-by: Wang Bo <[email protected]>
---
 be/src/olap/rowset/segment_v2/column_reader.cpp | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/be/src/olap/rowset/segment_v2/column_reader.cpp 
b/be/src/olap/rowset/segment_v2/column_reader.cpp
index 929b04cf5e..6b7c9f4d83 100644
--- a/be/src/olap/rowset/segment_v2/column_reader.cpp
+++ b/be/src/olap/rowset/segment_v2/column_reader.cpp
@@ -610,9 +610,13 @@ Status FileColumnIterator::next_batch(size_t* n, 
vectorized::MutableColumnPtr &d
                     DCHECK_EQ(this_run, num_rows);
                 } else {
                     *has_null = true;
-                    // todo(wb) add a DCHECK here to check whether type is 
column nullable
-                    for (size_t x = 0; x < this_run; x++) {
-                        dst->insert_data(nullptr, 0); // todo(wb) vectorized 
here
+                    auto* null_col =
+                            
vectorized::check_and_get_column<vectorized::ColumnNullable>(dst);
+                    if (null_col != nullptr) {
+                        
const_cast<vectorized::ColumnNullable*>(null_col)->insert_null_elements(
+                                this_run);
+                    } else {
+                        return Status::InternalError("unexpected column type 
in column reader");
                     }
                 }
 


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

Reply via email to