[
https://issues.apache.org/jira/browse/HIVE-12676?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dmitry Tolpeko updated HIVE-12676:
----------------------------------
Component/s: (was: hpl/sql)
> [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
> 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.4.14#64029)