PREHOOK: query: CREATE TABLE src11 as SELECT * FROM src PREHOOK: type: CREATETABLE_AS_SELECT PREHOOK: Input: default@src POSTHOOK: query: CREATE TABLE src11 as SELECT * FROM src POSTHOOK: type: CREATETABLE_AS_SELECT POSTHOOK: Input: default@src POSTHOOK: Output: default@src11 PREHOOK: query: CREATE TABLE src12 as SELECT * FROM src PREHOOK: type: CREATETABLE_AS_SELECT PREHOOK: Input: default@src POSTHOOK: query: CREATE TABLE src12 as SELECT * FROM src POSTHOOK: type: CREATETABLE_AS_SELECT POSTHOOK: Input: default@src POSTHOOK: Output: default@src12 PREHOOK: query: CREATE TABLE src13 as SELECT * FROM src PREHOOK: type: CREATETABLE_AS_SELECT PREHOOK: Input: default@src POSTHOOK: query: CREATE TABLE src13 as SELECT * FROM src POSTHOOK: type: CREATETABLE_AS_SELECT POSTHOOK: Input: default@src POSTHOOK: Output: default@src13 PREHOOK: query: CREATE TABLE src14 as SELECT * FROM src PREHOOK: type: CREATETABLE_AS_SELECT PREHOOK: Input: default@src POSTHOOK: query: CREATE TABLE src14 as SELECT * FROM src POSTHOOK: type: CREATETABLE_AS_SELECT POSTHOOK: Input: default@src POSTHOOK: Output: default@src14 PREHOOK: query: EXPLAIN SELECT * FROM src11 a JOIN src12 b ON (a.key = b.key) JOIN (SELECT * FROM (SELECT * FROM src13 UNION ALL SELECT * FROM src14)a )c ON c.value = b.value PREHOOK: type: QUERY POSTHOOK: query: EXPLAIN SELECT * FROM src11 a JOIN src12 b ON (a.key = b.key) JOIN (SELECT * FROM (SELECT * FROM src13 UNION ALL SELECT * FROM src14)a )c ON c.value = b.value POSTHOOK: type: QUERY ABSTRACT SYNTAX TREE: (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_JOIN (TOK_TABREF (TOK_TABNAME src11) a) (TOK_TABREF (TOK_TABNAME src12) b) (= (. (TOK_TABLE_OR_COL a) key) (. (TOK_TABLE_OR_COL b) key))) (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_SUBQUERY (TOK_UNION (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME src13))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR TOK_ALLCOLREF)))) (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME src14))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR TOK_ALLCOLREF))))) a)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR TOK_ALLCOLREF)))) c) (= (. (TOK_TABLE_OR_COL c) value) (. (TOK_TABLE_OR_COL b) value)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR TOK_ALLCOLREF)))) STAGE DEPENDENCIES: Stage-8 is a root stage Stage-6 depends on stages: Stage-8 Stage-0 is a root stage STAGE PLANS: Stage: Stage-8 Map Reduce Local Work Alias -> Map Local Tables: a Fetch Operator limit: -1 c-subquery1:a-subquery1:src13 Fetch Operator limit: -1 c-subquery2:a-subquery2:src14 Fetch Operator limit: -1 Alias -> Map Local Operator Tree: a TableScan alias: a HashTable Sink Operator condition expressions: 0 {key} {value} 1 {key} {value} handleSkewJoin: false keys: 0 [Column[key]] 1 [Column[key]] Position of Big Table: 1 c-subquery1:a-subquery1:src13 TableScan alias: src13 Select Operator expressions: expr: key type: string expr: value type: string outputColumnNames: _col0, _col1 Union Select Operator expressions: expr: _col0 type: string expr: _col1 type: string outputColumnNames: _col0, _col1 HashTable Sink Operator condition expressions: 0 {_col4} {_col5} {_col0} {_col1} 1 {_col0} {_col1} handleSkewJoin: false keys: 0 [Column[_col5]] 1 [Column[_col1]] Position of Big Table: 0 c-subquery2:a-subquery2:src14 TableScan alias: src14 Select Operator expressions: expr: key type: string expr: value type: string outputColumnNames: _col0, _col1 Union Select Operator expressions: expr: _col0 type: string expr: _col1 type: string outputColumnNames: _col0, _col1 HashTable Sink Operator condition expressions: 0 {_col4} {_col5} {_col0} {_col1} 1 {_col0} {_col1} handleSkewJoin: false keys: 0 [Column[_col5]] 1 [Column[_col1]] Position of Big Table: 0 Stage: Stage-6 Map Reduce Alias -> Map Operator Tree: b TableScan alias: b Map Join Operator condition map: Inner Join 0 to 1 condition expressions: 0 {key} {value} 1 {key} {value} handleSkewJoin: false keys: 0 [Column[key]] 1 [Column[key]] outputColumnNames: _col0, _col1, _col4, _col5 Position of Big Table: 1 Map Join Operator condition map: Inner Join 0 to 1 condition expressions: 0 {_col4} {_col5} {_col0} {_col1} 1 {_col0} {_col1} handleSkewJoin: false keys: 0 [Column[_col5]] 1 [Column[_col1]] outputColumnNames: _col0, _col1, _col4, _col5, _col8, _col9 Position of Big Table: 0 Select Operator expressions: expr: _col4 type: string expr: _col5 type: string expr: _col0 type: string expr: _col1 type: string expr: _col8 type: string expr: _col9 type: string outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 File Output Operator compressed: false GlobalTableId: 0 table: input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat Local Work: Map Reduce Local Work Stage: Stage-0 Fetch Operator limit: -1