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/08 01:29:39 UTC
[GitHub] [incubator-doris] Gabriel39 commented on a diff in pull request #10001: [Bug] runtime filter is not used as expected
Gabriel39 commented on code in PR #10001:
URL: https://github.com/apache/incubator-doris/pull/10001#discussion_r891835718
##########
be/src/exec/olap_scan_node.cpp:
##########
@@ -1566,7 +1566,7 @@ void OlapScanNode::scanner_thread(OlapScanner* scanner) {
auto& scanner_filter_apply_marks = *scanner->mutable_runtime_filter_marks();
DCHECK(scanner_filter_apply_marks.size() == _runtime_filter_descs.size());
for (size_t i = 0; i < scanner_filter_apply_marks.size(); i++) {
- if (!scanner_filter_apply_marks[i] && !_runtime_filter_ctxs[i].apply_mark) {
Review Comment:
done
##########
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:
`_push_down_ctxs` will be only inserted once for each scanner.
--
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