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

ASF GitHub Bot commented on HIVE-19569:
---------------------------------------

GitHub user maheshk114 opened a pull request:

    https://github.com/apache/hive/pull/368

    HIVE-19569 : alter table db1.t1 rename db2.t2 generates 
MetaStoreEventListener.onDropTable()

    changed create/drop table to alter table event

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/maheshk114/hive BUG-104447

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/hive/pull/368.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #368
    
----
commit 498da7cfb697309a30cbfc723a708bfaaa9ef29e
Author: Mahesh Kumar Behera <mbehera@...>
Date:   2018-06-06T04:57:39Z

    HIVE-19569 : alter table db1.t1 rename db2.t2 generates 
MetaStoreEventListener.onDropTable()

----


> alter table db1.t1 rename db2.t2 generates 
> MetaStoreEventListener.onDropTable()
> -------------------------------------------------------------------------------
>
>                 Key: HIVE-19569
>                 URL: https://issues.apache.org/jira/browse/HIVE-19569
>             Project: Hive
>          Issue Type: Bug
>          Components: Metastore, Standalone Metastore, Transactions
>    Affects Versions: 3.0.0
>            Reporter: Eugene Koifman
>            Assignee: mahesh kumar behera
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: HIVE-19569.01.patch
>
>
> When renaming a table within the same DB, this operation causes 
> {{MetaStoreEventListener.onAlterTable()}} to fire but when changing DB name 
> for a table it causes {{MetaStoreEventListener.onDropTable()}} + 
> {{MetaStoreEventListener.onCreateTable()}}.
> The files from original table are moved to new table location.  
> This creates confusing semantics since any logic in {{onDropTable()}} doesn't 
> know about the larger context, i.e. that there will be a matching 
> {{onCreateTable()}}.
> In particular, this causes a problem for Acid tables since files moved from 
> old table use WriteIDs that are not meaningful with the context of new table.
> Current implementation is due to replication.  This should ideally be changed 
> to raise a "not supported" error for tables that are marked for replication.
> cc [~sankarh]



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to