Gabriel39 commented on code in PR #11468:
URL: https://github.com/apache/doris/pull/11468#discussion_r938573763


##########
be/src/exec/olap_utils.h:
##########
@@ -215,4 +218,25 @@ inline SQLFilterOp to_olap_filter_type(TExprOpcode::type 
type, bool opposite) {
     return FILTER_IN;
 }
 
+inline SQLFilterOp to_olap_filter_type(std::string function_name, bool 
opposite) {
+    if (function_name == "lt") {
+        return opposite ? FILTER_LARGER : FILTER_LESS;
+    } else if (function_name == "gt") {
+        return opposite ? FILTER_LESS : FILTER_LARGER;
+    } else if (function_name == "le") {
+        return opposite ? FILTER_LARGER_OR_EQUAL : FILTER_LESS_OR_EQUAL;
+    } else if (function_name == "ge") {
+        return opposite ? FILTER_LESS_OR_EQUAL : FILTER_LARGER_OR_EQUAL;
+    } else if (function_name == "eq") {
+        return opposite ? FILTER_NOT_IN : FILTER_IN;
+    } else if (function_name == "ne") {
+        return opposite ? FILTER_IN : FILTER_NOT_IN;
+    } else if (function_name == "eq_for_null") {

Review Comment:
   I just copy this from `SQLFilterOp to_olap_filter_type(TExprOpcode::type 
type, bool opposite)`. After checking, I noticed this condition will never be 
true. So I think it's better to delete this condition block



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

To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to