Return-Path: X-Original-To: apmail-hive-dev-archive@www.apache.org Delivered-To: apmail-hive-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E4C49106DE for ; Tue, 1 Apr 2014 09:12:42 +0000 (UTC) Received: (qmail 67435 invoked by uid 500); 1 Apr 2014 09:12:40 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 67335 invoked by uid 500); 1 Apr 2014 09:12:38 -0000 Mailing-List: contact dev-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list dev@hive.apache.org Received: (qmail 67319 invoked by uid 99); 1 Apr 2014 09:12:37 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Apr 2014 09:12:36 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id C88051C011D; Tue, 1 Apr 2014 09:12:32 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============5105636160949860457==" MIME-Version: 1.0 Subject: Review Request 19865: Support partial partition exchange From: "Navis Ryu" To: "Navis Ryu" , "hive" Date: Tue, 01 Apr 2014 09:12:32 -0000 Message-ID: <20140401091232.2770.55666@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org Auto-Submitted: auto-generated Sender: "Navis Ryu" X-ReviewGroup: hive X-ReviewRequest-URL: https://reviews.apache.org/r/19865/ X-Sender: "Navis Ryu" Reply-To: "Navis Ryu" X-ReviewRequest-Repository: hive-git --===============5105636160949860457== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit ----------------------------------------------------------- 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 --===============5105636160949860457==--