chenhao7253886 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_r305608919
 
 

 ##########
 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:
   it's inappropriate to add an new operator for BinaryPredicate, because in 
most conditions we can't know whether the children is null when analyze 
BinaryPredicate.

----------------------------------------------------------------
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]

Reply via email to