PREHOOK: query: -- SORT_QUERY_RESULTS CREATE TABLE dest_j1(key STRING, value STRING, val2 STRING) STORED AS TEXTFILE PREHOOK: type: CREATETABLE PREHOOK: Output: database:default PREHOOK: Output: default@dest_j1 POSTHOOK: query: -- SORT_QUERY_RESULTS CREATE TABLE dest_j1(key STRING, value STRING, val2 STRING) STORED AS TEXTFILE POSTHOOK: type: CREATETABLE POSTHOOK: Output: database:default POSTHOOK: Output: default@dest_j1 PREHOOK: query: -- Since the inputs are small, it should be automatically converted to mapjoin EXPLAIN EXTENDED INSERT OVERWRITE TABLE dest_j1 SELECT x.key, x.value, subq1.value FROM ( SELECT x.key as key, x.value as value from src x where x.key < 20 UNION ALL SELECT x1.key as key, x1.value as value from src x1 where x1.key > 100 ) subq1 JOIN src1 x ON (x.key = subq1.key) PREHOOK: type: QUERY POSTHOOK: query: -- Since the inputs are small, it should be automatically converted to mapjoin EXPLAIN EXTENDED INSERT OVERWRITE TABLE dest_j1 SELECT x.key, x.value, subq1.value FROM ( SELECT x.key as key, x.value as value from src x where x.key < 20 UNION ALL SELECT x1.key as key, x1.value as value from src x1 where x1.key > 100 ) subq1 JOIN src1 x ON (x.key = subq1.key) POSTHOOK: type: QUERY ABSTRACT SYNTAX TREE: TOK_QUERY TOK_FROM TOK_JOIN TOK_SUBQUERY TOK_UNIONALL TOK_QUERY TOK_FROM TOK_TABREF TOK_TABNAME src x TOK_INSERT TOK_DESTINATION TOK_DIR TOK_TMP_FILE TOK_SELECT TOK_SELEXPR . TOK_TABLE_OR_COL x key key TOK_SELEXPR . TOK_TABLE_OR_COL x value value TOK_WHERE < . TOK_TABLE_OR_COL x key 20 TOK_QUERY TOK_FROM TOK_TABREF TOK_TABNAME src x1 TOK_INSERT TOK_DESTINATION TOK_DIR TOK_TMP_FILE TOK_SELECT TOK_SELEXPR . TOK_TABLE_OR_COL x1 key key TOK_SELEXPR . TOK_TABLE_OR_COL x1 value value TOK_WHERE > . TOK_TABLE_OR_COL x1 key 100 subq1 TOK_TABREF TOK_TABNAME src1 x = . TOK_TABLE_OR_COL x key . TOK_TABLE_OR_COL subq1 key TOK_INSERT TOK_DESTINATION TOK_TAB TOK_TABNAME dest_j1 TOK_SELECT TOK_SELEXPR . TOK_TABLE_OR_COL x key TOK_SELEXPR . TOK_TABLE_OR_COL x value TOK_SELEXPR . TOK_TABLE_OR_COL subq1 value STAGE DEPENDENCIES: Stage-6 is a root stage Stage-5 depends on stages: Stage-6 Stage-0 depends on stages: Stage-5 Stage-2 depends on stages: Stage-0 STAGE PLANS: Stage: Stage-6 Map Reduce Local Work Alias -> Map Local Tables: $hdt$_1:x Fetch Operator limit: -1 Alias -> Map Local Operator Tree: $hdt$_1:x TableScan alias: x Statistics: Num rows: 25 Data size: 191 Basic stats: COMPLETE Column stats: NONE GatherStats: false Filter Operator isSamplingPred: false predicate: (((UDFToDouble(key) < 20.0) or (UDFToDouble(key) > 100.0)) and key is not null) (type: boolean) Statistics: Num rows: 8 Data size: 61 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: string), value (type: string) outputColumnNames: _col0, _col1 Statistics: Num rows: 8 Data size: 61 Basic stats: COMPLETE Column stats: NONE HashTable Sink Operator keys: 0 _col0 (type: string) 1 _col0 (type: string) Position of Big Table: 0 Stage: Stage-5 Map Reduce Map Operator Tree: TableScan alias: x Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE GatherStats: false Filter Operator isSamplingPred: false predicate: (UDFToDouble(key) < 20.0) (type: boolean) Statistics: Num rows: 166 Data size: 1763 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: string), value (type: string) outputColumnNames: _col0, _col1 Statistics: Num rows: 166 Data size: 1763 Basic stats: COMPLETE Column stats: NONE Union Statistics: Num rows: 332 Data size: 3526 Basic stats: COMPLETE Column stats: NONE Map Join Operator condition map: Inner Join 0 to 1 keys: 0 _col0 (type: string) 1 _col0 (type: string) outputColumnNames: _col1, _col2, _col3 Position of Big Table: 0 Statistics: Num rows: 365 Data size: 3878 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col2 (type: string), _col3 (type: string), _col1 (type: string) outputColumnNames: _col0, _col1, _col2 Statistics: Num rows: 365 Data size: 3878 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false GlobalTableId: 1 #### A masked pattern was here #### NumFilesPerFileSink: 1 Statistics: Num rows: 365 Data size: 3878 Basic stats: COMPLETE Column stats: NONE #### A masked pattern was here #### table: input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat properties: bucket_count -1 columns key,value,val2 columns.comments columns.types string:string:string #### A masked pattern was here #### name default.dest_j1 serialization.ddl struct dest_j1 { string key, string value, string val2} serialization.format 1 serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe #### A masked pattern was here #### serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe name: default.dest_j1 TotalFiles: 1 GatherStats: true MultiFileSpray: false TableScan alias: x Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE GatherStats: false Filter Operator isSamplingPred: false predicate: (UDFToDouble(key) > 100.0) (type: boolean) Statistics: Num rows: 166 Data size: 1763 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: string), value (type: string) outputColumnNames: _col0, _col1 Statistics: Num rows: 166 Data size: 1763 Basic stats: COMPLETE Column stats: NONE Union Statistics: Num rows: 332 Data size: 3526 Basic stats: COMPLETE Column stats: NONE Map Join Operator condition map: Inner Join 0 to 1 keys: 0 _col0 (type: string) 1 _col0 (type: string) outputColumnNames: _col1, _col2, _col3 Position of Big Table: 0 Statistics: Num rows: 365 Data size: 3878 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col2 (type: string), _col3 (type: string), _col1 (type: string) outputColumnNames: _col0, _col1, _col2 Statistics: Num rows: 365 Data size: 3878 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false GlobalTableId: 1 #### A masked pattern was here #### NumFilesPerFileSink: 1 Statistics: Num rows: 365 Data size: 3878 Basic stats: COMPLETE Column stats: NONE #### A masked pattern was here #### table: input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat properties: bucket_count -1 columns key,value,val2 columns.comments columns.types string:string:string #### A masked pattern was here #### name default.dest_j1 serialization.ddl struct dest_j1 { string key, string value, string val2} serialization.format 1 serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe #### A masked pattern was here #### serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe name: default.dest_j1 TotalFiles: 1 GatherStats: true MultiFileSpray: false Local Work: Map Reduce Local Work Path -> Alias: #### A masked pattern was here #### Path -> Partition: #### A masked pattern was here #### Partition base file name: src input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat properties: COLUMN_STATS_ACCURATE true bucket_count -1 columns key,value columns.comments 'default','default' columns.types string:string #### A masked pattern was here #### name default.src numFiles 1 numRows 500 rawDataSize 5312 serialization.ddl struct src { string key, string value} serialization.format 1 serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe totalSize 5812 #### A masked pattern was here #### serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat properties: COLUMN_STATS_ACCURATE true bucket_count -1 columns key,value columns.comments 'default','default' columns.types string:string #### A masked pattern was here #### name default.src numFiles 1 numRows 500 rawDataSize 5312 serialization.ddl struct src { string key, string value} serialization.format 1 serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe totalSize 5812 #### A masked pattern was here #### serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe name: default.src name: default.src #### A masked pattern was here #### Partition base file name: src1 input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat properties: COLUMN_STATS_ACCURATE true bucket_count -1 columns key,value columns.comments 'default','default' columns.types string:string #### A masked pattern was here #### name default.src1 numFiles 1 numRows 25 rawDataSize 191 serialization.ddl struct src1 { string key, string value} serialization.format 1 serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe totalSize 216 #### A masked pattern was here #### serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat properties: COLUMN_STATS_ACCURATE true bucket_count -1 columns key,value columns.comments 'default','default' columns.types string:string #### A masked pattern was here #### name default.src1 numFiles 1 numRows 25 rawDataSize 191 serialization.ddl struct src1 { string key, string value} serialization.format 1 serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe totalSize 216 #### A masked pattern was here #### serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe name: default.src1 name: default.src1 Truncated Path -> Alias: /src [$hdt$_0-subquery1:$hdt$_0-subquery1:x, $hdt$_0-subquery2:$hdt$_0-subquery2:x] Stage: Stage-0 Move Operator tables: replace: true #### A masked pattern was here #### table: input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat properties: bucket_count -1 columns key,value,val2 columns.comments columns.types string:string:string #### A masked pattern was here #### name default.dest_j1 serialization.ddl struct dest_j1 { string key, string value, string val2} serialization.format 1 serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe #### A masked pattern was here #### serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe name: default.dest_j1 Stage: Stage-2 Stats-Aggr Operator #### A masked pattern was here #### PREHOOK: query: INSERT OVERWRITE TABLE dest_j1 SELECT x.key, x.value, subq1.value FROM ( SELECT x.key as key, x.value as value from src x where x.key < 20 UNION ALL SELECT x1.key as key, x1.value as value from src x1 where x1.key > 100 ) subq1 JOIN src1 x ON (x.key = subq1.key) PREHOOK: type: QUERY PREHOOK: Input: default@src PREHOOK: Input: default@src1 PREHOOK: Output: default@dest_j1 POSTHOOK: query: INSERT OVERWRITE TABLE dest_j1 SELECT x.key, x.value, subq1.value FROM ( SELECT x.key as key, x.value as value from src x where x.key < 20 UNION ALL SELECT x1.key as key, x1.value as value from src x1 where x1.key > 100 ) subq1 JOIN src1 x ON (x.key = subq1.key) POSTHOOK: type: QUERY POSTHOOK: Input: default@src POSTHOOK: Input: default@src1 POSTHOOK: Output: default@dest_j1 POSTHOOK: Lineage: dest_j1.key SIMPLE [(src1)x.FieldSchema(name:key, type:string, comment:default), ] POSTHOOK: Lineage: dest_j1.val2 EXPRESSION [(src)x.FieldSchema(name:value, type:string, comment:default), (src)x.FieldSchema(name:value, type:string, comment:default), ] POSTHOOK: Lineage: dest_j1.value SIMPLE [(src1)x.FieldSchema(name:value, type:string, comment:default), ] PREHOOK: query: select * from dest_j1 PREHOOK: type: QUERY PREHOOK: Input: default@dest_j1 #### A masked pattern was here #### POSTHOOK: query: select * from dest_j1 POSTHOOK: type: QUERY POSTHOOK: Input: default@dest_j1 #### A masked pattern was here #### 128 val_128 128 val_128 128 val_128 146 val_146 val_146 146 val_146 val_146 150 val_150 val_150 213 val_213 val_213 213 val_213 val_213 224 val_224 224 val_224 238 val_238 val_238 238 val_238 val_238 255 val_255 val_255 255 val_255 val_255 273 val_273 val_273 273 val_273 val_273 273 val_273 val_273 278 val_278 val_278 278 val_278 val_278 311 val_311 val_311 311 val_311 val_311 311 val_311 val_311 369 val_369 369 val_369 369 val_369 401 val_401 val_401 401 val_401 val_401 401 val_401 val_401 401 val_401 val_401 401 val_401 val_401 406 val_406 val_406 406 val_406 val_406 406 val_406 val_406 406 val_406 val_406