Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
Impala 2.2
-
None
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 | | | | | +-------+-------+--------+------+--------------+-------------------+--------+-------------------+-----------------------------------------------+