You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by mo...@apache.org on 2022/06/23 07:39:23 UTC
[doris] 04/04: [fixbug]opt nullable (#10346)
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 <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 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: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org