You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Egmont Koblinger (JIRA)" <ji...@apache.org> on 2015/12/15 10:35:46 UTC
[jira] [Commented] (HIVE-12676) [hive+impala] Alter table Rename to
+ Set location in a single step
[ https://issues.apache.org/jira/browse/HIVE-12676?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15057709#comment-15057709 ]
Egmont Koblinger commented on HIVE-12676:
-----------------------------------------
(Please let me know if I should file a separate jira for the same feature request in Impala.)
> [hive+impala] Alter table Rename to + Set location in a single step
> -------------------------------------------------------------------
>
> Key: HIVE-12676
> URL: https://issues.apache.org/jira/browse/HIVE-12676
> Project: Hive
> Issue Type: Improvement
> Components: hpl/sql
> Reporter: Egmont Koblinger
> Assignee: Dmitry Tolpeko
> Priority: Minor
>
> Assume a nonstandard table location, let's say /foo/bar/table1. You might want to rename from table1 to table2 and move the underlying data accordingly to /foo/bar/table2.
> The "alter table ... rename to ..." clause alters the table name, but in the same step moves the data into the standard location /user/hive/warehouse/table2. Then a subsequent "alter table ... set location ..." can move it back to the desired location /foo/bar/table2.
> This is problematic if there's any permission problem in the game, e.g. not being able to write to /user/hive/warehouse. So it should be possible to move the underlying data to its desired final place without intermittent places in between.
> A probably hard to discover workaround is to set the table to external, then rename it, then set back to internal and then change its location.
> It would be great to be able to do an "alter table ... rename to ... set location ..." operation in a single step.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)