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

Cannot drop table with uppercase name after "compute statistics for columns"

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.1.0
    • Metastore, Statistics
    • None

    Description

      Create a table with uppercase name Test,
      run "analyze table Test compute statistics for columns col1"
      After this, you cannot drop the table by
      drop table Test;

      Got error:
      NestedThrowablesStackTrace:
      java.sql.BatchUpdateException: Cannot delete or update a parent row: a foreign key constraint fails ("hive2"."TAB_COL_STATS", CONSTRAINT "TAB_COL_STATS_FK" FOREIGN KEY ("TBL_ID") REFERENCES "TBLS" ("TBL_ID"))

      workaround is to use lowercase table name
      drop table test;

      Attachments

        1. HIVE-8863.1.patch
          76 kB
          Chaoyu Tang
        2. HIVE-8863.patch
          13 kB
          Chaoyu Tang

        Issue Links

          Activity

            People

              ctang Chaoyu Tang
              jyu@cloudera.com Juan Yu
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: