airborne12 opened a new pull request, #69564:
URL: https://github.com/apache/doris/pull/69564

   ### What problem does this PR solve?
   
   Related PR: #69419
   
   Problem Summary: Backport #69419 to `branch-4.1`.
   
   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.1` at 3f911d030b), in a local ASAN build:
   
   - PASS: FE unit tests `LogicalPlanDeepCopierTest`, `CTEInlineTest`, 
`InferPredicateByReplaceTest`, `InferPredicatesTest`, 
`UnequalPredicateInferTest`, `BindScoreToOlapScanTest`, `SearchExpressionTest`, 
`TopNRuntimeFilterTest` and `MaterializedViewUtilsTest` (228 tests), and FE 
Checkstyle.
   - PASS: `./build.sh --be` and `./build.sh --fe`.
   - PASS: BE unit tests `SegmentIteratorScoreCommonExprTest`, 
`SegmentIteratorApplyIndexExprTest` and `VirtualSlotRefTest` (31 tests); 
clang-format 16 on the changed BE files.
   - PASS: the 16 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`. The framework 
regenerated the `.out` of `test_score_filter_matrix` on this branch: it drops 
the 46 SNII cases and keeps the 94 V2 and V3 cases of master unchanged. The 
other `.out` files are unchanged.
   
   🤖 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]

Reply via email to