You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by yi...@apache.org on 2022/06/23 04:37:48 UTC
[doris] branch master updated: [fixbug]opt nullable (#10346)
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 0c39e1018c [fixbug]opt nullable (#10346)
0c39e1018c is described below
commit 0c39e1018c8b0a1d7c990697f7850255831e5aef
Author: wangbo <wa...@apache.org>
AuthorDate: Thu Jun 23 12:37:43 2022 +0800
[fixbug]opt nullable (#10346)
Co-authored-by: Wang Bo <wa...@meituan.com>
---
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 fe6cd94a82..7e2ecae006 100644
--- a/be/src/olap/rowset/segment_v2/column_reader.cpp
+++ b/be/src/olap/rowset/segment_v2/column_reader.cpp
@@ -659,9 +659,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: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org