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

Sushanth Sowmyan commented on HIVE-4847:
----------------------------------------

I do not know of any committer's plan to incorporate this or to explicitly 
block it - I think this falls in a narrow niche of a feature that would be 
useful to have, but can prove to be pretty disruptive in terms of the effects 
it has on a wider ecosystem tooling. At the very least, I think that this patch 
should not go in as-is without some sort of gating mechanism wherein, by some 
conf parameter, this feature can be disabled.

I can give one example of a place where I am concerned about this feature, for 
eg - I know that external systems like Falcon, that implement replication 
between one hive warehouse to another depend on a db name being a primary key, 
and having that change behind the scene can be destructive to them. In 
addition, in the HiveMetaStore, we have event logs that do treat the db name as 
a primary key to provide this functionality to Falcon/etc, and this patch does 
nothing to change those event log contents. And I stress to add, nor should it 
modify event logs directly, since that would violate the expectation a third 
party tool has. One way to do this in a seamless manner would be to introduce 
another notion of a DBKEY (not DB_ID, since that can be different for each hive 
warehouse) which will remain unique for a db and not change when a db is 
renamed. Once that's done, all hive components that use DBNAME as the 
identifying basis would need to be rewritten to work against the DBKEY, and 
then, renaming DBNAME might be allowed. This will be a huge change.

Another example I wonder about is with things like ACID transactions - we have 
a log of tables needing compaction - I wonder if this change will affect them 
too. +cc [~alangates]/[~ekoifman].

> add rename database functionality
> ---------------------------------
>
>                 Key: HIVE-4847
>                 URL: https://issues.apache.org/jira/browse/HIVE-4847
>             Project: Hive
>          Issue Type: New Feature
>    Affects Versions: 0.11.0
>            Reporter: Greg Rahn
>            Assignee: Teddy Choi
>            Priority: Minor
>         Attachments: HIVE-4847.1.patch.txt, HIVE-4847.2.patch.txt
>
>
> There seems to be no way to rename a database in Hive, functionality to do so 
> would be nice.
> Proposed syntax:
> ALTER DATABASE dbname RENAME TO newdbname;



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to