airborne12 commented on code in PR #69419:
URL: https://github.com/apache/doris/pull/69419#discussion_r4344437251
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/InferPredicateByReplace.java:
##########
@@ -131,6 +134,11 @@ public Void visitLike(Like like, Map<Expression,
Set<Expression>> context) {
@Override
public Void visitOr(Or or, Map<Expression, Set<Expression>> context) {
+ // MATCH and SEARCH depend on the inverted index of their column,
so they can differ on an equal
+ // column, and a copy would also add to score().
+ if (or.containsType(Match.class, Search.class,
SearchExpression.class)) {
Review Comment:
Fixed in 8f065c95cd. MATCH, SEARCH and SearchExpression now implement a new
trait, `DependsOnColumnIndex`, and `InferPredicateByReplace.infer` skips every
input that contains one, before the collector runs, so the nesting no longer
matters. The OR check in `visitOr` is removed.
`InferPredicateByReplaceTest.testDoNotInferPredicatesThatDependOnColumnIndex`
adds `(MATCH) = TRUE`, the comparison form of this bypass; it fails with the
previous commit.
--
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]