PREHOOK: query: -- Test SHOW CREATE TABLE on an external, clustered and sorted table. Then test the query again after ALTERs. CREATE EXTERNAL TABLE tmp_showcrt1 (key smallint, value float) CLUSTERED BY (key) SORTED BY (value DESC) INTO 5 BUCKETS PREHOOK: type: CREATETABLE PREHOOK: Output: database:default PREHOOK: Output: default@tmp_showcrt1 POSTHOOK: query: -- Test SHOW CREATE TABLE on an external, clustered and sorted table. Then test the query again after ALTERs. CREATE EXTERNAL TABLE tmp_showcrt1 (key smallint, value float) CLUSTERED BY (key) SORTED BY (value DESC) INTO 5 BUCKETS POSTHOOK: type: CREATETABLE POSTHOOK: Output: database:default POSTHOOK: Output: default@tmp_showcrt1 PREHOOK: query: SHOW CREATE TABLE tmp_showcrt1 PREHOOK: type: SHOW_CREATETABLE PREHOOK: Input: default@tmp_showcrt1 POSTHOOK: query: SHOW CREATE TABLE tmp_showcrt1 POSTHOOK: type: SHOW_CREATETABLE POSTHOOK: Input: default@tmp_showcrt1 CREATE EXTERNAL TABLE `tmp_showcrt1`( `key` smallint, `value` float) CLUSTERED BY ( key) SORTED BY ( value DESC) INTO 5 BUCKETS ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' STORED AS INPUTFORMAT 'org.apache.hadoop.mapred.TextInputFormat' OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' LOCATION #### A masked pattern was here #### TBLPROPERTIES ( #### A masked pattern was here #### PREHOOK: query: -- Add a comment to the table, change the EXTERNAL property, and test SHOW CREATE TABLE on the change. ALTER TABLE tmp_showcrt1 SET TBLPROPERTIES ('comment'='temporary table', 'EXTERNAL'='FALSE') PREHOOK: type: ALTERTABLE_PROPERTIES PREHOOK: Input: default@tmp_showcrt1 PREHOOK: Output: default@tmp_showcrt1 POSTHOOK: query: -- Add a comment to the table, change the EXTERNAL property, and test SHOW CREATE TABLE on the change. ALTER TABLE tmp_showcrt1 SET TBLPROPERTIES ('comment'='temporary table', 'EXTERNAL'='FALSE') POSTHOOK: type: ALTERTABLE_PROPERTIES POSTHOOK: Input: default@tmp_showcrt1 POSTHOOK: Output: default@tmp_showcrt1 PREHOOK: query: SHOW CREATE TABLE tmp_showcrt1 PREHOOK: type: SHOW_CREATETABLE PREHOOK: Input: default@tmp_showcrt1 POSTHOOK: query: SHOW CREATE TABLE tmp_showcrt1 POSTHOOK: type: SHOW_CREATETABLE POSTHOOK: Input: default@tmp_showcrt1 CREATE TABLE `tmp_showcrt1`( `key` smallint, `value` float) COMMENT 'temporary table' CLUSTERED BY ( key) SORTED BY ( value DESC) INTO 5 BUCKETS ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' STORED AS INPUTFORMAT 'org.apache.hadoop.mapred.TextInputFormat' OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' LOCATION #### A masked pattern was here #### TBLPROPERTIES ( 'COLUMN_STATS_ACCURATE'='false', 'EXTERNAL'='FALSE', #### A masked pattern was here #### 'numFiles'='0', 'numRows'='-1', 'rawDataSize'='-1', 'totalSize'='0', #### A masked pattern was here #### PREHOOK: query: -- Alter the table comment, change the EXTERNAL property back and test SHOW CREATE TABLE on the change. ALTER TABLE tmp_showcrt1 SET TBLPROPERTIES ('comment'='changed comment', 'EXTERNAL'='TRUE') PREHOOK: type: ALTERTABLE_PROPERTIES PREHOOK: Input: default@tmp_showcrt1 PREHOOK: Output: default@tmp_showcrt1 POSTHOOK: query: -- Alter the table comment, change the EXTERNAL property back and test SHOW CREATE TABLE on the change. ALTER TABLE tmp_showcrt1 SET TBLPROPERTIES ('comment'='changed comment', 'EXTERNAL'='TRUE') POSTHOOK: type: ALTERTABLE_PROPERTIES POSTHOOK: Input: default@tmp_showcrt1 POSTHOOK: Output: default@tmp_showcrt1 PREHOOK: query: SHOW CREATE TABLE tmp_showcrt1 PREHOOK: type: SHOW_CREATETABLE PREHOOK: Input: default@tmp_showcrt1 POSTHOOK: query: SHOW CREATE TABLE tmp_showcrt1 POSTHOOK: type: SHOW_CREATETABLE POSTHOOK: Input: default@tmp_showcrt1 CREATE EXTERNAL TABLE `tmp_showcrt1`( `key` smallint, `value` float) COMMENT 'changed comment' CLUSTERED BY ( key) SORTED BY ( value DESC) INTO 5 BUCKETS ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' STORED AS INPUTFORMAT 'org.apache.hadoop.mapred.TextInputFormat' OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' LOCATION #### A masked pattern was here #### TBLPROPERTIES ( 'COLUMN_STATS_ACCURATE'='false', #### A masked pattern was here #### 'numFiles'='0', 'numRows'='-1', 'rawDataSize'='-1', 'totalSize'='0', #### A masked pattern was here #### PREHOOK: query: -- Change the 'SORTBUCKETCOLSPREFIX' property and test SHOW CREATE TABLE. The output should not change. ALTER TABLE tmp_showcrt1 SET TBLPROPERTIES ('SORTBUCKETCOLSPREFIX'='FALSE') PREHOOK: type: ALTERTABLE_PROPERTIES PREHOOK: Input: default@tmp_showcrt1 PREHOOK: Output: default@tmp_showcrt1 POSTHOOK: query: -- Change the 'SORTBUCKETCOLSPREFIX' property and test SHOW CREATE TABLE. The output should not change. ALTER TABLE tmp_showcrt1 SET TBLPROPERTIES ('SORTBUCKETCOLSPREFIX'='FALSE') POSTHOOK: type: ALTERTABLE_PROPERTIES POSTHOOK: Input: default@tmp_showcrt1 POSTHOOK: Output: default@tmp_showcrt1 PREHOOK: query: SHOW CREATE TABLE tmp_showcrt1 PREHOOK: type: SHOW_CREATETABLE PREHOOK: Input: default@tmp_showcrt1 POSTHOOK: query: SHOW CREATE TABLE tmp_showcrt1 POSTHOOK: type: SHOW_CREATETABLE POSTHOOK: Input: default@tmp_showcrt1 CREATE EXTERNAL TABLE `tmp_showcrt1`( `key` smallint, `value` float) COMMENT 'changed comment' CLUSTERED BY ( key) SORTED BY ( value DESC) INTO 5 BUCKETS ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' STORED AS INPUTFORMAT 'org.apache.hadoop.mapred.TextInputFormat' OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' LOCATION #### A masked pattern was here #### TBLPROPERTIES ( 'COLUMN_STATS_ACCURATE'='false', #### A masked pattern was here #### 'numFiles'='0', 'numRows'='-1', 'rawDataSize'='-1', 'totalSize'='0', #### A masked pattern was here #### PREHOOK: query: -- Alter the storage handler of the table, and test SHOW CREATE TABLE. ALTER TABLE tmp_showcrt1 SET TBLPROPERTIES ('storage_handler'='org.apache.hadoop.hive.ql.metadata.DefaultStorageHandler') PREHOOK: type: ALTERTABLE_PROPERTIES PREHOOK: Input: default@tmp_showcrt1 PREHOOK: Output: default@tmp_showcrt1 POSTHOOK: query: -- Alter the storage handler of the table, and test SHOW CREATE TABLE. ALTER TABLE tmp_showcrt1 SET TBLPROPERTIES ('storage_handler'='org.apache.hadoop.hive.ql.metadata.DefaultStorageHandler') POSTHOOK: type: ALTERTABLE_PROPERTIES POSTHOOK: Input: default@tmp_showcrt1 POSTHOOK: Output: default@tmp_showcrt1 PREHOOK: query: SHOW CREATE TABLE tmp_showcrt1 PREHOOK: type: SHOW_CREATETABLE PREHOOK: Input: default@tmp_showcrt1 POSTHOOK: query: SHOW CREATE TABLE tmp_showcrt1 POSTHOOK: type: SHOW_CREATETABLE POSTHOOK: Input: default@tmp_showcrt1 CREATE EXTERNAL TABLE `tmp_showcrt1`( `key` smallint, `value` float) COMMENT 'changed comment' CLUSTERED BY ( key) SORTED BY ( value DESC) INTO 5 BUCKETS ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' STORED BY 'org.apache.hadoop.hive.ql.metadata.DefaultStorageHandler' WITH SERDEPROPERTIES ( 'serialization.format'='1') LOCATION #### A masked pattern was here #### TBLPROPERTIES ( 'COLUMN_STATS_ACCURATE'='false', #### A masked pattern was here #### 'numFiles'='0', 'numRows'='-1', 'rawDataSize'='-1', 'totalSize'='0', #### A masked pattern was here #### PREHOOK: query: DROP TABLE tmp_showcrt1 PREHOOK: type: DROPTABLE PREHOOK: Input: default@tmp_showcrt1 PREHOOK: Output: default@tmp_showcrt1 POSTHOOK: query: DROP TABLE tmp_showcrt1 POSTHOOK: type: DROPTABLE POSTHOOK: Input: default@tmp_showcrt1 POSTHOOK: Output: default@tmp_showcrt1