airborne12 opened a new pull request, #69561:
URL: https://github.com/apache/doris/pull/69561
### What problem does this PR solve?
Related PR: #69419
Problem Summary: Backport #69419 to `branch-4.2`.
Predicate inference copied a predicate on one column to every column that is
equal to it, also when the predicate contained MATCH, multi_match or SEARCH.
Their result depends on the inverted index of the column, not only on its
value: with `c1 = c2` and different parsers on the two columns, the copy
removed matching rows, and with the same index it doubled `score()`, so a
minimum score let low-scored rows through. `InferPredicateByReplace.infer` now
skips every input that contains `Match`, `MultiMatch`, `Search` or
`SearchExpression`.
#### Branch adaptations
The branch does not have the `NoneMovableFunction` check that master has
next to the new check, so only the new check is added. The test imports
`SearchDslParser` from its package on the branch.
### Release note
Fix wrong results and scores when predicate inference copied a MATCH,
multi_match or SEARCH predicate to an equal column.
### Check List (For Author)
- Test
- [x] Regression test
- [x] Unit Test
- [ ] Manual test
- Behavior changed:
- [x] Yes. Predicate inference no longer copies a predicate that
contains MATCH, multi_match or SEARCH to an equal column.
- Does this need documentation?
- [x] No.
### Validation
Validated together with the other two backports (#69399, #69419 and #69292
on `branch-4.2` at ecbc5feab9), in a local ASAN build:
- PASS: FE unit tests `LogicalPlanDeepCopierTest`, `CTEInlineTest`,
`InferPredicateByReplaceTest`, `InferPredicatesTest`,
`UnequalPredicateInferTest`, `BindScoreToOlapScanTest`, `SearchExpressionTest`,
`TopNRuntimeFilterTest`, `PullUpProjectExprUnderTopNTest` and
`MaterializedViewUtilsTest` (280 tests), and FE Checkstyle.
- PASS: `./build.sh --fe --be`.
- PASS: BE unit tests `SegmentIteratorScoreCommonExprTest`,
`SegmentIteratorApplyIndexExprTest` and `VirtualSlotRefTest` (31 tests);
clang-format 16 on the changed BE files.
- PASS: the 23 regression suites of the branch that use `score()`, including
`test_cte_inline_virtual_column`, `infer_match_predicate`,
`test_score_filter_usage` and `test_score_filter_matrix`, with unchanged `.out`
files.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
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]