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

Table stats removed when setting TBLPROPERTIES

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • Impala 2.6.0
    • None
    • Catalog
    • None
    • CDH 5.82 running impala2.6.0-cdh5.8.2

    Description

      Possible duplicate of IMPALA-4767

      Table stats seem to be removed when setting table properties.

      To reproduce:
      Create a table with a single column.

      [impala:21000]> create table t(c int);
      

      Insert 1 row of data:

      [impala:21000]> insert into t values (1);
      

      Compute stats:

      [impala:21000]> compute stats t;
      

      Running show table stats shows the value of 1 for #Rows:

      [impala:21000] > show table stats t;
      Query: show table stats t
      +-------+--------+------+--------------+-------------------+--------+-------------------+--------------------------------------------------------+
      | #Rows | #Files | Size | Bytes Cached | Cache Replication | Format | Incremental stats | Location                                               |
      +-------+--------+------+--------------+-------------------+--------+-------------------+--------------------------------------------------------+
      | 1     | 1      | 2B   | NOT CACHED   | NOT CACHED        | TEXT   | false             | hdfs://.../t |
      +-------+--------+------+--------------+-------------------+--------+-------------------+--------------------------------------------------------+
      

      Now set an arbitrary table property:

      impala:21000> ALTER TABLE t SET TBLPROPERTIES ('field' = 'value');
      

      But we now seem to have lost the table level stats. Show table stats in impala now says -1 for #Rows:

      [impala:21000] > show table stats t;
      Query: show table stats t
      +-------+--------+------+--------------+-------------------+--------+-------------------+--------------------------------------------------------+
      | #Rows | #Files | Size | Bytes Cached | Cache Replication | Format | Incremental stats | Location                                               |
      +-------+--------+------+--------------+-------------------+--------+-------------------+--------------------------------------------------------+
      | -1    | 1      | 2B   | NOT CACHED   | NOT CACHED        | TEXT   | false             | hdfs://.../t |
      +-------+--------+------+--------------+-------------------+--------+-------------------+--------------------------------------------------------+
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            nbrenwald Nicholas Brenwald
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: