[ 
https://issues.apache.org/jira/browse/HIVE-12676?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15061378#comment-15061378
 ] 

Lefty Leverenz commented on HIVE-12676:
---------------------------------------

[~egmont@c], yes you should file this request separately for Impala.  Thanks.

> [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)

Reply via email to