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 DA91288A5 for ; Mon, 22 Aug 2011 12:02:05 +0000 (UTC) Received: (qmail 52047 invoked by uid 500); 22 Aug 2011 12:00:05 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 43759 invoked by uid 500); 22 Aug 2011 11:56:55 -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 8105 invoked by uid 500); 22 Aug 2011 11:54:11 -0000 Delivered-To: apmail-hadoop-hive-dev@hadoop.apache.org Received: (qmail 58962 invoked by uid 99); 22 Aug 2011 11:50:52 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Aug 2011 11:50:52 +0000 X-ASF-Spam-Status: No, hits=-2000.9 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Aug 2011 11:50:45 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 21C1141300 for ; Mon, 22 Aug 2011 11:49:35 +0000 (UTC) Date: Mon, 22 Aug 2011 11:49:35 +0000 (UTC) From: "jiraposter@reviews.apache.org (JIRA)" To: hive-dev@hadoop.apache.org Message-ID: <2127246870.823.1314013775135.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1532953936.7204.1309472850116.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (HIVE-2247) ALTER TABLE RENAME PARTITION MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HIVE-2247?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13088626#comment-13088626 ] jiraposter@reviews.apache.org commented on HIVE-2247: ----------------------------------------------------- bq. On 2011-08-19 22:52:29, Siying Dong wrote: bq. > I don't think so, because I already renamed the old partition to new one. If I run "Partition part = db.getPartition(tbl, renamePartitionDesc.getOldPartSpec(), false);", I will get null instead. - Weiyan ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/1105/#review1572 ----------------------------------------------------------- On 2011-07-29 02:39:50, Weiyan Wang wrote: bq. bq. ----------------------------------------------------------- bq. This is an automatically generated e-mail. To reply, visit: bq. https://reviews.apache.org/r/1105/ bq. ----------------------------------------------------------- bq. bq. (Updated 2011-07-29 02:39:50) bq. bq. bq. Review request for Siying Dong. bq. bq. bq. Summary bq. ------- bq. bq. Implement ALTER TABLE PARTITION RENAME function to rename a partition. bq. Add HiveQL syntax "ALTER TABLE bar PARTITION (k1='v1', k2='v2') RENAME TO PARTITION (k1='v3', k2='v4');" bq. This is my first Hive diff, I just learn everything from existing codebase and may not have a good understanding on it. bq. Feel free to inform me if I make something wrong. Thanks bq. bq. bq. This addresses bug HIVE-2247. bq. https://issues.apache.org/jira/browse/HIVE-2247 bq. bq. bq. Diffs bq. ----- bq. bq. trunk/metastore/if/hive_metastore.thrift 1145366 bq. trunk/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h 1145366 bq. trunk/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp 1145366 bq. trunk/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp 1145366 bq. trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java 1145366 bq. trunk/metastore/src/gen/thrift/gen-php/hive_metastore/ThriftHiveMetastore.php 1145366 bq. trunk/metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote 1145366 bq. trunk/metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py 1145366 bq. trunk/metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb 1145366 bq. trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveAlterHandler.java 1145366 bq. trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java 1145366 bq. trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java 1145366 bq. trunk/metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java 1145366 bq. trunk/metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java 1145366 bq. trunk/metastore/src/java/org/apache/hadoop/hive/metastore/RawStore.java 1145366 bq. trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestHiveMetaStore.java 1145366 bq. trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java 1145366 bq. trunk/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java 1145366 bq. trunk/ql/src/java/org/apache/hadoop/hive/ql/metadata/Partition.java 1145366 bq. trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java 1145366 bq. trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/Hive.g 1145366 bq. trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzerFactory.java 1145366 bq. trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/AlterTableDesc.java 1145366 bq. trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/DDLWork.java 1145366 bq. trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/HiveOperation.java 1145366 bq. trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/RenamePartitionDesc.java PRE-CREATION bq. trunk/ql/src/test/queries/clientnegative/alter_rename_partition_failure.q PRE-CREATION bq. trunk/ql/src/test/queries/clientnegative/alter_rename_partition_failure2.q PRE-CREATION bq. trunk/ql/src/test/queries/clientnegative/alter_rename_partition_failure3.q PRE-CREATION bq. trunk/ql/src/test/queries/clientpositive/alter_rename_partition.q PRE-CREATION bq. trunk/ql/src/test/queries/clientpositive/alter_rename_partition_authorization.q PRE-CREATION bq. trunk/ql/src/test/results/clientnegative/alter_rename_partition_failure.q.out PRE-CREATION bq. trunk/ql/src/test/results/clientnegative/alter_rename_partition_failure2.q.out PRE-CREATION bq. trunk/ql/src/test/results/clientnegative/alter_rename_partition_failure3.q.out PRE-CREATION bq. trunk/ql/src/test/results/clientpositive/alter_rename_partition.q.out PRE-CREATION bq. trunk/ql/src/test/results/clientpositive/alter_rename_partition_authorization.q.out PRE-CREATION bq. bq. Diff: https://reviews.apache.org/r/1105/diff bq. bq. bq. Testing bq. ------- bq. bq. Add a partition A in the table bq. Rename partition A to partition B bq. Show the partitions in the table, it returns partition B. bq. SELECT the data from partition A, it returns no results bq. SELECT the data from partition B, it returns the data originally stored in partition A bq. bq. bq. Thanks, bq. bq. Weiyan bq. bq. > ALTER TABLE RENAME PARTITION > ---------------------------- > > Key: HIVE-2247 > URL: https://issues.apache.org/jira/browse/HIVE-2247 > Project: Hive > Issue Type: New Feature > Reporter: Siying Dong > Assignee: Weiyan Wang > Attachments: HIVE-2247.3.patch.txt, HIVE-2247.4.patch.txt, HIVE-2247.5.patch.txt, HIVE-2247.6.patch.txt, HIVE-2247.7.patch.txt > > > We need a ALTER TABLE TABLE RENAME PARTITIONfunction that is similar t ALTER TABLE RENAME. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira