PREHOOK: query: create table union_subq_union(key int, value string) PREHOOK: type: CREATETABLE PREHOOK: Output: database:default PREHOOK: Output: default@union_subq_union POSTHOOK: query: create table union_subq_union(key int, value string) POSTHOOK: type: CREATETABLE POSTHOOK: Output: database:default POSTHOOK: Output: default@union_subq_union PREHOOK: query: explain insert overwrite table union_subq_union select * from ( select key, value from src union all select key, value from ( select key, value from src union all select key, value from src ) subq ) a PREHOOK: type: QUERY POSTHOOK: query: explain insert overwrite table union_subq_union select * from ( select key, value from src union all select key, value from ( select key, value from src union all select key, value from src ) subq ) a 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: src Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: string), value (type: string) outputColumnNames: _col0, _col1 Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Union Statistics: Num rows: 1500 Data size: 15936 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: UDFToInteger(_col0) (type: int), _col1 (type: string) outputColumnNames: _col0, _col1 Statistics: Num rows: 1500 Data size: 15936 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false Statistics: Num rows: 1500 Data size: 15936 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe name: default.union_subq_union TableScan alias: src Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: string), value (type: string) outputColumnNames: _col0, _col1 Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Union Statistics: Num rows: 1500 Data size: 15936 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: UDFToInteger(_col0) (type: int), _col1 (type: string) outputColumnNames: _col0, _col1 Statistics: Num rows: 1500 Data size: 15936 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false Statistics: Num rows: 1500 Data size: 15936 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe name: default.union_subq_union TableScan alias: src Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: string), value (type: string) outputColumnNames: _col0, _col1 Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Union Statistics: Num rows: 1500 Data size: 15936 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: UDFToInteger(_col0) (type: int), _col1 (type: string) outputColumnNames: _col0, _col1 Statistics: Num rows: 1500 Data size: 15936 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false Statistics: Num rows: 1500 Data size: 15936 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe name: default.union_subq_union 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: replace: true table: input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe name: default.union_subq_union Stage: Stage-2 Stats-Aggr Operator Stage: Stage-3 Map Reduce Map Operator Tree: TableScan File Output Operator compressed: false table: input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe name: default.union_subq_union Stage: Stage-5 Map Reduce Map Operator Tree: TableScan File Output Operator compressed: false table: input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe name: default.union_subq_union Stage: Stage-6 Move Operator files: hdfs directory: true #### A masked pattern was here #### PREHOOK: query: insert overwrite table union_subq_union select * from ( select key, value from src union all select key, value from ( select key, value from src union all select key, value from src ) subq ) a PREHOOK: type: QUERY PREHOOK: Input: default@src PREHOOK: Output: default@union_subq_union POSTHOOK: query: insert overwrite table union_subq_union select * from ( select key, value from src union all select key, value from ( select key, value from src union all select key, value from src ) subq ) a POSTHOOK: type: QUERY POSTHOOK: Input: default@src POSTHOOK: Output: default@union_subq_union POSTHOOK: Lineage: union_subq_union.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), (src)src.FieldSchema(name:key, type:string, comment:default), (src)src.FieldSchema(name:key, type:string, comment:default), ] POSTHOOK: Lineage: union_subq_union.value EXPRESSION [(src)src.FieldSchema(name:value, type:string, comment:default), (src)src.FieldSchema(name:value, type:string, comment:default), (src)src.FieldSchema(name:value, type:string, comment:default), ] PREHOOK: query: select * from union_subq_union order by key, value limit 20 PREHOOK: type: QUERY PREHOOK: Input: default@union_subq_union #### A masked pattern was here #### POSTHOOK: query: select * from union_subq_union order by key, value limit 20 POSTHOOK: type: QUERY POSTHOOK: Input: default@union_subq_union #### A masked pattern was here #### 0 val_0 0 val_0 0 val_0 0 val_0 0 val_0 0 val_0 0 val_0 0 val_0 0 val_0 2 val_2 2 val_2 2 val_2 4 val_4 4 val_4 4 val_4 5 val_5 5 val_5 5 val_5 5 val_5 5 val_5