morningman commented on code in PR #48532: URL: https://github.com/apache/doris/pull/48532#discussion_r1978962815
########## be/src/vec/exec/format/parquet/vparquet_group_reader.cpp: ########## @@ -207,29 +207,16 @@ bool RowGroupReader::_can_filter_by_dict(int slot_id, return false; } - std::function<bool(const VExpr* expr)> visit_function_call = [&](const VExpr* expr) { - // TODO: The current implementation of dictionary filtering does not take into account - // the implementation of NULL values because the dictionary itself does not contain - // NULL value encoding. As a result, many NULL-related functions or expressions - // cannot work properly, such as is null, is not null, coalesce, etc. - // Here we first disable dictionary filtering when predicate is not slot. - // Implementation of NULL value dictionary filtering will be carried out later. - if (expr->node_type() != TExprNodeType::SLOT_REF) { - return false; - } - for (auto& child : expr->children()) { - if (!visit_function_call(child.get())) { - return false; - } - } - return true; - }; - for (auto& ctx : _slot_id_to_filter_conjuncts->at(slot_id)) { - if (!visit_function_call(ctx->root().get())) { - return false; - } - } - return true; + // TODO: The current implementation of dictionary filtering does not take into account + // the implementation of NULL values because the dictionary itself does not contain + // NULL value encoding. As a result, many NULL-related functions or expressions + // cannot work properly, such as is null, is not null, coalesce, etc. + // Here we check if the predicate expr is IN or BINARY_PRED. + // Implementation of NULL value dictionary filtering will be carried out later. + return std::ranges::all_of(_slot_id_to_filter_conjuncts->at(slot_id), [&](const auto& ctx) { Review Comment: I think we can extract a method for this. eg, a static method in `generic_reader` -- 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