You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by zh...@apache.org on 2019/11/17 14:54:38 UTC
[incubator-doris] branch master updated: Fix bug upon is not null
with batch without null data (#2219)
This is an automated email from the ASF dual-hosted git repository.
zhaoc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git
The following commit(s) were added to refs/heads/master by this push:
new 626001f Fix bug upon is not null with batch without null data (#2219)
626001f is described below
commit 626001fae49215a3e405331950f33c26ce51b64e
Author: lichaoyong <li...@baidu.com>
AuthorDate: Sun Nov 17 22:54:29 2019 +0800
Fix bug upon is not null with batch without null data (#2219)
DefaultValueReader will be created for this column after adding a column.
Upon IS NOT NULL predicate, be will be core dump because of null pointer.
---
be/src/olap/null_predicate.cpp | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/be/src/olap/null_predicate.cpp b/be/src/olap/null_predicate.cpp
index 0e276e9..826b0d3 100644
--- a/be/src/olap/null_predicate.cpp
+++ b/be/src/olap/null_predicate.cpp
@@ -34,13 +34,19 @@ void NullPredicate::evaluate(VectorizedRowBatch* batch) const {
}
uint16_t* sel = batch->selected();
bool* null_array = batch->column(_column_id)->is_null();
- uint16_t new_size = 0;
if (batch->column(_column_id)->no_nulls() && _is_null) {
- batch->set_size(new_size);
+ batch->set_size(0);
batch->set_selected_in_use(true);
return;
}
+ if (batch->column(_column_id)->no_nulls() && !_is_null) {
+ batch->set_size(n);
+ batch->set_selected_in_use(false);
+ return;
+ }
+
+ uint16_t new_size = 0;
if (batch->selected_in_use()) {
for (uint16_t j = 0; j != n; ++j) {
uint16_t i = sel[j];
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org