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

Alter table rename can drop column stats from tables

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • Impala 2.7.0
    • None
    • Catalog

    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.

      Attachments

        Activity

          People

            bharathv Bharath Vissapragada
            bharathv Bharath Vissapragada
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: