You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/06/23 12:47:25 UTC

[GitHub] [doris] compasses commented on a diff in pull request #10355: Improve performance like/not like filter through pushdown function to storage engine

compasses commented on code in PR #10355:
URL: https://github.com/apache/doris/pull/10355#discussion_r904979836


##########
be/src/vec/exec/volap_scan_node.cpp:
##########
@@ -729,6 +729,72 @@ Status VOlapScanNode::build_olap_filters() {
     return Status::OK();
 }
 
+Status VOlapScanNode::build_function_filters() {
+    for (int conj_idx = 0; conj_idx < _conjunct_ctxs.size(); ++conj_idx) {
+        ExprContext* ex_ctx = _conjunct_ctxs[conj_idx];
+        Expr* fn_expr = ex_ctx->root();
+        bool opposite = false;
+
+        if (TExprNodeType::COMPOUND_PRED == fn_expr->node_type())
+        {
+            if (TExprOpcode::COMPOUND_NOT == fn_expr->op())

Review Comment:
   sure, make sense



##########
be/src/vec/exec/volap_scan_node.cpp:
##########
@@ -729,6 +729,72 @@ Status VOlapScanNode::build_olap_filters() {
     return Status::OK();
 }
 
+Status VOlapScanNode::build_function_filters() {
+    for (int conj_idx = 0; conj_idx < _conjunct_ctxs.size(); ++conj_idx) {
+        ExprContext* ex_ctx = _conjunct_ctxs[conj_idx];
+        Expr* fn_expr = ex_ctx->root();
+        bool opposite = false;
+
+        if (TExprNodeType::COMPOUND_PRED == fn_expr->node_type())
+        {
+            if (TExprOpcode::COMPOUND_NOT == fn_expr->op())
+            {
+                fn_expr = fn_expr->get_child(0);
+                opposite = true;
+            }
+        }
+
+        if (TExprNodeType::FUNCTION_CALL == fn_expr->node_type())
+        {
+            // currently only support like / not like
+            if ("like" == fn_expr->fn().name.function_name)

Review Comment:
   ok
   



-- 
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-unsubscribe@doris.apache.org

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


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