Repository navigation
branch-4.2: [fix](nereids) Do not infer MATCH and SEARCH predicates across column equalities #69419 - #69561
Merged
Conversation
… equalities ### What problem does this PR solve? Related PR: apache#69419 Problem Summary: Backport apache#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(). InferPredicateByReplace.infer now skips every input that contains Match, MultiMatch, Search or SearchExpression. 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: Includes the unit and regression tests of apache#69419; results are recorded in the pull request. - Behavior changed: Yes. Predicate inference no longer copies a predicate that contains MATCH, multi_match or SEARCH to an equal column. - Does this need documentation: No. Source-PR: apache#69419 Source-Head: 9e661c8 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Member
Author
|
run buildall |
Contributor
FE UT Coverage ReportIncrement line coverage |
Contributor
FE Regression Coverage ReportIncrement line coverage |
yiguolei
approved these changes
Oct 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 = c2and different parsers on the two columns, the copy removed matching rows, and with the same index it doubledscore(), so a minimum score let low-scored rows through.InferPredicateByReplace.infernow skips every input that containsMatch,MultiMatch,SearchorSearchExpression.Branch adaptations
The branch does not have the
NoneMovableFunctioncheck that master has next to the new check, so only the new check is added. The test importsSearchDslParserfrom 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)
Validation
Validated together with the other two backports (#69399, #69419 and #69292 on
branch-4.2at ecbc5fe), in a local ASAN build:LogicalPlanDeepCopierTest,CTEInlineTest,InferPredicateByReplaceTest,InferPredicatesTest,UnequalPredicateInferTest,BindScoreToOlapScanTest,SearchExpressionTest,TopNRuntimeFilterTest,PullUpProjectExprUnderTopNTestandMaterializedViewUtilsTest(280 tests), and FE Checkstyle../build.sh --fe --be.SegmentIteratorScoreCommonExprTest,SegmentIteratorApplyIndexExprTestandVirtualSlotRefTest(31 tests); clang-format 16 on the changed BE files.score(), includingtest_cte_inline_virtual_column,infer_match_predicate,test_score_filter_usageandtest_score_filter_matrix, with unchanged.outfiles.🤖 Generated with Claude Code