Quanlong Huang created IMPALA-13066:
---------------------------------------

             Summary: SHOW CREATE TABLE with stats and partitions
                 Key: IMPALA-13066
                 URL: https://issues.apache.org/jira/browse/IMPALA-13066
             Project: IMPALA
          Issue Type: New Feature
          Components: Backend, Frontend
            Reporter: Quanlong Huang


SHOW CREATE TABLE produces the statement to create the table. In practise, we 
also want the column stats and partitions. It'd be helpful to add an option for 
also producing the ADD PARTITION and SET COLUMN STATS statements. E.g.
{code:sql}
SHOW CREATE TABLE my_tbl WITH STATS;{code}
produces
{code:sql}
CREATE TABLE my_tbl ...;
ALTER TABLE my_tbl ADD PARTITION ...;
ALTER TABLE my_tbl PARTITION (...) SET TBLPROPERTIES('numRows'='30000', 
'STATS_GENERATED_VIA_STATS_TASK'='true');
ALTER TABLE my_tbl SET COLUMN STATS c1 
('numDVs'='19','numNulls'='0','maxSize'='8','avgSize'='8');
{code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscr...@impala.apache.org
For additional commands, e-mail: issues-all-h...@impala.apache.org

Reply via email to