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 36bf8ad3eb [Opt](Vec) Support const column check nullable and remove
nullable (#13020)
36bf8ad3eb is described below
commit 36bf8ad3eb81bbacfbee283e38510a3226bbdb11
Author: HappenLee <[email protected]>
AuthorDate: Thu Sep 29 08:39:19 2022 +0800
[Opt](Vec) Support const column check nullable and remove nullable (#13020)
---
be/src/vec/columns/column_const.h | 2 +-
be/src/vec/columns/column_nullable.cpp | 10 ++++++++++
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/be/src/vec/columns/column_const.h
b/be/src/vec/columns/column_const.h
index 75561ae3e8..f001150bee 100644
--- a/be/src/vec/columns/column_const.h
+++ b/be/src/vec/columns/column_const.h
@@ -184,7 +184,7 @@ public:
return false;
}
- // bool is_nullable() const override { return is_column_nullable(*data); }
+ // bool is_nullable() const override { return
is_column_nullable(*data); }
bool only_null() const override { return data->is_null_at(0); }
bool is_numeric() const override { return data->is_numeric(); }
bool is_fixed_and_contiguous() const override { return
data->is_fixed_and_contiguous(); }
diff --git a/be/src/vec/columns/column_nullable.cpp
b/be/src/vec/columns/column_nullable.cpp
index 0f898b60b4..ab37eb3f59 100644
--- a/be/src/vec/columns/column_nullable.cpp
+++ b/be/src/vec/columns/column_nullable.cpp
@@ -570,6 +570,16 @@ ColumnPtr remove_nullable(const ColumnPtr& column) {
if (is_column_nullable(*column)) {
return reinterpret_cast<const
ColumnNullable*>(column.get())->get_nested_column_ptr();
}
+
+ if (is_column_const(*column)) {
+ auto& column_nested = assert_cast<const
ColumnConst&>(*column).get_data_column_ptr();
+ if (is_column_nullable(*column_nested)) {
+ return ColumnConst::create(
+ assert_cast<const
ColumnNullable&>(*column_nested).get_nested_column_ptr(),
+ column->size());
+ }
+ }
+
return column;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]