You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit b5be6ee
Browse filesBrowse the repository at this point in the historyBrowse files
[fix](nereids) Preserve source-dependent predicates above set operations
### Background
Search predicates depend on the source column's index and analyzer, not only on its value. Set-operation pushdown substitutes each branch's output columns.
### What problem does this PR solve?
Issue Number: None
Related PR: #69344 (follow-up)
PR Type: Bugfix
Problem Summary:
Outer SEARCH predicates could be copied to branches with different analyzers, changing EXCEPT results. Rename NonInferableExpression to SourceDependentExpression and retain marked conjuncts above every set operation, including UNION ALL. Existing final SEARCH validation rejects unsupported placement.
### Details
- **Frequency:** Outer SEARCH on set operations with source-dependent matching.
- **Root cause:** Ordinary set-operation pushdown bypassed inference guards; UNION ALL had an unconditional fast path.
- **Why existing tests missed it:** Tests expected outer UNION SEARCH to be copied into each branch.
- **Fix:** Classify all conjuncts using the source-dependent marker while preserving existing volatile-expression handling.
- **Other paths and branches:** Inference guards and implementations use the renamed interface. Same-source alias pushdown remains allowed. MATCH/MultiMatch final validation is deferred.
- **Behavior change:** Outer SEARCH retained above set operations is rejected by existing FE validation; branch-local SEARCH remains supported.
### Testing
On ssh dev: 160 FE unit tests passed across CheckSearchUsageTest, PushDownFilterThroughSetOperationTest, InferPredicateByReplaceTest and InferPredicatesTest. Standard build.sh --fe with DISABLE_BUILD_UI=ON passed, including Checkstyle. Updated FE deployed.
Generated regression output using run-regression-test.sh. SEARCH directory: 47/48 suites passed, including changed suites. test_search_inverted_index_profile failed and failed independently on retry because InvertedIndexSearcherCacheHit was 0 instead of positive; its single-table query does not exercise set-operation pushdown.
### Release note
SEARCH predicates over set-operation outputs are rejected instead of being evaluated with different branch indexes or analyzers. SEARCH inside individual branches remains supported.
### Check List (For Author)
- Behavior changed: Yes (see Details)
- Does this need documentation: No
- Pre-submission status: Partially verified: one cache-profile regression remains failing as described in Testing.
### AI Disclosure
- Tool: Codex
- Generated: Code, tests, and commit description.
- Human review: Pending.
0 commit comments