This is an automated email from the ASF dual-hosted git repository.

yiguolei pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git

commit 326196b93dde8f0272aff660355606a5561e096d
Author: HappenLee <happen...@hotmail.com>
AuthorDate: Thu Mar 7 10:09:35 2024 +0800

    [Bug](fix) fix or and "<=>" cause coredump in query (#31884)
---
 be/src/pipeline/exec/scan_operator.cpp                           | 2 +-
 be/src/vec/exec/scan/vscan_node.cpp                              | 2 +-
 regression-test/data/correctness_p0/test_equal_for_null.out      | 2 ++
 regression-test/suites/correctness_p0/test_equal_for_null.groovy | 3 ++-
 4 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/be/src/pipeline/exec/scan_operator.cpp 
b/be/src/pipeline/exec/scan_operator.cpp
index 0fb92d793a8..2c809ffdfe3 100644
--- a/be/src/pipeline/exec/scan_operator.cpp
+++ b/be/src/pipeline/exec/scan_operator.cpp
@@ -1090,7 +1090,7 @@ Status 
ScanLocalState<Derived>::_normalize_binary_in_compound_predicate(
         auto eq_checker = [](const std::string& fn_name) { return fn_name == 
"eq"; };
         auto ne_checker = [](const std::string& fn_name) { return fn_name == 
"ne"; };
         auto noneq_checker = [](const std::string& fn_name) {
-            return fn_name != "ne" && fn_name != "eq";
+            return fn_name != "ne" && fn_name != "eq" && fn_name != 
"eq_for_null";
         };
 
         StringRef value;
diff --git a/be/src/vec/exec/scan/vscan_node.cpp 
b/be/src/vec/exec/scan/vscan_node.cpp
index 4ba8f924c00..4c0129b2bdf 100644
--- a/be/src/vec/exec/scan/vscan_node.cpp
+++ b/be/src/vec/exec/scan/vscan_node.cpp
@@ -1084,7 +1084,7 @@ Status 
VScanNode::_normalize_binary_in_compound_predicate(vectorized::VExpr* exp
         auto eq_checker = [](const std::string& fn_name) { return fn_name == 
"eq"; };
         auto ne_checker = [](const std::string& fn_name) { return fn_name == 
"ne"; };
         auto noneq_checker = [](const std::string& fn_name) {
-            return fn_name != "ne" && fn_name != "eq";
+            return fn_name != "ne" && fn_name != "eq" && fn_name != 
"eq_for_null";
         };
 
         StringRef value;
diff --git a/regression-test/data/correctness_p0/test_equal_for_null.out 
b/regression-test/data/correctness_p0/test_equal_for_null.out
index f958424e65c..357a6957798 100644
--- a/regression-test/data/correctness_p0/test_equal_for_null.out
+++ b/regression-test/data/correctness_p0/test_equal_for_null.out
@@ -1,3 +1,5 @@
 -- This file is automatically generated. You should know what you did if you 
want to edit this
 -- !select --
 
+-- !select --
+
diff --git a/regression-test/suites/correctness_p0/test_equal_for_null.groovy 
b/regression-test/suites/correctness_p0/test_equal_for_null.groovy
index d2f04e8bdde..51bef9deef1 100644
--- a/regression-test/suites/correctness_p0/test_equal_for_null.groovy
+++ b/regression-test/suites/correctness_p0/test_equal_for_null.groovy
@@ -47,4 +47,5 @@ suite("test_equal_for_null") {
     """
 
     qt_select " select * from `test_equal_for_null_tbl` where `k1` <=> 4 order 
by 1, 2, 3, 4; "
-}
\ No newline at end of file
+    qt_select " select * from `test_equal_for_null_tbl` where `k1` <=> 4 or 
`k1` <=> 3 order by 1, 2, 3, 4; "
+}


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to