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* push_expr DCHECK(is_consumer()); std::lock_guard 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; } } }