Repository navigation
Conversation
kasakrisz
marked this pull request as draft
November 25, 2026 14:59
kasakrisz
force-pushed
the
HIVE-30227-master-mv-icebeeg-v3-dv
branch
from
November 26, 2026 07:28
7aae0bc to
dd54192
Compare
kasakrisz
marked this pull request as ready for review
November 26, 2026 07:41
Comment on lines
85
to
88
| @@ -90,14 +87,28 @@ | |||
| * WHEN source.s IS NULL THEN mv.s | |||
| * ELSE mv.s + source.s END countStar, | |||
Contributor
There was a problem hiding this comment.
Not related to the PR: shouldn't this block for the countStar say '.c' instead of '.s'?
Contributor
Author
There was a problem hiding this comment.
Good catch. I updated the comment.
Comment on lines
81
to
82
| * CASE WHEN mv.s IS NULL AND source.s IS NULL THEN NULL <- (use case expression to handle nulls from both sides) | ||
| * WHEN mv.s IS NULL THEN source.s |
Contributor
There was a problem hiding this comment.
Not related to the PR: Couldn't we simplify this to CASE WHEN mv.s IS NULL THEN source.s? I haven't found yet whether that's just an explanatory comment, or whether (and where) the CASE statement is actually generated.
Contributor
Author
There was a problem hiding this comment.
Yes, it is simplified
…mode writes two DVs per data file
kasakrisz
force-pushed
the
HIVE-30227-master-mv-icebeeg-v3-dv
branch
from
November 30, 2026 08:14
dd54192 to
a0bd8a4
Compare
|
This branch has not been deployed
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 changes were proposed in this pull request?
An incremental rebuild of a materialized view that has aggregates is rewritten into a MERGE-like multi-insert. This PR is a follow-up of #6924 and makes that multi-insert follow the same rules as the rewritten MERGE statement.
The two deletes are now merged into one branch with the predicate
The two conditions never match the same row, so each row is still deleted at most once.
2. Get
DISTRIBUTE BYcolumns from the storage handler.- Iceberg V3 MVs: DISTRIBUTE BY FILE__PATH.
- Iceberg V1/V2 MVs: no DISTRIBUTE BY.
- Native ACID MVs: no DISTRIBUTE BY. The deleted rows are already distributed by the bucket id in ROW__ID, as for any ACID DELETE/UPDATE/MERGE.
3. No empty SORT BY. The SORT BY clause is added only when the storage handler returns sort columns. Iceberg V3 views and fanout writers return none.
Why are the changes needed?
See #6924 and HIVE-30112
Does this PR introduce any user-facing change?
No.
How was this patch tested?