[
https://issues.apache.org/jira/browse/HIVE-4847?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13733205#comment-13733205
]
Teddy Choi commented on HIVE-4847:
----------------------------------
I wrote some code to modify a MDatabase name on ObjectStore, and it seemed like
working properly. But it had a serious bug. When a user creates and manipulates
a new database and tables with old names, data gets corrupted. Because old
tables and new tables used same data directories. It was more complex than I
thought first.
I will modify the code to move directories containing actual data. There will
be some exceptional cases; such as there already exist directories with same
names, or external tables. When Hive meets those cases, it will throw an error
to prevent data corruption.
> 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
>
> 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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira