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

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

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.1.0
    • Component/s: Metastore, Statistics
    • Labels:
      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

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

                Dates

                • Created:
                  Updated:
                  Resolved: