Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Duplicate
-
Impala 2.7.0
-
None
Description
Renaming tables can drop column stats. For example,
create table blah (col1 string) insert into blah values ("!") compute stats blah show table stats blah show column stats blah alter table blah rename to blah2 show table stats blah2 show column stats blah2
The table stats are transferred to blah2 but columns stats are not:
pre rename:
Column Type #Distinct Values #Nulls Max Size Avg Size Column Type #Distinct Values #Nulls Max Size Avg Size 1 col1 STRING 1 -1 NULL 1
post rename:
Column Type #Distinct Values #Nulls Max Size Avg Size Column Type #Distinct Values #Nulls Max Size Avg Size 1 col1 STRING -1 -1 NULL -1
At this point I think compute stats command is causing this inconsistent state but this needs further debugging. Workaround is to recompute stats post rename.