Support drop materialized view#15590
Closed
gggrace14 wants to merge 4 commits intoprestodb:masterfrom
Closed
Conversation
highker
reviewed
Jan 10, 2021
highker
left a comment
There was a problem hiding this comment.
As discussed offline, please re-request my review once the first two commits are fixed
a4c9ad7 to
fa63fc1
Compare
Add createMaterializedView API to MetadataManager and add CreateMaterializedViewTask that calls the API to perform MV creation. HiveMetadata implementation of the API is to add essential MV table parameters and create MV as a standard table. ConnectorMaterializedViewDefinition is the json structure that contains all essential metadata we need to keep in Metastore. It will serialize into a table parameter. By this diff, querying MV works the same as querying a standard table. We only allow query/select on MV and disallow all other statements, ex. create, insert, delete, which is enforced in StatementAnalyzer. We don't support MVs defined across different catalogs, which is enforced in CreateMaterializedViewTask
Keep a list of dependency materialized view names as a table parameter of every base table. When a new MV is created, append its name to the lists. Add MV partition validation to HiveMetastore. At the moment, we only support partitioned MV defined on partitioned base tables. And MV must have one partition directly matched (selected) from every base table. Add and implement updateTableParameters API in SemiTransactionalHiveMetastore. It only updates table parameters and will not touch table location, stats, etc. Add updateTableParameters API to ExtendedHiveMetastore and subclasses, which calls alterTable() that is already implemented.
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.
This depends on #15589
Drop materialized view works as dropping a standard table, plus removing the MV name from the list of dependent MVs saved in all base table metadata.