airborne12 commented on code in PR #69419:
URL: https://github.com/apache/doris/pull/69419#discussion_r4348545217
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/InferPredicateByReplace.java:
##########
@@ -237,7 +240,9 @@ public static Set<Expression> infer(Set<Expression> inputs)
{
Map<Expression, Set<Expression>> exprPredicates = new HashMap<>();
for (Expression input : inputs) {
// Inference can evaluate a predicate on rows that never reach its
original filter.
- if (input.anyMatch(expr -> expr instanceof NoneMovableFunction
+ // MATCH and SEARCH depend on column indexes, and copies can
change score().
+ if (input.containsType(Match.class, Search.class,
SearchExpression.class)
Review Comment:
Fixed in 9e661c801d: `InferPredicateByReplace.infer` skips inputs containing
`MultiMatch` too, next to Match, Search and SearchExpression.
`InferPredicateByReplaceTest` adds multi_match to the shapes of the MATCH and
SEARCH cases, and regression `infer_match_predicate` adds the query above,
which keeps row 1.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]