[fix](null equal) fix coredump of pushing eq_for_null (#27341)

This commit is contained in:
TengJianPing
2023-11-21 18:36:33 +08:00
committed by GitHub
parent f7a1c3edac
commit 1ebb54afdc
4 changed files with 8 additions and 2 deletions

View File

@ -945,7 +945,7 @@ Status ScanLocalState<Derived>::_normalize_noneq_binary_predicate(
DCHECK(expr->children().size() == 2);
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;
int slot_ref_child = -1;

View File

@ -970,7 +970,7 @@ Status VScanNode::_normalize_noneq_binary_predicate(VExpr* expr, VExprContext* e
DCHECK(expr->children().size() == 2);
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;
int slot_ref_child = -1;

View File

@ -194,3 +194,6 @@ false
2 2
3 3
-- !test7 --
1

View File

@ -70,5 +70,8 @@ suite("test_null_equal") {
qt_test6 "select * from test_eq_for_null_nullable a, test_eq_for_null_nullable2 b where a.k1 <=> b.k1 order by 1;"
qt_test7 "select * from test_eq_for_null_nullable2 where k1 <=> 1 order by 1;"
}