----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/19865/ -----------------------------------------------------------
Review request for hive. Bugs: HIVE-6133 https://issues.apache.org/jira/browse/HIVE-6133 Repository: hive-git Description ------- 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, {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 {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. Diffs ----- metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java 844e07c metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreUtils.java 1bbe02e ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java 117295a ql/src/test/queries/clientnegative/exchange_partition_neg_partial_match1.q PRE-CREATION ql/src/test/queries/clientnegative/exchange_partition_neg_partial_match2.q PRE-CREATION ql/src/test/queries/clientnegative/exchange_partition_neg_partial_match3.q PRE-CREATION ql/src/test/queries/clientpositive/exchange_partition_partial_match1.q PRE-CREATION ql/src/test/queries/clientpositive/exchange_partition_partial_match2.q PRE-CREATION ql/src/test/queries/clientpositive/exchange_partition_partial_match3.q PRE-CREATION ql/src/test/queries/clientpositive/exchange_partition_partial_match4.q PRE-CREATION ql/src/test/results/clientnegative/exchange_partition_neg_partial_match1.q.out PRE-CREATION ql/src/test/results/clientnegative/exchange_partition_neg_partial_match2.q.out PRE-CREATION ql/src/test/results/clientnegative/exchange_partition_neg_partial_match3.q.out PRE-CREATION ql/src/test/results/clientpositive/exchange_partition_partial_match1.q.out PRE-CREATION ql/src/test/results/clientpositive/exchange_partition_partial_match2.q.out PRE-CREATION ql/src/test/results/clientpositive/exchange_partition_partial_match3.q.out PRE-CREATION ql/src/test/results/clientpositive/exchange_partition_partial_match4.q.out PRE-CREATION Diff: https://reviews.apache.org/r/19865/diff/ Testing ------- Thanks, Navis Ryu