Skip to content

Add capability to get partitions separately from MV and base tables#15662

Closed
gggrace14 wants to merge 3 commits intoprestodb:masterfrom
gggrace14:mpc
Closed

Add capability to get partitions separately from MV and base tables#15662
gggrace14 wants to merge 3 commits intoprestodb:masterfrom
gggrace14:mpc

Conversation

@gggrace14
Copy link
Copy Markdown
Contributor

@gggrace14 gggrace14 commented Feb 1, 2021

This PR depends on #15589 , and only the 3rd commit is additional and needs review here.

@gggrace14 gggrace14 force-pushed the mpc branch 3 times, most recently from e9e6530 to 93862a1 Compare February 2, 2021 18:35
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 parameters
and create MV as a standard table. ConnectorMaterializedViewDefinition is the json
structure that contains all essential metadata we will save to Metastore. It will
serialize into the viewOriginalText field of table metadata. Add MV partition.
At the moment, we only support partitioned MV defined on partitioned base tables.
MV must have one partition directly matched (selected) from base tables.

By this diff, querying MV will return whatever data is contained in the MV. We only allow
alter related statement on MV, 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 and implement alterTable API in SemiTransactionalHiveMetastore.
With this commit, we only allow parameters modification for an existing table,
and will not touch table location, stats, etc.

Add alterTable API to ExtendedHiveMetastore and subclasses, and again
with this commit we only allow parameters modification for an existing table,
and will not touch table location, stats, etc. It calls alterTable() that is already implemented.
@highker highker removed their request for review March 2, 2021 03:23
@stale
Copy link
Copy Markdown

stale bot commented Sep 6, 2021

This pull request has been automatically marked as stale because it has not had recent activity. If you'd still like this PR merged, please comment on the task, make sure you've addressed reviewer comments, and rebase on the latest master. Thank you for your contributions!

@stale stale bot added the stale label Sep 6, 2021
@stale stale bot closed this Mar 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant