PREHOOK: query: -- this test verifies that the block merge task that can follow a query to generate dynamic -- partitions does not produce incorrect results by dropping partitions create table srcpart_merge_dp like srcpart PREHOOK: type: CREATETABLE PREHOOK: Output: database:default PREHOOK: Output: default@srcpart_merge_dp POSTHOOK: query: -- this test verifies that the block merge task that can follow a query to generate dynamic -- partitions does not produce incorrect results by dropping partitions create table srcpart_merge_dp like srcpart POSTHOOK: type: CREATETABLE POSTHOOK: Output: database:default POSTHOOK: Output: default@srcpart_merge_dp PREHOOK: query: create table srcpart_merge_dp_rc like srcpart PREHOOK: type: CREATETABLE PREHOOK: Output: database:default PREHOOK: Output: default@srcpart_merge_dp_rc POSTHOOK: query: create table srcpart_merge_dp_rc like srcpart POSTHOOK: type: CREATETABLE POSTHOOK: Output: database:default POSTHOOK: Output: default@srcpart_merge_dp_rc PREHOOK: query: alter table srcpart_merge_dp_rc set fileformat RCFILE PREHOOK: type: ALTERTABLE_FILEFORMAT PREHOOK: Input: default@srcpart_merge_dp_rc PREHOOK: Output: default@srcpart_merge_dp_rc POSTHOOK: query: alter table srcpart_merge_dp_rc set fileformat RCFILE POSTHOOK: type: ALTERTABLE_FILEFORMAT POSTHOOK: Input: default@srcpart_merge_dp_rc POSTHOOK: Output: default@srcpart_merge_dp_rc PREHOOK: query: create table merge_dynamic_part like srcpart PREHOOK: type: CREATETABLE PREHOOK: Output: database:default PREHOOK: Output: default@merge_dynamic_part POSTHOOK: query: create table merge_dynamic_part like srcpart POSTHOOK: type: CREATETABLE POSTHOOK: Output: database:default POSTHOOK: Output: default@merge_dynamic_part PREHOOK: query: alter table merge_dynamic_part set fileformat RCFILE PREHOOK: type: ALTERTABLE_FILEFORMAT PREHOOK: Input: default@merge_dynamic_part PREHOOK: Output: default@merge_dynamic_part POSTHOOK: query: alter table merge_dynamic_part set fileformat RCFILE POSTHOOK: type: ALTERTABLE_FILEFORMAT POSTHOOK: Input: default@merge_dynamic_part POSTHOOK: Output: default@merge_dynamic_part PREHOOK: query: load data local inpath '../../data/files/srcbucket20.txt' INTO TABLE srcpart_merge_dp partition(ds='2008-04-08', hr=11) PREHOOK: type: LOAD #### A masked pattern was here #### PREHOOK: Output: default@srcpart_merge_dp POSTHOOK: query: load data local inpath '../../data/files/srcbucket20.txt' INTO TABLE srcpart_merge_dp partition(ds='2008-04-08', hr=11) POSTHOOK: type: LOAD #### A masked pattern was here #### POSTHOOK: Output: default@srcpart_merge_dp POSTHOOK: Output: default@srcpart_merge_dp@ds=2008-04-08/hr=11 PREHOOK: query: load data local inpath '../../data/files/srcbucket21.txt' INTO TABLE srcpart_merge_dp partition(ds='2008-04-08', hr=11) PREHOOK: type: LOAD #### A masked pattern was here #### PREHOOK: Output: default@srcpart_merge_dp@ds=2008-04-08/hr=11 POSTHOOK: query: load data local inpath '../../data/files/srcbucket21.txt' INTO TABLE srcpart_merge_dp partition(ds='2008-04-08', hr=11) POSTHOOK: type: LOAD #### A masked pattern was here #### POSTHOOK: Output: default@srcpart_merge_dp@ds=2008-04-08/hr=11 PREHOOK: query: load data local inpath '../../data/files/srcbucket22.txt' INTO TABLE srcpart_merge_dp partition(ds='2008-04-08', hr=11) PREHOOK: type: LOAD #### A masked pattern was here #### PREHOOK: Output: default@srcpart_merge_dp@ds=2008-04-08/hr=11 POSTHOOK: query: load data local inpath '../../data/files/srcbucket22.txt' INTO TABLE srcpart_merge_dp partition(ds='2008-04-08', hr=11) POSTHOOK: type: LOAD #### A masked pattern was here #### POSTHOOK: Output: default@srcpart_merge_dp@ds=2008-04-08/hr=11 PREHOOK: query: load data local inpath '../../data/files/srcbucket23.txt' INTO TABLE srcpart_merge_dp partition(ds='2008-04-08', hr=11) PREHOOK: type: LOAD #### A masked pattern was here #### PREHOOK: Output: default@srcpart_merge_dp@ds=2008-04-08/hr=11 POSTHOOK: query: load data local inpath '../../data/files/srcbucket23.txt' INTO TABLE srcpart_merge_dp partition(ds='2008-04-08', hr=11) POSTHOOK: type: LOAD #### A masked pattern was here #### POSTHOOK: Output: default@srcpart_merge_dp@ds=2008-04-08/hr=11 PREHOOK: query: load data local inpath '../../data/files/srcbucket20.txt' INTO TABLE srcpart_merge_dp partition(ds='2008-04-08', hr=12) PREHOOK: type: LOAD #### A masked pattern was here #### PREHOOK: Output: default@srcpart_merge_dp POSTHOOK: query: load data local inpath '../../data/files/srcbucket20.txt' INTO TABLE srcpart_merge_dp partition(ds='2008-04-08', hr=12) POSTHOOK: type: LOAD #### A masked pattern was here #### POSTHOOK: Output: default@srcpart_merge_dp POSTHOOK: Output: default@srcpart_merge_dp@ds=2008-04-08/hr=12 PREHOOK: query: load data local inpath '../../data/files/srcbucket21.txt' INTO TABLE srcpart_merge_dp partition(ds='2008-04-08', hr=12) PREHOOK: type: LOAD #### A masked pattern was here #### PREHOOK: Output: default@srcpart_merge_dp@ds=2008-04-08/hr=12 POSTHOOK: query: load data local inpath '../../data/files/srcbucket21.txt' INTO TABLE srcpart_merge_dp partition(ds='2008-04-08', hr=12) POSTHOOK: type: LOAD #### A masked pattern was here #### POSTHOOK: Output: default@srcpart_merge_dp@ds=2008-04-08/hr=12 PREHOOK: query: load data local inpath '../../data/files/srcbucket22.txt' INTO TABLE srcpart_merge_dp partition(ds='2008-04-08', hr=12) PREHOOK: type: LOAD #### A masked pattern was here #### PREHOOK: Output: default@srcpart_merge_dp@ds=2008-04-08/hr=12 POSTHOOK: query: load data local inpath '../../data/files/srcbucket22.txt' INTO TABLE srcpart_merge_dp partition(ds='2008-04-08', hr=12) POSTHOOK: type: LOAD #### A masked pattern was here #### POSTHOOK: Output: default@srcpart_merge_dp@ds=2008-04-08/hr=12 PREHOOK: query: load data local inpath '../../data/files/srcbucket23.txt' INTO TABLE srcpart_merge_dp partition(ds='2008-04-08', hr=12) PREHOOK: type: LOAD #### A masked pattern was here #### PREHOOK: Output: default@srcpart_merge_dp@ds=2008-04-08/hr=12 POSTHOOK: query: load data local inpath '../../data/files/srcbucket23.txt' INTO TABLE srcpart_merge_dp partition(ds='2008-04-08', hr=12) POSTHOOK: type: LOAD #### A masked pattern was here #### POSTHOOK: Output: default@srcpart_merge_dp@ds=2008-04-08/hr=12 PREHOOK: query: insert overwrite table srcpart_merge_dp_rc partition (ds = '2008-04-08', hr) select key, value, hr from srcpart_merge_dp where ds = '2008-04-08' PREHOOK: type: QUERY PREHOOK: Input: default@srcpart_merge_dp PREHOOK: Input: default@srcpart_merge_dp@ds=2008-04-08/hr=11 PREHOOK: Input: default@srcpart_merge_dp@ds=2008-04-08/hr=12 PREHOOK: Output: default@srcpart_merge_dp_rc@ds=2008-04-08 POSTHOOK: query: insert overwrite table srcpart_merge_dp_rc partition (ds = '2008-04-08', hr) select key, value, hr from srcpart_merge_dp where ds = '2008-04-08' POSTHOOK: type: QUERY POSTHOOK: Input: default@srcpart_merge_dp POSTHOOK: Input: default@srcpart_merge_dp@ds=2008-04-08/hr=11 POSTHOOK: Input: default@srcpart_merge_dp@ds=2008-04-08/hr=12 POSTHOOK: Output: default@srcpart_merge_dp_rc@ds=2008-04-08/hr=11 POSTHOOK: Output: default@srcpart_merge_dp_rc@ds=2008-04-08/hr=12 POSTHOOK: Lineage: srcpart_merge_dp_rc PARTITION(ds=2008-04-08,hr=11).key SIMPLE [(srcpart_merge_dp)srcpart_merge_dp.FieldSchema(name:key, type:string, comment:default), ] POSTHOOK: Lineage: srcpart_merge_dp_rc PARTITION(ds=2008-04-08,hr=11).value SIMPLE [(srcpart_merge_dp)srcpart_merge_dp.FieldSchema(name:value, type:string, comment:default), ] POSTHOOK: Lineage: srcpart_merge_dp_rc PARTITION(ds=2008-04-08,hr=12).key SIMPLE [(srcpart_merge_dp)srcpart_merge_dp.FieldSchema(name:key, type:string, comment:default), ] POSTHOOK: Lineage: srcpart_merge_dp_rc PARTITION(ds=2008-04-08,hr=12).value SIMPLE [(srcpart_merge_dp)srcpart_merge_dp.FieldSchema(name:value, type:string, comment:default), ] PREHOOK: query: explain insert overwrite table merge_dynamic_part partition (ds = '2008-04-08', hr) select key, value, if(key % 2 == 0, 'a1', 'b1') as hr from srcpart_merge_dp_rc where ds = '2008-04-08' PREHOOK: type: QUERY POSTHOOK: query: explain insert overwrite table merge_dynamic_part partition (ds = '2008-04-08', hr) select key, value, if(key % 2 == 0, 'a1', 'b1') as hr from srcpart_merge_dp_rc where ds = '2008-04-08' POSTHOOK: type: QUERY STAGE DEPENDENCIES: Stage-1 is a root stage Stage-7 depends on stages: Stage-1 , consists of Stage-4, Stage-3, Stage-5 Stage-4 Stage-0 depends on stages: Stage-4, Stage-3, Stage-6 Stage-2 depends on stages: Stage-0 Stage-3 Stage-5 Stage-6 depends on stages: Stage-5 STAGE PLANS: Stage: Stage-1 Map Reduce Map Operator Tree: TableScan alias: srcpart_merge_dp_rc Statistics: Num rows: 1000 Data size: 9624 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: string), value (type: string), if(((UDFToDouble(key) % 2.0) = 0.0), 'a1', 'b1') (type: string) outputColumnNames: _col0, _col1, _col2 Statistics: Num rows: 1000 Data size: 9624 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false Statistics: Num rows: 1000 Data size: 9624 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.hive.ql.io.RCFileInputFormat output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat serde: org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe name: default.merge_dynamic_part Stage: Stage-7 Conditional Operator Stage: Stage-4 Move Operator files: hdfs directory: true #### A masked pattern was here #### Stage: Stage-0 Move Operator tables: partition: ds 2008-04-08 hr replace: true table: input format: org.apache.hadoop.hive.ql.io.RCFileInputFormat output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat serde: org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe name: default.merge_dynamic_part Stage: Stage-2 Stats-Aggr Operator Stage: Stage-3 Merge File Operator Map Operator Tree: RCFile Merge Operator merge level: block input format: org.apache.hadoop.hive.ql.io.RCFileInputFormat Stage: Stage-5 Merge File Operator Map Operator Tree: RCFile Merge Operator merge level: block input format: org.apache.hadoop.hive.ql.io.RCFileInputFormat Stage: Stage-6 Move Operator files: hdfs directory: true #### A masked pattern was here #### PREHOOK: query: insert overwrite table merge_dynamic_part partition (ds = '2008-04-08', hr) select key, value, if(key % 2 == 0, 'a1', 'b1') as hr from srcpart_merge_dp_rc where ds = '2008-04-08' PREHOOK: type: QUERY PREHOOK: Input: default@srcpart_merge_dp_rc PREHOOK: Input: default@srcpart_merge_dp_rc@ds=2008-04-08/hr=11 PREHOOK: Input: default@srcpart_merge_dp_rc@ds=2008-04-08/hr=12 PREHOOK: Output: default@merge_dynamic_part@ds=2008-04-08 POSTHOOK: query: insert overwrite table merge_dynamic_part partition (ds = '2008-04-08', hr) select key, value, if(key % 2 == 0, 'a1', 'b1') as hr from srcpart_merge_dp_rc where ds = '2008-04-08' POSTHOOK: type: QUERY POSTHOOK: Input: default@srcpart_merge_dp_rc POSTHOOK: Input: default@srcpart_merge_dp_rc@ds=2008-04-08/hr=11 POSTHOOK: Input: default@srcpart_merge_dp_rc@ds=2008-04-08/hr=12 POSTHOOK: Output: default@merge_dynamic_part@ds=2008-04-08/hr=a1 POSTHOOK: Output: default@merge_dynamic_part@ds=2008-04-08/hr=b1 POSTHOOK: Lineage: merge_dynamic_part PARTITION(ds=2008-04-08,hr=a1).key SIMPLE [(srcpart_merge_dp_rc)srcpart_merge_dp_rc.FieldSchema(name:key, type:string, comment:default), ] POSTHOOK: Lineage: merge_dynamic_part PARTITION(ds=2008-04-08,hr=a1).value SIMPLE [(srcpart_merge_dp_rc)srcpart_merge_dp_rc.FieldSchema(name:value, type:string, comment:default), ] POSTHOOK: Lineage: merge_dynamic_part PARTITION(ds=2008-04-08,hr=b1).key SIMPLE [(srcpart_merge_dp_rc)srcpart_merge_dp_rc.FieldSchema(name:key, type:string, comment:default), ] POSTHOOK: Lineage: merge_dynamic_part PARTITION(ds=2008-04-08,hr=b1).value SIMPLE [(srcpart_merge_dp_rc)srcpart_merge_dp_rc.FieldSchema(name:value, type:string, comment:default), ] PREHOOK: query: show partitions merge_dynamic_part PREHOOK: type: SHOWPARTITIONS PREHOOK: Input: default@merge_dynamic_part POSTHOOK: query: show partitions merge_dynamic_part POSTHOOK: type: SHOWPARTITIONS POSTHOOK: Input: default@merge_dynamic_part ds=2008-04-08/hr=a1 ds=2008-04-08/hr=b1 PREHOOK: query: select count(*) from merge_dynamic_part PREHOOK: type: QUERY PREHOOK: Input: default@merge_dynamic_part PREHOOK: Input: default@merge_dynamic_part@ds=2008-04-08/hr=a1 PREHOOK: Input: default@merge_dynamic_part@ds=2008-04-08/hr=b1 #### A masked pattern was here #### POSTHOOK: query: select count(*) from merge_dynamic_part POSTHOOK: type: QUERY POSTHOOK: Input: default@merge_dynamic_part POSTHOOK: Input: default@merge_dynamic_part@ds=2008-04-08/hr=a1 POSTHOOK: Input: default@merge_dynamic_part@ds=2008-04-08/hr=b1 #### A masked pattern was here #### 1000