[ https://issues.apache.org/jira/browse/HIVE-2875?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Phabricator updated HIVE-2875: ------------------------------ Attachment: HIVE-2875.D2349.1.patch kevinwilfong requested code review of "HIVE-2875 [jira] Renaming partition changes partition location prefix". Reviewers: JIRA https://issues.apache.org/jira/browse/HIVE-2875 When a partition is renamed, instead of completely reconstructing the path, the partition specification at the end of the path is replaced with the new partition specification. If the old path for the partition did not end with the partition specification (it is some non default location) an error will be thrown, since we don't have a reasonable way to change the partition location. Renaming a partition changes the location of the partition to the default location of the table, followed by the partition specification. It should just change the partition specification of the path. If the path does not end with the old partition specification, we should probably throw an exception because renaming a partition should not change the path so dramatically, and not changing the path to reflect the new partition name could leave the partition in a very confusing state. TEST PLAN EMPTY REVISION DETAIL https://reviews.facebook.net/D2349 AFFECTED FILES metastore/src/java/org/apache/hadoop/hive/metastore/HiveAlterHandler.java ql/src/test/results/clientpositive/rename_partition_location.q.out ql/src/test/org/apache/hadoop/hive/ql/hooks/VerifyPartitionIsNotSubdirectoryOfTableHook.java ql/src/test/queries/clientpositive/rename_partition_location.q MANAGE HERALD DIFFERENTIAL RULES https://reviews.facebook.net/herald/view/differential/ WHY DID I GET THIS EMAIL? https://reviews.facebook.net/herald/transcript/5223/ Tip: use the X-Herald-Rules header to filter Herald messages in your client. > Renaming partition changes partition location prefix > ---------------------------------------------------- > > Key: HIVE-2875 > URL: https://issues.apache.org/jira/browse/HIVE-2875 > Project: Hive > Issue Type: Bug > Reporter: Kevin Wilfong > Assignee: Kevin Wilfong > Attachments: HIVE-2875.D2349.1.patch > > > Renaming a partition changes the location of the partition to the default > location of the table, followed by the partition specification. It should > just change the partition specification of the path. > If the path does not end with the old partition specification, we should > probably throw an exception because renaming a partition should not change > the path so dramatically, and not changing the path to reflect the new > partition name could leave the partition in a very confusing state. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira