You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by yi...@apache.org on 2022/06/08 03:10:44 UTC

[incubator-doris] branch master updated: [Bug] runtime filter is not used as expected (#10001)

This is an automated email from the ASF dual-hosted git repository.

yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 35c3e4e33c [Bug] runtime filter is not used as expected (#10001)
35c3e4e33c is described below

commit 35c3e4e33c4e226c338a1a7c9b86095db4bb4345
Author: Gabriel <ga...@gmail.com>
AuthorDate: Wed Jun 8 11:10:39 2022 +0800

    [Bug] runtime filter is not used as expected (#10001)
    
    * [Bug] runtime filter is not used as expected
    
    * update
---
 be/src/exec/olap_scan_node.cpp      |  2 +-
 be/src/exprs/runtime_filter.cpp     | 13 ++++++-------
 be/src/vec/exec/volap_scan_node.cpp |  2 +-
 3 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/be/src/exec/olap_scan_node.cpp b/be/src/exec/olap_scan_node.cpp
index e365cfcae0..401a1f2cea 100644
--- a/be/src/exec/olap_scan_node.cpp
+++ b/be/src/exec/olap_scan_node.cpp
@@ -1574,7 +1574,7 @@ void OlapScanNode::scanner_thread(OlapScanner* scanner) {
             bool ready = runtime_filter->is_ready();
             if (ready) {
                 runtime_filter->get_prepared_context(&contexts, row_desc(), _expr_mem_tracker);
-                _runtime_filter_ctxs[i].apply_mark = true;
+                scanner_filter_apply_marks[i] = true;
             }
         }
     }
diff --git a/be/src/exprs/runtime_filter.cpp b/be/src/exprs/runtime_filter.cpp
index 0fc0bbd14f..652f86c608 100644
--- a/be/src/exprs/runtime_filter.cpp
+++ b/be/src/exprs/runtime_filter.cpp
@@ -976,15 +976,14 @@ Status IRuntimeFilter::get_prepared_context(std::vector<ExprContext*>* push_expr
     DCHECK(is_consumer());
     std::lock_guard<std::mutex> guard(_inner_mutex);
 
-    if (!_push_down_ctxs.empty()) {
-        push_expr_ctxs->insert(push_expr_ctxs->end(), _push_down_ctxs.begin(),
-                               _push_down_ctxs.end());
-        return Status::OK();
+    if (_push_down_ctxs.empty()) {
+        RETURN_IF_ERROR(_wrapper->get_push_context(&_push_down_ctxs, _state, _probe_ctx));
+        RETURN_IF_ERROR(Expr::prepare(_push_down_ctxs, _state, desc, tracker));
+        RETURN_IF_ERROR(Expr::open(_push_down_ctxs, _state));
     }
     // push expr
-    RETURN_IF_ERROR(_wrapper->get_push_context(&_push_down_ctxs, _state, _probe_ctx));
-    RETURN_IF_ERROR(Expr::prepare(_push_down_ctxs, _state, desc, tracker));
-    return Expr::open(_push_down_ctxs, _state);
+    push_expr_ctxs->insert(push_expr_ctxs->end(), _push_down_ctxs.begin(), _push_down_ctxs.end());
+    return Status::OK();
 }
 
 bool IRuntimeFilter::await() {
diff --git a/be/src/vec/exec/volap_scan_node.cpp b/be/src/vec/exec/volap_scan_node.cpp
index 965f96cd1e..c0a51cfac4 100644
--- a/be/src/vec/exec/volap_scan_node.cpp
+++ b/be/src/vec/exec/volap_scan_node.cpp
@@ -174,7 +174,7 @@ void VOlapScanNode::scanner_thread(VOlapScanner* scanner) {
             bool ready = runtime_filter->is_ready();
             if (ready) {
                 runtime_filter->get_prepared_context(&contexts, row_desc(), _expr_mem_tracker);
-                _runtime_filter_ctxs[i].apply_mark = true;
+                scanner_filter_apply_marks[i] = true;
             }
         }
     }


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