Tanya-W commented on code in PR #13035: URL: https://github.com/apache/doris/pull/13035#discussion_r1057209928
########## be/src/vec/exec/scan/vscan_node.cpp: ########## @@ -868,6 +880,193 @@ Status VScanNode::_normalize_noneq_binary_predicate(VExpr* expr, VExprContext* e return Status::OK(); } +Status VScanNode::_normalize_compound_predicate( + vectorized::VExpr* expr, VExprContext* expr_ctx, PushDownType* pdt, + std::vector<ColumnValueRangeType>* column_value_rangs, + const std::function<bool(const std::vector<VExpr*>&, const VSlotRef**, VExpr**)>& + in_predicate_checker, + const std::function<bool(const std::vector<VExpr*>&, const VSlotRef**, VExpr**)>& + eq_predicate_checker) { + if (TExprNodeType::COMPOUND_PRED == expr->node_type()) { + DCHECK(expr->children().size() == 2); + auto compound_fn_name = expr->fn().name.function_name; + auto children_num = expr->children().size(); + for (auto i = 0; i < children_num; ++i) { + VExpr* child_expr = expr->children()[i]; + if (TExprNodeType::BINARY_PRED == child_expr->node_type()) { + SlotDescriptor* slot = nullptr; + ColumnValueRangeType* range_on_slot = nullptr; + if (_is_predicate_acting_on_slot(child_expr, in_predicate_checker, &slot, + &range_on_slot) || + _is_predicate_acting_on_slot(child_expr, eq_predicate_checker, &slot, + &range_on_slot)) { + ColumnValueRangeType active_range = + *range_on_slot; // copy, in order not to affect the range in the _colname_to_value_range + std::visit( Review Comment: active_range is a std::variant, should use std::visit to operate it -- 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