imay commented on a change in pull request #1516: Fix bug that <=> operator and
in operator get wrong result
URL: https://github.com/apache/incubator-doris/pull/1516#discussion_r305270111
##########
File path: be/src/exprs/binary_predicate.cpp
##########
@@ -468,12 +462,10 @@ DATETIME_BINARY_PRED_FNS()
#define STRING_BINARY_PRED_FN(CLASS, OP) \
BooleanVal CLASS::get_boolean_val(ExprContext* ctx, TupleRow* row) { \
StringVal v1 = _children[0]->get_string_val(ctx, row); \
- if (v1.is_null) { \
- return BooleanVal::null(); \
- } \
StringVal v2 = _children[1]->get_string_val(ctx, row); \
- if (v2.is_null) { \
- return BooleanVal::null(); \
+ BooleanVal result; \
+ if (get_result_for_null(v1, v2, &result)) { \
Review comment:
I think it's not a good way to add safe is null. I prefer to adding another
function to handle this. For performance we should avoid branch and function
call here. So you can find the proper function to handle this in Frontend when
analyzing.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]