PREHOOK: query: -- EXCLUDE_HADOOP_MAJOR_VERSIONS(0.20S) create table tst1(key string, value string) partitioned by (ds string) clustered by (key) into 10 buckets PREHOOK: type: CREATETABLE PREHOOK: Output: database:default PREHOOK: Output: default@tst1 POSTHOOK: query: -- EXCLUDE_HADOOP_MAJOR_VERSIONS(0.20S) create table tst1(key string, value string) partitioned by (ds string) clustered by (key) into 10 buckets POSTHOOK: type: CREATETABLE POSTHOOK: Output: database:default POSTHOOK: Output: default@tst1 PREHOOK: query: alter table tst1 clustered by (key) into 8 buckets PREHOOK: type: ALTERTABLE_CLUSTER_SORT PREHOOK: Input: default@tst1 PREHOOK: Output: default@tst1 POSTHOOK: query: alter table tst1 clustered by (key) into 8 buckets POSTHOOK: type: ALTERTABLE_CLUSTER_SORT POSTHOOK: Input: default@tst1 POSTHOOK: Output: default@tst1 PREHOOK: query: describe formatted tst1 PREHOOK: type: DESCTABLE PREHOOK: Input: default@tst1 POSTHOOK: query: describe formatted tst1 POSTHOOK: type: DESCTABLE POSTHOOK: Input: default@tst1 # col_name data_type comment key string value string # Partition Information # col_name data_type comment ds string # Detailed Table Information Database: default #### A masked pattern was here #### Protect Mode: None Retention: 0 #### A masked pattern was here #### Table Type: MANAGED_TABLE Table Parameters: #### A masked pattern was here #### # Storage Information SerDe Library: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe InputFormat: org.apache.hadoop.mapred.TextInputFormat OutputFormat: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat Compressed: No Num Buckets: 8 Bucket Columns: [key] Sort Columns: [] Storage Desc Params: serialization.format 1 PREHOOK: query: insert overwrite table tst1 partition (ds='1') select key, value from src PREHOOK: type: QUERY PREHOOK: Input: default@src PREHOOK: Output: default@tst1@ds=1 POSTHOOK: query: insert overwrite table tst1 partition (ds='1') select key, value from src POSTHOOK: type: QUERY POSTHOOK: Input: default@src POSTHOOK: Output: default@tst1@ds=1 POSTHOOK: Lineage: tst1 PARTITION(ds=1).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] POSTHOOK: Lineage: tst1 PARTITION(ds=1).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] PREHOOK: query: describe formatted tst1 partition (ds = '1') PREHOOK: type: DESCTABLE PREHOOK: Input: default@tst1 POSTHOOK: query: describe formatted tst1 partition (ds = '1') POSTHOOK: type: DESCTABLE POSTHOOK: Input: default@tst1 # col_name data_type comment key string value string # Partition Information # col_name data_type comment ds string # Detailed Partition Information Partition Value: [1] Database: default Table: tst1 #### A masked pattern was here #### Protect Mode: None #### A masked pattern was here #### Partition Parameters: COLUMN_STATS_ACCURATE true numFiles 8 numRows 500 rawDataSize 5312 totalSize 5812 #### A masked pattern was here #### # Storage Information SerDe Library: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe InputFormat: org.apache.hadoop.mapred.TextInputFormat OutputFormat: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat Compressed: No Num Buckets: 8 Bucket Columns: [key] Sort Columns: [] Storage Desc Params: serialization.format 1 PREHOOK: query: -- Test changing bucket number alter table tst1 clustered by (key) into 12 buckets PREHOOK: type: ALTERTABLE_CLUSTER_SORT PREHOOK: Input: default@tst1 PREHOOK: Output: default@tst1 POSTHOOK: query: -- Test changing bucket number alter table tst1 clustered by (key) into 12 buckets POSTHOOK: type: ALTERTABLE_CLUSTER_SORT POSTHOOK: Input: default@tst1 POSTHOOK: Output: default@tst1 PREHOOK: query: insert overwrite table tst1 partition (ds='1') select key, value from src PREHOOK: type: QUERY PREHOOK: Input: default@src PREHOOK: Output: default@tst1@ds=1 POSTHOOK: query: insert overwrite table tst1 partition (ds='1') select key, value from src POSTHOOK: type: QUERY POSTHOOK: Input: default@src POSTHOOK: Output: default@tst1@ds=1 POSTHOOK: Lineage: tst1 PARTITION(ds=1).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] POSTHOOK: Lineage: tst1 PARTITION(ds=1).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] PREHOOK: query: describe formatted tst1 partition (ds = '1') PREHOOK: type: DESCTABLE PREHOOK: Input: default@tst1 POSTHOOK: query: describe formatted tst1 partition (ds = '1') POSTHOOK: type: DESCTABLE POSTHOOK: Input: default@tst1 # col_name data_type comment key string value string # Partition Information # col_name data_type comment ds string # Detailed Partition Information Partition Value: [1] Database: default Table: tst1 #### A masked pattern was here #### Protect Mode: None #### A masked pattern was here #### Partition Parameters: COLUMN_STATS_ACCURATE true numFiles 12 numRows 500 rawDataSize 5312 totalSize 5812 #### A masked pattern was here #### # Storage Information SerDe Library: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe InputFormat: org.apache.hadoop.mapred.TextInputFormat OutputFormat: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat Compressed: No Num Buckets: 12 Bucket Columns: [key] Sort Columns: [] Storage Desc Params: serialization.format 1 PREHOOK: query: describe formatted tst1 PREHOOK: type: DESCTABLE PREHOOK: Input: default@tst1 POSTHOOK: query: describe formatted tst1 POSTHOOK: type: DESCTABLE POSTHOOK: Input: default@tst1 # col_name data_type comment key string value string # Partition Information # col_name data_type comment ds string # Detailed Table Information Database: default #### A masked pattern was here #### Protect Mode: None Retention: 0 #### A masked pattern was here #### Table Type: MANAGED_TABLE Table Parameters: #### A masked pattern was here #### # Storage Information SerDe Library: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe InputFormat: org.apache.hadoop.mapred.TextInputFormat OutputFormat: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat Compressed: No Num Buckets: 12 Bucket Columns: [key] Sort Columns: [] Storage Desc Params: serialization.format 1 PREHOOK: query: -- Test changing bucket number of (table/partition) alter table tst1 into 4 buckets PREHOOK: type: ALTERTABLE_BUCKETNUM PREHOOK: Input: default@tst1 POSTHOOK: query: -- Test changing bucket number of (table/partition) alter table tst1 into 4 buckets POSTHOOK: type: ALTERTABLE_BUCKETNUM POSTHOOK: Input: default@tst1 POSTHOOK: Output: default@tst1 PREHOOK: query: describe formatted tst1 PREHOOK: type: DESCTABLE PREHOOK: Input: default@tst1 POSTHOOK: query: describe formatted tst1 POSTHOOK: type: DESCTABLE POSTHOOK: Input: default@tst1 # col_name data_type comment key string value string # Partition Information # col_name data_type comment ds string # Detailed Table Information Database: default #### A masked pattern was here #### Protect Mode: None Retention: 0 #### A masked pattern was here #### Table Type: MANAGED_TABLE Table Parameters: #### A masked pattern was here #### # Storage Information SerDe Library: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe InputFormat: org.apache.hadoop.mapred.TextInputFormat OutputFormat: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat Compressed: No Num Buckets: 4 Bucket Columns: [key] Sort Columns: [] Storage Desc Params: serialization.format 1 PREHOOK: query: describe formatted tst1 partition (ds = '1') PREHOOK: type: DESCTABLE PREHOOK: Input: default@tst1 POSTHOOK: query: describe formatted tst1 partition (ds = '1') POSTHOOK: type: DESCTABLE POSTHOOK: Input: default@tst1 # col_name data_type comment key string value string # Partition Information # col_name data_type comment ds string # Detailed Partition Information Partition Value: [1] Database: default Table: tst1 #### A masked pattern was here #### Protect Mode: None #### A masked pattern was here #### Partition Parameters: COLUMN_STATS_ACCURATE true numFiles 12 numRows 500 rawDataSize 5312 totalSize 5812 #### A masked pattern was here #### # Storage Information SerDe Library: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe InputFormat: org.apache.hadoop.mapred.TextInputFormat OutputFormat: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat Compressed: No Num Buckets: 12 Bucket Columns: [key] Sort Columns: [] Storage Desc Params: serialization.format 1 PREHOOK: query: alter table tst1 partition (ds = '1') into 6 buckets PREHOOK: type: ALTERPARTITION_BUCKETNUM PREHOOK: Input: default@tst1 POSTHOOK: query: alter table tst1 partition (ds = '1') into 6 buckets POSTHOOK: type: ALTERPARTITION_BUCKETNUM POSTHOOK: Input: default@tst1 POSTHOOK: Input: default@tst1@ds=1 POSTHOOK: Output: default@tst1@ds=1 PREHOOK: query: describe formatted tst1 PREHOOK: type: DESCTABLE PREHOOK: Input: default@tst1 POSTHOOK: query: describe formatted tst1 POSTHOOK: type: DESCTABLE POSTHOOK: Input: default@tst1 # col_name data_type comment key string value string # Partition Information # col_name data_type comment ds string # Detailed Table Information Database: default #### A masked pattern was here #### Protect Mode: None Retention: 0 #### A masked pattern was here #### Table Type: MANAGED_TABLE Table Parameters: #### A masked pattern was here #### # Storage Information SerDe Library: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe InputFormat: org.apache.hadoop.mapred.TextInputFormat OutputFormat: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat Compressed: No Num Buckets: 4 Bucket Columns: [key] Sort Columns: [] Storage Desc Params: serialization.format 1 PREHOOK: query: describe formatted tst1 partition (ds = '1') PREHOOK: type: DESCTABLE PREHOOK: Input: default@tst1 POSTHOOK: query: describe formatted tst1 partition (ds = '1') POSTHOOK: type: DESCTABLE POSTHOOK: Input: default@tst1 # col_name data_type comment key string value string # Partition Information # col_name data_type comment ds string # Detailed Partition Information Partition Value: [1] Database: default Table: tst1 #### A masked pattern was here #### Protect Mode: None #### A masked pattern was here #### Partition Parameters: COLUMN_STATS_ACCURATE true #### A masked pattern was here #### numFiles 12 numRows 500 rawDataSize 5312 totalSize 5812 #### A masked pattern was here #### # Storage Information SerDe Library: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe InputFormat: org.apache.hadoop.mapred.TextInputFormat OutputFormat: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat Compressed: No Num Buckets: 6 Bucket Columns: [key] Sort Columns: [] Storage Desc Params: serialization.format 1 PREHOOK: query: -- Test adding sort order alter table tst1 clustered by (key) sorted by (key asc) into 12 buckets PREHOOK: type: ALTERTABLE_CLUSTER_SORT PREHOOK: Input: default@tst1 PREHOOK: Output: default@tst1 POSTHOOK: query: -- Test adding sort order alter table tst1 clustered by (key) sorted by (key asc) into 12 buckets POSTHOOK: type: ALTERTABLE_CLUSTER_SORT POSTHOOK: Input: default@tst1 POSTHOOK: Output: default@tst1 PREHOOK: query: describe formatted tst1 PREHOOK: type: DESCTABLE PREHOOK: Input: default@tst1 POSTHOOK: query: describe formatted tst1 POSTHOOK: type: DESCTABLE POSTHOOK: Input: default@tst1 # col_name data_type comment key string value string # Partition Information # col_name data_type comment ds string # Detailed Table Information Database: default #### A masked pattern was here #### Protect Mode: None Retention: 0 #### A masked pattern was here #### Table Type: MANAGED_TABLE Table Parameters: #### A masked pattern was here #### # Storage Information SerDe Library: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe InputFormat: org.apache.hadoop.mapred.TextInputFormat OutputFormat: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat Compressed: No Num Buckets: 12 Bucket Columns: [key] Sort Columns: [Order(col:key, order:1)] Storage Desc Params: serialization.format 1 PREHOOK: query: -- Test changing sort order alter table tst1 clustered by (key) sorted by (value desc) into 12 buckets PREHOOK: type: ALTERTABLE_CLUSTER_SORT PREHOOK: Input: default@tst1 PREHOOK: Output: default@tst1 POSTHOOK: query: -- Test changing sort order alter table tst1 clustered by (key) sorted by (value desc) into 12 buckets POSTHOOK: type: ALTERTABLE_CLUSTER_SORT POSTHOOK: Input: default@tst1 POSTHOOK: Output: default@tst1 PREHOOK: query: describe formatted tst1 PREHOOK: type: DESCTABLE PREHOOK: Input: default@tst1 POSTHOOK: query: describe formatted tst1 POSTHOOK: type: DESCTABLE POSTHOOK: Input: default@tst1 # col_name data_type comment key string value string # Partition Information # col_name data_type comment ds string # Detailed Table Information Database: default #### A masked pattern was here #### Protect Mode: None Retention: 0 #### A masked pattern was here #### Table Type: MANAGED_TABLE Table Parameters: #### A masked pattern was here #### # Storage Information SerDe Library: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe InputFormat: org.apache.hadoop.mapred.TextInputFormat OutputFormat: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat Compressed: No Num Buckets: 12 Bucket Columns: [key] Sort Columns: [Order(col:value, order:0)] Storage Desc Params: serialization.format 1 PREHOOK: query: -- Test removing test order alter table tst1 clustered by (value) into 12 buckets PREHOOK: type: ALTERTABLE_CLUSTER_SORT PREHOOK: Input: default@tst1 PREHOOK: Output: default@tst1 POSTHOOK: query: -- Test removing test order alter table tst1 clustered by (value) into 12 buckets POSTHOOK: type: ALTERTABLE_CLUSTER_SORT POSTHOOK: Input: default@tst1 POSTHOOK: Output: default@tst1 PREHOOK: query: describe formatted tst1 PREHOOK: type: DESCTABLE PREHOOK: Input: default@tst1 POSTHOOK: query: describe formatted tst1 POSTHOOK: type: DESCTABLE POSTHOOK: Input: default@tst1 # col_name data_type comment key string value string # Partition Information # col_name data_type comment ds string # Detailed Table Information Database: default #### A masked pattern was here #### Protect Mode: None Retention: 0 #### A masked pattern was here #### Table Type: MANAGED_TABLE Table Parameters: #### A masked pattern was here #### # Storage Information SerDe Library: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe InputFormat: org.apache.hadoop.mapred.TextInputFormat OutputFormat: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat Compressed: No Num Buckets: 12 Bucket Columns: [value] Sort Columns: [] Storage Desc Params: serialization.format 1 PREHOOK: query: -- Test removing buckets alter table tst1 not clustered PREHOOK: type: ALTERTABLE_CLUSTER_SORT PREHOOK: Input: default@tst1 PREHOOK: Output: default@tst1 POSTHOOK: query: -- Test removing buckets alter table tst1 not clustered POSTHOOK: type: ALTERTABLE_CLUSTER_SORT POSTHOOK: Input: default@tst1 POSTHOOK: Output: default@tst1 PREHOOK: query: describe formatted tst1 PREHOOK: type: DESCTABLE PREHOOK: Input: default@tst1 POSTHOOK: query: describe formatted tst1 POSTHOOK: type: DESCTABLE POSTHOOK: Input: default@tst1 # col_name data_type comment key string value string # Partition Information # col_name data_type comment ds string # Detailed Table Information Database: default #### A masked pattern was here #### Protect Mode: None Retention: 0 #### A masked pattern was here #### Table Type: MANAGED_TABLE Table Parameters: #### A masked pattern was here #### # Storage Information SerDe Library: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe InputFormat: org.apache.hadoop.mapred.TextInputFormat OutputFormat: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat Compressed: No Num Buckets: -1 Bucket Columns: [] Sort Columns: [] Storage Desc Params: serialization.format 1