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/07 14:48:55 UTC

[GitHub] [incubator-doris] BiteTheDDDDt commented on a diff in pull request #10001: [Bug] runtime filter is not used as expected

BiteTheDDDDt commented on code in PR #10001:
URL: https://github.com/apache/incubator-doris/pull/10001#discussion_r891332396


##########
be/src/exprs/runtime_filter.cpp:
##########
@@ -976,15 +984,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));

Review Comment:
   If there is no return here, will it cause `_push_down_ctxs` to be inserted twice?



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