Skip to content

branch-4.1: [fix](reverted index) Validate nested variant MATCH predicates #66207 - #66394

Open
github-actions[bot] wants to merge 1 commit into
branch-4.1from
auto-pick-66207-branch-4.1
Open

branch-4.1: [fix](reverted index) Validate nested variant MATCH predicates #66207#66394
github-actions[bot] wants to merge 1 commit into
branch-4.1from
auto-pick-66207-branch-4.1

Conversation

@github-actions

@github-actions github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Cherry-picked from #66207

Related PR: #61190

Problem Summary: Root VARIANT MATCH predicates were rejected only when
the Match expression was a top-level filter conjunct. A Match nested
under OR could bypass frontend analysis and reach backend execution,
where it failed with an unrelated runtime error. Recursively collect
Match expressions from each filter expression and apply the existing
operand and root Variant validation to every Match node. Add focused FE
unit and regression coverage for a mixed text/root Variant OR predicate.

### Release note

Reject MATCH predicates on VARIANT root columns even when nested in
compound filter expressions.

### Check List (For Author)

- Test: Regression test / Unit Test
- `./run-regression-test.sh --run -d search -s
test_disable_root_variant_match` (failed before the fix and passed after
it)
- `./run-fe-ut.sh --run
org.apache.doris.nereids.rules.rewrite.CheckMatchExpressionTest`
    - `./build.sh --fe`
- Behavior changed: Yes. Nested root VARIANT MATCH predicates now fail
during FE analysis, consistent with direct predicates.
- Does this need documentation: No
@github-actions
github-actions Bot requested a review from yiguolei as a code owner August 3, 2026 13:40
@hello-stephen

Copy link
Copy Markdown
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@hello-stephen

Copy link
Copy Markdown
Contributor

run buildall

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants