Description
CREATE TABLE t1 ( c1 INT COMMENT 'bla', c2 STRING ) LOCATION '$dir' TBLPROPERTIES ( 'prop1' = 'value1', 'prop2' = 'value2' )
The output of SHOW CREATE TABLE t1 is
CREATE EXTERNAL TABLE `t1`(`c1` int COMMENT 'bla', `c2` string) ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' WITH SERDEPROPERTIES ( 'serialization.format' = '1' ) STORED AS INPUTFORMAT 'org.apache.hadoop.mapred.TextInputFormat' OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' LOCATION 'file:/private/var/folders/4b/sgmfldk15js406vk7lw5llzw0000gn/T/spark-ee317538-0f8c-42d0-b08c-cf077d94fe75' TBLPROPERTIES ( 'rawDataSize' = '-1', 'numFiles' = '0', 'transient_lastDdlTime' = '1472424052', 'totalSize' = '0', 'prop1' = 'value1', 'prop2' = 'value2', 'COLUMN_STATS_ACCURATE' = 'false', 'numRows' = '-1' )
The statistics-related table properties should be skipped by SHOW CREATE TABLE, since it could be incorrect in the newly created table. See the Hive JIRA: https://issues.apache.org/jira/browse/HIVE-13792