branch-2.1: [bugfix](query) Fix for incorrect query results of variant type #51651 (#51707)

### What problem does this PR solve?

Cherry-picked from #51651

### Release note

None

### Check List (For Author)

- Test <!-- At least one of them must be included. -->
    - [ ] Regression test
    - [ ] Unit Test
    - [ ] Manual test (add detailed scripts or steps below)
    - [ ] No need to test or manual test. Explain why:
- [ ] This is a refactor/code format and no logic has been changed.
        - [ ] Previous test can cover this change.
        - [ ] No code files have been changed.
        - [ ] Other reason <!-- Add your reason?  -->

- Behavior changed:
    - [ ] No.
    - [ ] Yes. <!-- Explain the behavior change -->

- Does this need documentation?
    - [ ] No.
- [ ] Yes. <!-- Add document PR link here. eg:
https://github.com/apache/doris-website/pull/1214 -->

### Check List (For Reviewer who merge this PR)

- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label <!-- Add branch pick label that this PR
should merge into -->
This commit is contained in:
lw112
2025-06-20 14:03:04 +08:00
committed by GitHub
parent 7ef4824575
commit 956fb96dcd
3 changed files with 31 additions and 6 deletions

View File

@ -65,6 +65,9 @@ public class LogicalResultSinkToShortCircuitPointQuery implements RewriteRuleFac
return false;
}
OlapTable olapTable = olapScan.getTable();
if (olapTable.hasVariantColumns()) {
return false;
}
return olapTable.getEnableLightSchemaChange() && olapTable.getEnableUniqueKeyMergeOnWrite()
&& olapTable.storeRowColumn();
}