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

Dropping table after column stats are collected fails

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • None
    • None
    • Statistics
    • None

    Description

      This is my test:

      set hive.stats.dbclass=jdbc:derby;
      create table A(
        x INT,
        y INT
      )
      ROW FORMAT DELIMITED FIELDS TERMINATED BY ',';
      load data local inpath '/Users/hbutani/Dropbox/Hive-Dev/CBO/testData/test1/A.csv' 
      overwrite into table A;
      analyze table A compute statistics;
      analyze table A compute statistics for columns x,y;
      drop table A;
      

      The final drop gives:

      FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException(message:javax.jdo.JDODataStoreException: Exception thrown flushing changes to datastore
      	at org.datanucleus.api.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException(NucleusJDOHelper.java:451)
      .......
      NestedThrowablesStackTrace:
      java.sql.BatchUpdateException: DELETE on table 'TBLS' caused a violation of foreign key constraint 'TAB_COL_STATS_FK1' for key (2).  The statement has been rolled back.
      .....
      

      Running in local mode with 'set hive.stats.dbclass=jdbc:derby'. If this happens only in this mode, then it is a minor inconvenience.

      Attachments

        Issue Links

          Activity

            People

              ctang Chaoyu Tang
              rhbutani Harish Butani
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: