Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-2199

Row count not updated when compute incremental stats is used with a partition spec that contains no data

    XMLWordPrintableJSON

Details

    Description

      If 'COMPUTE INCREMENTAL STATS tbl PARTITION (x=y)' is used on an empty partition, the row count is left as -1, Impala should update this with 0.

      To reproduce:

      create table foo (x string) partitioned by (y int);
      alter table foo add partition (y = 1);
      compute incremental stats foo partition (y = 1);

      +-----------------------------------------+
      | summary                                 |
      +-----------------------------------------+
      | Updated 0 partition(s) and 1 column(s). |
      +-----------------------------------------+
      
      +-------+-------+--------+------+--------------+-------------------+--------+-------------------+-----------------------------------------------+
      | y     | #Rows | #Files | Size | Bytes Cached | Cache Replication | Format | Incremental stats | Location                                      |
      +-------+-------+--------+------+--------------+-------------------+--------+-------------------+-----------------------------------------------+
      | 1     | -1    | 0      | 0B   | NOT CACHED   | NOT CACHED        | TEXT   | false             | hdfs://localhost:20500/test-warehouse/foo/y=1 |
      | Total | 0     | 0      | 0B   | 0B           |                   |        |                   |                                               |
      +-------+-------+--------+------+--------------+-------------------+--------+-------------------+-----------------------------------------------+
      

      Attachments

        Activity

          People

            cchanning Chris Channing
            cchanning Chris Channing
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: