This is an automated email from the ASF dual-hosted git repository. panxiaolei 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 d1a10ae6a6c [Bug](runtime-filter) fix coredump on no null string type rf (#33869) d1a10ae6a6c is described below commit d1a10ae6a6c11beadf6fa88a0671093c3275eb27 Author: Pxl <pxl...@qq.com> AuthorDate: Fri Apr 19 14:07:12 2024 +0800 [Bug](runtime-filter) fix coredump on no null string type rf (#33869) fix coredump on no null string type rf --- be/src/exprs/hybrid_set.h | 4 +- .../join/no_null_str_rf/no_null_str_rf.out | 4 ++ .../join/no_null_str_rf/no_null_str_rf.groovy | 58 ++++++++++++++++++++++ 3 files changed, 64 insertions(+), 2 deletions(-) diff --git a/be/src/exprs/hybrid_set.h b/be/src/exprs/hybrid_set.h index 03cde80c24b..c45167a83bb 100644 --- a/be/src/exprs/hybrid_set.h +++ b/be/src/exprs/hybrid_set.h @@ -421,7 +421,7 @@ public: void _insert_fixed_len_string(const auto& col, const uint8_t* __restrict nullmap, size_t start, size_t end) { for (size_t i = start; i < end; i++) { - if (nullmap != nullptr || !nullmap[i]) { + if (nullmap == nullptr || !nullmap[i]) { _set.insert(col.get_data_at(i).to_string()); } else { _contains_null = true; @@ -583,7 +583,7 @@ public: void _insert_fixed_len_string(const auto& col, const uint8_t* __restrict nullmap, size_t start, size_t end) { for (size_t i = start; i < end; i++) { - if (nullmap != nullptr || !nullmap[i]) { + if (nullmap == nullptr || !nullmap[i]) { _set.insert(col.get_data_at(i)); } else { _contains_null = true; diff --git a/regression-test/data/query_p0/join/no_null_str_rf/no_null_str_rf.out b/regression-test/data/query_p0/join/no_null_str_rf/no_null_str_rf.out new file mode 100644 index 00000000000..ebb4260eeb2 --- /dev/null +++ b/regression-test/data/query_p0/join/no_null_str_rf/no_null_str_rf.out @@ -0,0 +1,4 @@ +-- This file is automatically generated. You should know what you did if you want to edit this +-- !test -- +4 + diff --git a/regression-test/suites/query_p0/join/no_null_str_rf/no_null_str_rf.groovy b/regression-test/suites/query_p0/join/no_null_str_rf/no_null_str_rf.groovy new file mode 100644 index 00000000000..0b13db03a20 --- /dev/null +++ b/regression-test/suites/query_p0/join/no_null_str_rf/no_null_str_rf.groovy @@ -0,0 +1,58 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +suite("no_null_str_rf") { + sql """ DROP TABLE IF EXISTS d_table; """ + sql """ DROP TABLE IF EXISTS dd_table; """ + sql """ + create table d_table( + k1 int null, + k2 int not null, + k3 bigint null, + k4 varchar(100) not null + ) + duplicate key (k1,k2,k3) + distributed BY hash(k1) buckets 3 + properties("replication_num" = "1"); + """ + + sql "insert into d_table select 1,1,1,'a';" + sql "insert into d_table select 1,1,1,'b';" + sql "insert into d_table select 1,1,1,'a';" + sql "insert into d_table select 1,1,1,'b';" + sql "insert into d_table select 1,1,1,'a';" + sql "insert into d_table select 1,1,1,'b';" + sql "insert into d_table select 1,1,1,'a';" + sql "insert into d_table select 1,1,1,'b';" + + sql """ + create table dd_table( + k1 int null, + k2 int not null, + k3 bigint null, + k4 varchar(100) not null + ) + duplicate key (k1,k2,k3) + distributed BY hash(k1) buckets 3 + properties("replication_num" = "1"); + """ + + sql "insert into dd_table select 1,1,1,'a';" + sql "insert into dd_table select 1,1,1,'c';" + + qt_test """select count(1) from d_table,dd_table where d_table.k4=dd_table.k4 and d_table.k1=1 and dd_table.k1=1;""" +} --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org