HappenLee commented on code in PR #11468: URL: https://github.com/apache/doris/pull/11468#discussion_r938494984
########## be/src/exec/olap_utils.h: ########## @@ -215,4 +218,25 @@ inline SQLFilterOp to_olap_filter_type(TExprOpcode::type type, bool opposite) { return FILTER_IN; } +inline SQLFilterOp to_olap_filter_type(std::string function_name, bool opposite) { Review Comment: pass `const std::string&` or `std::string_view` ########## be/src/exec/olap_utils.h: ########## @@ -215,4 +218,25 @@ inline SQLFilterOp to_olap_filter_type(TExprOpcode::type type, bool opposite) { return FILTER_IN; } +inline SQLFilterOp to_olap_filter_type(std::string function_name, bool opposite) { + if (function_name == "lt") { + return opposite ? FILTER_LARGER : FILTER_LESS; + } else if (function_name == "gt") { + return opposite ? FILTER_LESS : FILTER_LARGER; + } else if (function_name == "le") { + return opposite ? FILTER_LARGER_OR_EQUAL : FILTER_LESS_OR_EQUAL; + } else if (function_name == "ge") { + return opposite ? FILTER_LESS_OR_EQUAL : FILTER_LARGER_OR_EQUAL; + } else if (function_name == "eq") { + return opposite ? FILTER_NOT_IN : FILTER_IN; + } else if (function_name == "ne") { + return opposite ? FILTER_IN : FILTER_NOT_IN; + } else if (function_name == "eq_for_null") { Review Comment: why `eq_for_null` is Filter_IN? ########## be/src/vec/exec/volap_scan_node.cpp: ########## @@ -257,19 +266,12 @@ Status VOlapScanNode::open(RuntimeState* state) { ready = runtime_filter->await(); } if (ready) { - std::list<ExprContext*> expr_context; - RETURN_IF_ERROR(runtime_filter->get_push_expr_ctxs(&expr_context)); + std::vector<VExpr*> vexprs; + RETURN_IF_ERROR(runtime_filter->get_push_expr_ctxs(&vexprs)); _runtime_filter_ctxs[i].apply_mark = true; _runtime_filter_ctxs[i].runtimefilter = runtime_filter; - for (auto ctx : expr_context) { - ctx->prepare(state, row_desc()); - ctx->open(state); - int index = _conjunct_ctxs.size(); - _conjunct_ctxs.push_back(ctx); - // it's safe to store address from a fix-resized vector - _conjunctid_to_runtime_filter_ctxs[index] = &_runtime_filter_ctxs[i]; - } + RETURN_IF_ERROR(_append_rf_into_conjuncts(state, vexprs)); Review Comment: maybe we should after collect all vexprs from `_runtime_filter_descs` to do `_append_rf_into_conjuncts` -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org