[
https://issues.apache.org/jira/browse/SENTRY-2144?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16374622#comment-16374622
]
Na Li commented on SENTRY-2144:
-------------------------------
[~akolb] the example command to alter table name across database is "*ALTER
TABLE DB2.table1 RENAME TO DB1.table1_new*. just put database name in front of
the table name.
changing table name across database is in the added test case
testRenameTablesCrossDB. It means hive command supports that.
in
[https://www.cloudera.com/documentation/cdh/5-0-x/Impala/Installing-and-Using-Impala/ciiu_alter_table.html,]
impala supports that
{code:java}
use d2;
-- Move table from another database to the current one.
alter table d1.mobile rename to mobile;{code}
> Table Rename should allow database name change
> ----------------------------------------------
>
> Key: SENTRY-2144
> URL: https://issues.apache.org/jira/browse/SENTRY-2144
> Project: Sentry
> Issue Type: Bug
> Reporter: Na Li
> Assignee: Na Li
> Priority: Major
> Attachments: SENTRY-2144.001.patch
>
>
> Right now, when renaming a table, if the database changes, the privileges
> will be moved to the wrong table.
> For example, original table is db1.tbl1, and user changes to db2.tbl2.
> *Expected behavior*:
> The privileges associated with db1.tbl1 should be removed from db1.tbl1, and
> added to *{color:#205081}db2{color}*.tbl2.
> *Actual behavior*:
> The privileges associated with db1.tbl1 is removed from db1.tbl1, and added
> to {color:red}*db1*{color}.tbl2.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)