HIVE-2989 introduced the ability to create, drop and desc table links in Hive. This improvement adds on to table links, and allows the ability to:
a) Add partition to a table link
ALTER TABLELINK T@Y ADD [IF NOT EXISTS] PARTITION partition_spec PARTITION partition_spec ...
The partition being added must be available on the source of the link table T since it is a link not a real partition.
b) Drop partition on a table link
ALTER TABLELINK T@Y DROP [IF EXISTS] PARTITION partition_spec, PARTITION partition_spec, ...
This drop will not impact the source table of the link
c) Query table links using T@Y syntax:
SELECT DISTINCT user from T@Y where partition_key < 'val'
This query will query the partitions on the source table of the table link.
a) Set properties on a tablelink
ALTER TABLELINK T@Y LINKPROPERTIES(PROPERTY='value');
Once this patch is submitted, in conjunction with HIVE_2989, a user can create a link, add and drop partitions from it and query the data in the table link.
Dynamic link support is being added in a separate JIRA.