This is an automated email from the ASF dual-hosted git repository. kxiao pushed a commit to branch branch-2.0-beta in repository https://gitbox.apache.org/repos/asf/doris.git
commit 34eca4d69251bade0835d8468f0cb24c2610b32d Author: starocean999 <[email protected]> AuthorDate: Mon Jun 5 17:05:35 2023 +0800 [fix](execution) result_filter_data should be filled by 0 when can_filter_all is true (#20438) --- be/src/vec/exprs/vexpr_context.cpp | 1 + .../data/correctness_p0/test_function_conjunct.out | 5 +++ .../correctness_p0/test_function_conjunct.groovy | 45 ++++++++++++++++++++++ 3 files changed, 51 insertions(+) diff --git a/be/src/vec/exprs/vexpr_context.cpp b/be/src/vec/exprs/vexpr_context.cpp index 98af614797..88796ecc24 100644 --- a/be/src/vec/exprs/vexpr_context.cpp +++ b/be/src/vec/exprs/vexpr_context.cpp @@ -195,6 +195,7 @@ Status VExprContext::execute_conjuncts(const VExprContextSPtrs& ctxs, // filter all if (!const_column->get_bool(0)) { *can_filter_all = true; + memset(result_filter_data, 0, result_filter->size()); return Status::OK(); } } else { diff --git a/regression-test/data/correctness_p0/test_function_conjunct.out b/regression-test/data/correctness_p0/test_function_conjunct.out new file mode 100644 index 0000000000..863b85b658 --- /dev/null +++ b/regression-test/data/correctness_p0/test_function_conjunct.out @@ -0,0 +1,5 @@ +-- This file is automatically generated. You should know what you did if you want to edit this +-- !select_default -- + +-- !select_default -- + diff --git a/regression-test/suites/correctness_p0/test_function_conjunct.groovy b/regression-test/suites/correctness_p0/test_function_conjunct.groovy new file mode 100644 index 0000000000..1d747bb973 --- /dev/null +++ b/regression-test/suites/correctness_p0/test_function_conjunct.groovy @@ -0,0 +1,45 @@ +// 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("test_function_conjunct") { + def tableName = "test_function_conjunct_table" + sql """ DROP TABLE IF EXISTS ${tableName} """ + sql """ + CREATE TABLE IF NOT EXISTS ${tableName} ( + a varchar(10) not null, + b int not null + ) ENGINE=OLAP + DUPLICATE KEY(a) + DISTRIBUTED BY HASH(a) BUCKETS 2 + PROPERTIES ( + "replication_num" = "1", + "in_memory" = "false", + "storage_format" = "V2" + ); + """ + + sql """ INSERT INTO ${tableName} VALUES ("1","1"); """ + + sql "set enable_nereids_planner=true" + qt_select_default """select a, b from ${tableName} where coalesce(b, null) is NULL;""" + + sql "set enable_nereids_planner=false" + qt_select_default """select a, b from ${tableName} where coalesce(b, null) is NULL;""" + + sql """ DROP TABLE IF EXISTS ${tableName} """ + +} --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
