[fix](mv) Distinguish partition compensation from UNION ALL rewrite - #66445
Open
foxtail463 wants to merge 1 commit into
Open
[fix](mv) Distinguish partition compensation from UNION ALL rewrite#66445foxtail463 wants to merge 1 commit into
foxtail463 wants to merge 1 commit into
Conversation
foxtail463
requested review from
924060929,
englefly,
morrySnow and
starocean999
as code owners
August 4, 2026 12:32
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Contributor
Author
|
run buildall |
Contributor
TPC-H: Total hot run time: 28777 ms |
Contributor
TPC-DS: Total hot run time: 166596 ms |
Contributor
ClickBench: Total hot run time: 23.74 s |
Contributor
FE Regression Coverage ReportIncrement line coverage |
Member
|
/review |
Contributor
|
Codex automated review failed and did not complete. Error: All Codex review accounts are usage-limited; earliest retry is 2026-08-08T03:32:00Z. Please trigger /review again after that time. |
Member
|
当前单元测试只验证了 hasPartitionCompensation(),没有覆盖实际修复逻辑。建议补充回归测试:查询聚合时不包含 MV 分区列,使 canUnionRewrite() 返回 false;删除基表分区后,仅需移除失效 MV 分区且无需 UNION ALL,验证 MV rewrite 成功且结果正确。现有删除分区测试包含分区列,无法覆盖该分支。 |
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.
Problem Summary:
MV rewrite treated removing invalid MV partitions as requiring UNION ALL, causing
valid rewrites to be rejected.
Solution:
Separate partition compensation detection from base-table partition union requirements.
Only check UNION ALL capability when base-table compensation is needed.