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

Naveen Gangam commented on HIVE-6133:
-------------------------------------

[~navis] Should we revisit this improvement? From this feature documentation 
page at https://cwiki.apache.org/confluence/display/Hive/Exchange+Partition,
{{When the command is executed, the source table's partition folder in HDFS 
will be renamed to move it to the destination table's partition folder.}}

When exchanging a partition into a already partitioned table, what will the 
order of the partition keys be for the destination table? What will happen to 
existing partitions on the source table that only had single partition key when 
it was created? Thanks

> Support partial partition exchange
> ----------------------------------
>
>                 Key: HIVE-6133
>                 URL: https://issues.apache.org/jira/browse/HIVE-6133
>             Project: Hive
>          Issue Type: Improvement
>          Components: Query Processor
>            Reporter: Navis
>            Assignee: Navis
>            Priority: Minor
>         Attachments: HIVE-6133.1.patch.txt
>
>
> Current alter exchange coerces source and destination table to have same 
> partition columns. But source table has sub-set of partitions and provided 
> partition spec supplements to be a complete partition spec, it need not to be 
> that.
> For example, table into partition 
> {noformat}
> CREATE TABLE exchange_part_test1 (f1 string) PARTITIONED BY (ds STRING);
> CREATE TABLE exchange_part_test2 (f1 string) 
> ALTER TABLE exchange_part_test1 EXCHANGE PARTITION (ds='2013-04-05') WITH 
> TABLE exchange_part_test2;
> {noformat}
> or 
> partial partitions into parent partition
> {noformat}
> CREATE TABLE exchange_part_test1 (f1 string) PARTITIONED BY (ds STRING, hr 
> STRING);
> CREATE TABLE exchange_part_test2 (f1 string) PARTITIONED BY (hr STRING)
> ALTER TABLE exchange_part_test1 EXCHANGE PARTITION (ds='2013-04-05') WITH 
> TABLE exchange_part_test2;
> {noformat}
> can be possible.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to