Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-19569

alter table db1.t1 rename db2.t2 generates MetaStoreEventListener.onDropTable()

    XMLWordPrintableJSON

Details

    Description

      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

      Attachments

        1. HIVE-19569.04.patch
          15 kB
          mahesh kumar behera
        2. HIVE-19569.03.patch
          15 kB
          mahesh kumar behera
        3. HIVE-19569.02.patch
          15 kB
          mahesh kumar behera
        4. HIVE-19569.01-branch-3.patch
          15 kB
          mahesh kumar behera
        5. HIVE-19569.01.patch
          12 kB
          mahesh kumar behera

        Issue Links

          Activity

            People

              maheshk114 mahesh kumar behera
              ekoifman Eugene Koifman
              Votes:
              0 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m