Fix bug that <=> operator and in operator get wrong result (#1516)

* Fix bug that <=> operator and in operator get wrong result

* Add some comment to get_result_for_null

* Add an new Binary Operator to replace is_safe_for_null for handleing '<=>' operator

* Add EQ_FOR_NULL to TExprOpcode

* Remove macro definition last backslash
This commit is contained in:
chenhao
2019-07-30 11:17:53 +08:00
committed by GitHub
parent 97718a35a2
commit 2cb82c57bb
7 changed files with 215 additions and 15 deletions

View File

@ -129,13 +129,13 @@ BooleanVal InPredicate::get_boolean_val(ExprContext* ctx, TupleRow* row) {
if (lhs_slot == NULL) {
return BooleanVal::null();
}
if (_null_in_set) {
return BooleanVal::null();
}
// if find in const set, return true
if (_hybird_set->find(lhs_slot)) {
return BooleanVal(!_is_not_in);
}
if (_null_in_set) {
return BooleanVal::null();
}
return BooleanVal(_is_not_in);
}