PREHOOK: query: -- create testing table. create table alter_coltype(key string, value string) partitioned by (dt string, ts string) PREHOOK: type: CREATETABLE PREHOOK: Output: database:default POSTHOOK: query: -- create testing table. create table alter_coltype(key string, value string) partitioned by (dt string, ts string) POSTHOOK: type: CREATETABLE POSTHOOK: Output: database:default POSTHOOK: Output: default@alter_coltype PREHOOK: query: -- insert and create a partition. insert overwrite table alter_coltype partition(dt='100x', ts='6:30pm') select * from src1 PREHOOK: type: QUERY PREHOOK: Input: default@src1 PREHOOK: Output: default@alter_coltype@dt=100x/ts=6%3A30pm POSTHOOK: query: -- insert and create a partition. insert overwrite table alter_coltype partition(dt='100x', ts='6:30pm') select * from src1 POSTHOOK: type: QUERY POSTHOOK: Input: default@src1 POSTHOOK: Output: default@alter_coltype@dt=100x/ts=6%3A30pm POSTHOOK: Lineage: alter_coltype PARTITION(dt=100x,ts=6:30pm).key SIMPLE [(src1)src1.FieldSchema(name:key, type:string, comment:default), ] POSTHOOK: Lineage: alter_coltype PARTITION(dt=100x,ts=6:30pm).value SIMPLE [(src1)src1.FieldSchema(name:value, type:string, comment:default), ] PREHOOK: query: desc alter_coltype PREHOOK: type: DESCTABLE PREHOOK: Input: default@alter_coltype POSTHOOK: query: desc alter_coltype POSTHOOK: type: DESCTABLE POSTHOOK: Input: default@alter_coltype POSTHOOK: Lineage: alter_coltype PARTITION(dt=100x,ts=6:30pm).key SIMPLE [(src1)src1.FieldSchema(name:key, type:string, comment:default), ] POSTHOOK: Lineage: alter_coltype PARTITION(dt=100x,ts=6:30pm).value SIMPLE [(src1)src1.FieldSchema(name:value, type:string, comment:default), ] key string value string dt string ts string # Partition Information # col_name data_type comment dt string ts string PREHOOK: query: -- select with paritition predicate. select count(*) from alter_coltype where dt = '100x' PREHOOK: type: QUERY PREHOOK: Input: default@alter_coltype PREHOOK: Input: default@alter_coltype@dt=100x/ts=6%3A30pm #### A masked pattern was here #### POSTHOOK: query: -- select with paritition predicate. select count(*) from alter_coltype where dt = '100x' POSTHOOK: type: QUERY POSTHOOK: Input: default@alter_coltype POSTHOOK: Input: default@alter_coltype@dt=100x/ts=6%3A30pm #### A masked pattern was here #### POSTHOOK: Lineage: alter_coltype PARTITION(dt=100x,ts=6:30pm).key SIMPLE [(src1)src1.FieldSchema(name:key, type:string, comment:default), ] POSTHOOK: Lineage: alter_coltype PARTITION(dt=100x,ts=6:30pm).value SIMPLE [(src1)src1.FieldSchema(name:value, type:string, comment:default), ] 25 PREHOOK: query: -- alter partition key column data type for dt column. -- alter table alter_coltype partition column (dt int); -- load a new partition using new data type. -- insert overwrite table alter_coltype partition(dt=10, ts='3.0') select * from src1; -- make sure the partition predicate still works. -- select count(*) from alter_coltype where dt = '100x'; -- explain extended select count(*) from alter_coltype where dt = '100x'; -- select count(*) from alter_coltype where dt = '100'; -- alter partition key column data type for ts column. -- alter table alter_coltype partition column (ts double); -- alter table alter_coltype partition column (dt string); -- load a new partition using new data type. -- insert overwrite table alter_coltype partition(dt='100x', ts=3.0) select * from src1; -- validate partition key column predicate can still work. -- select count(*) from alter_coltype where ts = '6:30pm'; -- explain extended select count(*) from alter_coltype where ts = '6:30pm'; -- validate partition key column predicate on two different partition column data type -- can still work. -- select count(*) from alter_coltype where ts = 3.0 and dt=10; -- explain extended select count(*) from alter_coltype where ts = 3.0 and dt=10; -- query where multiple partition values (of different datatypes) are being selected -- select key, value, dt, ts from alter_coltype where dt is not null; -- explain extended select key, value, dt, ts from alter_coltype where dt is not null; -- select count(*) from alter_coltype where ts = 3.0; -- make sure the partition predicate still works. -- select count(*) from alter_coltype where dt = '100x' or dt = '10'; -- explain extended select count(*) from alter_coltype where dt = '100x' or dt = '10'; -- desc alter_coltype; -- desc alter_coltype partition (dt='100x', ts='6:30pm'); -- desc alter_coltype partition (dt='100x', ts=3.0); -- desc alter_coltype partition (dt=10, ts=3.0); drop table alter_coltype PREHOOK: type: DROPTABLE PREHOOK: Input: default@alter_coltype PREHOOK: Output: default@alter_coltype POSTHOOK: query: -- alter partition key column data type for dt column. -- alter table alter_coltype partition column (dt int); -- load a new partition using new data type. -- insert overwrite table alter_coltype partition(dt=10, ts='3.0') select * from src1; -- make sure the partition predicate still works. -- select count(*) from alter_coltype where dt = '100x'; -- explain extended select count(*) from alter_coltype where dt = '100x'; -- select count(*) from alter_coltype where dt = '100'; -- alter partition key column data type for ts column. -- alter table alter_coltype partition column (ts double); -- alter table alter_coltype partition column (dt string); -- load a new partition using new data type. -- insert overwrite table alter_coltype partition(dt='100x', ts=3.0) select * from src1; -- validate partition key column predicate can still work. -- select count(*) from alter_coltype where ts = '6:30pm'; -- explain extended select count(*) from alter_coltype where ts = '6:30pm'; -- validate partition key column predicate on two different partition column data type -- can still work. -- select count(*) from alter_coltype where ts = 3.0 and dt=10; -- explain extended select count(*) from alter_coltype where ts = 3.0 and dt=10; -- query where multiple partition values (of different datatypes) are being selected -- select key, value, dt, ts from alter_coltype where dt is not null; -- explain extended select key, value, dt, ts from alter_coltype where dt is not null; -- select count(*) from alter_coltype where ts = 3.0; -- make sure the partition predicate still works. -- select count(*) from alter_coltype where dt = '100x' or dt = '10'; -- explain extended select count(*) from alter_coltype where dt = '100x' or dt = '10'; -- desc alter_coltype; -- desc alter_coltype partition (dt='100x', ts='6:30pm'); -- desc alter_coltype partition (dt='100x', ts=3.0); -- desc alter_coltype partition (dt=10, ts=3.0); drop table alter_coltype POSTHOOK: type: DROPTABLE POSTHOOK: Input: default@alter_coltype POSTHOOK: Output: default@alter_coltype POSTHOOK: Lineage: alter_coltype PARTITION(dt=100x,ts=6:30pm).key SIMPLE [(src1)src1.FieldSchema(name:key, type:string, comment:default), ] POSTHOOK: Lineage: alter_coltype PARTITION(dt=100x,ts=6:30pm).value SIMPLE [(src1)src1.FieldSchema(name:value, type:string, comment:default), ]