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

CliDriver shutdown tries to drop index table again which was already dropped when dropping the original table

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 1.2.1
    • 2.0.0
    • None
    • None

    Description

      Steps to repro:

      set hive.stats.dbclass=fs;
      set hive.stats.autogather=true;
      set hive.cbo.enable=true;
      
      DROP TABLE IF EXISTS aa;
      CREATE TABLE aa (L_ORDERKEY      INT,
                                      L_PARTKEY       INT,
                                      L_SUPPKEY       INT,
                                      L_LINENUMBER    INT,
                                      L_QUANTITY      DOUBLE,
                                      L_EXTENDEDPRICE DOUBLE,
                                      L_DISCOUNT      DOUBLE,
                                      L_TAX           DOUBLE,
                                      L_RETURNFLAG    STRING,
                                      L_LINESTATUS    STRING,
                                      l_shipdate      STRING,
                                      L_COMMITDATE    STRING,
                                      L_RECEIPTDATE   STRING,
                                      L_SHIPINSTRUCT  STRING,
                                      L_SHIPMODE      STRING,
                                      L_COMMENT       STRING)
      ROW FORMAT DELIMITED
      FIELDS TERMINATED BY '|';
      
      LOAD DATA LOCAL INPATH '../../data/files/lineitem.txt' OVERWRITE INTO TABLE aa;
      
      CREATE INDEX aa_lshipdate_idx ON TABLE aa(l_shipdate) AS 'org.apache.hadoop.hive.ql.index.AggregateIndexHandler' WITH DEFERRED REBUILD IDXPROPERTIES("AGGREGATES"="count(l_shipdate)");
      ALTER INDEX aa_lshipdate_idx ON aa REBUILD;
      
      show tables;
      
      explain select l_shipdate, count(l_shipdate)
      from aa
      group by l_shipdate;
      

      The problem is that, we create an index table default_aa_lshipdate_idx, (default is the database name) and it comes after the table aa. Then, it first drop aa, which will drop default_aa_lshipdate_idx as well as it is related to aa. It will not find the table default_aa_lshipdate_idx when it tries to drop it again, which will throw an exception.

      Attachments

        1. HIVE-11846.01.patch
          10 kB
          Pengcheng Xiong

        Issue Links

          Activity

            People

              pxiong Pengcheng Xiong
              pxiong Pengcheng Xiong
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: