This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch dev-1.1.2
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/dev-1.1.2 by this push:
new d05f7f0ea2 [bugfix](dict) fix coredump of dict colum range predicate
when there is null value (#11967)
d05f7f0ea2 is described below
commit d05f7f0ea239f342a8c6e5b7e8eed78c15fb63ce
Author: TengJianPing <[email protected]>
AuthorDate: Tue Aug 23 16:07:48 2022 +0800
[bugfix](dict) fix coredump of dict colum range predicate when there is
null value (#11967)
---
be/src/vec/columns/column_dictionary.h | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/be/src/vec/columns/column_dictionary.h
b/be/src/vec/columns/column_dictionary.h
index a854408c20..8d1f7db387 100644
--- a/be/src/vec/columns/column_dictionary.h
+++ b/be/src/vec/columns/column_dictionary.h
@@ -305,7 +305,7 @@ public:
return -2; // -1 is null code
}
- T get_null_code() { return -1; }
+ T get_null_code() const { return -1; }
inline StringValue& get_value(T code) {
return code >= _dict_data.size() ? _null_value : _dict_data[code];
@@ -395,7 +395,12 @@ public:
}
}
- inline T convert_code(const T& code) const { return
_code_convert_map.find(code)->second; }
+ T convert_code(const T& code) const {
+ if (get_null_code() == code) {
+ return code;
+ }
+ return _code_convert_table[code];
+ }
size_t byte_size() { return _dict_data.size() * sizeof(_dict_data[0]);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]