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

Drop database cascade doesn't work with materialized views

Log workAgile BoardRank to TopRank to BottomBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0.0
    • 3.0.0
    • None

    Description

      Create a database, add a table and then a materialized view that depends on the table.  Then drop the database with cascade set.  Sometimes this will fail because when HiveMetaStore.drop_database_core goes to drop all of the tables it may drop the base table before the materialized view, which will cause an integrity constraint violation in the RDBMS.  To resolve this that method should change to fetch and drop materialized views before tables.

      cc [~jcamachorodriguez]

      Attachments

        1. HIVE-18991.patch
          10 kB
          jcamachorodriguez
        2. HIVE-18991.08.patch
          15 kB
          jcamachorodriguez
        3. HIVE-18991.07.patch
          15 kB
          jcamachorodriguez
        4. HIVE-18991.06.patch
          14 kB
          jcamachorodriguez
        5. HIVE-18991.03.patch
          12 kB
          jcamachorodriguez
        6. HIVE-18991.01.patch
          12 kB
          jcamachorodriguez

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            jcamacho Jesús Camacho Rodríguez Assign to me
            gates Alan Gates
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment