[ 
https://issues.apache.org/jira/browse/HIVE-3575?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13475420#comment-13475420
 ] 

Namit Jain commented on HIVE-3575:
----------------------------------

Hive supports both partitioned and unpartitioned views. Let us consider a 
specific example:
create table T (key string, value string) partitioned by (ds string, hr string);
insert overwrite table T partition (ds='1', hr='1') ...;
..
insert overwrite table T partition (ds='1', hr='24') ...;
T is a partitioned table by date and hour, and Tview is a view which 
conceptually denotes the table T partitioned by ds.
create view Tview (key string, value string) partitioned by (ds string) as 
select key, value, ds from T;
When all the hourly partitions are created for a day (ds='1'), the 
corresponding partition can be added to Tview
alter view Tview add partition (ds='1');
There is a implicit dependency between Tview@ds=1 and T@ds=1/hr=1, T@ds=1/hr=2, 
.... T@ds=1/hr=24, but that dependency is not captured anywhere
in the metastore. It would be useful to explicitly create that dependency. This 
dependency can be used for all kinds of auditing purposes. 
The table's partition T@ds=1/hr=1 cannot be dropped unless the view partition 
Tview@ds=1 is dropped.


                
> maintain dependency between views/view partitions and tables/partitions
> -----------------------------------------------------------------------
>
>                 Key: HIVE-3575
>                 URL: https://issues.apache.org/jira/browse/HIVE-3575
>             Project: Hive
>          Issue Type: New Feature
>          Components: Metastore, Query Processor
>            Reporter: Namit Jain
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to