-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HIVE-24854: Incremental MV refresh in presence of update/delete operations #2119
Merged
kasakrisz
merged 31 commits into
apache:master
from
kasakrisz:HIVE-24854-master-mv-inc-delete
Apr 14, 2021
Merged
HIVE-24854: Incremental MV refresh in presence of update/delete operations #2119
kasakrisz
merged 31 commits into
apache:master
from
kasakrisz:HIVE-24854-master-mv-inc-delete
Apr 14, 2021
Conversation
This file contains 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
kasakrisz
changed the title
HIVE-24854: Incremental MV refresh in presence of update/delete operations
[Draft] HIVE-24854: Incremental MV refresh in presence of update/delete operations
Mar 25, 2021
kgyrtkirk
added
tests failed
tests pending
and removed
tests pending
tests failed
labels
Mar 25, 2021
kasakrisz
force-pushed
the
HIVE-24854-master-mv-inc-delete
branch
from
March 25, 2021 20:21
20ebfdd
to
a6b5f9b
Compare
kgyrtkirk
added
tests failed
tests pending
and removed
tests pending
tests failed
labels
Mar 25, 2021
kasakrisz
force-pushed
the
HIVE-24854-master-mv-inc-delete
branch
from
March 26, 2021 06:51
a6b5f9b
to
6574400
Compare
kgyrtkirk
added
tests pending
tests unstable
and removed
tests failed
tests pending
labels
Mar 26, 2021
kasakrisz
force-pushed
the
HIVE-24854-master-mv-inc-delete
branch
from
March 28, 2021 12:48
6574400
to
e7eb3ff
Compare
kgyrtkirk
added
tests pending
tests unstable
and removed
tests unstable
tests pending
labels
Mar 28, 2021
kasakrisz
force-pushed
the
HIVE-24854-master-mv-inc-delete
branch
from
April 13, 2021 05:18
e9cea3b
to
6ef3a81
Compare
kgyrtkirk
added
tests failed
tests pending
tests unstable
tests passed
and removed
tests pending
tests failed
tests unstable
labels
Apr 13, 2021
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?
Implement incremental materialized view rebuild when any of the source tables has update/delete operations since the last rebuild.
Steps before generating incremental rebuild plan, these are already implemented:
2.1. branch for scanning the existing view
2.2. branch for executing the view definition query but filtering out rows from source tables already exists in the view.
Prerequisite:
Basic workflow:
HiveJoinIncrementalRewritingRule
)rowIsDeleted
and enable fetching deleted rows inHiveTableScan
operators in the right branch of the Right outer join which queries the delta rows since last MV rebuild. (HiveRowIsDeletedPropagatorRule
)CalcitePlanner.fixUpASTJoinIncrementalRebuild()
)5.1. Query the delta rows
5.2. First insert into MV delete delta; filter:
rowIsDeleted
5.2. Second insert into MV delta; filter:
not rowIsDeleted
Why are the changes needed?
This is an extension of existing incremental rebuild.
Does this PR introduce any user-facing change?
Yes. Plan of Materialized view rebuild may change when user executes commands like
EXPLAIN [CBO] ALTER MATERIALIZED VIEW <mv name> REBUILD;
How was this patch tested?