Index: conf/hive-default.xml.template =================================================================== --- conf/hive-default.xml.template (revision 1458165) +++ conf/hive-default.xml.template (working copy) @@ -810,7 +810,7 @@ hive.auto.convert.join.noconditionaltask - false + true Whether Hive enable the optimization about converting common join into mapjoin based on the input file size. If this paramater is on, and the sum of size for n-1 of the tables/partitions for a n-way join is smaller than the specified size, the join is directly converted to a mapjoin (there is no conditional task). Index: common/src/java/org/apache/hadoop/hive/conf/HiveConf.java =================================================================== --- common/src/java/org/apache/hadoop/hive/conf/HiveConf.java (revision 1458165) +++ common/src/java/org/apache/hadoop/hive/conf/HiveConf.java (working copy) @@ -484,7 +484,7 @@ HIVESKEWJOIN("hive.optimize.skewjoin", false), HIVECONVERTJOIN("hive.auto.convert.join", true), - HIVECONVERTJOINNOCONDITIONALTASK("hive.auto.convert.join.noconditionaltask", false), + HIVECONVERTJOINNOCONDITIONALTASK("hive.auto.convert.join.noconditionaltask", true), HIVECONVERTJOINNOCONDITIONALTASKTHRESHOLD("hive.auto.convert.join.noconditionaltask.size", 10000000L), HIVESKEWJOINKEY("hive.skewjoin.key", 100000), Index: ql/src/test/results/clientpositive/auto_join13.q.out =================================================================== --- ql/src/test/results/clientpositive/auto_join13.q.out (revision 1458165) +++ ql/src/test/results/clientpositive/auto_join13.q.out (working copy) @@ -24,59 +24,22 @@ (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_JOIN (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME src))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL src) key) c1) (TOK_SELEXPR (. (TOK_TABLE_OR_COL src) value) c2)))) src1) (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME src))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL src) key) c3) (TOK_SELEXPR (. (TOK_TABLE_OR_COL src) value) c4)))) src2) (AND (= (. (TOK_TABLE_OR_COL src1) c1) (. (TOK_TABLE_OR_COL src2) c3)) (< (. (TOK_TABLE_OR_COL src1) c1) 100))) (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME src))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL src) key) c5) (TOK_SELEXPR (. (TOK_TABLE_OR_COL src) value) c6)))) src3) (AND (= (+ (. (TOK_TABLE_OR_COL src1) c1) (. (TOK_TABLE_OR_COL src2) c3)) (. (TOK_TABLE_OR_COL src3) c5)) (< (. (TOK_TABLE_OR_COL src3) c5) 200)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION sum (TOK_FUNCTION hash (. (TOK_TABLE_OR_COL src1) c1) (. (TOK_TABLE_OR_COL src2) c4))))))) STAGE DEPENDENCIES: - Stage-11 is a root stage , consists of Stage-14, Stage-15, Stage-1 - Stage-14 has a backup stage: Stage-1 - Stage-9 depends on stages: Stage-14 - Stage-8 depends on stages: Stage-1, Stage-9, Stage-10 , consists of Stage-12, Stage-13, Stage-2 - Stage-12 has a backup stage: Stage-2 - Stage-6 depends on stages: Stage-12 - Stage-3 depends on stages: Stage-2, Stage-6, Stage-7 - Stage-13 has a backup stage: Stage-2 - Stage-7 depends on stages: Stage-13 - Stage-2 - Stage-15 has a backup stage: Stage-1 - Stage-10 depends on stages: Stage-15 - Stage-1 + Stage-8 is a root stage + Stage-7 depends on stages: Stage-8 + Stage-3 depends on stages: Stage-7 Stage-0 is a root stage STAGE PLANS: - Stage: Stage-11 - Conditional Operator - - Stage: Stage-14 + Stage: Stage-8 Map Reduce Local Work Alias -> Map Local Tables: - src2:src + src1:src Fetch Operator limit: -1 + src3:src + Fetch Operator + limit: -1 Alias -> Map Local Operator Tree: - src2:src - TableScan - alias: src - Filter Operator - predicate: - expr: (key < 100.0) - type: boolean - Select Operator - expressions: - expr: key - type: string - expr: value - type: string - outputColumnNames: _col0, _col1 - HashTable Sink Operator - condition expressions: - 0 {_col0} - 1 {_col0} {_col1} - handleSkewJoin: false - keys: - 0 [Column[_col0]] - 1 [Column[_col0]] - Position of Big Table: 0 - - Stage: Stage-9 - Map Reduce - Alias -> Map Operator Tree: src1:src TableScan alias: src @@ -89,9 +52,7 @@ expr: key type: string outputColumnNames: _col0 - Map Join Operator - condition map: - Inner Join 0 to 1 + HashTable Sink Operator condition expressions: 0 {_col0} 1 {_col0} {_col1} @@ -99,28 +60,8 @@ keys: 0 [Column[_col0]] 1 [Column[_col0]] - outputColumnNames: _col0, _col2, _col3 - Position of Big Table: 0 - File Output Operator - compressed: false - GlobalTableId: 0 - table: - input format: org.apache.hadoop.mapred.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - Local Work: - Map Reduce Local Work - - Stage: Stage-8 - Conditional Operator - - Stage: Stage-12 - Map Reduce Local Work - Alias -> Map Local Tables: + Position of Big Table: 1 src3:src - Fetch Operator - limit: -1 - Alias -> Map Local Operator Tree: - src3:src TableScan alias: src Filter Operator @@ -142,41 +83,66 @@ 1 [class org.apache.hadoop.hive.ql.udf.generic.GenericUDFBridge(Column[_col0]()] Position of Big Table: 0 - Stage: Stage-6 + Stage: Stage-7 Map Reduce Alias -> Map Operator Tree: - $INTNAME - Map Join Operator - condition map: - Inner Join 0 to 1 - condition expressions: - 0 {_col3} {_col0} - 1 - handleSkewJoin: false - keys: - 0 [class org.apache.hadoop.hive.ql.udf.generic.GenericUDFBridge(Column[_col0], Column[_col2]()] - 1 [class org.apache.hadoop.hive.ql.udf.generic.GenericUDFBridge(Column[_col0]()] - outputColumnNames: _col1, _col2 - Position of Big Table: 0 + src2:src + TableScan + alias: src + Filter Operator + predicate: + expr: (key < 100.0) + type: boolean Select Operator expressions: - expr: _col2 + expr: key type: string - expr: _col1 + expr: value type: string - outputColumnNames: _col2, _col1 - Group By Operator - aggregations: - expr: sum(hash(_col2,_col1)) - bucketGroup: false - mode: hash - outputColumnNames: _col0 - File Output Operator - compressed: false - GlobalTableId: 0 - table: - input format: org.apache.hadoop.mapred.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + outputColumnNames: _col0, _col1 + Map Join Operator + condition map: + Inner Join 0 to 1 + condition expressions: + 0 {_col0} + 1 {_col0} {_col1} + handleSkewJoin: false + keys: + 0 [Column[_col0]] + 1 [Column[_col0]] + outputColumnNames: _col0, _col2, _col3 + Position of Big Table: 1 + Map Join Operator + condition map: + Inner Join 0 to 1 + condition expressions: + 0 {_col3} {_col0} + 1 + handleSkewJoin: false + keys: + 0 [class org.apache.hadoop.hive.ql.udf.generic.GenericUDFBridge(Column[_col0], Column[_col2]()] + 1 [class org.apache.hadoop.hive.ql.udf.generic.GenericUDFBridge(Column[_col0]()] + outputColumnNames: _col1, _col2 + Position of Big Table: 0 + Select Operator + expressions: + expr: _col2 + type: string + expr: _col1 + type: string + outputColumnNames: _col2, _col1 + Group By Operator + aggregations: + expr: sum(hash(_col2,_col1)) + bucketGroup: false + mode: hash + outputColumnNames: _col0 + File Output Operator + compressed: false + GlobalTableId: 0 + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat Local Work: Map Reduce Local Work @@ -209,279 +175,6 @@ input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat - Stage: Stage-13 - Map Reduce Local Work - Alias -> Map Local Tables: - $INTNAME - Fetch Operator - limit: -1 - Alias -> Map Local Operator Tree: - $INTNAME - HashTable Sink Operator - condition expressions: - 0 {_col3} {_col0} - 1 - handleSkewJoin: false - keys: - 0 [class org.apache.hadoop.hive.ql.udf.generic.GenericUDFBridge(Column[_col0], Column[_col2]()] - 1 [class org.apache.hadoop.hive.ql.udf.generic.GenericUDFBridge(Column[_col0]()] - Position of Big Table: 1 - - Stage: Stage-7 - Map Reduce - Alias -> Map Operator Tree: - src3:src - TableScan - alias: src - Filter Operator - predicate: - expr: (key < 200.0) - type: boolean - Select Operator - expressions: - expr: key - type: string - outputColumnNames: _col0 - Map Join Operator - condition map: - Inner Join 0 to 1 - condition expressions: - 0 {_col3} {_col0} - 1 - handleSkewJoin: false - keys: - 0 [class org.apache.hadoop.hive.ql.udf.generic.GenericUDFBridge(Column[_col0], Column[_col2]()] - 1 [class org.apache.hadoop.hive.ql.udf.generic.GenericUDFBridge(Column[_col0]()] - outputColumnNames: _col1, _col2 - Position of Big Table: 1 - Select Operator - expressions: - expr: _col2 - type: string - expr: _col1 - type: string - outputColumnNames: _col2, _col1 - Group By Operator - aggregations: - expr: sum(hash(_col2,_col1)) - bucketGroup: false - mode: hash - outputColumnNames: _col0 - File Output Operator - compressed: false - GlobalTableId: 0 - table: - input format: org.apache.hadoop.mapred.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - Local Work: - Map Reduce Local Work - - Stage: Stage-2 - Map Reduce - Alias -> Map Operator Tree: - $INTNAME - Reduce Output Operator - key expressions: - expr: (_col0 + _col2) - type: double - sort order: + - Map-reduce partition columns: - expr: (_col0 + _col2) - type: double - tag: 0 - value expressions: - expr: _col3 - type: string - expr: _col0 - type: string - src3:src - TableScan - alias: src - Filter Operator - predicate: - expr: (key < 200.0) - type: boolean - Select Operator - expressions: - expr: key - type: string - outputColumnNames: _col0 - Reduce Output Operator - key expressions: - expr: UDFToDouble(_col0) - type: double - sort order: + - Map-reduce partition columns: - expr: UDFToDouble(_col0) - type: double - tag: 1 - Reduce Operator Tree: - Join Operator - condition map: - Inner Join 0 to 1 - condition expressions: - 0 {VALUE._col1} {VALUE._col2} - 1 - handleSkewJoin: false - outputColumnNames: _col1, _col2 - Select Operator - expressions: - expr: _col2 - type: string - expr: _col1 - type: string - outputColumnNames: _col2, _col1 - Group By Operator - aggregations: - expr: sum(hash(_col2,_col1)) - bucketGroup: false - mode: hash - outputColumnNames: _col0 - File Output Operator - compressed: false - GlobalTableId: 0 - table: - input format: org.apache.hadoop.mapred.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - - Stage: Stage-15 - Map Reduce Local Work - Alias -> Map Local Tables: - src1:src - Fetch Operator - limit: -1 - Alias -> Map Local Operator Tree: - src1:src - TableScan - alias: src - Filter Operator - predicate: - expr: (key < 100.0) - type: boolean - Select Operator - expressions: - expr: key - type: string - outputColumnNames: _col0 - HashTable Sink Operator - condition expressions: - 0 {_col0} - 1 {_col0} {_col1} - handleSkewJoin: false - keys: - 0 [Column[_col0]] - 1 [Column[_col0]] - Position of Big Table: 1 - - Stage: Stage-10 - Map Reduce - Alias -> Map Operator Tree: - src2:src - TableScan - alias: src - Filter Operator - predicate: - expr: (key < 100.0) - type: boolean - Select Operator - expressions: - expr: key - type: string - expr: value - type: string - outputColumnNames: _col0, _col1 - Map Join Operator - condition map: - Inner Join 0 to 1 - condition expressions: - 0 {_col0} - 1 {_col0} {_col1} - handleSkewJoin: false - keys: - 0 [Column[_col0]] - 1 [Column[_col0]] - outputColumnNames: _col0, _col2, _col3 - Position of Big Table: 1 - File Output Operator - compressed: false - GlobalTableId: 0 - table: - input format: org.apache.hadoop.mapred.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - Local Work: - Map Reduce Local Work - - Stage: Stage-1 - Map Reduce - Alias -> Map Operator Tree: - src1:src - TableScan - alias: src - Filter Operator - predicate: - expr: (key < 100.0) - type: boolean - Select Operator - expressions: - expr: key - type: string - outputColumnNames: _col0 - Reduce Output Operator - key expressions: - expr: _col0 - type: string - sort order: + - Map-reduce partition columns: - expr: _col0 - type: string - tag: 0 - value expressions: - expr: _col0 - type: string - src2:src - TableScan - alias: src - Filter Operator - predicate: - expr: (key < 100.0) - type: boolean - Select Operator - expressions: - expr: key - type: string - expr: value - type: string - outputColumnNames: _col0, _col1 - Reduce Output Operator - key expressions: - expr: _col0 - type: string - sort order: + - Map-reduce partition columns: - expr: _col0 - type: string - tag: 1 - value expressions: - expr: _col0 - type: string - expr: _col1 - type: string - Reduce Operator Tree: - Join Operator - condition map: - Inner Join 0 to 1 - condition expressions: - 0 {VALUE._col0} - 1 {VALUE._col0} {VALUE._col1} - handleSkewJoin: false - outputColumnNames: _col0, _col2, _col3 - File Output Operator - compressed: false - GlobalTableId: 0 - table: - input format: org.apache.hadoop.mapred.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - Stage: Stage-0 Fetch Operator limit: -1 Index: ql/src/test/results/clientpositive/multi_join_union.q.out =================================================================== --- ql/src/test/results/clientpositive/multi_join_union.q.out (revision 1458165) +++ ql/src/test/results/clientpositive/multi_join_union.q.out (working copy) @@ -40,53 +40,28 @@ (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-11 is a root stage , consists of Stage-14, Stage-15, Stage-1 - Stage-14 has a backup stage: Stage-1 - Stage-9 depends on stages: Stage-14 - Stage-8 depends on stages: Stage-1, Stage-9, Stage-10 , consists of Stage-12, Stage-13, Stage-2 - Stage-12 has a backup stage: Stage-2 - Stage-6 depends on stages: Stage-12 - Stage-13 has a backup stage: Stage-2 - Stage-7 depends on stages: Stage-13 - Stage-2 - Stage-15 has a backup stage: Stage-1 - Stage-10 depends on stages: Stage-15 - Stage-1 + Stage-8 is a root stage + Stage-7 depends on stages: Stage-8 Stage-0 is a root stage STAGE PLANS: - Stage: Stage-11 - Conditional Operator - - Stage: Stage-14 + Stage: Stage-8 Map Reduce Local Work Alias -> Map Local Tables: - b + 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: - b - TableScan - alias: b - HashTable Sink Operator - condition expressions: - 0 {key} {value} - 1 {key} {value} - handleSkewJoin: false - keys: - 0 [Column[key]] - 1 [Column[key]] - Position of Big Table: 0 - - Stage: Stage-9 - Map Reduce - Alias -> Map Operator Tree: a TableScan alias: a - Map Join Operator - condition map: - Inner Join 0 to 1 + HashTable Sink Operator condition expressions: 0 {key} {value} 1 {key} {value} @@ -94,31 +69,8 @@ keys: 0 [Column[key]] 1 [Column[key]] - outputColumnNames: _col0, _col1, _col4, _col5 - Position of Big Table: 0 - File Output Operator - compressed: false - GlobalTableId: 0 - table: - input format: org.apache.hadoop.mapred.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - Local Work: - Map Reduce Local Work - - Stage: Stage-8 - Conditional Operator - - Stage: Stage-12 - Map Reduce Local Work - Alias -> Map Local Tables: + Position of Big Table: 1 c-subquery1:a-subquery1:src13 - Fetch Operator - limit: -1 - c-subquery2:a-subquery2:src14 - Fetch Operator - limit: -1 - Alias -> Map Local Operator Tree: - c-subquery1:a-subquery1:src13 TableScan alias: src13 Select Operator @@ -173,312 +125,9 @@ 1 [Column[_col1]] Position of Big Table: 0 - Stage: Stage-6 - Map Reduce - Alias -> Map Operator Tree: - $INTNAME - 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-13 - Map Reduce Local Work - Alias -> Map Local Tables: - $INTNAME - Fetch Operator - limit: -1 - Alias -> Map Local Operator Tree: - $INTNAME - 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: 1 - Stage: Stage-7 Map Reduce Alias -> Map Operator Tree: - 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 - 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: 1 - 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 - 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 - 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: 1 - 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-2 - Map Reduce - Alias -> Map Operator Tree: - $INTNAME - Reduce Output Operator - key expressions: - expr: _col5 - type: string - sort order: + - Map-reduce partition columns: - expr: _col5 - type: string - tag: 0 - value expressions: - expr: _col4 - type: string - expr: _col5 - type: string - expr: _col0 - type: string - expr: _col1 - type: string - 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 - Reduce Output Operator - key expressions: - expr: _col1 - type: string - sort order: + - Map-reduce partition columns: - expr: _col1 - type: string - tag: 1 - value expressions: - expr: _col0 - type: string - expr: _col1 - type: string - 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 - Reduce Output Operator - key expressions: - expr: _col1 - type: string - sort order: + - Map-reduce partition columns: - expr: _col1 - type: string - tag: 1 - value expressions: - expr: _col0 - type: string - expr: _col1 - type: string - Reduce Operator Tree: - Join Operator - condition map: - Inner Join 0 to 1 - condition expressions: - 0 {VALUE._col0} {VALUE._col1} {VALUE._col4} {VALUE._col5} - 1 {VALUE._col0} {VALUE._col1} - handleSkewJoin: false - outputColumnNames: _col0, _col1, _col4, _col5, _col8, _col9 - 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 - - Stage: Stage-15 - Map Reduce Local Work - Alias -> Map Local Tables: - a - 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 - - Stage: Stage-10 - Map Reduce - Alias -> Map Operator Tree: b TableScan alias: b @@ -494,68 +143,42 @@ 1 [Column[key]] outputColumnNames: _col0, _col1, _col4, _col5 Position of Big Table: 1 - File Output Operator - compressed: false - GlobalTableId: 0 - table: - input format: org.apache.hadoop.mapred.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + 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-1 - Map Reduce - Alias -> Map Operator Tree: - a - TableScan - alias: a - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 0 - value expressions: - expr: key - type: string - expr: value - type: string - b - TableScan - alias: b - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 1 - value expressions: - expr: key - type: string - expr: value - type: string - Reduce Operator Tree: - Join Operator - condition map: - Inner Join 0 to 1 - condition expressions: - 0 {VALUE._col0} {VALUE._col1} - 1 {VALUE._col0} {VALUE._col1} - handleSkewJoin: false - outputColumnNames: _col0, _col1, _col4, _col5 - File Output Operator - compressed: false - GlobalTableId: 0 - table: - input format: org.apache.hadoop.mapred.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - Stage: Stage-0 Fetch Operator limit: -1 Index: ql/src/test/results/clientpositive/auto_join29.q.out =================================================================== --- ql/src/test/results/clientpositive/auto_join29.q.out (revision 1458165) +++ ql/src/test/results/clientpositive/auto_join29.q.out (working copy) @@ -8,18 +8,13 @@ (TOK_QUERY (TOK_FROM (TOK_RIGHTOUTERJOIN (TOK_LEFTOUTERJOIN (TOK_TABREF (TOK_TABNAME src) src1) (TOK_TABREF (TOK_TABNAME src) src2) (AND (AND (= (. (TOK_TABLE_OR_COL src1) key) (. (TOK_TABLE_OR_COL src2) key)) (< (. (TOK_TABLE_OR_COL src1) key) 10)) (> (. (TOK_TABLE_OR_COL src2) key) 10))) (TOK_TABREF (TOK_TABNAME src) src3) (AND (= (. (TOK_TABLE_OR_COL src2) key) (. (TOK_TABLE_OR_COL src3) key)) (< (. (TOK_TABLE_OR_COL src3) key) 10)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR TOK_ALLCOLREF)) (TOK_SORTBY (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src1) key)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src1) value)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src2) key)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src2) value)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src3) key)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src3) value))))) STAGE DEPENDENCIES: - Stage-6 is a root stage , consists of Stage-7, Stage-1 - Stage-7 has a backup stage: Stage-1 - Stage-5 depends on stages: Stage-7 - Stage-2 depends on stages: Stage-1, Stage-5 - Stage-1 + Stage-6 is a root stage + Stage-5 depends on stages: Stage-6 + Stage-2 depends on stages: Stage-5 Stage-0 is a root stage STAGE PLANS: Stage: Stage-6 - Conditional Operator - - Stage: Stage-7 Map Reduce Local Work Alias -> Map Local Tables: src1 @@ -161,101 +156,6 @@ input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat - Stage: Stage-1 - Map Reduce - Alias -> Map Operator Tree: - src1 - TableScan - alias: src1 - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 0 - value expressions: - expr: key - type: string - expr: value - type: string - src2 - TableScan - alias: src2 - Filter Operator - predicate: - expr: (key > 10.0) - type: boolean - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 1 - value expressions: - expr: key - type: string - expr: value - type: string - src3 - TableScan - alias: src3 - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 2 - value expressions: - expr: key - type: string - expr: value - type: string - Reduce Operator Tree: - Join Operator - condition map: - Left Outer Join0 to 1 - Right Outer Join1 to 2 - condition expressions: - 0 {VALUE._col0} {VALUE._col1} - 1 {VALUE._col0} {VALUE._col1} - 2 {VALUE._col0} {VALUE._col1} - filter predicates: - 0 {(VALUE._col0 < 10.0)} - 1 - 2 {(VALUE._col0 < 10.0)} - handleSkewJoin: false - outputColumnNames: _col0, _col1, _col4, _col5, _col8, _col9 - Select Operator - expressions: - expr: _col0 - type: string - expr: _col1 - type: string - expr: _col4 - type: string - expr: _col5 - 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.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - Stage: Stage-0 Fetch Operator limit: -1 @@ -2885,18 +2785,13 @@ (TOK_QUERY (TOK_FROM (TOK_LEFTOUTERJOIN (TOK_LEFTOUTERJOIN (TOK_TABREF (TOK_TABNAME src) src1) (TOK_TABREF (TOK_TABNAME src) src2) (AND (AND (= (. (TOK_TABLE_OR_COL src1) key) (. (TOK_TABLE_OR_COL src2) key)) (< (. (TOK_TABLE_OR_COL src1) key) 10)) (> (. (TOK_TABLE_OR_COL src2) key) 10))) (TOK_TABREF (TOK_TABNAME src) src3) (AND (= (. (TOK_TABLE_OR_COL src2) key) (. (TOK_TABLE_OR_COL src3) key)) (< (. (TOK_TABLE_OR_COL src3) key) 10)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR TOK_ALLCOLREF)) (TOK_SORTBY (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src1) key)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src1) value)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src2) key)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src2) value)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src3) key)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src3) value))))) STAGE DEPENDENCIES: - Stage-6 is a root stage , consists of Stage-7, Stage-1 - Stage-7 has a backup stage: Stage-1 - Stage-5 depends on stages: Stage-7 - Stage-2 depends on stages: Stage-1, Stage-5 - Stage-1 + Stage-6 is a root stage + Stage-5 depends on stages: Stage-6 + Stage-2 depends on stages: Stage-5 Stage-0 is a root stage STAGE PLANS: Stage: Stage-6 - Conditional Operator - - Stage: Stage-7 Map Reduce Local Work Alias -> Map Local Tables: src2 @@ -3042,105 +2937,6 @@ input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat - Stage: Stage-1 - Map Reduce - Alias -> Map Operator Tree: - src1 - TableScan - alias: src1 - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 0 - value expressions: - expr: key - type: string - expr: value - type: string - src2 - TableScan - alias: src2 - Filter Operator - predicate: - expr: (key > 10.0) - type: boolean - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 1 - value expressions: - expr: key - type: string - expr: value - type: string - src3 - TableScan - alias: src3 - Filter Operator - predicate: - expr: ((key > 10.0) and (key < 10.0)) - type: boolean - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 2 - value expressions: - expr: key - type: string - expr: value - type: string - Reduce Operator Tree: - Join Operator - condition map: - Left Outer Join0 to 1 - Left Outer Join1 to 2 - condition expressions: - 0 {VALUE._col0} {VALUE._col1} - 1 {VALUE._col0} {VALUE._col1} - 2 {VALUE._col0} {VALUE._col1} - filter predicates: - 0 {(VALUE._col0 < 10.0)} - 1 - 2 - handleSkewJoin: false - outputColumnNames: _col0, _col1, _col4, _col5, _col8, _col9 - Select Operator - expressions: - expr: _col0 - type: string - expr: _col1 - type: string - expr: _col4 - type: string - expr: _col5 - 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.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - Stage: Stage-0 Fetch Operator limit: -1 @@ -4180,18 +3976,13 @@ (TOK_QUERY (TOK_FROM (TOK_LEFTOUTERJOIN (TOK_RIGHTOUTERJOIN (TOK_TABREF (TOK_TABNAME src) src1) (TOK_TABREF (TOK_TABNAME src) src2) (AND (AND (= (. (TOK_TABLE_OR_COL src1) key) (. (TOK_TABLE_OR_COL src2) key)) (< (. (TOK_TABLE_OR_COL src1) key) 10)) (> (. (TOK_TABLE_OR_COL src2) key) 10))) (TOK_TABREF (TOK_TABNAME src) src3) (AND (= (. (TOK_TABLE_OR_COL src2) key) (. (TOK_TABLE_OR_COL src3) key)) (< (. (TOK_TABLE_OR_COL src3) key) 10)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR TOK_ALLCOLREF)) (TOK_SORTBY (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src1) key)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src1) value)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src2) key)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src2) value)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src3) key)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src3) value))))) STAGE DEPENDENCIES: - Stage-6 is a root stage , consists of Stage-7, Stage-1 - Stage-7 has a backup stage: Stage-1 - Stage-5 depends on stages: Stage-7 - Stage-2 depends on stages: Stage-1, Stage-5 - Stage-1 + Stage-6 is a root stage + Stage-5 depends on stages: Stage-6 + Stage-2 depends on stages: Stage-5 Stage-0 is a root stage STAGE PLANS: Stage: Stage-6 - Conditional Operator - - Stage: Stage-7 Map Reduce Local Work Alias -> Map Local Tables: src1 @@ -4337,105 +4128,6 @@ input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat - Stage: Stage-1 - Map Reduce - Alias -> Map Operator Tree: - src1 - TableScan - alias: src1 - Filter Operator - predicate: - expr: (key < 10.0) - type: boolean - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 0 - value expressions: - expr: key - type: string - expr: value - type: string - src2 - TableScan - alias: src2 - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 1 - value expressions: - expr: key - type: string - expr: value - type: string - src3 - TableScan - alias: src3 - Filter Operator - predicate: - expr: (key < 10.0) - type: boolean - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 2 - value expressions: - expr: key - type: string - expr: value - type: string - Reduce Operator Tree: - Join Operator - condition map: - Right Outer Join0 to 1 - Left Outer Join1 to 2 - condition expressions: - 0 {VALUE._col0} {VALUE._col1} - 1 {VALUE._col0} {VALUE._col1} - 2 {VALUE._col0} {VALUE._col1} - filter predicates: - 0 - 1 {(VALUE._col0 > 10.0)} - 2 - handleSkewJoin: false - outputColumnNames: _col0, _col1, _col4, _col5, _col8, _col9 - Select Operator - expressions: - expr: _col0 - type: string - expr: _col1 - type: string - expr: _col4 - type: string - expr: _col5 - 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.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - Stage: Stage-0 Fetch Operator limit: -1 @@ -5007,18 +4699,13 @@ (TOK_QUERY (TOK_FROM (TOK_RIGHTOUTERJOIN (TOK_RIGHTOUTERJOIN (TOK_TABREF (TOK_TABNAME src) src1) (TOK_TABREF (TOK_TABNAME src) src2) (AND (AND (= (. (TOK_TABLE_OR_COL src1) key) (. (TOK_TABLE_OR_COL src2) key)) (< (. (TOK_TABLE_OR_COL src1) key) 10)) (> (. (TOK_TABLE_OR_COL src2) key) 10))) (TOK_TABREF (TOK_TABNAME src) src3) (AND (= (. (TOK_TABLE_OR_COL src2) key) (. (TOK_TABLE_OR_COL src3) key)) (< (. (TOK_TABLE_OR_COL src3) key) 10)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR TOK_ALLCOLREF)) (TOK_SORTBY (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src1) key)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src1) value)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src2) key)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src2) value)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src3) key)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src3) value))))) STAGE DEPENDENCIES: - Stage-6 is a root stage , consists of Stage-7, Stage-1 - Stage-7 has a backup stage: Stage-1 - Stage-5 depends on stages: Stage-7 - Stage-2 depends on stages: Stage-1, Stage-5 - Stage-1 + Stage-6 is a root stage + Stage-5 depends on stages: Stage-6 + Stage-2 depends on stages: Stage-5 Stage-0 is a root stage STAGE PLANS: Stage: Stage-6 - Conditional Operator - - Stage: Stage-7 Map Reduce Local Work Alias -> Map Local Tables: src1 @@ -5160,101 +4847,6 @@ input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat - Stage: Stage-1 - Map Reduce - Alias -> Map Operator Tree: - src1 - TableScan - alias: src1 - Filter Operator - predicate: - expr: (key < 10.0) - type: boolean - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 0 - value expressions: - expr: key - type: string - expr: value - type: string - src2 - TableScan - alias: src2 - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 1 - value expressions: - expr: key - type: string - expr: value - type: string - src3 - TableScan - alias: src3 - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 2 - value expressions: - expr: key - type: string - expr: value - type: string - Reduce Operator Tree: - Join Operator - condition map: - Right Outer Join0 to 1 - Right Outer Join1 to 2 - condition expressions: - 0 {VALUE._col0} {VALUE._col1} - 1 {VALUE._col0} {VALUE._col1} - 2 {VALUE._col0} {VALUE._col1} - filter predicates: - 0 - 1 {(VALUE._col0 > 10.0)} - 2 {(VALUE._col0 < 10.0)} - handleSkewJoin: false - outputColumnNames: _col0, _col1, _col4, _col5, _col8, _col9 - Select Operator - expressions: - expr: _col0 - type: string - expr: _col1 - type: string - expr: _col4 - type: string - expr: _col5 - 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.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - Stage: Stage-0 Fetch Operator limit: -1 @@ -6342,35 +5934,28 @@ (TOK_QUERY (TOK_FROM (TOK_LEFTOUTERJOIN (TOK_JOIN (TOK_TABREF (TOK_TABNAME src) src1) (TOK_TABREF (TOK_TABNAME src) src2) (AND (AND (= (. (TOK_TABLE_OR_COL src1) key) (. (TOK_TABLE_OR_COL src2) key)) (< (. (TOK_TABLE_OR_COL src1) key) 10)) (> (. (TOK_TABLE_OR_COL src2) key) 10))) (TOK_TABREF (TOK_TABNAME src) src3) (AND (= (. (TOK_TABLE_OR_COL src2) key) (. (TOK_TABLE_OR_COL src3) key)) (< (. (TOK_TABLE_OR_COL src3) key) 10)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR TOK_ALLCOLREF)) (TOK_SORTBY (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src1) key)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src1) value)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src2) key)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src2) value)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src3) key)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src3) value))))) STAGE DEPENDENCIES: - Stage-7 is a root stage , consists of Stage-8, Stage-9, Stage-1 - Stage-8 has a backup stage: Stage-1 - Stage-5 depends on stages: Stage-8 - Stage-2 depends on stages: Stage-1, Stage-5, Stage-6 - Stage-9 has a backup stage: Stage-1 - Stage-6 depends on stages: Stage-9 - Stage-1 + Stage-6 is a root stage + Stage-5 depends on stages: Stage-6 + Stage-2 depends on stages: Stage-5 Stage-0 is a root stage STAGE PLANS: - Stage: Stage-7 - Conditional Operator - - Stage: Stage-8 + Stage: Stage-6 Map Reduce Local Work Alias -> Map Local Tables: - src2 + src1 Fetch Operator limit: -1 src3 Fetch Operator limit: -1 Alias -> Map Local Operator Tree: - src2 + src1 TableScan - alias: src2 + alias: src1 Filter Operator predicate: - expr: ((key < 10.0) and (key > 10.0)) + expr: ((key > 10.0) and (key < 10.0)) type: boolean HashTable Sink Operator condition expressions: @@ -6382,7 +5967,7 @@ 0 [Column[key]] 1 [Column[key]] 2 [Column[key]] - Position of Big Table: 0 + Position of Big Table: 1 src3 TableScan alias: src3 @@ -6400,17 +5985,17 @@ 0 [Column[key]] 1 [Column[key]] 2 [Column[key]] - Position of Big Table: 0 + Position of Big Table: 1 Stage: Stage-5 Map Reduce Alias -> Map Operator Tree: - src1 + src2 TableScan - alias: src1 + alias: src2 Filter Operator predicate: - expr: ((key > 10.0) and (key < 10.0)) + expr: ((key < 10.0) and (key > 10.0)) type: boolean Map Join Operator condition map: @@ -6426,7 +6011,7 @@ 1 [Column[key]] 2 [Column[key]] outputColumnNames: _col0, _col1, _col4, _col5, _col8, _col9 - Position of Big Table: 0 + Position of Big Table: 1 Select Operator expressions: expr: _col0 @@ -6493,201 +6078,6 @@ input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat - Stage: Stage-9 - Map Reduce Local Work - Alias -> Map Local Tables: - src1 - Fetch Operator - limit: -1 - src3 - Fetch Operator - limit: -1 - Alias -> Map Local Operator Tree: - src1 - TableScan - alias: src1 - Filter Operator - predicate: - expr: ((key > 10.0) and (key < 10.0)) - type: boolean - HashTable Sink Operator - condition expressions: - 0 {key} {value} - 1 {key} {value} - 2 {key} {value} - handleSkewJoin: false - keys: - 0 [Column[key]] - 1 [Column[key]] - 2 [Column[key]] - Position of Big Table: 1 - src3 - TableScan - alias: src3 - Filter Operator - predicate: - expr: ((key > 10.0) and (key < 10.0)) - type: boolean - HashTable Sink Operator - condition expressions: - 0 {key} {value} - 1 {key} {value} - 2 {key} {value} - handleSkewJoin: false - keys: - 0 [Column[key]] - 1 [Column[key]] - 2 [Column[key]] - Position of Big Table: 1 - - Stage: Stage-6 - Map Reduce - Alias -> Map Operator Tree: - src2 - TableScan - alias: src2 - Filter Operator - predicate: - expr: ((key < 10.0) and (key > 10.0)) - type: boolean - Map Join Operator - condition map: - Inner Join 0 to 1 - Left Outer Join1 to 2 - condition expressions: - 0 {key} {value} - 1 {key} {value} - 2 {key} {value} - handleSkewJoin: false - keys: - 0 [Column[key]] - 1 [Column[key]] - 2 [Column[key]] - outputColumnNames: _col0, _col1, _col4, _col5, _col8, _col9 - Position of Big Table: 1 - Select Operator - expressions: - expr: _col0 - type: string - expr: _col1 - type: string - expr: _col4 - type: string - expr: _col5 - 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.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - Local Work: - Map Reduce Local Work - - Stage: Stage-1 - Map Reduce - Alias -> Map Operator Tree: - src1 - TableScan - alias: src1 - Filter Operator - predicate: - expr: ((key > 10.0) and (key < 10.0)) - type: boolean - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 0 - value expressions: - expr: key - type: string - expr: value - type: string - src2 - TableScan - alias: src2 - Filter Operator - predicate: - expr: ((key < 10.0) and (key > 10.0)) - type: boolean - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 1 - value expressions: - expr: key - type: string - expr: value - type: string - src3 - TableScan - alias: src3 - Filter Operator - predicate: - expr: ((key > 10.0) and (key < 10.0)) - type: boolean - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 2 - value expressions: - expr: key - type: string - expr: value - type: string - Reduce Operator Tree: - Join Operator - condition map: - Inner Join 0 to 1 - Left Outer Join1 to 2 - condition expressions: - 0 {VALUE._col0} {VALUE._col1} - 1 {VALUE._col0} {VALUE._col1} - 2 {VALUE._col0} {VALUE._col1} - handleSkewJoin: false - outputColumnNames: _col0, _col1, _col4, _col5, _col8, _col9 - Select Operator - expressions: - expr: _col0 - type: string - expr: _col1 - type: string - expr: _col4 - type: string - expr: _col5 - 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.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - Stage: Stage-0 Fetch Operator limit: -1 @@ -6711,18 +6101,13 @@ (TOK_QUERY (TOK_FROM (TOK_RIGHTOUTERJOIN (TOK_JOIN (TOK_TABREF (TOK_TABNAME src) src1) (TOK_TABREF (TOK_TABNAME src) src2) (AND (AND (= (. (TOK_TABLE_OR_COL src1) key) (. (TOK_TABLE_OR_COL src2) key)) (< (. (TOK_TABLE_OR_COL src1) key) 10)) (> (. (TOK_TABLE_OR_COL src2) key) 10))) (TOK_TABREF (TOK_TABNAME src) src3) (AND (= (. (TOK_TABLE_OR_COL src2) key) (. (TOK_TABLE_OR_COL src3) key)) (< (. (TOK_TABLE_OR_COL src3) key) 10)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR TOK_ALLCOLREF)) (TOK_SORTBY (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src1) key)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src1) value)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src2) key)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src2) value)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src3) key)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src3) value))))) STAGE DEPENDENCIES: - Stage-6 is a root stage , consists of Stage-7, Stage-1 - Stage-7 has a backup stage: Stage-1 - Stage-5 depends on stages: Stage-7 - Stage-2 depends on stages: Stage-1, Stage-5 - Stage-1 + Stage-6 is a root stage + Stage-5 depends on stages: Stage-6 + Stage-2 depends on stages: Stage-5 Stage-0 is a root stage STAGE PLANS: Stage: Stage-6 - Conditional Operator - - Stage: Stage-7 Map Reduce Local Work Alias -> Map Local Tables: src1 @@ -6868,105 +6253,6 @@ input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat - Stage: Stage-1 - Map Reduce - Alias -> Map Operator Tree: - src1 - TableScan - alias: src1 - Filter Operator - predicate: - expr: ((key > 10.0) and (key < 10.0)) - type: boolean - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 0 - value expressions: - expr: key - type: string - expr: value - type: string - src2 - TableScan - alias: src2 - Filter Operator - predicate: - expr: ((key < 10.0) and (key > 10.0)) - type: boolean - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 1 - value expressions: - expr: key - type: string - expr: value - type: string - src3 - TableScan - alias: src3 - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 2 - value expressions: - expr: key - type: string - expr: value - type: string - Reduce Operator Tree: - Join Operator - condition map: - Inner Join 0 to 1 - Right Outer Join1 to 2 - condition expressions: - 0 {VALUE._col0} {VALUE._col1} - 1 {VALUE._col0} {VALUE._col1} - 2 {VALUE._col0} {VALUE._col1} - filter predicates: - 0 - 1 - 2 {(VALUE._col0 < 10.0)} - handleSkewJoin: false - outputColumnNames: _col0, _col1, _col4, _col5, _col8, _col9 - Select Operator - expressions: - expr: _col0 - type: string - expr: _col1 - type: string - expr: _col4 - type: string - expr: _col5 - 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.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - Stage: Stage-0 Fetch Operator limit: -1 @@ -7490,18 +6776,13 @@ (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_LEFTOUTERJOIN (TOK_TABREF (TOK_TABNAME src) src1) (TOK_TABREF (TOK_TABNAME src) src2) (AND (AND (= (. (TOK_TABLE_OR_COL src1) key) (. (TOK_TABLE_OR_COL src2) key)) (< (. (TOK_TABLE_OR_COL src1) key) 10)) (> (. (TOK_TABLE_OR_COL src2) key) 10))) (TOK_TABREF (TOK_TABNAME src) src3) (AND (= (. (TOK_TABLE_OR_COL src2) key) (. (TOK_TABLE_OR_COL src3) key)) (< (. (TOK_TABLE_OR_COL src3) key) 10)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR TOK_ALLCOLREF)) (TOK_SORTBY (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src1) key)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src1) value)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src2) key)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src2) value)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src3) key)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src3) value))))) STAGE DEPENDENCIES: - Stage-6 is a root stage , consists of Stage-7, Stage-1 - Stage-7 has a backup stage: Stage-1 - Stage-5 depends on stages: Stage-7 - Stage-2 depends on stages: Stage-1, Stage-5 - Stage-1 + Stage-6 is a root stage + Stage-5 depends on stages: Stage-6 + Stage-2 depends on stages: Stage-5 Stage-0 is a root stage STAGE PLANS: Stage: Stage-6 - Conditional Operator - - Stage: Stage-7 Map Reduce Local Work Alias -> Map Local Tables: src2 @@ -7647,105 +6928,6 @@ input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat - Stage: Stage-1 - Map Reduce - Alias -> Map Operator Tree: - src1 - TableScan - alias: src1 - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 0 - value expressions: - expr: key - type: string - expr: value - type: string - src2 - TableScan - alias: src2 - Filter Operator - predicate: - expr: ((key < 10.0) and (key > 10.0)) - type: boolean - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 1 - value expressions: - expr: key - type: string - expr: value - type: string - src3 - TableScan - alias: src3 - Filter Operator - predicate: - expr: ((key > 10.0) and (key < 10.0)) - type: boolean - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 2 - value expressions: - expr: key - type: string - expr: value - type: string - Reduce Operator Tree: - Join Operator - condition map: - Left Outer Join0 to 1 - Inner Join 1 to 2 - condition expressions: - 0 {VALUE._col0} {VALUE._col1} - 1 {VALUE._col0} {VALUE._col1} - 2 {VALUE._col0} {VALUE._col1} - filter predicates: - 0 {(VALUE._col0 < 10.0)} - 1 - 2 - handleSkewJoin: false - outputColumnNames: _col0, _col1, _col4, _col5, _col8, _col9 - Select Operator - expressions: - expr: _col0 - type: string - expr: _col1 - type: string - expr: _col4 - type: string - expr: _col5 - 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.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - Stage: Stage-0 Fetch Operator limit: -1 @@ -7769,20 +6951,13 @@ (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_RIGHTOUTERJOIN (TOK_TABREF (TOK_TABNAME src) src1) (TOK_TABREF (TOK_TABNAME src) src2) (AND (AND (= (. (TOK_TABLE_OR_COL src1) key) (. (TOK_TABLE_OR_COL src2) key)) (< (. (TOK_TABLE_OR_COL src1) key) 10)) (> (. (TOK_TABLE_OR_COL src2) key) 10))) (TOK_TABREF (TOK_TABNAME src) src3) (AND (= (. (TOK_TABLE_OR_COL src2) key) (. (TOK_TABLE_OR_COL src3) key)) (< (. (TOK_TABLE_OR_COL src3) key) 10)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR TOK_ALLCOLREF)) (TOK_SORTBY (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src1) key)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src1) value)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src2) key)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src2) value)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src3) key)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src3) value))))) STAGE DEPENDENCIES: - Stage-7 is a root stage , consists of Stage-8, Stage-9, Stage-1 - Stage-8 has a backup stage: Stage-1 - Stage-5 depends on stages: Stage-8 - Stage-2 depends on stages: Stage-1, Stage-5, Stage-6 - Stage-9 has a backup stage: Stage-1 - Stage-6 depends on stages: Stage-9 - Stage-1 + Stage-6 is a root stage + Stage-5 depends on stages: Stage-6 + Stage-2 depends on stages: Stage-5 Stage-0 is a root stage STAGE PLANS: - Stage: Stage-7 - Conditional Operator - - Stage: Stage-8 + Stage: Stage-6 Map Reduce Local Work Alias -> Map Local Tables: src1 @@ -7932,217 +7107,6 @@ input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat - Stage: Stage-9 - Map Reduce Local Work - Alias -> Map Local Tables: - src1 - Fetch Operator - limit: -1 - src2 - Fetch Operator - limit: -1 - Alias -> Map Local Operator Tree: - src1 - TableScan - alias: src1 - Filter Operator - predicate: - expr: (key < 10.0) - type: boolean - HashTable Sink Operator - condition expressions: - 0 {key} {value} - 1 {key} {value} - 2 {key} {value} - filter predicates: - 0 - 1 {(key > 10.0)} - 2 - handleSkewJoin: false - keys: - 0 [Column[key]] - 1 [Column[key]] - 2 [Column[key]] - Position of Big Table: 2 - src2 - TableScan - alias: src2 - Filter Operator - predicate: - expr: (key < 10.0) - type: boolean - HashTable Sink Operator - condition expressions: - 0 {key} {value} - 1 {key} {value} - 2 {key} {value} - filter predicates: - 0 - 1 {(key > 10.0)} - 2 - handleSkewJoin: false - keys: - 0 [Column[key]] - 1 [Column[key]] - 2 [Column[key]] - Position of Big Table: 2 - - Stage: Stage-6 - Map Reduce - Alias -> Map Operator Tree: - src3 - TableScan - alias: src3 - Filter Operator - predicate: - expr: (key < 10.0) - type: boolean - Map Join Operator - condition map: - Right Outer Join0 to 1 - Inner Join 1 to 2 - condition expressions: - 0 {key} {value} - 1 {key} {value} - 2 {key} {value} - filter predicates: - 0 - 1 {(key > 10.0)} - 2 - handleSkewJoin: false - keys: - 0 [Column[key]] - 1 [Column[key]] - 2 [Column[key]] - outputColumnNames: _col0, _col1, _col4, _col5, _col8, _col9 - Position of Big Table: 2 - Select Operator - expressions: - expr: _col0 - type: string - expr: _col1 - type: string - expr: _col4 - type: string - expr: _col5 - 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.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - Local Work: - Map Reduce Local Work - - Stage: Stage-1 - Map Reduce - Alias -> Map Operator Tree: - src1 - TableScan - alias: src1 - Filter Operator - predicate: - expr: (key < 10.0) - type: boolean - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 0 - value expressions: - expr: key - type: string - expr: value - type: string - src2 - TableScan - alias: src2 - Filter Operator - predicate: - expr: (key < 10.0) - type: boolean - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 1 - value expressions: - expr: key - type: string - expr: value - type: string - src3 - TableScan - alias: src3 - Filter Operator - predicate: - expr: (key < 10.0) - type: boolean - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 2 - value expressions: - expr: key - type: string - expr: value - type: string - Reduce Operator Tree: - Join Operator - condition map: - Right Outer Join0 to 1 - Inner Join 1 to 2 - condition expressions: - 0 {VALUE._col0} {VALUE._col1} - 1 {VALUE._col0} {VALUE._col1} - 2 {VALUE._col0} {VALUE._col1} - filter predicates: - 0 - 1 {(VALUE._col0 > 10.0)} - 2 - handleSkewJoin: false - outputColumnNames: _col0, _col1, _col4, _col5, _col8, _col9 - Select Operator - expressions: - expr: _col0 - type: string - expr: _col1 - type: string - expr: _col4 - type: string - expr: _col5 - 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.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - Stage: Stage-0 Fetch Operator limit: -1 @@ -8224,37 +7188,28 @@ (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_JOIN (TOK_TABREF (TOK_TABNAME src) src1) (TOK_TABREF (TOK_TABNAME src) src2) (AND (AND (= (. (TOK_TABLE_OR_COL src1) key) (. (TOK_TABLE_OR_COL src2) key)) (< (. (TOK_TABLE_OR_COL src1) key) 10)) (> (. (TOK_TABLE_OR_COL src2) key) 10))) (TOK_TABREF (TOK_TABNAME src) src3) (AND (= (. (TOK_TABLE_OR_COL src2) key) (. (TOK_TABLE_OR_COL src3) key)) (< (. (TOK_TABLE_OR_COL src3) key) 10)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR TOK_ALLCOLREF)) (TOK_SORTBY (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src1) key)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src1) value)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src2) key)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src2) value)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src3) key)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src3) value))))) STAGE DEPENDENCIES: - Stage-8 is a root stage , consists of Stage-9, Stage-10, Stage-11, Stage-1 - Stage-9 has a backup stage: Stage-1 - Stage-5 depends on stages: Stage-9 - Stage-2 depends on stages: Stage-1, Stage-5, Stage-6, Stage-7 - Stage-10 has a backup stage: Stage-1 - Stage-6 depends on stages: Stage-10 - Stage-11 has a backup stage: Stage-1 - Stage-7 depends on stages: Stage-11 - Stage-1 + Stage-6 is a root stage + Stage-5 depends on stages: Stage-6 + Stage-2 depends on stages: Stage-5 Stage-0 is a root stage STAGE PLANS: - Stage: Stage-8 - Conditional Operator - - Stage: Stage-9 + Stage: Stage-6 Map Reduce Local Work Alias -> Map Local Tables: - src2 + src1 Fetch Operator limit: -1 src3 Fetch Operator limit: -1 Alias -> Map Local Operator Tree: - src2 + src1 TableScan - alias: src2 + alias: src1 Filter Operator predicate: - expr: ((key < 10.0) and (key > 10.0)) + expr: ((key > 10.0) and (key < 10.0)) type: boolean HashTable Sink Operator condition expressions: @@ -8266,7 +7221,7 @@ 0 [Column[key]] 1 [Column[key]] 2 [Column[key]] - Position of Big Table: 0 + Position of Big Table: 1 src3 TableScan alias: src3 @@ -8284,17 +7239,17 @@ 0 [Column[key]] 1 [Column[key]] 2 [Column[key]] - Position of Big Table: 0 + Position of Big Table: 1 Stage: Stage-5 Map Reduce Alias -> Map Operator Tree: - src1 + src2 TableScan - alias: src1 + alias: src2 Filter Operator predicate: - expr: ((key > 10.0) and (key < 10.0)) + expr: ((key < 10.0) and (key > 10.0)) type: boolean Map Join Operator condition map: @@ -8310,7 +7265,7 @@ 1 [Column[key]] 2 [Column[key]] outputColumnNames: _col0, _col1, _col4, _col5, _col8, _col9 - Position of Big Table: 0 + Position of Big Table: 1 Select Operator expressions: expr: _col0 @@ -8377,297 +7332,6 @@ input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat - Stage: Stage-10 - Map Reduce Local Work - Alias -> Map Local Tables: - src1 - Fetch Operator - limit: -1 - src3 - Fetch Operator - limit: -1 - Alias -> Map Local Operator Tree: - src1 - TableScan - alias: src1 - Filter Operator - predicate: - expr: ((key > 10.0) and (key < 10.0)) - type: boolean - HashTable Sink Operator - condition expressions: - 0 {key} {value} - 1 {key} {value} - 2 {key} {value} - handleSkewJoin: false - keys: - 0 [Column[key]] - 1 [Column[key]] - 2 [Column[key]] - Position of Big Table: 1 - src3 - TableScan - alias: src3 - Filter Operator - predicate: - expr: ((key > 10.0) and (key < 10.0)) - type: boolean - HashTable Sink Operator - condition expressions: - 0 {key} {value} - 1 {key} {value} - 2 {key} {value} - handleSkewJoin: false - keys: - 0 [Column[key]] - 1 [Column[key]] - 2 [Column[key]] - Position of Big Table: 1 - - Stage: Stage-6 - Map Reduce - Alias -> Map Operator Tree: - src2 - TableScan - alias: src2 - Filter Operator - predicate: - expr: ((key < 10.0) and (key > 10.0)) - type: boolean - Map Join Operator - condition map: - Inner Join 0 to 1 - Inner Join 1 to 2 - condition expressions: - 0 {key} {value} - 1 {key} {value} - 2 {key} {value} - handleSkewJoin: false - keys: - 0 [Column[key]] - 1 [Column[key]] - 2 [Column[key]] - outputColumnNames: _col0, _col1, _col4, _col5, _col8, _col9 - Position of Big Table: 1 - Select Operator - expressions: - expr: _col0 - type: string - expr: _col1 - type: string - expr: _col4 - type: string - expr: _col5 - 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.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - Local Work: - Map Reduce Local Work - - Stage: Stage-11 - Map Reduce Local Work - Alias -> Map Local Tables: - src1 - Fetch Operator - limit: -1 - src2 - Fetch Operator - limit: -1 - Alias -> Map Local Operator Tree: - src1 - TableScan - alias: src1 - Filter Operator - predicate: - expr: ((key > 10.0) and (key < 10.0)) - type: boolean - HashTable Sink Operator - condition expressions: - 0 {key} {value} - 1 {key} {value} - 2 {key} {value} - handleSkewJoin: false - keys: - 0 [Column[key]] - 1 [Column[key]] - 2 [Column[key]] - Position of Big Table: 2 - src2 - TableScan - alias: src2 - Filter Operator - predicate: - expr: ((key < 10.0) and (key > 10.0)) - type: boolean - HashTable Sink Operator - condition expressions: - 0 {key} {value} - 1 {key} {value} - 2 {key} {value} - handleSkewJoin: false - keys: - 0 [Column[key]] - 1 [Column[key]] - 2 [Column[key]] - Position of Big Table: 2 - - Stage: Stage-7 - Map Reduce - Alias -> Map Operator Tree: - src3 - TableScan - alias: src3 - Filter Operator - predicate: - expr: ((key > 10.0) and (key < 10.0)) - type: boolean - Map Join Operator - condition map: - Inner Join 0 to 1 - Inner Join 1 to 2 - condition expressions: - 0 {key} {value} - 1 {key} {value} - 2 {key} {value} - handleSkewJoin: false - keys: - 0 [Column[key]] - 1 [Column[key]] - 2 [Column[key]] - outputColumnNames: _col0, _col1, _col4, _col5, _col8, _col9 - Position of Big Table: 2 - Select Operator - expressions: - expr: _col0 - type: string - expr: _col1 - type: string - expr: _col4 - type: string - expr: _col5 - 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.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - Local Work: - Map Reduce Local Work - - Stage: Stage-1 - Map Reduce - Alias -> Map Operator Tree: - src1 - TableScan - alias: src1 - Filter Operator - predicate: - expr: ((key > 10.0) and (key < 10.0)) - type: boolean - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 0 - value expressions: - expr: key - type: string - expr: value - type: string - src2 - TableScan - alias: src2 - Filter Operator - predicate: - expr: ((key < 10.0) and (key > 10.0)) - type: boolean - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 1 - value expressions: - expr: key - type: string - expr: value - type: string - src3 - TableScan - alias: src3 - Filter Operator - predicate: - expr: ((key > 10.0) and (key < 10.0)) - type: boolean - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 2 - value expressions: - expr: key - type: string - expr: value - type: string - Reduce Operator Tree: - Join Operator - condition map: - Inner Join 0 to 1 - Inner Join 1 to 2 - condition expressions: - 0 {VALUE._col0} {VALUE._col1} - 1 {VALUE._col0} {VALUE._col1} - 2 {VALUE._col0} {VALUE._col1} - handleSkewJoin: false - outputColumnNames: _col0, _col1, _col4, _col5, _col8, _col9 - Select Operator - expressions: - expr: _col0 - type: string - expr: _col1 - type: string - expr: _col4 - type: string - expr: _col5 - 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.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - Stage: Stage-0 Fetch Operator limit: -1 Index: ql/src/test/results/clientpositive/reduce_deduplicate_exclude_join.q.out =================================================================== --- ql/src/test/results/clientpositive/reduce_deduplicate_exclude_join.q.out (revision 1458165) +++ ql/src/test/results/clientpositive/reduce_deduplicate_exclude_join.q.out (working copy) @@ -7,12 +7,8 @@ STAGE DEPENDENCIES: Stage-2 is a root stage - Stage-5 depends on stages: Stage-2 , consists of Stage-6, Stage-7, Stage-1 - Stage-6 has a backup stage: Stage-1 - Stage-3 depends on stages: Stage-6 - Stage-7 has a backup stage: Stage-1 - Stage-4 depends on stages: Stage-7 - Stage-1 + Stage-4 depends on stages: Stage-2 + Stage-3 depends on stages: Stage-4 Stage-0 is a root stage STAGE PLANS: @@ -52,10 +48,7 @@ input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - Stage: Stage-5 - Conditional Operator - - Stage: Stage-6 + Stage: Stage-4 Map Reduce Local Work Alias -> Map Local Tables: b @@ -112,126 +105,6 @@ Local Work: Map Reduce Local Work - Stage: Stage-7 - Map Reduce Local Work - Alias -> Map Local Tables: - $INTNAME - Fetch Operator - limit: -1 - Alias -> Map Local Operator Tree: - $INTNAME - HashTable Sink Operator - condition expressions: - 0 {_col0} {_col1} - 1 {key} {value} - handleSkewJoin: false - keys: - 0 [Column[_col0]] - 1 [Column[key]] - Position of Big Table: 1 - - Stage: Stage-4 - Map Reduce - Alias -> Map Operator Tree: - b - TableScan - alias: b - Map Join Operator - condition map: - Inner Join 0 to 1 - condition expressions: - 0 {_col0} {_col1} - 1 {key} {value} - handleSkewJoin: false - keys: - 0 [Column[_col0]] - 1 [Column[key]] - outputColumnNames: _col0, _col1, _col2, _col3 - Position of Big Table: 1 - Select Operator - expressions: - expr: _col0 - type: string - expr: _col1 - type: string - expr: _col2 - type: string - expr: _col3 - type: string - outputColumnNames: _col0, _col1, _col2, _col3 - Limit - 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-1 - Map Reduce - Alias -> Map Operator Tree: - $INTNAME - Reduce Output Operator - key expressions: - expr: _col0 - type: string - sort order: + - Map-reduce partition columns: - expr: _col0 - type: string - tag: 0 - value expressions: - expr: _col0 - type: string - expr: _col1 - type: string - b - TableScan - alias: b - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 1 - value expressions: - expr: key - type: string - expr: value - type: string - Reduce Operator Tree: - Join Operator - condition map: - Inner Join 0 to 1 - condition expressions: - 0 {VALUE._col0} {VALUE._col1} - 1 {VALUE._col0} {VALUE._col1} - handleSkewJoin: false - outputColumnNames: _col0, _col1, _col2, _col3 - Select Operator - expressions: - expr: _col0 - type: string - expr: _col1 - type: string - expr: _col2 - type: string - expr: _col3 - type: string - outputColumnNames: _col0, _col1, _col2, _col3 - Limit - File Output Operator - compressed: false - GlobalTableId: 0 - table: - input format: org.apache.hadoop.mapred.TextInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat - Stage: Stage-0 Fetch Operator limit: 1 Index: ql/src/test/results/clientpositive/auto_join24.q.out =================================================================== --- ql/src/test/results/clientpositive/auto_join24.q.out (revision 1458165) +++ ql/src/test/results/clientpositive/auto_join24.q.out (working copy) @@ -27,29 +27,22 @@ (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_TABREF (TOK_TABNAME tst1) a) (TOK_TABREF (TOK_TABNAME tst1) b) (= (. (TOK_TABLE_OR_COL a) key) (. (TOK_TABLE_OR_COL b) key)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION sum (. (TOK_TABLE_OR_COL a) cnt)))))) STAGE DEPENDENCIES: - Stage-6 is a root stage , consists of Stage-7, Stage-8, Stage-1 - Stage-7 has a backup stage: Stage-1 - Stage-4 depends on stages: Stage-7 - Stage-2 depends on stages: Stage-1, Stage-4, Stage-5 - Stage-8 has a backup stage: Stage-1 - Stage-5 depends on stages: Stage-8 - Stage-1 + Stage-5 is a root stage + Stage-4 depends on stages: Stage-5 + Stage-2 depends on stages: Stage-4 Stage-0 is a root stage STAGE PLANS: - Stage: Stage-6 - Conditional Operator - - Stage: Stage-7 + Stage: Stage-5 Map Reduce Local Work Alias -> Map Local Tables: - b + a Fetch Operator limit: -1 Alias -> Map Local Operator Tree: - b + a TableScan - alias: b + alias: a HashTable Sink Operator condition expressions: 0 {cnt} @@ -58,14 +51,14 @@ keys: 0 [Column[key]] 1 [Column[key]] - Position of Big Table: 0 + Position of Big Table: 1 Stage: Stage-4 Map Reduce Alias -> Map Operator Tree: - a + b TableScan - alias: a + alias: b Map Join Operator condition map: Inner Join 0 to 1 @@ -77,7 +70,7 @@ 0 [Column[key]] 1 [Column[key]] outputColumnNames: _col1 - Position of Big Table: 0 + Position of Big Table: 1 Select Operator expressions: expr: _col1 @@ -127,121 +120,6 @@ input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat - Stage: Stage-8 - Map Reduce Local Work - Alias -> Map Local Tables: - a - Fetch Operator - limit: -1 - Alias -> Map Local Operator Tree: - a - TableScan - alias: a - HashTable Sink Operator - condition expressions: - 0 {cnt} - 1 - handleSkewJoin: false - keys: - 0 [Column[key]] - 1 [Column[key]] - Position of Big Table: 1 - - Stage: Stage-5 - Map Reduce - Alias -> Map Operator Tree: - b - TableScan - alias: b - Map Join Operator - condition map: - Inner Join 0 to 1 - condition expressions: - 0 {cnt} - 1 - handleSkewJoin: false - keys: - 0 [Column[key]] - 1 [Column[key]] - outputColumnNames: _col1 - Position of Big Table: 1 - Select Operator - expressions: - expr: _col1 - type: int - outputColumnNames: _col1 - Group By Operator - aggregations: - expr: sum(_col1) - bucketGroup: false - mode: hash - outputColumnNames: _col0 - File Output Operator - compressed: false - GlobalTableId: 0 - table: - input format: org.apache.hadoop.mapred.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - Local Work: - Map Reduce Local Work - - Stage: Stage-1 - Map Reduce - Alias -> Map Operator Tree: - a - TableScan - alias: a - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 0 - value expressions: - expr: cnt - type: int - b - TableScan - alias: b - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 1 - Reduce Operator Tree: - Join Operator - condition map: - Inner Join 0 to 1 - condition expressions: - 0 {VALUE._col1} - 1 - handleSkewJoin: false - outputColumnNames: _col1 - Select Operator - expressions: - expr: _col1 - type: int - outputColumnNames: _col1 - Group By Operator - aggregations: - expr: sum(_col1) - bucketGroup: false - mode: hash - outputColumnNames: _col0 - File Output Operator - compressed: false - GlobalTableId: 0 - table: - input format: org.apache.hadoop.mapred.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - Stage: Stage-0 Fetch Operator limit: -1 Index: ql/src/test/results/clientpositive/auto_join1.q.out =================================================================== --- ql/src/test/results/clientpositive/auto_join1.q.out (revision 1458165) +++ ql/src/test/results/clientpositive/auto_join1.q.out (working copy) @@ -15,29 +15,22 @@ (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_TABREF (TOK_TABNAME src) src1) (TOK_TABREF (TOK_TABNAME src) src2) (= (. (TOK_TABLE_OR_COL src1) key) (. (TOK_TABLE_OR_COL src2) key)))) (TOK_INSERT (TOK_DESTINATION (TOK_TAB (TOK_TABNAME dest_j1))) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL src1) key)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL src2) value))))) STAGE DEPENDENCIES: - Stage-6 is a root stage , consists of Stage-7, Stage-8, Stage-1 - Stage-7 has a backup stage: Stage-1 - Stage-4 depends on stages: Stage-7 - Stage-0 depends on stages: Stage-1, Stage-4, Stage-5 + Stage-5 is a root stage + Stage-4 depends on stages: Stage-5 + Stage-0 depends on stages: Stage-4 Stage-2 depends on stages: Stage-0 - Stage-8 has a backup stage: Stage-1 - Stage-5 depends on stages: Stage-8 - Stage-1 STAGE PLANS: - Stage: Stage-6 - Conditional Operator - - Stage: Stage-7 + Stage: Stage-5 Map Reduce Local Work Alias -> Map Local Tables: - src2 + src1 Fetch Operator limit: -1 Alias -> Map Local Operator Tree: - src2 + src1 TableScan - alias: src2 + alias: src1 HashTable Sink Operator condition expressions: 0 {key} @@ -46,14 +39,14 @@ keys: 0 [Column[key]] 1 [Column[key]] - Position of Big Table: 0 + Position of Big Table: 1 Stage: Stage-4 Map Reduce Alias -> Map Operator Tree: - src1 + src2 TableScan - alias: src1 + alias: src2 Map Join Operator condition map: Inner Join 0 to 1 @@ -65,7 +58,7 @@ 0 [Column[key]] 1 [Column[key]] outputColumnNames: _col0, _col5 - Position of Big Table: 0 + Position of Big Table: 1 Select Operator expressions: expr: UDFToInteger(_col0) @@ -97,120 +90,7 @@ Stage: Stage-2 Stats-Aggr Operator - Stage: Stage-8 - Map Reduce Local Work - Alias -> Map Local Tables: - src1 - Fetch Operator - limit: -1 - Alias -> Map Local Operator Tree: - src1 - TableScan - alias: src1 - HashTable Sink Operator - condition expressions: - 0 {key} - 1 {value} - handleSkewJoin: false - keys: - 0 [Column[key]] - 1 [Column[key]] - Position of Big Table: 1 - Stage: Stage-5 - Map Reduce - Alias -> Map Operator Tree: - src2 - TableScan - alias: src2 - Map Join Operator - condition map: - Inner Join 0 to 1 - condition expressions: - 0 {key} - 1 {value} - handleSkewJoin: false - keys: - 0 [Column[key]] - 1 [Column[key]] - outputColumnNames: _col0, _col5 - Position of Big Table: 1 - Select Operator - expressions: - expr: UDFToInteger(_col0) - type: int - expr: _col5 - type: string - outputColumnNames: _col0, _col1 - File Output Operator - compressed: false - GlobalTableId: 1 - 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.dest_j1 - Local Work: - Map Reduce Local Work - - Stage: Stage-1 - Map Reduce - Alias -> Map Operator Tree: - src1 - TableScan - alias: src1 - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 0 - value expressions: - expr: key - type: string - src2 - TableScan - alias: src2 - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 1 - value expressions: - expr: value - type: string - Reduce Operator Tree: - Join Operator - condition map: - Inner Join 0 to 1 - condition expressions: - 0 {VALUE._col0} - 1 {VALUE._col1} - handleSkewJoin: false - outputColumnNames: _col0, _col5 - Select Operator - expressions: - expr: UDFToInteger(_col0) - type: int - expr: _col5 - type: string - outputColumnNames: _col0, _col1 - File Output Operator - compressed: false - GlobalTableId: 1 - 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.dest_j1 - PREHOOK: query: FROM src src1 JOIN src src2 ON (src1.key = src2.key) INSERT OVERWRITE TABLE dest_j1 SELECT src1.key, src2.value PREHOOK: type: QUERY Index: ql/src/test/results/clientpositive/auto_join17.q.out =================================================================== --- ql/src/test/results/clientpositive/auto_join17.q.out (revision 1458165) +++ ql/src/test/results/clientpositive/auto_join17.q.out (working copy) @@ -15,29 +15,22 @@ (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_TABREF (TOK_TABNAME src) src1) (TOK_TABREF (TOK_TABNAME src) src2) (= (. (TOK_TABLE_OR_COL src1) key) (. (TOK_TABLE_OR_COL src2) key)))) (TOK_INSERT (TOK_DESTINATION (TOK_TAB (TOK_TABNAME dest1))) (TOK_SELECT (TOK_SELEXPR (TOK_ALLCOLREF (TOK_TABNAME src1))) (TOK_SELEXPR (TOK_ALLCOLREF (TOK_TABNAME src2)))))) STAGE DEPENDENCIES: - Stage-6 is a root stage , consists of Stage-7, Stage-8, Stage-1 - Stage-7 has a backup stage: Stage-1 - Stage-4 depends on stages: Stage-7 - Stage-0 depends on stages: Stage-1, Stage-4, Stage-5 + Stage-5 is a root stage + Stage-4 depends on stages: Stage-5 + Stage-0 depends on stages: Stage-4 Stage-2 depends on stages: Stage-0 - Stage-8 has a backup stage: Stage-1 - Stage-5 depends on stages: Stage-8 - Stage-1 STAGE PLANS: - Stage: Stage-6 - Conditional Operator - - Stage: Stage-7 + Stage: Stage-5 Map Reduce Local Work Alias -> Map Local Tables: - src2 + src1 Fetch Operator limit: -1 Alias -> Map Local Operator Tree: - src2 + src1 TableScan - alias: src2 + alias: src1 HashTable Sink Operator condition expressions: 0 {key} {value} @@ -46,14 +39,14 @@ keys: 0 [Column[key]] 1 [Column[key]] - Position of Big Table: 0 + Position of Big Table: 1 Stage: Stage-4 Map Reduce Alias -> Map Operator Tree: - src1 + src2 TableScan - alias: src1 + alias: src2 Map Join Operator condition map: Inner Join 0 to 1 @@ -65,7 +58,7 @@ 0 [Column[key]] 1 [Column[key]] outputColumnNames: _col0, _col1, _col4, _col5 - Position of Big Table: 0 + Position of Big Table: 1 Select Operator expressions: expr: UDFToInteger(_col0) @@ -101,133 +94,7 @@ Stage: Stage-2 Stats-Aggr Operator - Stage: Stage-8 - Map Reduce Local Work - Alias -> Map Local Tables: - src1 - Fetch Operator - limit: -1 - Alias -> Map Local Operator Tree: - src1 - TableScan - alias: src1 - 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 - Stage: Stage-5 - Map Reduce - Alias -> Map Operator Tree: - src2 - TableScan - alias: src2 - 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 - Select Operator - expressions: - expr: UDFToInteger(_col0) - type: int - expr: _col1 - type: string - expr: UDFToInteger(_col4) - type: int - expr: _col5 - type: string - outputColumnNames: _col0, _col1, _col2, _col3 - File Output Operator - compressed: false - GlobalTableId: 1 - 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.dest1 - Local Work: - Map Reduce Local Work - - Stage: Stage-1 - Map Reduce - Alias -> Map Operator Tree: - src1 - TableScan - alias: src1 - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 0 - value expressions: - expr: key - type: string - expr: value - type: string - src2 - TableScan - alias: src2 - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 1 - value expressions: - expr: key - type: string - expr: value - type: string - Reduce Operator Tree: - Join Operator - condition map: - Inner Join 0 to 1 - condition expressions: - 0 {VALUE._col0} {VALUE._col1} - 1 {VALUE._col0} {VALUE._col1} - handleSkewJoin: false - outputColumnNames: _col0, _col1, _col4, _col5 - Select Operator - expressions: - expr: UDFToInteger(_col0) - type: int - expr: _col1 - type: string - expr: UDFToInteger(_col4) - type: int - expr: _col5 - type: string - outputColumnNames: _col0, _col1, _col2, _col3 - File Output Operator - compressed: false - GlobalTableId: 1 - 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.dest1 - - PREHOOK: query: FROM src src1 JOIN src src2 ON (src1.key = src2.key) INSERT OVERWRITE TABLE dest1 SELECT src1.*, src2.* PREHOOK: type: QUERY Index: ql/src/test/results/clientpositive/auto_join12.q.out =================================================================== --- ql/src/test/results/clientpositive/auto_join12.q.out (revision 1458165) +++ ql/src/test/results/clientpositive/auto_join12.q.out (working copy) @@ -24,45 +24,34 @@ (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_JOIN (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME src))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL src) key) c1) (TOK_SELEXPR (. (TOK_TABLE_OR_COL src) value) c2)))) src1) (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME src))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL src) key) c3) (TOK_SELEXPR (. (TOK_TABLE_OR_COL src) value) c4)))) src2) (AND (= (. (TOK_TABLE_OR_COL src1) c1) (. (TOK_TABLE_OR_COL src2) c3)) (< (. (TOK_TABLE_OR_COL src1) c1) 100))) (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME src))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL src) key) c5) (TOK_SELEXPR (. (TOK_TABLE_OR_COL src) value) c6)))) src3) (AND (= (. (TOK_TABLE_OR_COL src1) c1) (. (TOK_TABLE_OR_COL src3) c5)) (< (. (TOK_TABLE_OR_COL src3) c5) 80)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION sum (TOK_FUNCTION hash (. (TOK_TABLE_OR_COL src1) c1) (. (TOK_TABLE_OR_COL src2) c4))))))) STAGE DEPENDENCIES: - Stage-8 is a root stage , consists of Stage-9, Stage-10, Stage-11, Stage-1 - Stage-9 has a backup stage: Stage-1 - Stage-5 depends on stages: Stage-9 - Stage-2 depends on stages: Stage-1, Stage-5, Stage-6, Stage-7 - Stage-10 has a backup stage: Stage-1 - Stage-6 depends on stages: Stage-10 - Stage-11 has a backup stage: Stage-1 - Stage-7 depends on stages: Stage-11 - Stage-1 + Stage-6 is a root stage + Stage-5 depends on stages: Stage-6 + Stage-2 depends on stages: Stage-5 Stage-0 is a root stage STAGE PLANS: - Stage: Stage-8 - Conditional Operator - - Stage: Stage-9 + Stage: Stage-6 Map Reduce Local Work Alias -> Map Local Tables: - src2:src + src1:src Fetch Operator limit: -1 src3:src Fetch Operator limit: -1 Alias -> Map Local Operator Tree: - src2:src + src1:src TableScan alias: src Filter Operator predicate: - expr: ((key < 100.0) and (key < 80.0)) + expr: ((key < 80.0) and (key < 100.0)) type: boolean Select Operator expressions: expr: key type: string - expr: value - type: string - outputColumnNames: _col0, _col1 + outputColumnNames: _col0 HashTable Sink Operator condition expressions: 0 {_col0} @@ -73,7 +62,7 @@ 0 [Column[_col0]] 1 [Column[_col0]] 2 [Column[_col0]] - Position of Big Table: 0 + Position of Big Table: 1 src3:src TableScan alias: src @@ -96,23 +85,25 @@ 0 [Column[_col0]] 1 [Column[_col0]] 2 [Column[_col0]] - Position of Big Table: 0 + Position of Big Table: 1 Stage: Stage-5 Map Reduce Alias -> Map Operator Tree: - src1:src + src2:src TableScan alias: src Filter Operator predicate: - expr: ((key < 80.0) and (key < 100.0)) + expr: ((key < 100.0) and (key < 80.0)) type: boolean Select Operator expressions: expr: key type: string - outputColumnNames: _col0 + expr: value + type: string + outputColumnNames: _col0, _col1 Map Join Operator condition map: Inner Join 0 to 1 @@ -127,7 +118,7 @@ 1 [Column[_col0]] 2 [Column[_col0]] outputColumnNames: _col0, _col3 - Position of Big Table: 0 + Position of Big Table: 1 Select Operator expressions: expr: _col0 @@ -179,333 +170,6 @@ input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat - Stage: Stage-10 - Map Reduce Local Work - Alias -> Map Local Tables: - src1:src - Fetch Operator - limit: -1 - src3:src - Fetch Operator - limit: -1 - Alias -> Map Local Operator Tree: - src1:src - TableScan - alias: src - Filter Operator - predicate: - expr: ((key < 80.0) and (key < 100.0)) - type: boolean - Select Operator - expressions: - expr: key - type: string - outputColumnNames: _col0 - HashTable Sink Operator - condition expressions: - 0 {_col0} - 1 {_col1} - 2 - handleSkewJoin: false - keys: - 0 [Column[_col0]] - 1 [Column[_col0]] - 2 [Column[_col0]] - Position of Big Table: 1 - src3:src - TableScan - alias: src - Filter Operator - predicate: - expr: ((key < 100.0) and (key < 80.0)) - type: boolean - Select Operator - expressions: - expr: key - type: string - outputColumnNames: _col0 - HashTable Sink Operator - condition expressions: - 0 {_col0} - 1 {_col1} - 2 - handleSkewJoin: false - keys: - 0 [Column[_col0]] - 1 [Column[_col0]] - 2 [Column[_col0]] - Position of Big Table: 1 - - Stage: Stage-6 - Map Reduce - Alias -> Map Operator Tree: - src2:src - TableScan - alias: src - Filter Operator - predicate: - expr: ((key < 100.0) and (key < 80.0)) - type: boolean - Select Operator - expressions: - expr: key - type: string - expr: value - type: string - outputColumnNames: _col0, _col1 - Map Join Operator - condition map: - Inner Join 0 to 1 - Inner Join 0 to 2 - condition expressions: - 0 {_col0} - 1 {_col1} - 2 - handleSkewJoin: false - keys: - 0 [Column[_col0]] - 1 [Column[_col0]] - 2 [Column[_col0]] - outputColumnNames: _col0, _col3 - Position of Big Table: 1 - Select Operator - expressions: - expr: _col0 - type: string - expr: _col3 - type: string - outputColumnNames: _col0, _col3 - Group By Operator - aggregations: - expr: sum(hash(_col0,_col3)) - bucketGroup: false - mode: hash - outputColumnNames: _col0 - File Output Operator - compressed: false - GlobalTableId: 0 - table: - input format: org.apache.hadoop.mapred.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - Local Work: - Map Reduce Local Work - - Stage: Stage-11 - Map Reduce Local Work - Alias -> Map Local Tables: - src1:src - Fetch Operator - limit: -1 - src2:src - Fetch Operator - limit: -1 - Alias -> Map Local Operator Tree: - src1:src - TableScan - alias: src - Filter Operator - predicate: - expr: ((key < 80.0) and (key < 100.0)) - type: boolean - Select Operator - expressions: - expr: key - type: string - outputColumnNames: _col0 - HashTable Sink Operator - condition expressions: - 0 {_col0} - 1 {_col1} - 2 - handleSkewJoin: false - keys: - 0 [Column[_col0]] - 1 [Column[_col0]] - 2 [Column[_col0]] - Position of Big Table: 2 - src2:src - TableScan - alias: src - Filter Operator - predicate: - expr: ((key < 100.0) and (key < 80.0)) - type: boolean - Select Operator - expressions: - expr: key - type: string - expr: value - type: string - outputColumnNames: _col0, _col1 - HashTable Sink Operator - condition expressions: - 0 {_col0} - 1 {_col1} - 2 - handleSkewJoin: false - keys: - 0 [Column[_col0]] - 1 [Column[_col0]] - 2 [Column[_col0]] - Position of Big Table: 2 - - Stage: Stage-7 - Map Reduce - Alias -> Map Operator Tree: - src3:src - TableScan - alias: src - Filter Operator - predicate: - expr: ((key < 100.0) and (key < 80.0)) - type: boolean - Select Operator - expressions: - expr: key - type: string - outputColumnNames: _col0 - Map Join Operator - condition map: - Inner Join 0 to 1 - Inner Join 0 to 2 - condition expressions: - 0 {_col0} - 1 {_col1} - 2 - handleSkewJoin: false - keys: - 0 [Column[_col0]] - 1 [Column[_col0]] - 2 [Column[_col0]] - outputColumnNames: _col0, _col3 - Position of Big Table: 2 - Select Operator - expressions: - expr: _col0 - type: string - expr: _col3 - type: string - outputColumnNames: _col0, _col3 - Group By Operator - aggregations: - expr: sum(hash(_col0,_col3)) - bucketGroup: false - mode: hash - outputColumnNames: _col0 - File Output Operator - compressed: false - GlobalTableId: 0 - table: - input format: org.apache.hadoop.mapred.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - Local Work: - Map Reduce Local Work - - Stage: Stage-1 - Map Reduce - Alias -> Map Operator Tree: - src1:src - TableScan - alias: src - Filter Operator - predicate: - expr: ((key < 80.0) and (key < 100.0)) - type: boolean - Select Operator - expressions: - expr: key - type: string - outputColumnNames: _col0 - Reduce Output Operator - key expressions: - expr: _col0 - type: string - sort order: + - Map-reduce partition columns: - expr: _col0 - type: string - tag: 0 - value expressions: - expr: _col0 - type: string - src2:src - TableScan - alias: src - Filter Operator - predicate: - expr: ((key < 100.0) and (key < 80.0)) - type: boolean - Select Operator - expressions: - expr: key - type: string - expr: value - type: string - outputColumnNames: _col0, _col1 - Reduce Output Operator - key expressions: - expr: _col0 - type: string - sort order: + - Map-reduce partition columns: - expr: _col0 - type: string - tag: 1 - value expressions: - expr: _col1 - type: string - src3:src - TableScan - alias: src - Filter Operator - predicate: - expr: ((key < 100.0) and (key < 80.0)) - type: boolean - Select Operator - expressions: - expr: key - type: string - outputColumnNames: _col0 - Reduce Output Operator - key expressions: - expr: _col0 - type: string - sort order: + - Map-reduce partition columns: - expr: _col0 - type: string - tag: 2 - Reduce Operator Tree: - Join Operator - condition map: - Inner Join 0 to 1 - Inner Join 0 to 2 - condition expressions: - 0 {VALUE._col0} - 1 {VALUE._col1} - 2 - handleSkewJoin: false - outputColumnNames: _col0, _col3 - Select Operator - expressions: - expr: _col0 - type: string - expr: _col3 - type: string - outputColumnNames: _col0, _col3 - Group By Operator - aggregations: - expr: sum(hash(_col0,_col3)) - bucketGroup: false - mode: hash - outputColumnNames: _col0 - File Output Operator - compressed: false - GlobalTableId: 0 - table: - input format: org.apache.hadoop.mapred.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - Stage: Stage-0 Fetch Operator limit: -1 Index: ql/src/test/results/clientpositive/join41.q.out =================================================================== --- ql/src/test/results/clientpositive/join41.q.out (revision 0) +++ ql/src/test/results/clientpositive/join41.q.out (working copy) @@ -0,0 +1,205 @@ +PREHOOK: query: create table s1 as select * from src where key = 0 +PREHOOK: type: CREATETABLE_AS_SELECT +PREHOOK: Input: default@src +POSTHOOK: query: create table s1 as select * from src where key = 0 +POSTHOOK: type: CREATETABLE_AS_SELECT +POSTHOOK: Input: default@src +POSTHOOK: Output: default@s1 +PREHOOK: query: EXPLAIN +SELECT * FROM s1 src1 LEFT OUTER JOIN s1 src2 ON (src1.key = src2.key AND src2.key > 10) +PREHOOK: type: QUERY +POSTHOOK: query: EXPLAIN +SELECT * FROM s1 src1 LEFT OUTER JOIN s1 src2 ON (src1.key = src2.key AND src2.key > 10) +POSTHOOK: type: QUERY +ABSTRACT SYNTAX TREE: + (TOK_QUERY (TOK_FROM (TOK_LEFTOUTERJOIN (TOK_TABREF (TOK_TABNAME s1) src1) (TOK_TABREF (TOK_TABNAME s1) src2) (AND (= (. (TOK_TABLE_OR_COL src1) key) (. (TOK_TABLE_OR_COL src2) key)) (> (. (TOK_TABLE_OR_COL src2) key) 10)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR TOK_ALLCOLREF)))) + +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-0 is a root stage + +STAGE PLANS: + Stage: Stage-1 + Map Reduce + Alias -> Map Operator Tree: + src1 + TableScan + alias: src1 + Reduce Output Operator + key expressions: + expr: key + type: string + sort order: + + Map-reduce partition columns: + expr: key + type: string + tag: 0 + value expressions: + expr: key + type: string + expr: value + type: string + src2 + TableScan + alias: src2 + Filter Operator + predicate: + expr: (key > 10.0) + type: boolean + Reduce Output Operator + key expressions: + expr: key + type: string + sort order: + + Map-reduce partition columns: + expr: key + type: string + tag: 1 + value expressions: + expr: key + type: string + expr: value + type: string + Reduce Operator Tree: + Join Operator + condition map: + Left Outer Join0 to 1 + condition expressions: + 0 {VALUE._col0} {VALUE._col1} + 1 {VALUE._col0} {VALUE._col1} + handleSkewJoin: false + outputColumnNames: _col0, _col1, _col4, _col5 + Select Operator + expressions: + expr: _col0 + type: string + expr: _col1 + type: string + expr: _col4 + type: string + expr: _col5 + type: string + outputColumnNames: _col0, _col1, _col2, _col3 + File Output Operator + compressed: false + GlobalTableId: 0 + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + + Stage: Stage-0 + Fetch Operator + limit: -1 + + +PREHOOK: query: SELECT * FROM s1 src1 LEFT OUTER JOIN s1 src2 ON (src1.key = src2.key AND src2.key > 10) +PREHOOK: type: QUERY +PREHOOK: Input: default@s1 +#### A masked pattern was here #### +POSTHOOK: query: SELECT * FROM s1 src1 LEFT OUTER JOIN s1 src2 ON (src1.key = src2.key AND src2.key > 10) +POSTHOOK: type: QUERY +POSTHOOK: Input: default@s1 +#### A masked pattern was here #### +0 val_0 NULL NULL +0 val_0 NULL NULL +0 val_0 NULL NULL +PREHOOK: query: -- Make sure the big table is chosen correctly as part of HIVE-4146 +EXPLAIN +SELECT * FROM s1 src1 LEFT OUTER JOIN s1 src2 ON (src1.key = src2.key AND src2.key > 10) +PREHOOK: type: QUERY +POSTHOOK: query: -- Make sure the big table is chosen correctly as part of HIVE-4146 +EXPLAIN +SELECT * FROM s1 src1 LEFT OUTER JOIN s1 src2 ON (src1.key = src2.key AND src2.key > 10) +POSTHOOK: type: QUERY +ABSTRACT SYNTAX TREE: + (TOK_QUERY (TOK_FROM (TOK_LEFTOUTERJOIN (TOK_TABREF (TOK_TABNAME s1) src1) (TOK_TABREF (TOK_TABNAME s1) src2) (AND (= (. (TOK_TABLE_OR_COL src1) key) (. (TOK_TABLE_OR_COL src2) key)) (> (. (TOK_TABLE_OR_COL src2) key) 10)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR TOK_ALLCOLREF)))) + +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-0 is a root stage + +STAGE PLANS: + Stage: Stage-1 + Map Reduce + Alias -> Map Operator Tree: + src1 + TableScan + alias: src1 + Reduce Output Operator + key expressions: + expr: key + type: string + sort order: + + Map-reduce partition columns: + expr: key + type: string + tag: 0 + value expressions: + expr: key + type: string + expr: value + type: string + src2 + TableScan + alias: src2 + Filter Operator + predicate: + expr: (key > 10.0) + type: boolean + Reduce Output Operator + key expressions: + expr: key + type: string + sort order: + + Map-reduce partition columns: + expr: key + type: string + tag: 1 + value expressions: + expr: key + type: string + expr: value + type: string + Reduce Operator Tree: + Join Operator + condition map: + Left Outer Join0 to 1 + condition expressions: + 0 {VALUE._col0} {VALUE._col1} + 1 {VALUE._col0} {VALUE._col1} + handleSkewJoin: false + outputColumnNames: _col0, _col1, _col4, _col5 + Select Operator + expressions: + expr: _col0 + type: string + expr: _col1 + type: string + expr: _col4 + type: string + expr: _col5 + type: string + outputColumnNames: _col0, _col1, _col2, _col3 + File Output Operator + compressed: false + GlobalTableId: 0 + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + + Stage: Stage-0 + Fetch Operator + limit: -1 + + +PREHOOK: query: SELECT * FROM s1 src1 LEFT OUTER JOIN s1 src2 ON (src1.key = src2.key AND src2.key > 10) +PREHOOK: type: QUERY +PREHOOK: Input: default@s1 +#### A masked pattern was here #### +POSTHOOK: query: SELECT * FROM s1 src1 LEFT OUTER JOIN s1 src2 ON (src1.key = src2.key AND src2.key > 10) +POSTHOOK: type: QUERY +POSTHOOK: Input: default@s1 +#### A masked pattern was here #### +0 val_0 NULL NULL +0 val_0 NULL NULL +0 val_0 NULL NULL Index: ql/src/test/results/clientpositive/auto_join28.q.out =================================================================== --- ql/src/test/results/clientpositive/auto_join28.q.out (revision 1458165) +++ ql/src/test/results/clientpositive/auto_join28.q.out (working copy) @@ -8,35 +8,40 @@ (TOK_QUERY (TOK_FROM (TOK_RIGHTOUTERJOIN (TOK_LEFTOUTERJOIN (TOK_TABREF (TOK_TABNAME src) src1) (TOK_TABREF (TOK_TABNAME src) src2) (AND (AND (= (. (TOK_TABLE_OR_COL src1) key) (. (TOK_TABLE_OR_COL src2) key)) (< (. (TOK_TABLE_OR_COL src1) key) 10)) (> (. (TOK_TABLE_OR_COL src2) key) 10))) (TOK_TABREF (TOK_TABNAME src) src3) (AND (= (. (TOK_TABLE_OR_COL src2) key) (. (TOK_TABLE_OR_COL src3) key)) (< (. (TOK_TABLE_OR_COL src3) key) 10)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR TOK_ALLCOLREF)) (TOK_SORTBY (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src1) key)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src1) value)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src2) key)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src2) value)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src3) key)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src3) value))))) STAGE DEPENDENCIES: - Stage-6 is a root stage , consists of Stage-1 - Stage-1 - Stage-2 depends on stages: Stage-1 + Stage-6 is a root stage + Stage-5 depends on stages: Stage-6 + Stage-2 depends on stages: Stage-5 Stage-0 is a root stage STAGE PLANS: Stage: Stage-6 - Conditional Operator - - Stage: Stage-1 - Map Reduce - Alias -> Map Operator Tree: + Map Reduce Local Work + Alias -> Map Local Tables: src1 + Fetch Operator + limit: -1 + src2 + Fetch Operator + limit: -1 + Alias -> Map Local Operator Tree: + src1 TableScan alias: src1 - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 0 - value expressions: - expr: key - type: string - expr: value - type: string + HashTable Sink Operator + condition expressions: + 0 {key} {value} + 1 {key} {value} + 2 {key} {value} + filter predicates: + 0 {(key < 10.0)} + 1 + 2 {(key < 10.0)} + handleSkewJoin: false + keys: + 0 [Column[key]] + 1 [Column[key]] + 2 [Column[key]] + Position of Big Table: 2 src2 TableScan alias: src2 @@ -44,73 +49,70 @@ predicate: expr: (key > 10.0) type: boolean - Reduce Output Operator - key expressions: - expr: key + HashTable Sink Operator + condition expressions: + 0 {key} {value} + 1 {key} {value} + 2 {key} {value} + filter predicates: + 0 {(key < 10.0)} + 1 + 2 {(key < 10.0)} + handleSkewJoin: false + keys: + 0 [Column[key]] + 1 [Column[key]] + 2 [Column[key]] + Position of Big Table: 2 + + Stage: Stage-5 + Map Reduce + Alias -> Map Operator Tree: + src3 + TableScan + alias: src3 + Map Join Operator + condition map: + Left Outer Join0 to 1 + Right Outer Join1 to 2 + condition expressions: + 0 {key} {value} + 1 {key} {value} + 2 {key} {value} + filter predicates: + 0 {(key < 10.0)} + 1 + 2 {(key < 10.0)} + handleSkewJoin: false + keys: + 0 [Column[key]] + 1 [Column[key]] + 2 [Column[key]] + outputColumnNames: _col0, _col1, _col4, _col5, _col8, _col9 + Position of Big Table: 2 + Select Operator + expressions: + expr: _col0 type: string - sort order: + - Map-reduce partition columns: - expr: key + expr: _col1 type: string - tag: 1 - value expressions: - expr: key + expr: _col4 type: string - expr: value + expr: _col5 type: string - src3 - TableScan - alias: src3 - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 2 - value expressions: - expr: key - type: string - expr: value - type: string - Reduce Operator Tree: - Join Operator - condition map: - Left Outer Join0 to 1 - Right Outer Join1 to 2 - condition expressions: - 0 {VALUE._col0} {VALUE._col1} - 1 {VALUE._col0} {VALUE._col1} - 2 {VALUE._col0} {VALUE._col1} - filter predicates: - 0 {(VALUE._col0 < 10.0)} - 1 - 2 {(VALUE._col0 < 10.0)} - handleSkewJoin: false - outputColumnNames: _col0, _col1, _col4, _col5, _col8, _col9 - Select Operator - expressions: - expr: _col0 - type: string - expr: _col1 - type: string - expr: _col4 - type: string - expr: _col5 - 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.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + 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.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + Local Work: + Map Reduce Local Work Stage: Stage-2 Map Reduce @@ -169,56 +171,44 @@ (TOK_QUERY (TOK_FROM (TOK_LEFTOUTERJOIN (TOK_LEFTOUTERJOIN (TOK_TABREF (TOK_TABNAME src) src1) (TOK_TABREF (TOK_TABNAME src) src2) (AND (AND (= (. (TOK_TABLE_OR_COL src1) key) (. (TOK_TABLE_OR_COL src2) key)) (< (. (TOK_TABLE_OR_COL src1) key) 10)) (> (. (TOK_TABLE_OR_COL src2) key) 10))) (TOK_TABREF (TOK_TABNAME src) src3) (AND (= (. (TOK_TABLE_OR_COL src2) key) (. (TOK_TABLE_OR_COL src3) key)) (< (. (TOK_TABLE_OR_COL src3) key) 10)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR TOK_ALLCOLREF)) (TOK_SORTBY (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src1) key)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src1) value)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src2) key)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src2) value)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src3) key)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src3) value))))) STAGE DEPENDENCIES: - Stage-6 is a root stage , consists of Stage-1 - Stage-1 - Stage-2 depends on stages: Stage-1 + Stage-6 is a root stage + Stage-5 depends on stages: Stage-6 + Stage-2 depends on stages: Stage-5 Stage-0 is a root stage STAGE PLANS: Stage: Stage-6 - Conditional Operator - - Stage: Stage-1 - Map Reduce - Alias -> Map Operator Tree: - src1 - TableScan - alias: src1 - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 0 - value expressions: - expr: key - type: string - expr: value - type: string + Map Reduce Local Work + Alias -> Map Local Tables: src2 + Fetch Operator + limit: -1 + src3 + Fetch Operator + limit: -1 + Alias -> Map Local Operator Tree: + src2 TableScan alias: src2 Filter Operator predicate: expr: (key > 10.0) type: boolean - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 1 - value expressions: - expr: key - type: string - expr: value - type: string + HashTable Sink Operator + condition expressions: + 0 {key} {value} + 1 {key} {value} + 2 {key} {value} + filter predicates: + 0 {(key < 10.0)} + 1 + 2 + handleSkewJoin: false + keys: + 0 [Column[key]] + 1 [Column[key]] + 2 [Column[key]] + Position of Big Table: 0 src3 TableScan alias: src3 @@ -226,56 +216,70 @@ predicate: expr: ((key > 10.0) and (key < 10.0)) type: boolean - Reduce Output Operator - key expressions: - expr: key + HashTable Sink Operator + condition expressions: + 0 {key} {value} + 1 {key} {value} + 2 {key} {value} + filter predicates: + 0 {(key < 10.0)} + 1 + 2 + handleSkewJoin: false + keys: + 0 [Column[key]] + 1 [Column[key]] + 2 [Column[key]] + Position of Big Table: 0 + + Stage: Stage-5 + Map Reduce + Alias -> Map Operator Tree: + src1 + TableScan + alias: src1 + Map Join Operator + condition map: + Left Outer Join0 to 1 + Left Outer Join1 to 2 + condition expressions: + 0 {key} {value} + 1 {key} {value} + 2 {key} {value} + filter predicates: + 0 {(key < 10.0)} + 1 + 2 + handleSkewJoin: false + keys: + 0 [Column[key]] + 1 [Column[key]] + 2 [Column[key]] + outputColumnNames: _col0, _col1, _col4, _col5, _col8, _col9 + Position of Big Table: 0 + Select Operator + expressions: + expr: _col0 type: string - sort order: + - Map-reduce partition columns: - expr: key + expr: _col1 type: string - tag: 2 - value expressions: - expr: key + expr: _col4 type: string - expr: value + expr: _col5 type: string - Reduce Operator Tree: - Join Operator - condition map: - Left Outer Join0 to 1 - Left Outer Join1 to 2 - condition expressions: - 0 {VALUE._col0} {VALUE._col1} - 1 {VALUE._col0} {VALUE._col1} - 2 {VALUE._col0} {VALUE._col1} - filter predicates: - 0 {(VALUE._col0 < 10.0)} - 1 - 2 - handleSkewJoin: false - outputColumnNames: _col0, _col1, _col4, _col5, _col8, _col9 - Select Operator - expressions: - expr: _col0 - type: string - expr: _col1 - type: string - expr: _col4 - type: string - expr: _col5 - 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.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + 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.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + Local Work: + Map Reduce Local Work Stage: Stage-2 Map Reduce @@ -334,56 +338,44 @@ (TOK_QUERY (TOK_FROM (TOK_LEFTOUTERJOIN (TOK_RIGHTOUTERJOIN (TOK_TABREF (TOK_TABNAME src) src1) (TOK_TABREF (TOK_TABNAME src) src2) (AND (AND (= (. (TOK_TABLE_OR_COL src1) key) (. (TOK_TABLE_OR_COL src2) key)) (< (. (TOK_TABLE_OR_COL src1) key) 10)) (> (. (TOK_TABLE_OR_COL src2) key) 10))) (TOK_TABREF (TOK_TABNAME src) src3) (AND (= (. (TOK_TABLE_OR_COL src2) key) (. (TOK_TABLE_OR_COL src3) key)) (< (. (TOK_TABLE_OR_COL src3) key) 10)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR TOK_ALLCOLREF)) (TOK_SORTBY (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src1) key)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src1) value)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src2) key)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src2) value)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src3) key)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src3) value))))) STAGE DEPENDENCIES: - Stage-6 is a root stage , consists of Stage-1 - Stage-1 - Stage-2 depends on stages: Stage-1 + Stage-6 is a root stage + Stage-5 depends on stages: Stage-6 + Stage-2 depends on stages: Stage-5 Stage-0 is a root stage STAGE PLANS: Stage: Stage-6 - Conditional Operator - - Stage: Stage-1 - Map Reduce - Alias -> Map Operator Tree: + Map Reduce Local Work + Alias -> Map Local Tables: src1 + Fetch Operator + limit: -1 + src3 + Fetch Operator + limit: -1 + Alias -> Map Local Operator Tree: + src1 TableScan alias: src1 Filter Operator predicate: expr: (key < 10.0) type: boolean - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 0 - value expressions: - expr: key - type: string - expr: value - type: string - src2 - TableScan - alias: src2 - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 1 - value expressions: - expr: key - type: string - expr: value - type: string + HashTable Sink Operator + condition expressions: + 0 {key} {value} + 1 {key} {value} + 2 {key} {value} + filter predicates: + 0 + 1 {(key > 10.0)} + 2 + handleSkewJoin: false + keys: + 0 [Column[key]] + 1 [Column[key]] + 2 [Column[key]] + Position of Big Table: 1 src3 TableScan alias: src3 @@ -391,56 +383,70 @@ predicate: expr: (key < 10.0) type: boolean - Reduce Output Operator - key expressions: - expr: key + HashTable Sink Operator + condition expressions: + 0 {key} {value} + 1 {key} {value} + 2 {key} {value} + filter predicates: + 0 + 1 {(key > 10.0)} + 2 + handleSkewJoin: false + keys: + 0 [Column[key]] + 1 [Column[key]] + 2 [Column[key]] + Position of Big Table: 1 + + Stage: Stage-5 + Map Reduce + Alias -> Map Operator Tree: + src2 + TableScan + alias: src2 + Map Join Operator + condition map: + Right Outer Join0 to 1 + Left Outer Join1 to 2 + condition expressions: + 0 {key} {value} + 1 {key} {value} + 2 {key} {value} + filter predicates: + 0 + 1 {(key > 10.0)} + 2 + handleSkewJoin: false + keys: + 0 [Column[key]] + 1 [Column[key]] + 2 [Column[key]] + outputColumnNames: _col0, _col1, _col4, _col5, _col8, _col9 + Position of Big Table: 1 + Select Operator + expressions: + expr: _col0 type: string - sort order: + - Map-reduce partition columns: - expr: key + expr: _col1 type: string - tag: 2 - value expressions: - expr: key + expr: _col4 type: string - expr: value + expr: _col5 type: string - Reduce Operator Tree: - Join Operator - condition map: - Right Outer Join0 to 1 - Left Outer Join1 to 2 - condition expressions: - 0 {VALUE._col0} {VALUE._col1} - 1 {VALUE._col0} {VALUE._col1} - 2 {VALUE._col0} {VALUE._col1} - filter predicates: - 0 - 1 {(VALUE._col0 > 10.0)} - 2 - handleSkewJoin: false - outputColumnNames: _col0, _col1, _col4, _col5, _col8, _col9 - Select Operator - expressions: - expr: _col0 - type: string - expr: _col1 - type: string - expr: _col4 - type: string - expr: _col5 - 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.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + 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.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + Local Work: + Map Reduce Local Work Stage: Stage-2 Map Reduce @@ -499,109 +505,111 @@ (TOK_QUERY (TOK_FROM (TOK_RIGHTOUTERJOIN (TOK_RIGHTOUTERJOIN (TOK_TABREF (TOK_TABNAME src) src1) (TOK_TABREF (TOK_TABNAME src) src2) (AND (AND (= (. (TOK_TABLE_OR_COL src1) key) (. (TOK_TABLE_OR_COL src2) key)) (< (. (TOK_TABLE_OR_COL src1) key) 10)) (> (. (TOK_TABLE_OR_COL src2) key) 10))) (TOK_TABREF (TOK_TABNAME src) src3) (AND (= (. (TOK_TABLE_OR_COL src2) key) (. (TOK_TABLE_OR_COL src3) key)) (< (. (TOK_TABLE_OR_COL src3) key) 10)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR TOK_ALLCOLREF)) (TOK_SORTBY (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src1) key)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src1) value)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src2) key)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src2) value)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src3) key)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src3) value))))) STAGE DEPENDENCIES: - Stage-6 is a root stage , consists of Stage-1 - Stage-1 - Stage-2 depends on stages: Stage-1 + Stage-6 is a root stage + Stage-5 depends on stages: Stage-6 + Stage-2 depends on stages: Stage-5 Stage-0 is a root stage STAGE PLANS: Stage: Stage-6 - Conditional Operator - - Stage: Stage-1 - Map Reduce - Alias -> Map Operator Tree: + Map Reduce Local Work + Alias -> Map Local Tables: src1 + Fetch Operator + limit: -1 + src2 + Fetch Operator + limit: -1 + Alias -> Map Local Operator Tree: + src1 TableScan alias: src1 Filter Operator predicate: expr: (key < 10.0) type: boolean - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 0 - value expressions: - expr: key - type: string - expr: value - type: string + HashTable Sink Operator + condition expressions: + 0 {key} {value} + 1 {key} {value} + 2 {key} {value} + filter predicates: + 0 + 1 {(key > 10.0)} + 2 {(key < 10.0)} + handleSkewJoin: false + keys: + 0 [Column[key]] + 1 [Column[key]] + 2 [Column[key]] + Position of Big Table: 2 src2 TableScan alias: src2 - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 1 - value expressions: - expr: key - type: string - expr: value - type: string + HashTable Sink Operator + condition expressions: + 0 {key} {value} + 1 {key} {value} + 2 {key} {value} + filter predicates: + 0 + 1 {(key > 10.0)} + 2 {(key < 10.0)} + handleSkewJoin: false + keys: + 0 [Column[key]] + 1 [Column[key]] + 2 [Column[key]] + Position of Big Table: 2 + + Stage: Stage-5 + Map Reduce + Alias -> Map Operator Tree: src3 TableScan alias: src3 - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 2 - value expressions: - expr: key - type: string - expr: value - type: string - Reduce Operator Tree: - Join Operator - condition map: - Right Outer Join0 to 1 - Right Outer Join1 to 2 - condition expressions: - 0 {VALUE._col0} {VALUE._col1} - 1 {VALUE._col0} {VALUE._col1} - 2 {VALUE._col0} {VALUE._col1} - filter predicates: - 0 - 1 {(VALUE._col0 > 10.0)} - 2 {(VALUE._col0 < 10.0)} - handleSkewJoin: false - outputColumnNames: _col0, _col1, _col4, _col5, _col8, _col9 - Select Operator - expressions: - expr: _col0 - type: string - expr: _col1 - type: string - expr: _col4 - type: string - expr: _col5 - 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.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + Map Join Operator + condition map: + Right Outer Join0 to 1 + Right Outer Join1 to 2 + condition expressions: + 0 {key} {value} + 1 {key} {value} + 2 {key} {value} + filter predicates: + 0 + 1 {(key > 10.0)} + 2 {(key < 10.0)} + handleSkewJoin: false + keys: + 0 [Column[key]] + 1 [Column[key]] + 2 [Column[key]] + outputColumnNames: _col0, _col1, _col4, _col5, _col8, _col9 + Position of Big Table: 2 + Select Operator + expressions: + expr: _col0 + type: string + expr: _col1 + type: string + expr: _col4 + type: string + expr: _col5 + 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.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + Local Work: + Map Reduce Local Work Stage: Stage-2 Map Reduce Index: ql/src/test/results/clientpositive/auto_join23.q.out =================================================================== --- ql/src/test/results/clientpositive/auto_join23.q.out (revision 1458165) +++ ql/src/test/results/clientpositive/auto_join23.q.out (working copy) @@ -8,29 +8,22 @@ (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_TABREF (TOK_TABNAME src) src1) (TOK_TABREF (TOK_TABNAME src) src2))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR TOK_ALLCOLREF)) (TOK_WHERE (and (< (. (TOK_TABLE_OR_COL src1) key) 10) (< (. (TOK_TABLE_OR_COL src2) key) 10))) (TOK_SORTBY (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src1) key)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src1) value)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src2) key)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src2) value))))) STAGE DEPENDENCIES: - Stage-6 is a root stage , consists of Stage-7, Stage-8, Stage-1 - Stage-7 has a backup stage: Stage-1 - Stage-4 depends on stages: Stage-7 - Stage-2 depends on stages: Stage-1, Stage-4, Stage-5 - Stage-8 has a backup stage: Stage-1 - Stage-5 depends on stages: Stage-8 - Stage-1 + Stage-5 is a root stage + Stage-4 depends on stages: Stage-5 + Stage-2 depends on stages: Stage-4 Stage-0 is a root stage STAGE PLANS: - Stage: Stage-6 - Conditional Operator - - Stage: Stage-7 + Stage: Stage-5 Map Reduce Local Work Alias -> Map Local Tables: - src2 + src1 Fetch Operator limit: -1 Alias -> Map Local Operator Tree: - src2 + src1 TableScan - alias: src2 + alias: src1 Filter Operator predicate: expr: (key < 10.0) @@ -43,14 +36,14 @@ keys: 0 [] 1 [] - Position of Big Table: 0 + Position of Big Table: 1 Stage: Stage-4 Map Reduce Alias -> Map Operator Tree: - src1 + src2 TableScan - alias: src1 + alias: src2 Filter Operator predicate: expr: (key < 10.0) @@ -66,7 +59,7 @@ 0 [] 1 [] outputColumnNames: _col0, _col1, _col4, _col5 - Position of Big Table: 0 + Position of Big Table: 1 Select Operator expressions: expr: _col0 @@ -121,132 +114,6 @@ input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat - Stage: Stage-8 - Map Reduce Local Work - Alias -> Map Local Tables: - src1 - Fetch Operator - limit: -1 - Alias -> Map Local Operator Tree: - src1 - TableScan - alias: src1 - Filter Operator - predicate: - expr: (key < 10.0) - type: boolean - HashTable Sink Operator - condition expressions: - 0 {key} {value} - 1 {key} {value} - handleSkewJoin: false - keys: - 0 [] - 1 [] - Position of Big Table: 1 - - Stage: Stage-5 - Map Reduce - Alias -> Map Operator Tree: - src2 - TableScan - alias: src2 - Filter Operator - predicate: - expr: (key < 10.0) - type: boolean - Map Join Operator - condition map: - Inner Join 0 to 1 - condition expressions: - 0 {key} {value} - 1 {key} {value} - handleSkewJoin: false - keys: - 0 [] - 1 [] - outputColumnNames: _col0, _col1, _col4, _col5 - Position of Big Table: 1 - Select Operator - expressions: - expr: _col0 - type: string - expr: _col1 - type: string - expr: _col4 - type: string - expr: _col5 - type: string - outputColumnNames: _col0, _col1, _col2, _col3 - File Output Operator - compressed: false - GlobalTableId: 0 - table: - input format: org.apache.hadoop.mapred.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - Local Work: - Map Reduce Local Work - - Stage: Stage-1 - Map Reduce - Alias -> Map Operator Tree: - src1 - TableScan - alias: src1 - Filter Operator - predicate: - expr: (key < 10.0) - type: boolean - Reduce Output Operator - sort order: - tag: 0 - value expressions: - expr: key - type: string - expr: value - type: string - src2 - TableScan - alias: src2 - Filter Operator - predicate: - expr: (key < 10.0) - type: boolean - Reduce Output Operator - sort order: - tag: 1 - value expressions: - expr: key - type: string - expr: value - type: string - Reduce Operator Tree: - Join Operator - condition map: - Inner Join 0 to 1 - condition expressions: - 0 {VALUE._col0} {VALUE._col1} - 1 {VALUE._col0} {VALUE._col1} - handleSkewJoin: false - outputColumnNames: _col0, _col1, _col4, _col5 - Select Operator - expressions: - expr: _col0 - type: string - expr: _col1 - type: string - expr: _col4 - type: string - expr: _col5 - type: string - outputColumnNames: _col0, _col1, _col2, _col3 - File Output Operator - compressed: false - GlobalTableId: 0 - table: - input format: org.apache.hadoop.mapred.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - Stage: Stage-0 Fetch Operator limit: -1 Index: ql/src/test/results/clientpositive/auto_join5.q.out =================================================================== --- ql/src/test/results/clientpositive/auto_join5.q.out (revision 1458165) +++ ql/src/test/results/clientpositive/auto_join5.q.out (working copy) @@ -37,18 +37,13 @@ (TOK_QUERY (TOK_FROM (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_RIGHTOUTERJOIN (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME src) src1)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL src1) key) c1) (TOK_SELEXPR (. (TOK_TABLE_OR_COL src1) value) c2)) (TOK_WHERE (and (> (. (TOK_TABLE_OR_COL src1) key) 10) (< (. (TOK_TABLE_OR_COL src1) key) 20))))) a) (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME src) src2)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL src2) key) c3) (TOK_SELEXPR (. (TOK_TABLE_OR_COL src2) value) c4)) (TOK_WHERE (and (> (. (TOK_TABLE_OR_COL src2) key) 15) (< (. (TOK_TABLE_OR_COL src2) key) 25))))) b) (= (. (TOK_TABLE_OR_COL a) c1) (. (TOK_TABLE_OR_COL b) c3)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL a) c1) c1) (TOK_SELEXPR (. (TOK_TABLE_OR_COL a) c2) c2) (TOK_SELEXPR (. (TOK_TABLE_OR_COL b) c3) c3) (TOK_SELEXPR (. (TOK_TABLE_OR_COL b) c4) c4)))) c)) (TOK_INSERT (TOK_DESTINATION (TOK_TAB (TOK_TABNAME dest1))) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL c) c1)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL c) c2)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL c) c3)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL c) c4))))) STAGE DEPENDENCIES: - Stage-5 is a root stage , consists of Stage-6, Stage-1 - Stage-6 has a backup stage: Stage-1 - Stage-4 depends on stages: Stage-6 - Stage-0 depends on stages: Stage-1, Stage-4 + Stage-5 is a root stage + Stage-4 depends on stages: Stage-5 + Stage-0 depends on stages: Stage-4 Stage-2 depends on stages: Stage-0 - Stage-1 STAGE PLANS: Stage: Stage-5 - Conditional Operator - - Stage: Stage-6 Map Reduce Local Work Alias -> Map Local Tables: c:a:src1 @@ -143,95 +138,7 @@ Stage: Stage-2 Stats-Aggr Operator - Stage: Stage-1 - Map Reduce - Alias -> Map Operator Tree: - c:a:src1 - TableScan - alias: src1 - Filter Operator - predicate: - expr: ((key > 10.0) and (key < 20.0)) - type: boolean - Select Operator - expressions: - expr: key - type: string - expr: value - type: string - outputColumnNames: _col0, _col1 - Reduce Output Operator - key expressions: - expr: _col0 - type: string - sort order: + - Map-reduce partition columns: - expr: _col0 - type: string - tag: 0 - value expressions: - expr: _col0 - type: string - expr: _col1 - type: string - c:b:src2 - TableScan - alias: src2 - Filter Operator - predicate: - expr: ((key > 15.0) and (key < 25.0)) - type: boolean - Select Operator - expressions: - expr: key - type: string - expr: value - type: string - outputColumnNames: _col0, _col1 - Reduce Output Operator - key expressions: - expr: _col0 - type: string - sort order: + - Map-reduce partition columns: - expr: _col0 - type: string - tag: 1 - value expressions: - expr: _col0 - type: string - expr: _col1 - type: string - Reduce Operator Tree: - Join Operator - condition map: - Right Outer Join0 to 1 - condition expressions: - 0 {VALUE._col0} {VALUE._col1} - 1 {VALUE._col0} {VALUE._col1} - handleSkewJoin: false - outputColumnNames: _col0, _col1, _col2, _col3 - Select Operator - expressions: - expr: UDFToInteger(_col0) - type: int - expr: _col1 - type: string - expr: UDFToInteger(_col2) - type: int - expr: _col3 - type: string - outputColumnNames: _col0, _col1, _col2, _col3 - File Output Operator - compressed: false - GlobalTableId: 1 - 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.dest1 - PREHOOK: query: FROM ( FROM ( Index: ql/src/test/results/clientpositive/auto_join0.q.out =================================================================== --- ql/src/test/results/clientpositive/auto_join0.q.out (revision 1458165) +++ ql/src/test/results/clientpositive/auto_join0.q.out (working copy) @@ -24,21 +24,14 @@ (TOK_QUERY (TOK_FROM (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME src))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR TOK_ALLCOLREF)) (TOK_WHERE (< (. (TOK_TABLE_OR_COL src) key) 10)))) src1) (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME src))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR TOK_ALLCOLREF)) (TOK_WHERE (< (. (TOK_TABLE_OR_COL src) key) 10)))) src2))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL src1) key) k1) (TOK_SELEXPR (. (TOK_TABLE_OR_COL src1) value) v1) (TOK_SELEXPR (. (TOK_TABLE_OR_COL src2) key) k2) (TOK_SELEXPR (. (TOK_TABLE_OR_COL src2) value) v2)) (TOK_SORTBY (TOK_TABSORTCOLNAMEASC (TOK_TABLE_OR_COL k1)) (TOK_TABSORTCOLNAMEASC (TOK_TABLE_OR_COL v1)) (TOK_TABSORTCOLNAMEASC (TOK_TABLE_OR_COL k2)) (TOK_TABSORTCOLNAMEASC (TOK_TABLE_OR_COL v2))))) a)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION sum (TOK_FUNCTION hash (. (TOK_TABLE_OR_COL a) k1) (. (TOK_TABLE_OR_COL a) v1) (. (TOK_TABLE_OR_COL a) k2) (. (TOK_TABLE_OR_COL a) v2))))))) STAGE DEPENDENCIES: - Stage-7 is a root stage , consists of Stage-8, Stage-9, Stage-1 - Stage-8 has a backup stage: Stage-1 - Stage-5 depends on stages: Stage-8 - Stage-2 depends on stages: Stage-1, Stage-5, Stage-6 + Stage-6 is a root stage + Stage-5 depends on stages: Stage-6 + Stage-2 depends on stages: Stage-5 Stage-3 depends on stages: Stage-2 - Stage-9 has a backup stage: Stage-1 - Stage-6 depends on stages: Stage-9 - Stage-1 Stage-0 is a root stage STAGE PLANS: - Stage: Stage-7 - Conditional Operator - - Stage: Stage-8 + Stage: Stage-6 Map Reduce Local Work Alias -> Map Local Tables: a:src2:src @@ -198,160 +191,6 @@ input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat - Stage: Stage-9 - Map Reduce Local Work - Alias -> Map Local Tables: - a:src1:src - Fetch Operator - limit: -1 - Alias -> Map Local Operator Tree: - a:src1:src - TableScan - alias: src - Filter Operator - predicate: - expr: (key < 10.0) - type: boolean - Select Operator - expressions: - expr: key - type: string - expr: value - type: string - outputColumnNames: _col0, _col1 - HashTable Sink Operator - condition expressions: - 0 {_col0} {_col1} - 1 {_col0} {_col1} - handleSkewJoin: false - keys: - 0 [] - 1 [] - Position of Big Table: 1 - - Stage: Stage-6 - Map Reduce - Alias -> Map Operator Tree: - a:src2:src - TableScan - alias: src - Filter Operator - predicate: - expr: (key < 10.0) - type: boolean - Select Operator - expressions: - expr: key - type: string - expr: value - type: string - outputColumnNames: _col0, _col1 - Map Join Operator - condition map: - Inner Join 0 to 1 - condition expressions: - 0 {_col0} {_col1} - 1 {_col0} {_col1} - handleSkewJoin: false - keys: - 0 [] - 1 [] - outputColumnNames: _col0, _col1, _col2, _col3 - Position of Big Table: 1 - Select Operator - expressions: - expr: _col0 - type: string - expr: _col1 - type: string - expr: _col2 - type: string - expr: _col3 - type: string - outputColumnNames: _col0, _col1, _col2, _col3 - File Output Operator - compressed: false - GlobalTableId: 0 - table: - input format: org.apache.hadoop.mapred.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - Local Work: - Map Reduce Local Work - - Stage: Stage-1 - Map Reduce - Alias -> Map Operator Tree: - a:src1:src - TableScan - alias: src - Filter Operator - predicate: - expr: (key < 10.0) - type: boolean - Select Operator - expressions: - expr: key - type: string - expr: value - type: string - outputColumnNames: _col0, _col1 - Reduce Output Operator - sort order: - tag: 0 - value expressions: - expr: _col0 - type: string - expr: _col1 - type: string - a:src2:src - TableScan - alias: src - Filter Operator - predicate: - expr: (key < 10.0) - type: boolean - Select Operator - expressions: - expr: key - type: string - expr: value - type: string - outputColumnNames: _col0, _col1 - Reduce Output Operator - sort order: - tag: 1 - value expressions: - expr: _col0 - type: string - expr: _col1 - type: string - Reduce Operator Tree: - Join Operator - condition map: - Inner Join 0 to 1 - condition expressions: - 0 {VALUE._col0} {VALUE._col1} - 1 {VALUE._col0} {VALUE._col1} - handleSkewJoin: false - outputColumnNames: _col0, _col1, _col2, _col3 - Select Operator - expressions: - expr: _col0 - type: string - expr: _col1 - type: string - expr: _col2 - type: string - expr: _col3 - type: string - outputColumnNames: _col0, _col1, _col2, _col3 - File Output Operator - compressed: false - GlobalTableId: 0 - table: - input format: org.apache.hadoop.mapred.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - Stage: Stage-0 Fetch Operator limit: -1 Index: ql/src/test/results/clientpositive/auto_join16.q.out =================================================================== --- ql/src/test/results/clientpositive/auto_join16.q.out (revision 1458165) +++ ql/src/test/results/clientpositive/auto_join16.q.out (working copy) @@ -18,20 +18,13 @@ (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME src) a)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL a) key)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL a) value))) (TOK_WHERE (> (. (TOK_TABLE_OR_COL a) key) 10)))) subq) (TOK_TABREF (TOK_TABNAME src) tab) (and (and (= (. (TOK_TABLE_OR_COL subq) key) (. (TOK_TABLE_OR_COL tab) key)) (> (. (TOK_TABLE_OR_COL subq) key) 20)) (= (. (TOK_TABLE_OR_COL subq) value) (. (TOK_TABLE_OR_COL tab) value))))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION sum (TOK_FUNCTION hash (. (TOK_TABLE_OR_COL subq) key) (. (TOK_TABLE_OR_COL tab) value))))) (TOK_WHERE (< (. (TOK_TABLE_OR_COL tab) value) 200)))) STAGE DEPENDENCIES: - Stage-6 is a root stage , consists of Stage-7, Stage-8, Stage-1 - Stage-7 has a backup stage: Stage-1 - Stage-4 depends on stages: Stage-7 - Stage-2 depends on stages: Stage-1, Stage-4, Stage-5 - Stage-8 has a backup stage: Stage-1 - Stage-5 depends on stages: Stage-8 - Stage-1 + Stage-5 is a root stage + Stage-4 depends on stages: Stage-5 + Stage-2 depends on stages: Stage-4 Stage-0 is a root stage STAGE PLANS: - Stage: Stage-6 - Conditional Operator - - Stage: Stage-7 + Stage: Stage-5 Map Reduce Local Work Alias -> Map Local Tables: tab @@ -135,166 +128,6 @@ input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat - Stage: Stage-8 - Map Reduce Local Work - Alias -> Map Local Tables: - subq:a - Fetch Operator - limit: -1 - Alias -> Map Local Operator Tree: - subq:a - TableScan - alias: a - Filter Operator - predicate: - expr: (((key > 10.0) and (key > 20.0)) and (value < 200.0)) - type: boolean - Select Operator - expressions: - expr: key - type: string - expr: value - type: string - outputColumnNames: _col0, _col1 - HashTable Sink Operator - condition expressions: - 0 {_col0} - 1 {value} - handleSkewJoin: false - keys: - 0 [Column[_col0], Column[_col1]] - 1 [Column[key], Column[value]] - Position of Big Table: 1 - - Stage: Stage-5 - Map Reduce - Alias -> Map Operator Tree: - tab - TableScan - alias: tab - Filter Operator - predicate: - expr: ((key > 20.0) and (value < 200.0)) - type: boolean - Map Join Operator - condition map: - Inner Join 0 to 1 - condition expressions: - 0 {_col0} - 1 {value} - handleSkewJoin: false - keys: - 0 [Column[_col0], Column[_col1]] - 1 [Column[key], Column[value]] - outputColumnNames: _col0, _col3 - Position of Big Table: 1 - Select Operator - expressions: - expr: _col0 - type: string - expr: _col3 - type: string - outputColumnNames: _col0, _col3 - Group By Operator - aggregations: - expr: sum(hash(_col0,_col3)) - bucketGroup: false - mode: hash - outputColumnNames: _col0 - File Output Operator - compressed: false - GlobalTableId: 0 - table: - input format: org.apache.hadoop.mapred.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - Local Work: - Map Reduce Local Work - - Stage: Stage-1 - Map Reduce - Alias -> Map Operator Tree: - subq:a - TableScan - alias: a - Filter Operator - predicate: - expr: (((key > 10.0) and (key > 20.0)) and (value < 200.0)) - type: boolean - Select Operator - expressions: - expr: key - type: string - expr: value - type: string - outputColumnNames: _col0, _col1 - Reduce Output Operator - key expressions: - expr: _col0 - type: string - expr: _col1 - type: string - sort order: ++ - Map-reduce partition columns: - expr: _col0 - type: string - expr: _col1 - type: string - tag: 0 - value expressions: - expr: _col0 - type: string - tab - TableScan - alias: tab - Filter Operator - predicate: - expr: ((key > 20.0) and (value < 200.0)) - type: boolean - Reduce Output Operator - key expressions: - expr: key - type: string - expr: value - type: string - sort order: ++ - Map-reduce partition columns: - expr: key - type: string - expr: value - type: string - tag: 1 - value expressions: - expr: value - type: string - Reduce Operator Tree: - Join Operator - condition map: - Inner Join 0 to 1 - condition expressions: - 0 {VALUE._col0} - 1 {VALUE._col1} - handleSkewJoin: false - outputColumnNames: _col0, _col3 - Select Operator - expressions: - expr: _col0 - type: string - expr: _col3 - type: string - outputColumnNames: _col0, _col3 - Group By Operator - aggregations: - expr: sum(hash(_col0,_col3)) - bucketGroup: false - mode: hash - outputColumnNames: _col0 - File Output Operator - compressed: false - GlobalTableId: 0 - table: - input format: org.apache.hadoop.mapred.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - Stage: Stage-0 Fetch Operator limit: -1 Index: ql/src/test/results/clientpositive/auto_join11.q.out =================================================================== --- ql/src/test/results/clientpositive/auto_join11.q.out (revision 1458165) +++ ql/src/test/results/clientpositive/auto_join11.q.out (working copy) @@ -18,27 +18,20 @@ (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME src))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL src) key) c1) (TOK_SELEXPR (. (TOK_TABLE_OR_COL src) value) c2)))) src1) (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME src))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL src) key) c3) (TOK_SELEXPR (. (TOK_TABLE_OR_COL src) value) c4)))) src2) (AND (= (. (TOK_TABLE_OR_COL src1) c1) (. (TOK_TABLE_OR_COL src2) c3)) (< (. (TOK_TABLE_OR_COL src1) c1) 100)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION sum (TOK_FUNCTION hash (. (TOK_TABLE_OR_COL src1) c1) (. (TOK_TABLE_OR_COL src2) c4))))))) STAGE DEPENDENCIES: - Stage-6 is a root stage , consists of Stage-7, Stage-8, Stage-1 - Stage-7 has a backup stage: Stage-1 - Stage-4 depends on stages: Stage-7 - Stage-2 depends on stages: Stage-1, Stage-4, Stage-5 - Stage-8 has a backup stage: Stage-1 - Stage-5 depends on stages: Stage-8 - Stage-1 + Stage-5 is a root stage + Stage-4 depends on stages: Stage-5 + Stage-2 depends on stages: Stage-4 Stage-0 is a root stage STAGE PLANS: - Stage: Stage-6 - Conditional Operator - - Stage: Stage-7 + Stage: Stage-5 Map Reduce Local Work Alias -> Map Local Tables: - src2:src + src1:src Fetch Operator limit: -1 Alias -> Map Local Operator Tree: - src2:src + src1:src TableScan alias: src Filter Operator @@ -49,9 +42,7 @@ expressions: expr: key type: string - expr: value - type: string - outputColumnNames: _col0, _col1 + outputColumnNames: _col0 HashTable Sink Operator condition expressions: 0 {_col0} @@ -60,12 +51,12 @@ keys: 0 [Column[_col0]] 1 [Column[_col0]] - Position of Big Table: 0 + Position of Big Table: 1 Stage: Stage-4 Map Reduce Alias -> Map Operator Tree: - src1:src + src2:src TableScan alias: src Filter Operator @@ -76,7 +67,9 @@ expressions: expr: key type: string - outputColumnNames: _col0 + expr: value + type: string + outputColumnNames: _col0, _col1 Map Join Operator condition map: Inner Join 0 to 1 @@ -88,7 +81,7 @@ 0 [Column[_col0]] 1 [Column[_col0]] outputColumnNames: _col0, _col3 - Position of Big Table: 0 + Position of Big Table: 1 Select Operator expressions: expr: _col0 @@ -140,168 +133,6 @@ input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat - Stage: Stage-8 - Map Reduce Local Work - Alias -> Map Local Tables: - src1:src - Fetch Operator - limit: -1 - Alias -> Map Local Operator Tree: - src1:src - TableScan - alias: src - Filter Operator - predicate: - expr: (key < 100.0) - type: boolean - Select Operator - expressions: - expr: key - type: string - outputColumnNames: _col0 - HashTable Sink Operator - condition expressions: - 0 {_col0} - 1 {_col1} - handleSkewJoin: false - keys: - 0 [Column[_col0]] - 1 [Column[_col0]] - Position of Big Table: 1 - - Stage: Stage-5 - Map Reduce - Alias -> Map Operator Tree: - src2:src - TableScan - alias: src - Filter Operator - predicate: - expr: (key < 100.0) - type: boolean - Select Operator - expressions: - expr: key - type: string - expr: value - type: string - outputColumnNames: _col0, _col1 - Map Join Operator - condition map: - Inner Join 0 to 1 - condition expressions: - 0 {_col0} - 1 {_col1} - handleSkewJoin: false - keys: - 0 [Column[_col0]] - 1 [Column[_col0]] - outputColumnNames: _col0, _col3 - Position of Big Table: 1 - Select Operator - expressions: - expr: _col0 - type: string - expr: _col3 - type: string - outputColumnNames: _col0, _col3 - Group By Operator - aggregations: - expr: sum(hash(_col0,_col3)) - bucketGroup: false - mode: hash - outputColumnNames: _col0 - File Output Operator - compressed: false - GlobalTableId: 0 - table: - input format: org.apache.hadoop.mapred.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - Local Work: - Map Reduce Local Work - - Stage: Stage-1 - Map Reduce - Alias -> Map Operator Tree: - src1:src - TableScan - alias: src - Filter Operator - predicate: - expr: (key < 100.0) - type: boolean - Select Operator - expressions: - expr: key - type: string - outputColumnNames: _col0 - Reduce Output Operator - key expressions: - expr: _col0 - type: string - sort order: + - Map-reduce partition columns: - expr: _col0 - type: string - tag: 0 - value expressions: - expr: _col0 - type: string - src2:src - TableScan - alias: src - Filter Operator - predicate: - expr: (key < 100.0) - type: boolean - Select Operator - expressions: - expr: key - type: string - expr: value - type: string - outputColumnNames: _col0, _col1 - Reduce Output Operator - key expressions: - expr: _col0 - type: string - sort order: + - Map-reduce partition columns: - expr: _col0 - type: string - tag: 1 - value expressions: - expr: _col1 - type: string - Reduce Operator Tree: - Join Operator - condition map: - Inner Join 0 to 1 - condition expressions: - 0 {VALUE._col0} - 1 {VALUE._col1} - handleSkewJoin: false - outputColumnNames: _col0, _col3 - Select Operator - expressions: - expr: _col0 - type: string - expr: _col3 - type: string - outputColumnNames: _col0, _col3 - Group By Operator - aggregations: - expr: sum(hash(_col0,_col3)) - bucketGroup: false - mode: hash - outputColumnNames: _col0 - File Output Operator - compressed: false - GlobalTableId: 0 - table: - input format: org.apache.hadoop.mapred.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - Stage: Stage-0 Fetch Operator limit: -1 Index: ql/src/test/results/clientpositive/multiMapJoin1.q.out =================================================================== --- ql/src/test/results/clientpositive/multiMapJoin1.q.out (revision 1458165) +++ ql/src/test/results/clientpositive/multiMapJoin1.q.out (working copy) @@ -129,31 +129,21 @@ (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_TABREF (TOK_TABNAME bigTbl)) (TOK_TABREF (TOK_TABNAME smallTbl1)) (= (. (TOK_TABLE_OR_COL bigTbl) key) (. (TOK_TABLE_OR_COL smallTbl1) key)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL bigTbl) key) key) (TOK_SELEXPR (. (TOK_TABLE_OR_COL bigTbl) value) value1) (TOK_SELEXPR (. (TOK_TABLE_OR_COL bigTbl) value) value2)))) firstjoin) (TOK_TABREF (TOK_TABNAME smallTbl2)) (= (. (TOK_TABLE_OR_COL firstjoin) value1) (. (TOK_TABLE_OR_COL smallTbl2) value)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTIONSTAR count))))) STAGE DEPENDENCIES: - Stage-10 is a root stage , consists of Stage-13, Stage-14, Stage-3 - Stage-13 has a backup stage: Stage-3 - Stage-8 depends on stages: Stage-13 - Stage-7 depends on stages: Stage-3, Stage-8, Stage-9 , consists of Stage-11, Stage-12, Stage-1 - Stage-11 has a backup stage: Stage-1 - Stage-5 depends on stages: Stage-11 - Stage-2 depends on stages: Stage-1, Stage-5, Stage-6 - Stage-12 has a backup stage: Stage-1 - Stage-6 depends on stages: Stage-12 - Stage-1 - Stage-14 has a backup stage: Stage-3 - Stage-9 depends on stages: Stage-14 - Stage-3 + Stage-7 is a root stage + Stage-6 depends on stages: Stage-7 + Stage-2 depends on stages: Stage-6 Stage-0 is a root stage STAGE PLANS: - Stage: Stage-10 - Conditional Operator - - Stage: Stage-13 + Stage: Stage-7 Map Reduce Local Work Alias -> Map Local Tables: firstjoin:smalltbl1 Fetch Operator limit: -1 + smalltbl2 + Fetch Operator + limit: -1 Alias -> Map Local Operator Tree: firstjoin:smalltbl1 TableScan @@ -167,50 +157,7 @@ 0 [Column[key]] 1 [Column[key]] Position of Big Table: 0 - - Stage: Stage-8 - Map Reduce - Alias -> Map Operator Tree: - firstjoin:bigtbl - TableScan - alias: bigtbl - Map Join Operator - condition map: - Inner Join 0 to 1 - condition expressions: - 0 {value} - 1 - handleSkewJoin: false - keys: - 0 [Column[key]] - 1 [Column[key]] - outputColumnNames: _col1 - Position of Big Table: 0 - Select Operator - expressions: - expr: _col1 - type: string - outputColumnNames: _col1 - File Output Operator - compressed: false - GlobalTableId: 0 - table: - input format: org.apache.hadoop.mapred.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - Local Work: - Map Reduce Local Work - - Stage: Stage-7 - Conditional Operator - - Stage: Stage-11 - Map Reduce Local Work - Alias -> Map Local Tables: smalltbl2 - Fetch Operator - limit: -1 - Alias -> Map Local Operator Tree: - smalltbl2 TableScan alias: smalltbl2 HashTable Sink Operator @@ -223,34 +170,53 @@ 1 [Column[value]] Position of Big Table: 0 - Stage: Stage-5 + Stage: Stage-6 Map Reduce Alias -> Map Operator Tree: - $INTNAME + firstjoin:bigtbl + TableScan + alias: bigtbl Map Join Operator condition map: Inner Join 0 to 1 condition expressions: - 0 + 0 {value} 1 handleSkewJoin: false keys: - 0 [Column[_col1]] - 1 [Column[value]] + 0 [Column[key]] + 1 [Column[key]] + outputColumnNames: _col1 Position of Big Table: 0 Select Operator - Group By Operator - aggregations: - expr: count() - bucketGroup: false - mode: hash - outputColumnNames: _col0 - File Output Operator - compressed: false - GlobalTableId: 0 - table: - input format: org.apache.hadoop.mapred.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + expressions: + expr: _col1 + type: string + outputColumnNames: _col1 + Map Join Operator + condition map: + Inner Join 0 to 1 + condition expressions: + 0 + 1 + handleSkewJoin: false + keys: + 0 [Column[_col1]] + 1 [Column[value]] + Position of Big Table: 0 + Select Operator + Group By Operator + aggregations: + expr: count() + bucketGroup: false + mode: hash + outputColumnNames: _col0 + File Output Operator + compressed: false + GlobalTableId: 0 + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat Local Work: Map Reduce Local Work @@ -283,207 +249,6 @@ input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat - Stage: Stage-12 - Map Reduce Local Work - Alias -> Map Local Tables: - $INTNAME - Fetch Operator - limit: -1 - Alias -> Map Local Operator Tree: - $INTNAME - HashTable Sink Operator - condition expressions: - 0 - 1 - handleSkewJoin: false - keys: - 0 [Column[_col1]] - 1 [Column[value]] - Position of Big Table: 1 - - Stage: Stage-6 - Map Reduce - Alias -> Map Operator Tree: - smalltbl2 - TableScan - alias: smalltbl2 - Map Join Operator - condition map: - Inner Join 0 to 1 - condition expressions: - 0 - 1 - handleSkewJoin: false - keys: - 0 [Column[_col1]] - 1 [Column[value]] - Position of Big Table: 1 - Select Operator - Group By Operator - aggregations: - expr: count() - bucketGroup: false - mode: hash - outputColumnNames: _col0 - File Output Operator - compressed: false - GlobalTableId: 0 - table: - input format: org.apache.hadoop.mapred.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - Local Work: - Map Reduce Local Work - - Stage: Stage-1 - Map Reduce - Alias -> Map Operator Tree: - $INTNAME - Reduce Output Operator - key expressions: - expr: _col1 - type: string - sort order: + - Map-reduce partition columns: - expr: _col1 - type: string - tag: 0 - smalltbl2 - TableScan - alias: smalltbl2 - Reduce Output Operator - key expressions: - expr: value - type: string - sort order: + - Map-reduce partition columns: - expr: value - type: string - tag: 1 - Reduce Operator Tree: - Join Operator - condition map: - Inner Join 0 to 1 - condition expressions: - 0 - 1 - handleSkewJoin: false - Select Operator - Group By Operator - aggregations: - expr: count() - bucketGroup: false - mode: hash - outputColumnNames: _col0 - File Output Operator - compressed: false - GlobalTableId: 0 - table: - input format: org.apache.hadoop.mapred.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - - Stage: Stage-14 - Map Reduce Local Work - Alias -> Map Local Tables: - firstjoin:bigtbl - Fetch Operator - limit: -1 - Alias -> Map Local Operator Tree: - firstjoin:bigtbl - TableScan - alias: bigtbl - HashTable Sink Operator - condition expressions: - 0 {value} - 1 - handleSkewJoin: false - keys: - 0 [Column[key]] - 1 [Column[key]] - Position of Big Table: 1 - - Stage: Stage-9 - Map Reduce - Alias -> Map Operator Tree: - firstjoin:smalltbl1 - TableScan - alias: smalltbl1 - Map Join Operator - condition map: - Inner Join 0 to 1 - condition expressions: - 0 {value} - 1 - handleSkewJoin: false - keys: - 0 [Column[key]] - 1 [Column[key]] - outputColumnNames: _col1 - Position of Big Table: 1 - Select Operator - expressions: - expr: _col1 - type: string - outputColumnNames: _col1 - File Output Operator - compressed: false - GlobalTableId: 0 - table: - input format: org.apache.hadoop.mapred.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - Local Work: - Map Reduce Local Work - - Stage: Stage-3 - Map Reduce - Alias -> Map Operator Tree: - firstjoin:bigtbl - TableScan - alias: bigtbl - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 0 - value expressions: - expr: value - type: string - firstjoin:smalltbl1 - TableScan - alias: smalltbl1 - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 1 - Reduce Operator Tree: - Join Operator - condition map: - Inner Join 0 to 1 - condition expressions: - 0 {VALUE._col1} - 1 - handleSkewJoin: false - outputColumnNames: _col1 - Select Operator - expressions: - expr: _col1 - type: string - outputColumnNames: _col1 - File Output Operator - compressed: false - GlobalTableId: 0 - table: - input format: org.apache.hadoop.mapred.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - Stage: Stage-0 Fetch Operator limit: -1 Index: ql/src/test/results/clientpositive/auto_join27.q.out =================================================================== --- ql/src/test/results/clientpositive/auto_join27.q.out (revision 1458165) +++ ql/src/test/results/clientpositive/auto_join27.q.out (working copy) @@ -27,13 +27,9 @@ STAGE DEPENDENCIES: Stage-1 is a root stage - Stage-8 depends on stages: Stage-1 , consists of Stage-9, Stage-10, Stage-2 - Stage-9 has a backup stage: Stage-2 - Stage-6 depends on stages: Stage-9 - Stage-3 depends on stages: Stage-2, Stage-6, Stage-7 - Stage-10 has a backup stage: Stage-2 - Stage-7 depends on stages: Stage-10 - Stage-2 + Stage-7 depends on stages: Stage-1 + Stage-6 depends on stages: Stage-7 + Stage-3 depends on stages: Stage-6 Stage-0 is a root stage STAGE PLANS: @@ -100,10 +96,7 @@ input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - Stage: Stage-8 - Conditional Operator - - Stage: Stage-9 + Stage: Stage-7 Map Reduce Local Work Alias -> Map Local Tables: src3:src @@ -233,177 +226,6 @@ input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat - Stage: Stage-10 - Map Reduce Local Work - Alias -> Map Local Tables: -#### A masked pattern was here #### - Fetch Operator - limit: -1 - null-subquery1:src_12-subquery1:src - Fetch Operator - limit: -1 - Alias -> Map Local Operator Tree: -#### A masked pattern was here #### - TableScan - Union - HashTable Sink Operator - condition expressions: - 0 - 1 - handleSkewJoin: false - keys: - 0 [Column[_col0]] - 1 [Column[_col0]] - Position of Big Table: 1 - null-subquery1:src_12-subquery1:src - TableScan - alias: src - Filter Operator - predicate: - expr: (key < 200.0) - type: boolean - Select Operator - expressions: - expr: key - type: string - expr: value - type: string - outputColumnNames: _col0, _col1 - Union - HashTable Sink Operator - condition expressions: - 0 - 1 - handleSkewJoin: false - keys: - 0 [Column[_col0]] - 1 [Column[_col0]] - Position of Big Table: 1 - - Stage: Stage-7 - Map Reduce - Alias -> Map Operator Tree: - src3:src - TableScan - alias: src - Filter Operator - predicate: - expr: (key < 200.0) - type: boolean - Select Operator - expressions: - expr: key - type: string - outputColumnNames: _col0 - Map Join Operator - condition map: - Inner Join 0 to 1 - condition expressions: - 0 - 1 - handleSkewJoin: false - keys: - 0 [Column[_col0]] - 1 [Column[_col0]] - Position of Big Table: 1 - Select Operator - Group By Operator - aggregations: - expr: count(1) - bucketGroup: false - mode: hash - outputColumnNames: _col0 - File Output Operator - compressed: false - GlobalTableId: 0 - table: - input format: org.apache.hadoop.mapred.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - Local Work: - Map Reduce Local Work - - Stage: Stage-2 - Map Reduce - Alias -> Map Operator Tree: -#### A masked pattern was here #### - TableScan - Union - Reduce Output Operator - key expressions: - expr: _col0 - type: string - sort order: + - Map-reduce partition columns: - expr: _col0 - type: string - tag: 0 - null-subquery1:src_12-subquery1:src - TableScan - alias: src - Filter Operator - predicate: - expr: (key < 200.0) - type: boolean - Select Operator - expressions: - expr: key - type: string - expr: value - type: string - outputColumnNames: _col0, _col1 - Union - Reduce Output Operator - key expressions: - expr: _col0 - type: string - sort order: + - Map-reduce partition columns: - expr: _col0 - type: string - tag: 0 - src3:src - TableScan - alias: src - Filter Operator - predicate: - expr: (key < 200.0) - type: boolean - Select Operator - expressions: - expr: key - type: string - outputColumnNames: _col0 - Reduce Output Operator - key expressions: - expr: _col0 - type: string - sort order: + - Map-reduce partition columns: - expr: _col0 - type: string - tag: 1 - Reduce Operator Tree: - Join Operator - condition map: - Inner Join 0 to 1 - condition expressions: - 0 - 1 - handleSkewJoin: false - Select Operator - Group By Operator - aggregations: - expr: count(1) - bucketGroup: false - mode: hash - outputColumnNames: _col0 - File Output Operator - compressed: false - GlobalTableId: 0 - table: - input format: org.apache.hadoop.mapred.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - Stage: Stage-0 Fetch Operator limit: -1 Index: ql/src/test/results/clientpositive/auto_join22.q.out =================================================================== --- ql/src/test/results/clientpositive/auto_join22.q.out (revision 1458165) +++ ql/src/test/results/clientpositive/auto_join22.q.out (working copy) @@ -8,35 +8,25 @@ (TOK_QUERY (TOK_FROM (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_TABREF (TOK_TABNAME src) src4) (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_TABREF (TOK_TABNAME src) src1) (TOK_TABREF (TOK_TABNAME src) src2) (= (. (TOK_TABLE_OR_COL src1) key) (. (TOK_TABLE_OR_COL src2) key)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_ALLCOLREF (TOK_TABNAME src2))) (TOK_SELEXPR (. (TOK_TABLE_OR_COL src1) key) src1_key) (TOK_SELEXPR (. (TOK_TABLE_OR_COL src1) value) src1_value)))) src3) (= (. (TOK_TABLE_OR_COL src3) src1_key) (. (TOK_TABLE_OR_COL src4) key)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_ALLCOLREF (TOK_TABNAME src3))) (TOK_SELEXPR (. (TOK_TABLE_OR_COL src4) value) src4_value) (TOK_SELEXPR (. (TOK_TABLE_OR_COL src4) key) src4_key)))) src5)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION sum (TOK_FUNCTION hash (. (TOK_TABLE_OR_COL src5) src1_value))))))) STAGE DEPENDENCIES: - Stage-11 is a root stage , consists of Stage-14, Stage-15, Stage-1 - Stage-14 has a backup stage: Stage-1 - Stage-9 depends on stages: Stage-14 - Stage-8 depends on stages: Stage-1, Stage-9, Stage-10 , consists of Stage-12, Stage-13, Stage-2 - Stage-12 has a backup stage: Stage-2 - Stage-6 depends on stages: Stage-12 - Stage-3 depends on stages: Stage-2, Stage-6, Stage-7 - Stage-13 has a backup stage: Stage-2 - Stage-7 depends on stages: Stage-13 - Stage-2 - Stage-15 has a backup stage: Stage-1 - Stage-10 depends on stages: Stage-15 - Stage-1 + Stage-8 is a root stage + Stage-7 depends on stages: Stage-8 + Stage-3 depends on stages: Stage-7 Stage-0 is a root stage STAGE PLANS: - Stage: Stage-11 - Conditional Operator - - Stage: Stage-14 + Stage: Stage-8 Map Reduce Local Work Alias -> Map Local Tables: - src5:src3:src2 + src5:src3:src1 Fetch Operator limit: -1 + src5:src4 + Fetch Operator + limit: -1 Alias -> Map Local Operator Tree: - src5:src3:src2 + src5:src3:src1 TableScan - alias: src2 + alias: src1 HashTable Sink Operator condition expressions: 0 {key} {value} @@ -45,53 +35,10 @@ keys: 0 [Column[key]] 1 [Column[key]] - Position of Big Table: 0 - - Stage: Stage-9 - Map Reduce - Alias -> Map Operator Tree: - src5:src3:src1 + Position of Big Table: 1 + src5:src4 TableScan - alias: src1 - Map Join Operator - condition map: - Inner Join 0 to 1 - condition expressions: - 0 {key} {value} - 1 - handleSkewJoin: false - keys: - 0 [Column[key]] - 1 [Column[key]] - outputColumnNames: _col0, _col1 - Position of Big Table: 0 - Select Operator - expressions: - expr: _col0 - type: string - expr: _col1 - type: string - outputColumnNames: _col2, _col3 - File Output Operator - compressed: false - GlobalTableId: 0 - table: - input format: org.apache.hadoop.mapred.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - Local Work: - Map Reduce Local Work - - Stage: Stage-8 - Conditional Operator - - Stage: Stage-12 - Map Reduce Local Work - Alias -> Map Local Tables: - $INTNAME - Fetch Operator - limit: -1 - Alias -> Map Local Operator Tree: - $INTNAME + alias: src4 HashTable Sink Operator condition expressions: 0 @@ -100,43 +47,62 @@ keys: 0 [Column[key]] 1 [Column[_col2]] - Position of Big Table: 0 + Position of Big Table: 1 - Stage: Stage-6 + Stage: Stage-7 Map Reduce Alias -> Map Operator Tree: - src5:src4 + src5:src3:src2 TableScan - alias: src4 + alias: src2 Map Join Operator condition map: Inner Join 0 to 1 condition expressions: - 0 - 1 {_col3} + 0 {key} {value} + 1 handleSkewJoin: false keys: 0 [Column[key]] - 1 [Column[_col2]] - outputColumnNames: _col7 - Position of Big Table: 0 + 1 [Column[key]] + outputColumnNames: _col0, _col1 + Position of Big Table: 1 Select Operator expressions: - expr: _col7 + expr: _col0 type: string - outputColumnNames: _col3 - Group By Operator - aggregations: - expr: sum(hash(_col3)) - bucketGroup: false - mode: hash - outputColumnNames: _col0 - File Output Operator - compressed: false - GlobalTableId: 0 - table: - input format: org.apache.hadoop.mapred.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + expr: _col1 + type: string + outputColumnNames: _col2, _col3 + Map Join Operator + condition map: + Inner Join 0 to 1 + condition expressions: + 0 + 1 {_col3} + handleSkewJoin: false + keys: + 0 [Column[key]] + 1 [Column[_col2]] + outputColumnNames: _col7 + Position of Big Table: 1 + Select Operator + expressions: + expr: _col7 + type: string + outputColumnNames: _col3 + Group By Operator + aggregations: + expr: sum(hash(_col3)) + bucketGroup: false + mode: hash + outputColumnNames: _col0 + File Output Operator + compressed: false + GlobalTableId: 0 + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat Local Work: Map Reduce Local Work @@ -169,226 +135,6 @@ input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat - Stage: Stage-13 - Map Reduce Local Work - Alias -> Map Local Tables: - src5:src4 - Fetch Operator - limit: -1 - Alias -> Map Local Operator Tree: - src5:src4 - TableScan - alias: src4 - HashTable Sink Operator - condition expressions: - 0 - 1 {_col3} - handleSkewJoin: false - keys: - 0 [Column[key]] - 1 [Column[_col2]] - Position of Big Table: 1 - - Stage: Stage-7 - Map Reduce - Alias -> Map Operator Tree: - $INTNAME - Map Join Operator - condition map: - Inner Join 0 to 1 - condition expressions: - 0 - 1 {_col3} - handleSkewJoin: false - keys: - 0 [Column[key]] - 1 [Column[_col2]] - outputColumnNames: _col7 - Position of Big Table: 1 - Select Operator - expressions: - expr: _col7 - type: string - outputColumnNames: _col3 - Group By Operator - aggregations: - expr: sum(hash(_col3)) - bucketGroup: false - mode: hash - outputColumnNames: _col0 - File Output Operator - compressed: false - GlobalTableId: 0 - table: - input format: org.apache.hadoop.mapred.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - Local Work: - Map Reduce Local Work - - Stage: Stage-2 - Map Reduce - Alias -> Map Operator Tree: - $INTNAME - Reduce Output Operator - key expressions: - expr: _col2 - type: string - sort order: + - Map-reduce partition columns: - expr: _col2 - type: string - tag: 1 - value expressions: - expr: _col3 - type: string - src5:src4 - TableScan - alias: src4 - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 0 - Reduce Operator Tree: - Join Operator - condition map: - Inner Join 0 to 1 - condition expressions: - 0 - 1 {VALUE._col3} - handleSkewJoin: false - outputColumnNames: _col7 - Select Operator - expressions: - expr: _col7 - type: string - outputColumnNames: _col3 - Group By Operator - aggregations: - expr: sum(hash(_col3)) - bucketGroup: false - mode: hash - outputColumnNames: _col0 - File Output Operator - compressed: false - GlobalTableId: 0 - table: - input format: org.apache.hadoop.mapred.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - - Stage: Stage-15 - Map Reduce Local Work - Alias -> Map Local Tables: - src5:src3:src1 - Fetch Operator - limit: -1 - Alias -> Map Local Operator Tree: - src5:src3:src1 - TableScan - alias: src1 - HashTable Sink Operator - condition expressions: - 0 {key} {value} - 1 - handleSkewJoin: false - keys: - 0 [Column[key]] - 1 [Column[key]] - Position of Big Table: 1 - - Stage: Stage-10 - Map Reduce - Alias -> Map Operator Tree: - src5:src3:src2 - TableScan - alias: src2 - Map Join Operator - condition map: - Inner Join 0 to 1 - condition expressions: - 0 {key} {value} - 1 - handleSkewJoin: false - keys: - 0 [Column[key]] - 1 [Column[key]] - outputColumnNames: _col0, _col1 - Position of Big Table: 1 - Select Operator - expressions: - expr: _col0 - type: string - expr: _col1 - type: string - outputColumnNames: _col2, _col3 - File Output Operator - compressed: false - GlobalTableId: 0 - table: - input format: org.apache.hadoop.mapred.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - Local Work: - Map Reduce Local Work - - Stage: Stage-1 - Map Reduce - Alias -> Map Operator Tree: - src5:src3:src1 - TableScan - alias: src1 - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 0 - value expressions: - expr: key - type: string - expr: value - type: string - src5:src3:src2 - TableScan - alias: src2 - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 1 - Reduce Operator Tree: - Join Operator - condition map: - Inner Join 0 to 1 - condition expressions: - 0 {VALUE._col0} {VALUE._col1} - 1 - handleSkewJoin: false - outputColumnNames: _col0, _col1 - Select Operator - expressions: - expr: _col0 - type: string - expr: _col1 - type: string - outputColumnNames: _col2, _col3 - File Output Operator - compressed: false - GlobalTableId: 0 - table: - input format: org.apache.hadoop.mapred.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - Stage: Stage-0 Fetch Operator limit: -1 Index: ql/src/test/results/clientpositive/mapjoin_filter_on_outerjoin.q.out =================================================================== --- ql/src/test/results/clientpositive/mapjoin_filter_on_outerjoin.q.out (revision 1458165) +++ ql/src/test/results/clientpositive/mapjoin_filter_on_outerjoin.q.out (working copy) @@ -253,26 +253,19 @@ (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_RIGHTOUTERJOIN (TOK_TABREF (TOK_TABNAME src1)) (TOK_TABREF (TOK_TABNAME src1) src2) (AND (AND (= (. (TOK_TABLE_OR_COL src1) key) (. (TOK_TABLE_OR_COL src2) key)) (< (. (TOK_TABLE_OR_COL src1) key) 10)) (> (. (TOK_TABLE_OR_COL src2) key) 10))) (TOK_TABREF (TOK_TABNAME src) src3) (AND (= (. (TOK_TABLE_OR_COL src2) key) (. (TOK_TABLE_OR_COL src3) key)) (< (. (TOK_TABLE_OR_COL src3) key) 300)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR TOK_ALLCOLREF)) (TOK_SORTBY (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src1) key)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src2) key)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src3) key))))) STAGE DEPENDENCIES: - Stage-7 is a root stage , consists of Stage-8, Stage-9, Stage-1 - Stage-8 has a backup stage: Stage-1 - Stage-5 depends on stages: Stage-8 - Stage-2 depends on stages: Stage-1, Stage-5, Stage-6 - Stage-9 has a backup stage: Stage-1 - Stage-6 depends on stages: Stage-9 - Stage-1 + Stage-6 is a root stage + Stage-5 depends on stages: Stage-6 + Stage-2 depends on stages: Stage-5 Stage-0 is a root stage STAGE PLANS: - Stage: Stage-7 - Conditional Operator - - Stage: Stage-8 + Stage: Stage-6 Map Reduce Local Work Alias -> Map Local Tables: src1 Fetch Operator limit: -1 - src3 + src2 Fetch Operator limit: -1 Alias -> Map Local Operator Tree: @@ -297,10 +290,10 @@ 0 [Column[key]] 1 [Column[key]] 2 [Column[key]] - Position of Big Table: 1 - src3 + Position of Big Table: 2 + src2 TableScan - alias: src3 + alias: src2 Filter Operator predicate: expr: (key < 300.0) @@ -319,14 +312,14 @@ 0 [Column[key]] 1 [Column[key]] 2 [Column[key]] - Position of Big Table: 1 + Position of Big Table: 2 Stage: Stage-5 Map Reduce Alias -> Map Operator Tree: - src2 + src3 TableScan - alias: src2 + alias: src3 Filter Operator predicate: expr: (key < 300.0) @@ -349,7 +342,7 @@ 1 [Column[key]] 2 [Column[key]] outputColumnNames: _col0, _col1, _col4, _col5, _col8, _col9 - Position of Big Table: 1 + Position of Big Table: 2 Select Operator expressions: expr: _col0 @@ -410,217 +403,6 @@ input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat - Stage: Stage-9 - Map Reduce Local Work - Alias -> Map Local Tables: - src1 - Fetch Operator - limit: -1 - src2 - Fetch Operator - limit: -1 - Alias -> Map Local Operator Tree: - src1 - TableScan - alias: src1 - Filter Operator - predicate: - expr: ((key < 300.0) and (key < 10.0)) - type: boolean - HashTable Sink Operator - condition expressions: - 0 {key} {value} - 1 {key} {value} - 2 {key} {value} - filter predicates: - 0 - 1 {(key > 10.0)} - 2 - handleSkewJoin: false - keys: - 0 [Column[key]] - 1 [Column[key]] - 2 [Column[key]] - Position of Big Table: 2 - src2 - TableScan - alias: src2 - Filter Operator - predicate: - expr: (key < 300.0) - type: boolean - HashTable Sink Operator - condition expressions: - 0 {key} {value} - 1 {key} {value} - 2 {key} {value} - filter predicates: - 0 - 1 {(key > 10.0)} - 2 - handleSkewJoin: false - keys: - 0 [Column[key]] - 1 [Column[key]] - 2 [Column[key]] - Position of Big Table: 2 - - Stage: Stage-6 - Map Reduce - Alias -> Map Operator Tree: - src3 - TableScan - alias: src3 - Filter Operator - predicate: - expr: (key < 300.0) - type: boolean - Map Join Operator - condition map: - Right Outer Join0 to 1 - Inner Join 1 to 2 - condition expressions: - 0 {key} {value} - 1 {key} {value} - 2 {key} {value} - filter predicates: - 0 - 1 {(key > 10.0)} - 2 - handleSkewJoin: false - keys: - 0 [Column[key]] - 1 [Column[key]] - 2 [Column[key]] - outputColumnNames: _col0, _col1, _col4, _col5, _col8, _col9 - Position of Big Table: 2 - Select Operator - expressions: - expr: _col0 - type: string - expr: _col1 - type: string - expr: _col4 - type: string - expr: _col5 - 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.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - Local Work: - Map Reduce Local Work - - Stage: Stage-1 - Map Reduce - Alias -> Map Operator Tree: - src1 - TableScan - alias: src1 - Filter Operator - predicate: - expr: ((key < 300.0) and (key < 10.0)) - type: boolean - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 0 - value expressions: - expr: key - type: string - expr: value - type: string - src2 - TableScan - alias: src2 - Filter Operator - predicate: - expr: (key < 300.0) - type: boolean - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 1 - value expressions: - expr: key - type: string - expr: value - type: string - src3 - TableScan - alias: src3 - Filter Operator - predicate: - expr: (key < 300.0) - type: boolean - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 2 - value expressions: - expr: key - type: string - expr: value - type: string - Reduce Operator Tree: - Join Operator - condition map: - Right Outer Join0 to 1 - Inner Join 1 to 2 - condition expressions: - 0 {VALUE._col0} {VALUE._col1} - 1 {VALUE._col0} {VALUE._col1} - 2 {VALUE._col0} {VALUE._col1} - filter predicates: - 0 - 1 {(VALUE._col0 > 10.0)} - 2 - handleSkewJoin: false - outputColumnNames: _col0, _col1, _col4, _col5, _col8, _col9 - Select Operator - expressions: - expr: _col0 - type: string - expr: _col1 - type: string - expr: _col4 - type: string - expr: _col5 - 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.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - Stage: Stage-0 Fetch Operator limit: -1 Index: ql/src/test/results/clientpositive/auto_join9.q.out =================================================================== --- ql/src/test/results/clientpositive/auto_join9.q.out (revision 1458165) +++ ql/src/test/results/clientpositive/auto_join9.q.out (working copy) @@ -15,29 +15,22 @@ (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_TABREF (TOK_TABNAME srcpart) src1) (TOK_TABREF (TOK_TABNAME src) src2) (= (. (TOK_TABLE_OR_COL src1) key) (. (TOK_TABLE_OR_COL src2) key)))) (TOK_INSERT (TOK_DESTINATION (TOK_TAB (TOK_TABNAME dest1))) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL src1) key)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL src2) value))) (TOK_WHERE (and (= (. (TOK_TABLE_OR_COL src1) ds) '2008-04-08') (= (. (TOK_TABLE_OR_COL src1) hr) '12'))))) STAGE DEPENDENCIES: - Stage-6 is a root stage , consists of Stage-7, Stage-8, Stage-1 - Stage-7 has a backup stage: Stage-1 - Stage-4 depends on stages: Stage-7 - Stage-0 depends on stages: Stage-1, Stage-4, Stage-5 + Stage-5 is a root stage + Stage-4 depends on stages: Stage-5 + Stage-0 depends on stages: Stage-4 Stage-2 depends on stages: Stage-0 - Stage-8 has a backup stage: Stage-1 - Stage-5 depends on stages: Stage-8 - Stage-1 STAGE PLANS: - Stage: Stage-6 - Conditional Operator - - Stage: Stage-7 + Stage: Stage-5 Map Reduce Local Work Alias -> Map Local Tables: - src2 + src1 Fetch Operator limit: -1 Alias -> Map Local Operator Tree: - src2 + src1 TableScan - alias: src2 + alias: src1 HashTable Sink Operator condition expressions: 0 {key} @@ -46,14 +39,14 @@ keys: 0 [Column[key]] 1 [Column[key]] - Position of Big Table: 0 + Position of Big Table: 1 Stage: Stage-4 Map Reduce Alias -> Map Operator Tree: - src1 + src2 TableScan - alias: src1 + alias: src2 Map Join Operator condition map: Inner Join 0 to 1 @@ -65,7 +58,7 @@ 0 [Column[key]] 1 [Column[key]] outputColumnNames: _col0, _col7 - Position of Big Table: 0 + Position of Big Table: 1 Select Operator expressions: expr: UDFToInteger(_col0) @@ -97,120 +90,7 @@ Stage: Stage-2 Stats-Aggr Operator - Stage: Stage-8 - Map Reduce Local Work - Alias -> Map Local Tables: - src1 - Fetch Operator - limit: -1 - Alias -> Map Local Operator Tree: - src1 - TableScan - alias: src1 - HashTable Sink Operator - condition expressions: - 0 {key} - 1 {value} - handleSkewJoin: false - keys: - 0 [Column[key]] - 1 [Column[key]] - Position of Big Table: 1 - Stage: Stage-5 - Map Reduce - Alias -> Map Operator Tree: - src2 - TableScan - alias: src2 - Map Join Operator - condition map: - Inner Join 0 to 1 - condition expressions: - 0 {key} - 1 {value} - handleSkewJoin: false - keys: - 0 [Column[key]] - 1 [Column[key]] - outputColumnNames: _col0, _col7 - Position of Big Table: 1 - Select Operator - expressions: - expr: UDFToInteger(_col0) - type: int - expr: _col7 - type: string - outputColumnNames: _col0, _col1 - File Output Operator - compressed: false - GlobalTableId: 1 - 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.dest1 - Local Work: - Map Reduce Local Work - - Stage: Stage-1 - Map Reduce - Alias -> Map Operator Tree: - src1 - TableScan - alias: src1 - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 0 - value expressions: - expr: key - type: string - src2 - TableScan - alias: src2 - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 1 - value expressions: - expr: value - type: string - Reduce Operator Tree: - Join Operator - condition map: - Inner Join 0 to 1 - condition expressions: - 0 {VALUE._col0} - 1 {VALUE._col1} - handleSkewJoin: false - outputColumnNames: _col0, _col7 - Select Operator - expressions: - expr: UDFToInteger(_col0) - type: int - expr: _col7 - type: string - outputColumnNames: _col0, _col1 - File Output Operator - compressed: false - GlobalTableId: 1 - 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.dest1 - PREHOOK: query: FROM srcpart src1 JOIN src src2 ON (src1.key = src2.key) INSERT OVERWRITE TABLE dest1 SELECT src1.key, src2.value where src1.ds = '2008-04-08' and src1.hr = '12' PREHOOK: type: QUERY Index: ql/src/test/results/clientpositive/auto_sortmerge_join_9.q.out =================================================================== --- ql/src/test/results/clientpositive/auto_sortmerge_join_9.q.out (revision 1458165) +++ ql/src/test/results/clientpositive/auto_sortmerge_join_9.q.out (working copy) @@ -1459,20 +1459,13 @@ (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME tbl1) a)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (+ (. (TOK_TABLE_OR_COL a) key) 1) key) (TOK_SELEXPR (TOK_FUNCTION concat (. (TOK_TABLE_OR_COL a) value) (. (TOK_TABLE_OR_COL a) value)) value)))) subq1) (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME tbl2) a)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (+ (. (TOK_TABLE_OR_COL a) key) 1) key) (TOK_SELEXPR (TOK_FUNCTION concat (. (TOK_TABLE_OR_COL a) value) (. (TOK_TABLE_OR_COL a) value)) value)))) subq2) (= (. (TOK_TABLE_OR_COL subq1) key) (. (TOK_TABLE_OR_COL subq2) key)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTIONSTAR count))))) STAGE DEPENDENCIES: - Stage-6 is a root stage , consists of Stage-7, Stage-8, Stage-1 - Stage-7 has a backup stage: Stage-1 - Stage-4 depends on stages: Stage-7 - Stage-2 depends on stages: Stage-1, Stage-4, Stage-5 - Stage-8 has a backup stage: Stage-1 - Stage-5 depends on stages: Stage-8 - Stage-1 + Stage-5 is a root stage + Stage-4 depends on stages: Stage-5 + Stage-2 depends on stages: Stage-4 Stage-0 is a root stage STAGE PLANS: - Stage: Stage-6 - Conditional Operator - - Stage: Stage-7 + Stage: Stage-5 Map Reduce Local Work Alias -> Map Local Tables: subq2:a @@ -1564,128 +1557,6 @@ input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat - Stage: Stage-8 - Map Reduce Local Work - Alias -> Map Local Tables: - subq1:a - Fetch Operator - limit: -1 - Alias -> Map Local Operator Tree: - subq1:a - TableScan - alias: a - Select Operator - expressions: - expr: (key + 1) - type: int - outputColumnNames: _col0 - HashTable Sink Operator - condition expressions: - 0 - 1 - handleSkewJoin: false - keys: - 0 [Column[_col0]] - 1 [Column[_col0]] - Position of Big Table: 1 - - Stage: Stage-5 - Map Reduce - Alias -> Map Operator Tree: - subq2:a - TableScan - alias: a - Select Operator - expressions: - expr: (key + 1) - type: int - outputColumnNames: _col0 - Map Join Operator - condition map: - Inner Join 0 to 1 - condition expressions: - 0 - 1 - handleSkewJoin: false - keys: - 0 [Column[_col0]] - 1 [Column[_col0]] - Position of Big Table: 1 - Select Operator - Group By Operator - aggregations: - expr: count() - bucketGroup: false - mode: hash - outputColumnNames: _col0 - File Output Operator - compressed: false - GlobalTableId: 0 - table: - input format: org.apache.hadoop.mapred.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - Local Work: - Map Reduce Local Work - - Stage: Stage-1 - Map Reduce - Alias -> Map Operator Tree: - subq1:a - TableScan - alias: a - Select Operator - expressions: - expr: (key + 1) - type: int - outputColumnNames: _col0 - Reduce Output Operator - key expressions: - expr: _col0 - type: int - sort order: + - Map-reduce partition columns: - expr: _col0 - type: int - tag: 0 - subq2:a - TableScan - alias: a - Select Operator - expressions: - expr: (key + 1) - type: int - outputColumnNames: _col0 - Reduce Output Operator - key expressions: - expr: _col0 - type: int - sort order: + - Map-reduce partition columns: - expr: _col0 - type: int - tag: 1 - Reduce Operator Tree: - Join Operator - condition map: - Inner Join 0 to 1 - condition expressions: - 0 - 1 - handleSkewJoin: false - Select Operator - Group By Operator - aggregations: - expr: count() - bucketGroup: false - mode: hash - outputColumnNames: _col0 - File Output Operator - compressed: false - GlobalTableId: 0 - table: - input format: org.apache.hadoop.mapred.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - Stage: Stage-0 Fetch Operator limit: -1 Index: ql/src/test/results/clientpositive/auto_join4.q.out =================================================================== --- ql/src/test/results/clientpositive/auto_join4.q.out (revision 1458165) +++ ql/src/test/results/clientpositive/auto_join4.q.out (working copy) @@ -37,18 +37,13 @@ (TOK_QUERY (TOK_FROM (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_LEFTOUTERJOIN (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME src) src1)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL src1) key) c1) (TOK_SELEXPR (. (TOK_TABLE_OR_COL src1) value) c2)) (TOK_WHERE (and (> (. (TOK_TABLE_OR_COL src1) key) 10) (< (. (TOK_TABLE_OR_COL src1) key) 20))))) a) (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME src) src2)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL src2) key) c3) (TOK_SELEXPR (. (TOK_TABLE_OR_COL src2) value) c4)) (TOK_WHERE (and (> (. (TOK_TABLE_OR_COL src2) key) 15) (< (. (TOK_TABLE_OR_COL src2) key) 25))))) b) (= (. (TOK_TABLE_OR_COL a) c1) (. (TOK_TABLE_OR_COL b) c3)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL a) c1) c1) (TOK_SELEXPR (. (TOK_TABLE_OR_COL a) c2) c2) (TOK_SELEXPR (. (TOK_TABLE_OR_COL b) c3) c3) (TOK_SELEXPR (. (TOK_TABLE_OR_COL b) c4) c4)))) c)) (TOK_INSERT (TOK_DESTINATION (TOK_TAB (TOK_TABNAME dest1))) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL c) c1)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL c) c2)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL c) c3)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL c) c4))))) STAGE DEPENDENCIES: - Stage-5 is a root stage , consists of Stage-6, Stage-1 - Stage-6 has a backup stage: Stage-1 - Stage-4 depends on stages: Stage-6 - Stage-0 depends on stages: Stage-1, Stage-4 + Stage-5 is a root stage + Stage-4 depends on stages: Stage-5 + Stage-0 depends on stages: Stage-4 Stage-2 depends on stages: Stage-0 - Stage-1 STAGE PLANS: Stage: Stage-5 - Conditional Operator - - Stage: Stage-6 Map Reduce Local Work Alias -> Map Local Tables: c:b:src2 @@ -143,95 +138,7 @@ Stage: Stage-2 Stats-Aggr Operator - Stage: Stage-1 - Map Reduce - Alias -> Map Operator Tree: - c:a:src1 - TableScan - alias: src1 - Filter Operator - predicate: - expr: ((key > 10.0) and (key < 20.0)) - type: boolean - Select Operator - expressions: - expr: key - type: string - expr: value - type: string - outputColumnNames: _col0, _col1 - Reduce Output Operator - key expressions: - expr: _col0 - type: string - sort order: + - Map-reduce partition columns: - expr: _col0 - type: string - tag: 0 - value expressions: - expr: _col0 - type: string - expr: _col1 - type: string - c:b:src2 - TableScan - alias: src2 - Filter Operator - predicate: - expr: ((key > 15.0) and (key < 25.0)) - type: boolean - Select Operator - expressions: - expr: key - type: string - expr: value - type: string - outputColumnNames: _col0, _col1 - Reduce Output Operator - key expressions: - expr: _col0 - type: string - sort order: + - Map-reduce partition columns: - expr: _col0 - type: string - tag: 1 - value expressions: - expr: _col0 - type: string - expr: _col1 - type: string - Reduce Operator Tree: - Join Operator - condition map: - Left Outer Join0 to 1 - condition expressions: - 0 {VALUE._col0} {VALUE._col1} - 1 {VALUE._col0} {VALUE._col1} - handleSkewJoin: false - outputColumnNames: _col0, _col1, _col2, _col3 - Select Operator - expressions: - expr: UDFToInteger(_col0) - type: int - expr: _col1 - type: string - expr: UDFToInteger(_col2) - type: int - expr: _col3 - type: string - outputColumnNames: _col0, _col1, _col2, _col3 - File Output Operator - compressed: false - GlobalTableId: 1 - 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.dest1 - PREHOOK: query: FROM ( FROM ( Index: ql/src/test/results/clientpositive/infer_bucket_sort_convert_join.q.out =================================================================== --- ql/src/test/results/clientpositive/infer_bucket_sort_convert_join.q.out (revision 1458165) +++ ql/src/test/results/clientpositive/infer_bucket_sort_convert_join.q.out (working copy) @@ -65,7 +65,8 @@ Sort Columns: [] Storage Desc Params: serialization.format 1 -PREHOOK: query: -- Tests a join which is not converted to a map join, the output should be bucketed and sorted +PREHOOK: query: -- This test tests the scenario when the mapper dies. So, create a conditional task for the mapjoin. +-- Tests a join which is not converted to a map join, the output should be bucketed and sorted. INSERT OVERWRITE TABLE test_table PARTITION (part = '1') SELECT a.key, b.value FROM src a JOIN src b ON a.key = b.key @@ -84,7 +85,8 @@ #### A masked pattern was here #### FAILED: Execution Error, return code 3 from org.apache.hadoop.hive.ql.exec.MapredLocalTask ATTEMPT: Execute BackupTask: org.apache.hadoop.hive.ql.exec.MapRedTask -POSTHOOK: query: -- Tests a join which is not converted to a map join, the output should be bucketed and sorted +POSTHOOK: query: -- This test tests the scenario when the mapper dies. So, create a conditional task for the mapjoin. +-- Tests a join which is not converted to a map join, the output should be bucketed and sorted. INSERT OVERWRITE TABLE test_table PARTITION (part = '1') SELECT a.key, b.value FROM src a JOIN src b ON a.key = b.key Index: ql/src/test/results/clientpositive/auto_join15.q.out =================================================================== --- ql/src/test/results/clientpositive/auto_join15.q.out (revision 1458165) +++ ql/src/test/results/clientpositive/auto_join15.q.out (working copy) @@ -18,30 +18,23 @@ (TOK_QUERY (TOK_FROM (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_TABREF (TOK_TABNAME src) src1) (TOK_TABREF (TOK_TABNAME src) src2) (= (. (TOK_TABLE_OR_COL src1) key) (. (TOK_TABLE_OR_COL src2) key)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL src1) key) k1) (TOK_SELEXPR (. (TOK_TABLE_OR_COL src1) value) v1) (TOK_SELEXPR (. (TOK_TABLE_OR_COL src2) key) k2) (TOK_SELEXPR (. (TOK_TABLE_OR_COL src2) value) v2)) (TOK_SORTBY (TOK_TABSORTCOLNAMEASC (TOK_TABLE_OR_COL k1)) (TOK_TABSORTCOLNAMEASC (TOK_TABLE_OR_COL v1)) (TOK_TABSORTCOLNAMEASC (TOK_TABLE_OR_COL k2)) (TOK_TABSORTCOLNAMEASC (TOK_TABLE_OR_COL v2))))) a)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION sum (TOK_FUNCTION hash (. (TOK_TABLE_OR_COL a) k1) (. (TOK_TABLE_OR_COL a) v1) (. (TOK_TABLE_OR_COL a) k2) (. (TOK_TABLE_OR_COL a) v2))))))) STAGE DEPENDENCIES: - Stage-7 is a root stage , consists of Stage-8, Stage-9, Stage-1 - Stage-8 has a backup stage: Stage-1 - Stage-5 depends on stages: Stage-8 - Stage-2 depends on stages: Stage-1, Stage-5, Stage-6 + Stage-6 is a root stage + Stage-5 depends on stages: Stage-6 + Stage-2 depends on stages: Stage-5 Stage-3 depends on stages: Stage-2 - Stage-9 has a backup stage: Stage-1 - Stage-6 depends on stages: Stage-9 - Stage-1 Stage-0 is a root stage STAGE PLANS: - Stage: Stage-7 - Conditional Operator - - Stage: Stage-8 + Stage: Stage-6 Map Reduce Local Work Alias -> Map Local Tables: - a:src2 + a:src1 Fetch Operator limit: -1 Alias -> Map Local Operator Tree: - a:src2 + a:src1 TableScan - alias: src2 + alias: src1 HashTable Sink Operator condition expressions: 0 {key} {value} @@ -50,14 +43,14 @@ keys: 0 [Column[key]] 1 [Column[key]] - Position of Big Table: 0 + Position of Big Table: 1 Stage: Stage-5 Map Reduce Alias -> Map Operator Tree: - a:src1 + a:src2 TableScan - alias: src1 + alias: src2 Map Join Operator condition map: Inner Join 0 to 1 @@ -69,7 +62,7 @@ 0 [Column[key]] 1 [Column[key]] outputColumnNames: _col0, _col1, _col4, _col5 - Position of Big Table: 0 + Position of Big Table: 1 Select Operator expressions: expr: _col0 @@ -170,128 +163,6 @@ input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat - Stage: Stage-9 - Map Reduce Local Work - Alias -> Map Local Tables: - a:src1 - Fetch Operator - limit: -1 - Alias -> Map Local Operator Tree: - a:src1 - TableScan - alias: src1 - 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 - - Stage: Stage-6 - Map Reduce - Alias -> Map Operator Tree: - a:src2 - TableScan - alias: src2 - 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 - Select Operator - expressions: - expr: _col0 - type: string - expr: _col1 - type: string - expr: _col4 - type: string - expr: _col5 - type: string - outputColumnNames: _col0, _col1, _col2, _col3 - File Output Operator - compressed: false - GlobalTableId: 0 - table: - input format: org.apache.hadoop.mapred.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - Local Work: - Map Reduce Local Work - - Stage: Stage-1 - Map Reduce - Alias -> Map Operator Tree: - a:src1 - TableScan - alias: src1 - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 0 - value expressions: - expr: key - type: string - expr: value - type: string - a:src2 - TableScan - alias: src2 - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 1 - value expressions: - expr: key - type: string - expr: value - type: string - Reduce Operator Tree: - Join Operator - condition map: - Inner Join 0 to 1 - condition expressions: - 0 {VALUE._col0} {VALUE._col1} - 1 {VALUE._col0} {VALUE._col1} - handleSkewJoin: false - outputColumnNames: _col0, _col1, _col4, _col5 - Select Operator - expressions: - expr: _col0 - type: string - expr: _col1 - type: string - expr: _col4 - type: string - expr: _col5 - type: string - outputColumnNames: _col0, _col1, _col2, _col3 - File Output Operator - compressed: false - GlobalTableId: 0 - table: - input format: org.apache.hadoop.mapred.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - Stage: Stage-0 Fetch Operator limit: -1 Index: ql/src/test/results/clientpositive/auto_join10.q.out =================================================================== --- ql/src/test/results/clientpositive/auto_join10.q.out (revision 1458165) +++ ql/src/test/results/clientpositive/auto_join10.q.out (working copy) @@ -18,20 +18,13 @@ (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME src))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_ALLCOLREF (TOK_TABNAME src)))))) x) (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME src))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_ALLCOLREF (TOK_TABNAME src)))))) Y) (= (. (TOK_TABLE_OR_COL x) key) (. (TOK_TABLE_OR_COL Y) key)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION sum (TOK_FUNCTION hash (. (TOK_TABLE_OR_COL Y) key) (. (TOK_TABLE_OR_COL Y) value))))))) STAGE DEPENDENCIES: - Stage-6 is a root stage , consists of Stage-7, Stage-8, Stage-1 - Stage-7 has a backup stage: Stage-1 - Stage-4 depends on stages: Stage-7 - Stage-2 depends on stages: Stage-1, Stage-4, Stage-5 - Stage-8 has a backup stage: Stage-1 - Stage-5 depends on stages: Stage-8 - Stage-1 + Stage-5 is a root stage + Stage-4 depends on stages: Stage-5 + Stage-2 depends on stages: Stage-4 Stage-0 is a root stage STAGE PLANS: - Stage: Stage-6 - Conditional Operator - - Stage: Stage-7 + Stage: Stage-5 Map Reduce Local Work Alias -> Map Local Tables: y:src @@ -132,151 +125,6 @@ input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat - Stage: Stage-8 - Map Reduce Local Work - Alias -> Map Local Tables: - x:src - Fetch Operator - limit: -1 - Alias -> Map Local Operator Tree: - x:src - TableScan - alias: src - Select Operator - expressions: - expr: key - type: string - outputColumnNames: _col0 - HashTable Sink Operator - condition expressions: - 0 - 1 {_col0} {_col1} - handleSkewJoin: false - keys: - 0 [Column[_col0]] - 1 [Column[_col0]] - Position of Big Table: 1 - - Stage: Stage-5 - Map Reduce - Alias -> Map Operator Tree: - y:src - TableScan - alias: src - Select Operator - expressions: - expr: key - type: string - expr: value - type: string - outputColumnNames: _col0, _col1 - Map Join Operator - condition map: - Inner Join 0 to 1 - condition expressions: - 0 - 1 {_col0} {_col1} - handleSkewJoin: false - keys: - 0 [Column[_col0]] - 1 [Column[_col0]] - outputColumnNames: _col2, _col3 - Position of Big Table: 1 - Select Operator - expressions: - expr: _col2 - type: string - expr: _col3 - type: string - outputColumnNames: _col2, _col3 - Group By Operator - aggregations: - expr: sum(hash(_col2,_col3)) - bucketGroup: false - mode: hash - outputColumnNames: _col0 - File Output Operator - compressed: false - GlobalTableId: 0 - table: - input format: org.apache.hadoop.mapred.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - Local Work: - Map Reduce Local Work - - Stage: Stage-1 - Map Reduce - Alias -> Map Operator Tree: - x:src - TableScan - alias: src - Select Operator - expressions: - expr: key - type: string - outputColumnNames: _col0 - Reduce Output Operator - key expressions: - expr: _col0 - type: string - sort order: + - Map-reduce partition columns: - expr: _col0 - type: string - tag: 0 - y:src - TableScan - alias: src - Select Operator - expressions: - expr: key - type: string - expr: value - type: string - outputColumnNames: _col0, _col1 - Reduce Output Operator - key expressions: - expr: _col0 - type: string - sort order: + - Map-reduce partition columns: - expr: _col0 - type: string - tag: 1 - value expressions: - expr: _col0 - type: string - expr: _col1 - type: string - Reduce Operator Tree: - Join Operator - condition map: - Inner Join 0 to 1 - condition expressions: - 0 - 1 {VALUE._col0} {VALUE._col1} - handleSkewJoin: false - outputColumnNames: _col2, _col3 - Select Operator - expressions: - expr: _col2 - type: string - expr: _col3 - type: string - outputColumnNames: _col2, _col3 - Group By Operator - aggregations: - expr: sum(hash(_col2,_col3)) - bucketGroup: false - mode: hash - outputColumnNames: _col0 - File Output Operator - compressed: false - GlobalTableId: 0 - table: - input format: org.apache.hadoop.mapred.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - Stage: Stage-0 Fetch Operator limit: -1 Index: ql/src/test/results/clientpositive/mapjoin_hook.q.out =================================================================== --- ql/src/test/results/clientpositive/mapjoin_hook.q.out (revision 1458165) +++ ql/src/test/results/clientpositive/mapjoin_hook.q.out (working copy) @@ -14,7 +14,7 @@ PREHOOK: type: QUERY PREHOOK: Input: default@src PREHOOK: Output: default@dest1 -[MapJoinCounter PostHook] CONVERTED_LOCAL_MAPJOIN: 1 CONVERTED_MAPJOIN: 1 LOCAL_MAPJOIN: 0 COMMON_JOIN: 0 BACKUP_COMMON_JOIN: 0 +[MapJoinCounter PostHook] CONVERTED_LOCAL_MAPJOIN: 0 CONVERTED_MAPJOIN: 0 LOCAL_MAPJOIN: 1 COMMON_JOIN: 0 BACKUP_COMMON_JOIN: 0 PREHOOK: query: FROM srcpart src1 JOIN src src2 ON (src1.key = src2.key) INSERT OVERWRITE TABLE dest1 SELECT src1.key, src2.value where (src1.ds = '2008-04-08' or src1.ds = '2008-04-09' )and (src1.hr = '12' or src1.hr = '11') Index: ql/src/test/results/clientpositive/auto_join26.q.out =================================================================== --- ql/src/test/results/clientpositive/auto_join26.q.out (revision 1458165) +++ ql/src/test/results/clientpositive/auto_join26.q.out (working copy) @@ -15,30 +15,23 @@ (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_TABREF (TOK_TABNAME src1) x) (TOK_TABREF (TOK_TABNAME src) y) (= (. (TOK_TABLE_OR_COL x) key) (. (TOK_TABLE_OR_COL y) key)))) (TOK_INSERT (TOK_DESTINATION (TOK_TAB (TOK_TABNAME dest_j1))) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL x) key)) (TOK_SELEXPR (TOK_FUNCTION count 1))) (TOK_GROUPBY (. (TOK_TABLE_OR_COL x) key)))) STAGE DEPENDENCIES: - Stage-7 is a root stage , consists of Stage-8, Stage-9, Stage-1 - Stage-8 has a backup stage: Stage-1 - Stage-5 depends on stages: Stage-8 - Stage-2 depends on stages: Stage-1, Stage-5, Stage-6 + Stage-6 is a root stage + Stage-5 depends on stages: Stage-6 + Stage-2 depends on stages: Stage-5 Stage-0 depends on stages: Stage-2 Stage-3 depends on stages: Stage-0 - Stage-9 has a backup stage: Stage-1 - Stage-6 depends on stages: Stage-9 - Stage-1 STAGE PLANS: - Stage: Stage-7 - Conditional Operator - - Stage: Stage-8 + Stage: Stage-6 Map Reduce Local Work Alias -> Map Local Tables: - y + x Fetch Operator limit: -1 Alias -> Map Local Operator Tree: - y + x TableScan - alias: y + alias: x HashTable Sink Operator condition expressions: 0 {key} @@ -47,14 +40,14 @@ keys: 0 [Column[key]] 1 [Column[key]] - Position of Big Table: 0 + Position of Big Table: 1 Stage: Stage-5 Map Reduce Alias -> Map Operator Tree: - x + y TableScan - alias: x + alias: y Map Join Operator condition map: Inner Join 0 to 1 @@ -66,7 +59,7 @@ 0 [Column[key]] 1 [Column[key]] outputColumnNames: _col0 - Position of Big Table: 0 + Position of Big Table: 1 Select Operator expressions: expr: _col0 @@ -145,128 +138,7 @@ Stage: Stage-3 Stats-Aggr Operator - Stage: Stage-9 - Map Reduce Local Work - Alias -> Map Local Tables: - x - Fetch Operator - limit: -1 - Alias -> Map Local Operator Tree: - x - TableScan - alias: x - HashTable Sink Operator - condition expressions: - 0 {key} - 1 - handleSkewJoin: false - keys: - 0 [Column[key]] - 1 [Column[key]] - Position of Big Table: 1 - Stage: Stage-6 - Map Reduce - Alias -> Map Operator Tree: - y - TableScan - alias: y - Map Join Operator - condition map: - Inner Join 0 to 1 - condition expressions: - 0 {key} - 1 - handleSkewJoin: false - keys: - 0 [Column[key]] - 1 [Column[key]] - outputColumnNames: _col0 - Position of Big Table: 1 - Select Operator - expressions: - expr: _col0 - type: string - outputColumnNames: _col0 - Group By Operator - aggregations: - expr: count(1) - bucketGroup: false - keys: - expr: _col0 - type: string - mode: hash - outputColumnNames: _col0, _col1 - File Output Operator - compressed: false - GlobalTableId: 0 - table: - input format: org.apache.hadoop.mapred.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - Local Work: - Map Reduce Local Work - - Stage: Stage-1 - Map Reduce - Alias -> Map Operator Tree: - x - TableScan - alias: x - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 0 - value expressions: - expr: key - type: string - y - TableScan - alias: y - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 1 - Reduce Operator Tree: - Join Operator - condition map: - Inner Join 0 to 1 - condition expressions: - 0 {VALUE._col0} - 1 - handleSkewJoin: false - outputColumnNames: _col0 - Select Operator - expressions: - expr: _col0 - type: string - outputColumnNames: _col0 - Group By Operator - aggregations: - expr: count(1) - bucketGroup: false - keys: - expr: _col0 - type: string - mode: hash - outputColumnNames: _col0, _col1 - File Output Operator - compressed: false - GlobalTableId: 0 - table: - input format: org.apache.hadoop.mapred.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - - PREHOOK: query: INSERT OVERWRITE TABLE dest_j1 SELECT x.key, count(1) FROM src1 x JOIN src y ON (x.key = y.key) group by x.key PREHOOK: type: QUERY Index: ql/src/test/results/clientpositive/auto_join21.q.out =================================================================== --- ql/src/test/results/clientpositive/auto_join21.q.out (revision 1458165) +++ ql/src/test/results/clientpositive/auto_join21.q.out (working copy) @@ -8,18 +8,13 @@ (TOK_QUERY (TOK_FROM (TOK_RIGHTOUTERJOIN (TOK_LEFTOUTERJOIN (TOK_TABREF (TOK_TABNAME src) src1) (TOK_TABREF (TOK_TABNAME src) src2) (AND (AND (= (. (TOK_TABLE_OR_COL src1) key) (. (TOK_TABLE_OR_COL src2) key)) (< (. (TOK_TABLE_OR_COL src1) key) 10)) (> (. (TOK_TABLE_OR_COL src2) key) 10))) (TOK_TABREF (TOK_TABNAME src) src3) (AND (= (. (TOK_TABLE_OR_COL src2) key) (. (TOK_TABLE_OR_COL src3) key)) (< (. (TOK_TABLE_OR_COL src3) key) 10)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR TOK_ALLCOLREF)) (TOK_SORTBY (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src1) key)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src1) value)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src2) key)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src2) value)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src3) key)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src3) value))))) STAGE DEPENDENCIES: - Stage-6 is a root stage , consists of Stage-7, Stage-1 - Stage-7 has a backup stage: Stage-1 - Stage-5 depends on stages: Stage-7 - Stage-2 depends on stages: Stage-1, Stage-5 - Stage-1 + Stage-6 is a root stage + Stage-5 depends on stages: Stage-6 + Stage-2 depends on stages: Stage-5 Stage-0 is a root stage STAGE PLANS: Stage: Stage-6 - Conditional Operator - - Stage: Stage-7 Map Reduce Local Work Alias -> Map Local Tables: src1 @@ -161,101 +156,6 @@ input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat - Stage: Stage-1 - Map Reduce - Alias -> Map Operator Tree: - src1 - TableScan - alias: src1 - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 0 - value expressions: - expr: key - type: string - expr: value - type: string - src2 - TableScan - alias: src2 - Filter Operator - predicate: - expr: (key > 10.0) - type: boolean - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 1 - value expressions: - expr: key - type: string - expr: value - type: string - src3 - TableScan - alias: src3 - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 2 - value expressions: - expr: key - type: string - expr: value - type: string - Reduce Operator Tree: - Join Operator - condition map: - Left Outer Join0 to 1 - Right Outer Join1 to 2 - condition expressions: - 0 {VALUE._col0} {VALUE._col1} - 1 {VALUE._col0} {VALUE._col1} - 2 {VALUE._col0} {VALUE._col1} - filter predicates: - 0 {(VALUE._col0 < 10.0)} - 1 - 2 {(VALUE._col0 < 10.0)} - handleSkewJoin: false - outputColumnNames: _col0, _col1, _col4, _col5, _col8, _col9 - Select Operator - expressions: - expr: _col0 - type: string - expr: _col1 - type: string - expr: _col4 - type: string - expr: _col5 - 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.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - Stage: Stage-0 Fetch Operator limit: -1 Index: ql/src/test/results/clientpositive/auto_join8.q.out =================================================================== --- ql/src/test/results/clientpositive/auto_join8.q.out (revision 1458165) +++ ql/src/test/results/clientpositive/auto_join8.q.out (working copy) @@ -37,18 +37,13 @@ (TOK_QUERY (TOK_FROM (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_LEFTOUTERJOIN (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME src) src1)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL src1) key) c1) (TOK_SELEXPR (. (TOK_TABLE_OR_COL src1) value) c2)) (TOK_WHERE (and (> (. (TOK_TABLE_OR_COL src1) key) 10) (< (. (TOK_TABLE_OR_COL src1) key) 20))))) a) (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME src) src2)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL src2) key) c3) (TOK_SELEXPR (. (TOK_TABLE_OR_COL src2) value) c4)) (TOK_WHERE (and (> (. (TOK_TABLE_OR_COL src2) key) 15) (< (. (TOK_TABLE_OR_COL src2) key) 25))))) b) (= (. (TOK_TABLE_OR_COL a) c1) (. (TOK_TABLE_OR_COL b) c3)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL a) c1) c1) (TOK_SELEXPR (. (TOK_TABLE_OR_COL a) c2) c2) (TOK_SELEXPR (. (TOK_TABLE_OR_COL b) c3) c3) (TOK_SELEXPR (. (TOK_TABLE_OR_COL b) c4) c4)))) c)) (TOK_INSERT (TOK_DESTINATION (TOK_TAB (TOK_TABNAME dest1))) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL c) c1)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL c) c2)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL c) c3)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL c) c4))) (TOK_WHERE (AND (TOK_FUNCTION TOK_ISNULL (. (TOK_TABLE_OR_COL c) c3)) (TOK_FUNCTION TOK_ISNOTNULL (. (TOK_TABLE_OR_COL c) c1)))))) STAGE DEPENDENCIES: - Stage-5 is a root stage , consists of Stage-6, Stage-1 - Stage-6 has a backup stage: Stage-1 - Stage-4 depends on stages: Stage-6 - Stage-0 depends on stages: Stage-1, Stage-4 + Stage-5 is a root stage + Stage-4 depends on stages: Stage-5 + Stage-0 depends on stages: Stage-4 Stage-2 depends on stages: Stage-0 - Stage-1 STAGE PLANS: Stage: Stage-5 - Conditional Operator - - Stage: Stage-6 Map Reduce Local Work Alias -> Map Local Tables: c:b:src2 @@ -147,99 +142,7 @@ Stage: Stage-2 Stats-Aggr Operator - Stage: Stage-1 - Map Reduce - Alias -> Map Operator Tree: - c:a:src1 - TableScan - alias: src1 - Filter Operator - predicate: - expr: (((key > 10.0) and (key < 20.0)) and key is not null) - type: boolean - Select Operator - expressions: - expr: key - type: string - expr: value - type: string - outputColumnNames: _col0, _col1 - Reduce Output Operator - key expressions: - expr: _col0 - type: string - sort order: + - Map-reduce partition columns: - expr: _col0 - type: string - tag: 0 - value expressions: - expr: _col0 - type: string - expr: _col1 - type: string - c:b:src2 - TableScan - alias: src2 - Filter Operator - predicate: - expr: (((key > 15.0) and (key < 25.0)) and key is not null) - type: boolean - Select Operator - expressions: - expr: key - type: string - expr: value - type: string - outputColumnNames: _col0, _col1 - Reduce Output Operator - key expressions: - expr: _col0 - type: string - sort order: + - Map-reduce partition columns: - expr: _col0 - type: string - tag: 1 - value expressions: - expr: _col0 - type: string - expr: _col1 - type: string - Reduce Operator Tree: - Join Operator - condition map: - Left Outer Join0 to 1 - condition expressions: - 0 {VALUE._col0} {VALUE._col1} - 1 {VALUE._col0} {VALUE._col1} - handleSkewJoin: false - outputColumnNames: _col0, _col1, _col2, _col3 - Filter Operator - predicate: - expr: _col2 is null - type: boolean - Select Operator - expressions: - expr: UDFToInteger(_col0) - type: int - expr: _col1 - type: string - expr: UDFToInteger(_col2) - type: int - expr: _col3 - type: string - outputColumnNames: _col0, _col1, _col2, _col3 - File Output Operator - compressed: false - GlobalTableId: 1 - 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.dest1 - PREHOOK: query: FROM ( FROM ( Index: ql/src/test/results/clientpositive/auto_join3.q.out =================================================================== --- ql/src/test/results/clientpositive/auto_join3.q.out (revision 1458165) +++ ql/src/test/results/clientpositive/auto_join3.q.out (working copy) @@ -15,34 +15,25 @@ (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_JOIN (TOK_TABREF (TOK_TABNAME src) src1) (TOK_TABREF (TOK_TABNAME src) src2) (= (. (TOK_TABLE_OR_COL src1) key) (. (TOK_TABLE_OR_COL src2) key))) (TOK_TABREF (TOK_TABNAME src) src3) (= (. (TOK_TABLE_OR_COL src1) key) (. (TOK_TABLE_OR_COL src3) key)))) (TOK_INSERT (TOK_DESTINATION (TOK_TAB (TOK_TABNAME dest1))) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL src1) key)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL src3) value))))) STAGE DEPENDENCIES: - Stage-8 is a root stage , consists of Stage-9, Stage-10, Stage-11, Stage-1 - Stage-9 has a backup stage: Stage-1 - Stage-5 depends on stages: Stage-9 - Stage-0 depends on stages: Stage-1, Stage-5, Stage-6, Stage-7 + 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-10 has a backup stage: Stage-1 - Stage-6 depends on stages: Stage-10 - Stage-11 has a backup stage: Stage-1 - Stage-7 depends on stages: Stage-11 - Stage-1 STAGE PLANS: - Stage: Stage-8 - Conditional Operator - - Stage: Stage-9 + Stage: Stage-6 Map Reduce Local Work Alias -> Map Local Tables: - src2 + src1 Fetch Operator limit: -1 src3 Fetch Operator limit: -1 Alias -> Map Local Operator Tree: - src2 + src1 TableScan - alias: src2 + alias: src1 HashTable Sink Operator condition expressions: 0 {key} @@ -53,7 +44,7 @@ 0 [Column[key]] 1 [Column[key]] 2 [Column[key]] - Position of Big Table: 0 + Position of Big Table: 1 src3 TableScan alias: src3 @@ -67,14 +58,14 @@ 0 [Column[key]] 1 [Column[key]] 2 [Column[key]] - Position of Big Table: 0 + Position of Big Table: 1 Stage: Stage-5 Map Reduce Alias -> Map Operator Tree: - src1 + src2 TableScan - alias: src1 + alias: src2 Map Join Operator condition map: Inner Join 0 to 1 @@ -89,7 +80,7 @@ 1 [Column[key]] 2 [Column[key]] outputColumnNames: _col0, _col9 - Position of Big Table: 0 + Position of Big Table: 1 Select Operator expressions: expr: UDFToInteger(_col0) @@ -121,235 +112,7 @@ Stage: Stage-2 Stats-Aggr Operator - Stage: Stage-10 - Map Reduce Local Work - Alias -> Map Local Tables: - src1 - Fetch Operator - limit: -1 - src3 - Fetch Operator - limit: -1 - Alias -> Map Local Operator Tree: - src1 - TableScan - alias: src1 - HashTable Sink Operator - condition expressions: - 0 {key} - 1 - 2 {value} - handleSkewJoin: false - keys: - 0 [Column[key]] - 1 [Column[key]] - 2 [Column[key]] - Position of Big Table: 1 - src3 - TableScan - alias: src3 - HashTable Sink Operator - condition expressions: - 0 {key} - 1 - 2 {value} - handleSkewJoin: false - keys: - 0 [Column[key]] - 1 [Column[key]] - 2 [Column[key]] - Position of Big Table: 1 - Stage: Stage-6 - Map Reduce - Alias -> Map Operator Tree: - src2 - TableScan - alias: src2 - Map Join Operator - condition map: - Inner Join 0 to 1 - Inner Join 0 to 2 - condition expressions: - 0 {key} - 1 - 2 {value} - handleSkewJoin: false - keys: - 0 [Column[key]] - 1 [Column[key]] - 2 [Column[key]] - outputColumnNames: _col0, _col9 - Position of Big Table: 1 - Select Operator - expressions: - expr: UDFToInteger(_col0) - type: int - expr: _col9 - type: string - outputColumnNames: _col0, _col1 - File Output Operator - compressed: false - GlobalTableId: 1 - 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.dest1 - Local Work: - Map Reduce Local Work - - Stage: Stage-11 - Map Reduce Local Work - Alias -> Map Local Tables: - src1 - Fetch Operator - limit: -1 - src2 - Fetch Operator - limit: -1 - Alias -> Map Local Operator Tree: - src1 - TableScan - alias: src1 - HashTable Sink Operator - condition expressions: - 0 {key} - 1 - 2 {value} - handleSkewJoin: false - keys: - 0 [Column[key]] - 1 [Column[key]] - 2 [Column[key]] - Position of Big Table: 2 - src2 - TableScan - alias: src2 - HashTable Sink Operator - condition expressions: - 0 {key} - 1 - 2 {value} - handleSkewJoin: false - keys: - 0 [Column[key]] - 1 [Column[key]] - 2 [Column[key]] - Position of Big Table: 2 - - Stage: Stage-7 - Map Reduce - Alias -> Map Operator Tree: - src3 - TableScan - alias: src3 - Map Join Operator - condition map: - Inner Join 0 to 1 - Inner Join 0 to 2 - condition expressions: - 0 {key} - 1 - 2 {value} - handleSkewJoin: false - keys: - 0 [Column[key]] - 1 [Column[key]] - 2 [Column[key]] - outputColumnNames: _col0, _col9 - Position of Big Table: 2 - Select Operator - expressions: - expr: UDFToInteger(_col0) - type: int - expr: _col9 - type: string - outputColumnNames: _col0, _col1 - File Output Operator - compressed: false - GlobalTableId: 1 - 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.dest1 - Local Work: - Map Reduce Local Work - - Stage: Stage-1 - Map Reduce - Alias -> Map Operator Tree: - src1 - TableScan - alias: src1 - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 0 - value expressions: - expr: key - type: string - src2 - TableScan - alias: src2 - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 1 - src3 - TableScan - alias: src3 - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 2 - value expressions: - expr: value - type: string - Reduce Operator Tree: - Join Operator - condition map: - Inner Join 0 to 1 - Inner Join 0 to 2 - condition expressions: - 0 {VALUE._col0} - 1 - 2 {VALUE._col1} - handleSkewJoin: false - outputColumnNames: _col0, _col9 - Select Operator - expressions: - expr: UDFToInteger(_col0) - type: int - expr: _col9 - type: string - outputColumnNames: _col0, _col1 - File Output Operator - compressed: false - GlobalTableId: 1 - 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.dest1 - - PREHOOK: query: FROM src src1 JOIN src src2 ON (src1.key = src2.key) JOIN src src3 ON (src1.key = src3.key) INSERT OVERWRITE TABLE dest1 SELECT src1.key, src3.value PREHOOK: type: QUERY Index: ql/src/test/results/clientpositive/auto_join14_hadoop20.q.out =================================================================== --- ql/src/test/results/clientpositive/auto_join14_hadoop20.q.out (revision 1458165) +++ ql/src/test/results/clientpositive/auto_join14_hadoop20.q.out (working copy) @@ -19,29 +19,22 @@ (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_TABREF (TOK_TABNAME src)) (TOK_TABREF (TOK_TABNAME srcpart)) (and (AND (= (. (TOK_TABLE_OR_COL src) key) (. (TOK_TABLE_OR_COL srcpart) key)) (= (. (TOK_TABLE_OR_COL srcpart) ds) '2008-04-08')) (> (. (TOK_TABLE_OR_COL src) key) 100)))) (TOK_INSERT (TOK_DESTINATION (TOK_TAB (TOK_TABNAME dest1))) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL src) key)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL srcpart) value))))) STAGE DEPENDENCIES: - Stage-6 is a root stage , consists of Stage-7, Stage-8, Stage-1 - Stage-7 has a backup stage: Stage-1 - Stage-4 depends on stages: Stage-7 - Stage-0 depends on stages: Stage-1, Stage-4, Stage-5 + Stage-5 is a root stage + Stage-4 depends on stages: Stage-5 + Stage-0 depends on stages: Stage-4 Stage-2 depends on stages: Stage-0 - Stage-8 has a backup stage: Stage-1 - Stage-5 depends on stages: Stage-8 - Stage-1 STAGE PLANS: - Stage: Stage-6 - Conditional Operator - - Stage: Stage-7 + Stage: Stage-5 Map Reduce Local Work Alias -> Map Local Tables: - srcpart + src Fetch Operator limit: -1 Alias -> Map Local Operator Tree: - srcpart + src TableScan - alias: srcpart + alias: src Filter Operator predicate: expr: (key > 100.0) @@ -54,14 +47,14 @@ keys: 0 [Column[key]] 1 [Column[key]] - Position of Big Table: 0 + Position of Big Table: 1 Stage: Stage-4 Map Reduce Alias -> Map Operator Tree: - src + srcpart TableScan - alias: src + alias: srcpart Filter Operator predicate: expr: (key > 100.0) @@ -77,7 +70,7 @@ 0 [Column[key]] 1 [Column[key]] outputColumnNames: _col0, _col5 - Position of Big Table: 0 + Position of Big Table: 1 Select Operator expressions: expr: UDFToInteger(_col0) @@ -109,137 +102,7 @@ Stage: Stage-2 Stats-Aggr Operator - Stage: Stage-8 - Map Reduce Local Work - Alias -> Map Local Tables: - src - Fetch Operator - limit: -1 - Alias -> Map Local Operator Tree: - src - TableScan - alias: src - Filter Operator - predicate: - expr: (key > 100.0) - type: boolean - HashTable Sink Operator - condition expressions: - 0 {key} - 1 {value} - handleSkewJoin: false - keys: - 0 [Column[key]] - 1 [Column[key]] - Position of Big Table: 1 - Stage: Stage-5 - Map Reduce - Alias -> Map Operator Tree: - srcpart - TableScan - alias: srcpart - Filter Operator - predicate: - expr: (key > 100.0) - type: boolean - Map Join Operator - condition map: - Inner Join 0 to 1 - condition expressions: - 0 {key} - 1 {value} - handleSkewJoin: false - keys: - 0 [Column[key]] - 1 [Column[key]] - outputColumnNames: _col0, _col5 - Position of Big Table: 1 - Select Operator - expressions: - expr: UDFToInteger(_col0) - type: int - expr: _col5 - type: string - outputColumnNames: _col0, _col1 - File Output Operator - compressed: false - GlobalTableId: 1 - 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.dest1 - Local Work: - Map Reduce Local Work - - Stage: Stage-1 - Map Reduce - Alias -> Map Operator Tree: - src - TableScan - alias: src - Filter Operator - predicate: - expr: (key > 100.0) - type: boolean - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 0 - value expressions: - expr: key - type: string - srcpart - TableScan - alias: srcpart - Filter Operator - predicate: - expr: (key > 100.0) - type: boolean - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 1 - value expressions: - expr: value - type: string - Reduce Operator Tree: - Join Operator - condition map: - Inner Join 0 to 1 - condition expressions: - 0 {VALUE._col0} - 1 {VALUE._col1} - handleSkewJoin: false - outputColumnNames: _col0, _col5 - Select Operator - expressions: - expr: UDFToInteger(_col0) - type: int - expr: _col5 - type: string - outputColumnNames: _col0, _col1 - File Output Operator - compressed: false - GlobalTableId: 1 - 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.dest1 - - PREHOOK: query: FROM src JOIN srcpart ON src.key = srcpart.key AND srcpart.ds = '2008-04-08' and src.key > 100 INSERT OVERWRITE TABLE dest1 SELECT src.key, srcpart.value PREHOOK: type: QUERY Index: ql/src/test/results/clientpositive/auto_join19.q.out =================================================================== --- ql/src/test/results/clientpositive/auto_join19.q.out (revision 1458165) +++ ql/src/test/results/clientpositive/auto_join19.q.out (working copy) @@ -17,20 +17,13 @@ (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_TABREF (TOK_TABNAME srcpart) src1) (TOK_TABREF (TOK_TABNAME src) src2) (= (. (TOK_TABLE_OR_COL src1) key) (. (TOK_TABLE_OR_COL src2) key)))) (TOK_INSERT (TOK_DESTINATION (TOK_TAB (TOK_TABNAME dest1))) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL src1) key)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL src2) value))) (TOK_WHERE (and (or (= (. (TOK_TABLE_OR_COL src1) ds) '2008-04-08') (= (. (TOK_TABLE_OR_COL src1) ds) '2008-04-09')) (or (= (. (TOK_TABLE_OR_COL src1) hr) '12') (= (. (TOK_TABLE_OR_COL src1) hr) '11')))))) STAGE DEPENDENCIES: - Stage-6 is a root stage , consists of Stage-7, Stage-8, Stage-1 - Stage-7 has a backup stage: Stage-1 - Stage-4 depends on stages: Stage-7 - Stage-0 depends on stages: Stage-1, Stage-4, Stage-5 + Stage-5 is a root stage + Stage-4 depends on stages: Stage-5 + Stage-0 depends on stages: Stage-4 Stage-2 depends on stages: Stage-0 - Stage-8 has a backup stage: Stage-1 - Stage-5 depends on stages: Stage-8 - Stage-1 STAGE PLANS: - Stage: Stage-6 - Conditional Operator - - Stage: Stage-7 + Stage: Stage-5 Map Reduce Local Work Alias -> Map Local Tables: src2 @@ -99,120 +92,7 @@ Stage: Stage-2 Stats-Aggr Operator - Stage: Stage-8 - Map Reduce Local Work - Alias -> Map Local Tables: - src1 - Fetch Operator - limit: -1 - Alias -> Map Local Operator Tree: - src1 - TableScan - alias: src1 - HashTable Sink Operator - condition expressions: - 0 {key} - 1 {value} - handleSkewJoin: false - keys: - 0 [Column[key]] - 1 [Column[key]] - Position of Big Table: 1 - Stage: Stage-5 - Map Reduce - Alias -> Map Operator Tree: - src2 - TableScan - alias: src2 - Map Join Operator - condition map: - Inner Join 0 to 1 - condition expressions: - 0 {key} - 1 {value} - handleSkewJoin: false - keys: - 0 [Column[key]] - 1 [Column[key]] - outputColumnNames: _col0, _col7 - Position of Big Table: 1 - Select Operator - expressions: - expr: UDFToInteger(_col0) - type: int - expr: _col7 - type: string - outputColumnNames: _col0, _col1 - File Output Operator - compressed: false - GlobalTableId: 1 - 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.dest1 - Local Work: - Map Reduce Local Work - - Stage: Stage-1 - Map Reduce - Alias -> Map Operator Tree: - src1 - TableScan - alias: src1 - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 0 - value expressions: - expr: key - type: string - src2 - TableScan - alias: src2 - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 1 - value expressions: - expr: value - type: string - Reduce Operator Tree: - Join Operator - condition map: - Inner Join 0 to 1 - condition expressions: - 0 {VALUE._col0} - 1 {VALUE._col1} - handleSkewJoin: false - outputColumnNames: _col0, _col7 - Select Operator - expressions: - expr: UDFToInteger(_col0) - type: int - expr: _col7 - type: string - outputColumnNames: _col0, _col1 - File Output Operator - compressed: false - GlobalTableId: 1 - 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.dest1 - PREHOOK: query: FROM srcpart src1 JOIN src src2 ON (src1.key = src2.key) INSERT OVERWRITE TABLE dest1 SELECT src1.key, src2.value where (src1.ds = '2008-04-08' or src1.ds = '2008-04-09' )and (src1.hr = '12' or src1.hr = '11') Index: ql/src/test/results/clientpositive/auto_sortmerge_join_10.q.out =================================================================== --- ql/src/test/results/clientpositive/auto_sortmerge_join_10.q.out (revision 1458165) +++ ql/src/test/results/clientpositive/auto_sortmerge_join_10.q.out (working copy) @@ -68,20 +68,13 @@ (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_SUBQUERY (TOK_UNION (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME tbl1) a)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL a) key) key) (TOK_SELEXPR (. (TOK_TABLE_OR_COL a) value) value)) (TOK_WHERE (< (TOK_TABLE_OR_COL key) 6)))) (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME tbl1) a)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL a) key) key) (TOK_SELEXPR (. (TOK_TABLE_OR_COL a) value) value)) (TOK_WHERE (< (TOK_TABLE_OR_COL key) 6))))) usubq1)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR TOK_ALLCOLREF)))) subq1) (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME tbl2) a)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL a) key) key) (TOK_SELEXPR (. (TOK_TABLE_OR_COL a) value) value)) (TOK_WHERE (< (TOK_TABLE_OR_COL key) 6)))) subq2) (= (. (TOK_TABLE_OR_COL subq1) key) (. (TOK_TABLE_OR_COL subq2) key)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTIONSTAR count))))) STAGE DEPENDENCIES: - Stage-7 is a root stage , consists of Stage-8, Stage-9, Stage-1 - Stage-8 has a backup stage: Stage-1 - Stage-5 depends on stages: Stage-8 - Stage-2 depends on stages: Stage-1, Stage-5, Stage-6 - Stage-9 has a backup stage: Stage-1 - Stage-6 depends on stages: Stage-9 - Stage-1 + Stage-6 is a root stage + Stage-5 depends on stages: Stage-6 + Stage-2 depends on stages: Stage-5 Stage-0 is a root stage STAGE PLANS: - Stage: Stage-7 - Conditional Operator - - Stage: Stage-8 + Stage: Stage-6 Map Reduce Local Work Alias -> Map Local Tables: subq2:a @@ -233,221 +226,6 @@ input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat - Stage: Stage-9 - Map Reduce Local Work - Alias -> Map Local Tables: - subq1-subquery1:usubq1-subquery1:a - Fetch Operator - limit: -1 - subq1-subquery2:usubq1-subquery2:a - Fetch Operator - limit: -1 - Alias -> Map Local Operator Tree: - subq1-subquery1:usubq1-subquery1:a - TableScan - alias: a - Filter Operator - predicate: - expr: (key < 6) - type: boolean - Select Operator - expressions: - expr: key - type: int - expr: value - type: string - outputColumnNames: _col0, _col1 - Union - Select Operator - expressions: - expr: _col0 - type: int - outputColumnNames: _col0 - HashTable Sink Operator - condition expressions: - 0 - 1 - handleSkewJoin: false - keys: - 0 [Column[_col0]] - 1 [Column[_col0]] - Position of Big Table: 1 - subq1-subquery2:usubq1-subquery2:a - TableScan - alias: a - Filter Operator - predicate: - expr: (key < 6) - type: boolean - Select Operator - expressions: - expr: key - type: int - expr: value - type: string - outputColumnNames: _col0, _col1 - Union - Select Operator - expressions: - expr: _col0 - type: int - outputColumnNames: _col0 - HashTable Sink Operator - condition expressions: - 0 - 1 - handleSkewJoin: false - keys: - 0 [Column[_col0]] - 1 [Column[_col0]] - Position of Big Table: 1 - - Stage: Stage-6 - Map Reduce - Alias -> Map Operator Tree: - subq2:a - TableScan - alias: a - Filter Operator - predicate: - expr: (key < 6) - type: boolean - Select Operator - expressions: - expr: key - type: int - outputColumnNames: _col0 - Map Join Operator - condition map: - Inner Join 0 to 1 - condition expressions: - 0 - 1 - handleSkewJoin: false - keys: - 0 [Column[_col0]] - 1 [Column[_col0]] - Position of Big Table: 1 - Select Operator - Group By Operator - aggregations: - expr: count() - bucketGroup: false - mode: hash - outputColumnNames: _col0 - File Output Operator - compressed: false - GlobalTableId: 0 - table: - input format: org.apache.hadoop.mapred.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - Local Work: - Map Reduce Local Work - - Stage: Stage-1 - Map Reduce - Alias -> Map Operator Tree: - subq1-subquery1:usubq1-subquery1:a - TableScan - alias: a - Filter Operator - predicate: - expr: (key < 6) - type: boolean - Select Operator - expressions: - expr: key - type: int - expr: value - type: string - outputColumnNames: _col0, _col1 - Union - Select Operator - expressions: - expr: _col0 - type: int - outputColumnNames: _col0 - Reduce Output Operator - key expressions: - expr: _col0 - type: int - sort order: + - Map-reduce partition columns: - expr: _col0 - type: int - tag: 0 - subq1-subquery2:usubq1-subquery2:a - TableScan - alias: a - Filter Operator - predicate: - expr: (key < 6) - type: boolean - Select Operator - expressions: - expr: key - type: int - expr: value - type: string - outputColumnNames: _col0, _col1 - Union - Select Operator - expressions: - expr: _col0 - type: int - outputColumnNames: _col0 - Reduce Output Operator - key expressions: - expr: _col0 - type: int - sort order: + - Map-reduce partition columns: - expr: _col0 - type: int - tag: 0 - subq2:a - TableScan - alias: a - Filter Operator - predicate: - expr: (key < 6) - type: boolean - Select Operator - expressions: - expr: key - type: int - outputColumnNames: _col0 - Reduce Output Operator - key expressions: - expr: _col0 - type: int - sort order: + - Map-reduce partition columns: - expr: _col0 - type: int - tag: 1 - Reduce Operator Tree: - Join Operator - condition map: - Inner Join 0 to 1 - condition expressions: - 0 - 1 - handleSkewJoin: false - Select Operator - Group By Operator - aggregations: - expr: count() - bucketGroup: false - mode: hash - outputColumnNames: _col0 - File Output Operator - compressed: false - GlobalTableId: 0 - table: - input format: org.apache.hadoop.mapred.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - Stage: Stage-0 Fetch Operator limit: -1 @@ -511,13 +289,9 @@ STAGE DEPENDENCIES: Stage-1 is a root stage - Stage-7 depends on stages: Stage-1 , consists of Stage-8, Stage-9, Stage-2 - Stage-8 has a backup stage: Stage-2 - Stage-5 depends on stages: Stage-8 - Stage-3 depends on stages: Stage-2, Stage-5, Stage-6 - Stage-9 has a backup stage: Stage-2 - Stage-6 depends on stages: Stage-9 - Stage-2 + Stage-6 depends on stages: Stage-1 + Stage-5 depends on stages: Stage-6 + Stage-3 depends on stages: Stage-5 Stage-0 is a root stage STAGE PLANS: @@ -579,10 +353,7 @@ input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - Stage: Stage-7 - Conditional Operator - - Stage: Stage-8 + Stage: Stage-6 Map Reduce Local Work Alias -> Map Local Tables: subq2:a @@ -671,122 +442,6 @@ input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat - Stage: Stage-9 - Map Reduce Local Work - Alias -> Map Local Tables: - $INTNAME - Fetch Operator - limit: -1 - Alias -> Map Local Operator Tree: - $INTNAME - HashTable Sink Operator - condition expressions: - 0 - 1 - handleSkewJoin: false - keys: - 0 [Column[_col0]] - 1 [Column[_col0]] - Position of Big Table: 1 - - Stage: Stage-6 - Map Reduce - Alias -> Map Operator Tree: - subq2:a - TableScan - alias: a - Filter Operator - predicate: - expr: (key < 6) - type: boolean - Select Operator - expressions: - expr: key - type: int - outputColumnNames: _col0 - Map Join Operator - condition map: - Inner Join 0 to 1 - condition expressions: - 0 - 1 - handleSkewJoin: false - keys: - 0 [Column[_col0]] - 1 [Column[_col0]] - Position of Big Table: 1 - Select Operator - Group By Operator - aggregations: - expr: count() - bucketGroup: false - mode: hash - outputColumnNames: _col0 - File Output Operator - compressed: false - GlobalTableId: 0 - table: - input format: org.apache.hadoop.mapred.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - Local Work: - Map Reduce Local Work - - Stage: Stage-2 - Map Reduce - Alias -> Map Operator Tree: - $INTNAME - Reduce Output Operator - key expressions: - expr: _col0 - type: int - sort order: + - Map-reduce partition columns: - expr: _col0 - type: int - tag: 0 - subq2:a - TableScan - alias: a - Filter Operator - predicate: - expr: (key < 6) - type: boolean - Select Operator - expressions: - expr: key - type: int - outputColumnNames: _col0 - Reduce Output Operator - key expressions: - expr: _col0 - type: int - sort order: + - Map-reduce partition columns: - expr: _col0 - type: int - tag: 1 - Reduce Operator Tree: - Join Operator - condition map: - Inner Join 0 to 1 - condition expressions: - 0 - 1 - handleSkewJoin: false - Select Operator - Group By Operator - aggregations: - expr: count() - bucketGroup: false - mode: hash - outputColumnNames: _col0 - File Output Operator - compressed: false - GlobalTableId: 0 - table: - input format: org.apache.hadoop.mapred.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - Stage: Stage-0 Fetch Operator limit: -1 Index: ql/src/test/results/clientpositive/join_reorder4.q.out =================================================================== --- ql/src/test/results/clientpositive/join_reorder4.q.out (revision 1458165) +++ ql/src/test/results/clientpositive/join_reorder4.q.out (working copy) @@ -39,108 +39,15 @@ (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_JOIN (TOK_TABREF (TOK_TABNAME T1) a) (TOK_TABREF (TOK_TABNAME T2) b) (= (. (TOK_TABLE_OR_COL a) key1) (. (TOK_TABLE_OR_COL b) key2))) (TOK_TABREF (TOK_TABNAME T3) c) (= (. (TOK_TABLE_OR_COL a) key1) (. (TOK_TABLE_OR_COL c) key3)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_HINTLIST (TOK_HINT TOK_STREAMTABLE (TOK_HINTARGLIST a))) (TOK_SELEXPR (TOK_ALLCOLREF (TOK_TABNAME a))) (TOK_SELEXPR (TOK_ALLCOLREF (TOK_TABNAME b))) (TOK_SELEXPR (TOK_ALLCOLREF (TOK_TABNAME c)))))) STAGE DEPENDENCIES: - Stage-7 is a root stage , consists of Stage-8, Stage-9, Stage-10, Stage-1 - Stage-8 has a backup stage: Stage-1 - Stage-4 depends on stages: Stage-8 - Stage-9 has a backup stage: Stage-1 - Stage-5 depends on stages: Stage-9 - Stage-10 has a backup stage: Stage-1 - Stage-6 depends on stages: Stage-10 - Stage-1 + Stage-5 is a root stage + Stage-4 depends on stages: Stage-5 Stage-0 is a root stage STAGE PLANS: - Stage: Stage-7 - Conditional Operator - - Stage: Stage-8 + Stage: Stage-5 Map Reduce Local Work Alias -> Map Local Tables: - b - Fetch Operator - limit: -1 - c - Fetch Operator - limit: -1 - Alias -> Map Local Operator Tree: - b - TableScan - alias: b - HashTable Sink Operator - condition expressions: - 0 {key1} {val1} - 1 {key2} {val2} - 2 {key3} {val3} - handleSkewJoin: false - keys: - 0 [Column[key1]] - 1 [Column[key2]] - 2 [Column[key3]] - Position of Big Table: 0 - c - TableScan - alias: c - HashTable Sink Operator - condition expressions: - 0 {key1} {val1} - 1 {key2} {val2} - 2 {key3} {val3} - handleSkewJoin: false - keys: - 0 [Column[key1]] - 1 [Column[key2]] - 2 [Column[key3]] - Position of Big Table: 0 - - Stage: Stage-4 - Map Reduce - Alias -> Map Operator Tree: a - TableScan - alias: a - Map Join Operator - condition map: - Inner Join 0 to 1 - Inner Join 0 to 2 - condition expressions: - 0 {key1} {val1} - 1 {key2} {val2} - 2 {key3} {val3} - handleSkewJoin: false - keys: - 0 [Column[key1]] - 1 [Column[key2]] - 2 [Column[key3]] - outputColumnNames: _col0, _col1, _col4, _col5, _col8, _col9 - Position of Big Table: 0 - Select Operator - expressions: - expr: _col0 - type: string - expr: _col1 - type: string - expr: _col4 - type: string - expr: _col5 - 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-9 - Map Reduce Local Work - Alias -> Map Local Tables: - a Fetch Operator limit: -1 c @@ -176,7 +83,7 @@ 2 [Column[key3]] Position of Big Table: 1 - Stage: Stage-5 + Stage: Stage-4 Map Reduce Alias -> Map Operator Tree: b @@ -221,177 +128,6 @@ Local Work: Map Reduce Local Work - Stage: Stage-10 - Map Reduce Local Work - Alias -> Map Local Tables: - a - Fetch Operator - limit: -1 - b - Fetch Operator - limit: -1 - Alias -> Map Local Operator Tree: - a - TableScan - alias: a - HashTable Sink Operator - condition expressions: - 0 {key1} {val1} - 1 {key2} {val2} - 2 {key3} {val3} - handleSkewJoin: false - keys: - 0 [Column[key1]] - 1 [Column[key2]] - 2 [Column[key3]] - Position of Big Table: 2 - b - TableScan - alias: b - HashTable Sink Operator - condition expressions: - 0 {key1} {val1} - 1 {key2} {val2} - 2 {key3} {val3} - handleSkewJoin: false - keys: - 0 [Column[key1]] - 1 [Column[key2]] - 2 [Column[key3]] - Position of Big Table: 2 - - Stage: Stage-6 - Map Reduce - Alias -> Map Operator Tree: - c - TableScan - alias: c - Map Join Operator - condition map: - Inner Join 0 to 1 - Inner Join 0 to 2 - condition expressions: - 0 {key1} {val1} - 1 {key2} {val2} - 2 {key3} {val3} - handleSkewJoin: false - keys: - 0 [Column[key1]] - 1 [Column[key2]] - 2 [Column[key3]] - outputColumnNames: _col0, _col1, _col4, _col5, _col8, _col9 - Position of Big Table: 2 - Select Operator - expressions: - expr: _col0 - type: string - expr: _col1 - type: string - expr: _col4 - type: string - expr: _col5 - 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-1 - Map Reduce - Alias -> Map Operator Tree: - a - TableScan - alias: a - Reduce Output Operator - key expressions: - expr: key1 - type: string - sort order: + - Map-reduce partition columns: - expr: key1 - type: string - tag: 2 - value expressions: - expr: key1 - type: string - expr: val1 - type: string - b - TableScan - alias: b - Reduce Output Operator - key expressions: - expr: key2 - type: string - sort order: + - Map-reduce partition columns: - expr: key2 - type: string - tag: 1 - value expressions: - expr: key2 - type: string - expr: val2 - type: string - c - TableScan - alias: c - Reduce Output Operator - key expressions: - expr: key3 - type: string - sort order: + - Map-reduce partition columns: - expr: key3 - type: string - tag: 0 - value expressions: - expr: key3 - type: string - expr: val3 - type: string - Reduce Operator Tree: - Join Operator - condition map: - Inner Join 0 to 1 - Inner Join 0 to 2 - condition expressions: - 0 {VALUE._col0} {VALUE._col1} - 1 {VALUE._col0} {VALUE._col1} - 2 {VALUE._col0} {VALUE._col1} - handleSkewJoin: false - outputColumnNames: _col0, _col1, _col4, _col5, _col8, _col9 - Select Operator - expressions: - expr: _col0 - type: string - expr: _col1 - type: string - expr: _col4 - type: string - expr: _col5 - 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 - Stage: Stage-0 Fetch Operator limit: -1 @@ -418,108 +154,15 @@ (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_JOIN (TOK_TABREF (TOK_TABNAME T1) a) (TOK_TABREF (TOK_TABNAME T2) b) (= (. (TOK_TABLE_OR_COL a) key1) (. (TOK_TABLE_OR_COL b) key2))) (TOK_TABREF (TOK_TABNAME T3) c) (= (. (TOK_TABLE_OR_COL a) key1) (. (TOK_TABLE_OR_COL c) key3)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_HINTLIST (TOK_HINT TOK_STREAMTABLE (TOK_HINTARGLIST b))) (TOK_SELEXPR (TOK_ALLCOLREF (TOK_TABNAME a))) (TOK_SELEXPR (TOK_ALLCOLREF (TOK_TABNAME b))) (TOK_SELEXPR (TOK_ALLCOLREF (TOK_TABNAME c)))))) STAGE DEPENDENCIES: - Stage-7 is a root stage , consists of Stage-8, Stage-9, Stage-10, Stage-1 - Stage-8 has a backup stage: Stage-1 - Stage-4 depends on stages: Stage-8 - Stage-9 has a backup stage: Stage-1 - Stage-5 depends on stages: Stage-9 - Stage-10 has a backup stage: Stage-1 - Stage-6 depends on stages: Stage-10 - Stage-1 + Stage-5 is a root stage + Stage-4 depends on stages: Stage-5 Stage-0 is a root stage STAGE PLANS: - Stage: Stage-7 - Conditional Operator - - Stage: Stage-8 + Stage: Stage-5 Map Reduce Local Work Alias -> Map Local Tables: - b - Fetch Operator - limit: -1 - c - Fetch Operator - limit: -1 - Alias -> Map Local Operator Tree: - b - TableScan - alias: b - HashTable Sink Operator - condition expressions: - 0 {key1} {val1} - 1 {key2} {val2} - 2 {key3} {val3} - handleSkewJoin: false - keys: - 0 [Column[key1]] - 1 [Column[key2]] - 2 [Column[key3]] - Position of Big Table: 0 - c - TableScan - alias: c - HashTable Sink Operator - condition expressions: - 0 {key1} {val1} - 1 {key2} {val2} - 2 {key3} {val3} - handleSkewJoin: false - keys: - 0 [Column[key1]] - 1 [Column[key2]] - 2 [Column[key3]] - Position of Big Table: 0 - - Stage: Stage-4 - Map Reduce - Alias -> Map Operator Tree: a - TableScan - alias: a - Map Join Operator - condition map: - Inner Join 0 to 1 - Inner Join 0 to 2 - condition expressions: - 0 {key1} {val1} - 1 {key2} {val2} - 2 {key3} {val3} - handleSkewJoin: false - keys: - 0 [Column[key1]] - 1 [Column[key2]] - 2 [Column[key3]] - outputColumnNames: _col0, _col1, _col4, _col5, _col8, _col9 - Position of Big Table: 0 - Select Operator - expressions: - expr: _col0 - type: string - expr: _col1 - type: string - expr: _col4 - type: string - expr: _col5 - 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-9 - Map Reduce Local Work - Alias -> Map Local Tables: - a Fetch Operator limit: -1 c @@ -555,7 +198,7 @@ 2 [Column[key3]] Position of Big Table: 1 - Stage: Stage-5 + Stage: Stage-4 Map Reduce Alias -> Map Operator Tree: b @@ -600,177 +243,6 @@ Local Work: Map Reduce Local Work - Stage: Stage-10 - Map Reduce Local Work - Alias -> Map Local Tables: - a - Fetch Operator - limit: -1 - b - Fetch Operator - limit: -1 - Alias -> Map Local Operator Tree: - a - TableScan - alias: a - HashTable Sink Operator - condition expressions: - 0 {key1} {val1} - 1 {key2} {val2} - 2 {key3} {val3} - handleSkewJoin: false - keys: - 0 [Column[key1]] - 1 [Column[key2]] - 2 [Column[key3]] - Position of Big Table: 2 - b - TableScan - alias: b - HashTable Sink Operator - condition expressions: - 0 {key1} {val1} - 1 {key2} {val2} - 2 {key3} {val3} - handleSkewJoin: false - keys: - 0 [Column[key1]] - 1 [Column[key2]] - 2 [Column[key3]] - Position of Big Table: 2 - - Stage: Stage-6 - Map Reduce - Alias -> Map Operator Tree: - c - TableScan - alias: c - Map Join Operator - condition map: - Inner Join 0 to 1 - Inner Join 0 to 2 - condition expressions: - 0 {key1} {val1} - 1 {key2} {val2} - 2 {key3} {val3} - handleSkewJoin: false - keys: - 0 [Column[key1]] - 1 [Column[key2]] - 2 [Column[key3]] - outputColumnNames: _col0, _col1, _col4, _col5, _col8, _col9 - Position of Big Table: 2 - Select Operator - expressions: - expr: _col0 - type: string - expr: _col1 - type: string - expr: _col4 - type: string - expr: _col5 - 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-1 - Map Reduce - Alias -> Map Operator Tree: - a - TableScan - alias: a - Reduce Output Operator - key expressions: - expr: key1 - type: string - sort order: + - Map-reduce partition columns: - expr: key1 - type: string - tag: 0 - value expressions: - expr: key1 - type: string - expr: val1 - type: string - b - TableScan - alias: b - Reduce Output Operator - key expressions: - expr: key2 - type: string - sort order: + - Map-reduce partition columns: - expr: key2 - type: string - tag: 2 - value expressions: - expr: key2 - type: string - expr: val2 - type: string - c - TableScan - alias: c - Reduce Output Operator - key expressions: - expr: key3 - type: string - sort order: + - Map-reduce partition columns: - expr: key3 - type: string - tag: 1 - value expressions: - expr: key3 - type: string - expr: val3 - type: string - Reduce Operator Tree: - Join Operator - condition map: - Inner Join 0 to 1 - Inner Join 0 to 2 - condition expressions: - 0 {VALUE._col0} {VALUE._col1} - 1 {VALUE._col0} {VALUE._col1} - 2 {VALUE._col0} {VALUE._col1} - handleSkewJoin: false - outputColumnNames: _col0, _col1, _col4, _col5, _col8, _col9 - Select Operator - expressions: - expr: _col0 - type: string - expr: _col1 - type: string - expr: _col4 - type: string - expr: _col5 - 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 - Stage: Stage-0 Fetch Operator limit: -1 @@ -797,108 +269,15 @@ (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_JOIN (TOK_TABREF (TOK_TABNAME T1) a) (TOK_TABREF (TOK_TABNAME T2) b) (= (. (TOK_TABLE_OR_COL a) key1) (. (TOK_TABLE_OR_COL b) key2))) (TOK_TABREF (TOK_TABNAME T3) c) (= (. (TOK_TABLE_OR_COL a) key1) (. (TOK_TABLE_OR_COL c) key3)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_HINTLIST (TOK_HINT TOK_STREAMTABLE (TOK_HINTARGLIST c))) (TOK_SELEXPR (TOK_ALLCOLREF (TOK_TABNAME a))) (TOK_SELEXPR (TOK_ALLCOLREF (TOK_TABNAME b))) (TOK_SELEXPR (TOK_ALLCOLREF (TOK_TABNAME c)))))) STAGE DEPENDENCIES: - Stage-7 is a root stage , consists of Stage-8, Stage-9, Stage-10, Stage-1 - Stage-8 has a backup stage: Stage-1 - Stage-4 depends on stages: Stage-8 - Stage-9 has a backup stage: Stage-1 - Stage-5 depends on stages: Stage-9 - Stage-10 has a backup stage: Stage-1 - Stage-6 depends on stages: Stage-10 - Stage-1 + Stage-5 is a root stage + Stage-4 depends on stages: Stage-5 Stage-0 is a root stage STAGE PLANS: - Stage: Stage-7 - Conditional Operator - - Stage: Stage-8 + Stage: Stage-5 Map Reduce Local Work Alias -> Map Local Tables: - b - Fetch Operator - limit: -1 - c - Fetch Operator - limit: -1 - Alias -> Map Local Operator Tree: - b - TableScan - alias: b - HashTable Sink Operator - condition expressions: - 0 {key1} {val1} - 1 {key2} {val2} - 2 {key3} {val3} - handleSkewJoin: false - keys: - 0 [Column[key1]] - 1 [Column[key2]] - 2 [Column[key3]] - Position of Big Table: 0 - c - TableScan - alias: c - HashTable Sink Operator - condition expressions: - 0 {key1} {val1} - 1 {key2} {val2} - 2 {key3} {val3} - handleSkewJoin: false - keys: - 0 [Column[key1]] - 1 [Column[key2]] - 2 [Column[key3]] - Position of Big Table: 0 - - Stage: Stage-4 - Map Reduce - Alias -> Map Operator Tree: a - TableScan - alias: a - Map Join Operator - condition map: - Inner Join 0 to 1 - Inner Join 0 to 2 - condition expressions: - 0 {key1} {val1} - 1 {key2} {val2} - 2 {key3} {val3} - handleSkewJoin: false - keys: - 0 [Column[key1]] - 1 [Column[key2]] - 2 [Column[key3]] - outputColumnNames: _col0, _col1, _col4, _col5, _col8, _col9 - Position of Big Table: 0 - Select Operator - expressions: - expr: _col0 - type: string - expr: _col1 - type: string - expr: _col4 - type: string - expr: _col5 - 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-9 - Map Reduce Local Work - Alias -> Map Local Tables: - a Fetch Operator limit: -1 c @@ -934,7 +313,7 @@ 2 [Column[key3]] Position of Big Table: 1 - Stage: Stage-5 + Stage: Stage-4 Map Reduce Alias -> Map Operator Tree: b @@ -979,177 +358,6 @@ Local Work: Map Reduce Local Work - Stage: Stage-10 - Map Reduce Local Work - Alias -> Map Local Tables: - a - Fetch Operator - limit: -1 - b - Fetch Operator - limit: -1 - Alias -> Map Local Operator Tree: - a - TableScan - alias: a - HashTable Sink Operator - condition expressions: - 0 {key1} {val1} - 1 {key2} {val2} - 2 {key3} {val3} - handleSkewJoin: false - keys: - 0 [Column[key1]] - 1 [Column[key2]] - 2 [Column[key3]] - Position of Big Table: 2 - b - TableScan - alias: b - HashTable Sink Operator - condition expressions: - 0 {key1} {val1} - 1 {key2} {val2} - 2 {key3} {val3} - handleSkewJoin: false - keys: - 0 [Column[key1]] - 1 [Column[key2]] - 2 [Column[key3]] - Position of Big Table: 2 - - Stage: Stage-6 - Map Reduce - Alias -> Map Operator Tree: - c - TableScan - alias: c - Map Join Operator - condition map: - Inner Join 0 to 1 - Inner Join 0 to 2 - condition expressions: - 0 {key1} {val1} - 1 {key2} {val2} - 2 {key3} {val3} - handleSkewJoin: false - keys: - 0 [Column[key1]] - 1 [Column[key2]] - 2 [Column[key3]] - outputColumnNames: _col0, _col1, _col4, _col5, _col8, _col9 - Position of Big Table: 2 - Select Operator - expressions: - expr: _col0 - type: string - expr: _col1 - type: string - expr: _col4 - type: string - expr: _col5 - 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-1 - Map Reduce - Alias -> Map Operator Tree: - a - TableScan - alias: a - Reduce Output Operator - key expressions: - expr: key1 - type: string - sort order: + - Map-reduce partition columns: - expr: key1 - type: string - tag: 0 - value expressions: - expr: key1 - type: string - expr: val1 - type: string - b - TableScan - alias: b - Reduce Output Operator - key expressions: - expr: key2 - type: string - sort order: + - Map-reduce partition columns: - expr: key2 - type: string - tag: 1 - value expressions: - expr: key2 - type: string - expr: val2 - type: string - c - TableScan - alias: c - Reduce Output Operator - key expressions: - expr: key3 - type: string - sort order: + - Map-reduce partition columns: - expr: key3 - type: string - tag: 2 - value expressions: - expr: key3 - type: string - expr: val3 - type: string - Reduce Operator Tree: - Join Operator - condition map: - Inner Join 0 to 1 - Inner Join 0 to 2 - condition expressions: - 0 {VALUE._col0} {VALUE._col1} - 1 {VALUE._col0} {VALUE._col1} - 2 {VALUE._col0} {VALUE._col1} - handleSkewJoin: false - outputColumnNames: _col0, _col1, _col4, _col5, _col8, _col9 - Select Operator - expressions: - expr: _col0 - type: string - expr: _col1 - type: string - expr: _col4 - type: string - expr: _col5 - 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 - Stage: Stage-0 Fetch Operator limit: -1 Index: ql/src/test/results/clientpositive/auto_join25.q.out =================================================================== --- ql/src/test/results/clientpositive/auto_join25.q.out (revision 1458165) +++ ql/src/test/results/clientpositive/auto_join25.q.out (working copy) @@ -1,6 +1,8 @@ -PREHOOK: query: CREATE TABLE dest1(key INT, value STRING) STORED AS TEXTFILE +PREHOOK: query: -- This test tests the scenario when the mapper dies. So, create a conditional task for the mapjoin +CREATE TABLE dest1(key INT, value STRING) STORED AS TEXTFILE PREHOOK: type: CREATETABLE -POSTHOOK: query: CREATE TABLE dest1(key INT, value STRING) STORED AS TEXTFILE +POSTHOOK: query: -- This test tests the scenario when the mapper dies. So, create a conditional task for the mapjoin +CREATE TABLE dest1(key INT, value STRING) STORED AS TEXTFILE POSTHOOK: type: CREATETABLE POSTHOOK: Output: default@dest1 PREHOOK: query: FROM srcpart src1 JOIN src src2 ON (src1.key = src2.key) Index: ql/src/test/results/clientpositive/auto_join20.q.out =================================================================== --- ql/src/test/results/clientpositive/auto_join20.q.out (revision 1458165) +++ ql/src/test/results/clientpositive/auto_join20.q.out (working copy) @@ -18,19 +18,14 @@ (TOK_QUERY (TOK_FROM (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_RIGHTOUTERJOIN (TOK_JOIN (TOK_TABREF (TOK_TABNAME src) src1) (TOK_TABREF (TOK_TABNAME src) src2) (AND (= (. (TOK_TABLE_OR_COL src1) key) (. (TOK_TABLE_OR_COL src2) key)) (< (. (TOK_TABLE_OR_COL src1) key) 10))) (TOK_TABREF (TOK_TABNAME src) src3) (AND (= (. (TOK_TABLE_OR_COL src1) key) (. (TOK_TABLE_OR_COL src3) key)) (< (. (TOK_TABLE_OR_COL src3) key) 20)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL src1) key) k1) (TOK_SELEXPR (. (TOK_TABLE_OR_COL src1) value) v1) (TOK_SELEXPR (. (TOK_TABLE_OR_COL src2) key) k2) (TOK_SELEXPR (. (TOK_TABLE_OR_COL src2) value) v2) (TOK_SELEXPR (. (TOK_TABLE_OR_COL src3) key) k3) (TOK_SELEXPR (. (TOK_TABLE_OR_COL src3) value) v3)) (TOK_SORTBY (TOK_TABSORTCOLNAMEASC (TOK_TABLE_OR_COL k1)) (TOK_TABSORTCOLNAMEASC (TOK_TABLE_OR_COL v1)) (TOK_TABSORTCOLNAMEASC (TOK_TABLE_OR_COL k2)) (TOK_TABSORTCOLNAMEASC (TOK_TABLE_OR_COL v2)) (TOK_TABSORTCOLNAMEASC (TOK_TABLE_OR_COL k3)) (TOK_TABSORTCOLNAMEASC (TOK_TABLE_OR_COL v3))))) a)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION sum (TOK_FUNCTION hash (. (TOK_TABLE_OR_COL a) k1) (. (TOK_TABLE_OR_COL a) v1) (. (TOK_TABLE_OR_COL a) k2) (. (TOK_TABLE_OR_COL a) v2) (. (TOK_TABLE_OR_COL a) k3) (. (TOK_TABLE_OR_COL a) v3))))))) STAGE DEPENDENCIES: - Stage-7 is a root stage , consists of Stage-8, Stage-1 - Stage-8 has a backup stage: Stage-1 - Stage-6 depends on stages: Stage-8 - Stage-2 depends on stages: Stage-1, Stage-6 + Stage-7 is a root stage + Stage-6 depends on stages: Stage-7 + Stage-2 depends on stages: Stage-6 Stage-3 depends on stages: Stage-2 - Stage-1 Stage-0 is a root stage STAGE PLANS: Stage: Stage-7 - Conditional Operator - - Stage: Stage-8 Map Reduce Local Work Alias -> Map Local Tables: a:src1 @@ -226,105 +221,6 @@ input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat - Stage: Stage-1 - Map Reduce - Alias -> Map Operator Tree: - a:src1 - TableScan - alias: src1 - Filter Operator - predicate: - expr: (key < 10.0) - type: boolean - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 0 - value expressions: - expr: key - type: string - expr: value - type: string - a:src2 - TableScan - alias: src2 - Filter Operator - predicate: - expr: (key < 10.0) - type: boolean - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 1 - value expressions: - expr: key - type: string - expr: value - type: string - a:src3 - TableScan - alias: src3 - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 2 - value expressions: - expr: key - type: string - expr: value - type: string - Reduce Operator Tree: - Join Operator - condition map: - Inner Join 0 to 1 - Right Outer Join0 to 2 - condition expressions: - 0 {VALUE._col0} {VALUE._col1} - 1 {VALUE._col0} {VALUE._col1} - 2 {VALUE._col0} {VALUE._col1} - filter predicates: - 0 - 1 - 2 {(VALUE._col0 < 20.0)} - handleSkewJoin: false - outputColumnNames: _col0, _col1, _col4, _col5, _col8, _col9 - Select Operator - expressions: - expr: _col0 - type: string - expr: _col1 - type: string - expr: _col4 - type: string - expr: _col5 - 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.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - Stage: Stage-0 Fetch Operator limit: -1 @@ -369,19 +265,14 @@ (TOK_QUERY (TOK_FROM (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_RIGHTOUTERJOIN (TOK_JOIN (TOK_TABREF (TOK_TABNAME src) src1) (TOK_TABREF (TOK_TABNAME src) src2) (AND (AND (= (. (TOK_TABLE_OR_COL src1) key) (. (TOK_TABLE_OR_COL src2) key)) (< (. (TOK_TABLE_OR_COL src1) key) 10)) (< (. (TOK_TABLE_OR_COL src2) key) 15))) (TOK_TABREF (TOK_TABNAME src) src3) (AND (= (. (TOK_TABLE_OR_COL src1) key) (. (TOK_TABLE_OR_COL src3) key)) (< (. (TOK_TABLE_OR_COL src3) key) 20)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL src1) key) k1) (TOK_SELEXPR (. (TOK_TABLE_OR_COL src1) value) v1) (TOK_SELEXPR (. (TOK_TABLE_OR_COL src2) key) k2) (TOK_SELEXPR (. (TOK_TABLE_OR_COL src2) value) v2) (TOK_SELEXPR (. (TOK_TABLE_OR_COL src3) key) k3) (TOK_SELEXPR (. (TOK_TABLE_OR_COL src3) value) v3)) (TOK_SORTBY (TOK_TABSORTCOLNAMEASC (TOK_TABLE_OR_COL k1)) (TOK_TABSORTCOLNAMEASC (TOK_TABLE_OR_COL v1)) (TOK_TABSORTCOLNAMEASC (TOK_TABLE_OR_COL k2)) (TOK_TABSORTCOLNAMEASC (TOK_TABLE_OR_COL v2)) (TOK_TABSORTCOLNAMEASC (TOK_TABLE_OR_COL k3)) (TOK_TABSORTCOLNAMEASC (TOK_TABLE_OR_COL v3))))) a)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION sum (TOK_FUNCTION hash (. (TOK_TABLE_OR_COL a) k1) (. (TOK_TABLE_OR_COL a) v1) (. (TOK_TABLE_OR_COL a) k2) (. (TOK_TABLE_OR_COL a) v2) (. (TOK_TABLE_OR_COL a) k3) (. (TOK_TABLE_OR_COL a) v3))))))) STAGE DEPENDENCIES: - Stage-7 is a root stage , consists of Stage-8, Stage-1 - Stage-8 has a backup stage: Stage-1 - Stage-6 depends on stages: Stage-8 - Stage-2 depends on stages: Stage-1, Stage-6 + Stage-7 is a root stage + Stage-6 depends on stages: Stage-7 + Stage-2 depends on stages: Stage-6 Stage-3 depends on stages: Stage-2 - Stage-1 Stage-0 is a root stage STAGE PLANS: Stage: Stage-7 - Conditional Operator - - Stage: Stage-8 Map Reduce Local Work Alias -> Map Local Tables: a:src1 @@ -577,105 +468,6 @@ input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat - Stage: Stage-1 - Map Reduce - Alias -> Map Operator Tree: - a:src1 - TableScan - alias: src1 - Filter Operator - predicate: - expr: ((key < 15.0) and (key < 10.0)) - type: boolean - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 0 - value expressions: - expr: key - type: string - expr: value - type: string - a:src2 - TableScan - alias: src2 - Filter Operator - predicate: - expr: ((key < 10.0) and (key < 15.0)) - type: boolean - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 1 - value expressions: - expr: key - type: string - expr: value - type: string - a:src3 - TableScan - alias: src3 - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 2 - value expressions: - expr: key - type: string - expr: value - type: string - Reduce Operator Tree: - Join Operator - condition map: - Inner Join 0 to 1 - Right Outer Join0 to 2 - condition expressions: - 0 {VALUE._col0} {VALUE._col1} - 1 {VALUE._col0} {VALUE._col1} - 2 {VALUE._col0} {VALUE._col1} - filter predicates: - 0 - 1 - 2 {(VALUE._col0 < 20.0)} - handleSkewJoin: false - outputColumnNames: _col0, _col1, _col4, _col5, _col8, _col9 - Select Operator - expressions: - expr: _col0 - type: string - expr: _col1 - type: string - expr: _col4 - type: string - expr: _col5 - 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.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - Stage: Stage-0 Fetch Operator limit: -1 Index: ql/src/test/results/clientpositive/auto_join2.q.out =================================================================== --- ql/src/test/results/clientpositive/auto_join2.q.out (revision 1458165) +++ ql/src/test/results/clientpositive/auto_join2.q.out (working copy) @@ -15,54 +15,26 @@ (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_JOIN (TOK_TABREF (TOK_TABNAME src) src1) (TOK_TABREF (TOK_TABNAME src) src2) (= (. (TOK_TABLE_OR_COL src1) key) (. (TOK_TABLE_OR_COL src2) key))) (TOK_TABREF (TOK_TABNAME src) src3) (= (+ (. (TOK_TABLE_OR_COL src1) key) (. (TOK_TABLE_OR_COL src2) key)) (. (TOK_TABLE_OR_COL src3) key)))) (TOK_INSERT (TOK_DESTINATION (TOK_TAB (TOK_TABNAME dest_j2))) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL src1) key)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL src3) value))))) STAGE DEPENDENCIES: - Stage-11 is a root stage , consists of Stage-14, Stage-15, Stage-1 - Stage-14 has a backup stage: Stage-1 - Stage-9 depends on stages: Stage-14 - Stage-8 depends on stages: Stage-1, Stage-9, Stage-10 , consists of Stage-12, Stage-13, Stage-2 - Stage-12 has a backup stage: Stage-2 - Stage-6 depends on stages: Stage-12 - Stage-0 depends on stages: Stage-2, Stage-6, Stage-7 + Stage-8 is a root stage + Stage-7 depends on stages: Stage-8 + Stage-0 depends on stages: Stage-7 Stage-3 depends on stages: Stage-0 - Stage-13 has a backup stage: Stage-2 - Stage-7 depends on stages: Stage-13 - Stage-2 - Stage-15 has a backup stage: Stage-1 - Stage-10 depends on stages: Stage-15 - Stage-1 STAGE PLANS: - Stage: Stage-11 - Conditional Operator - - Stage: Stage-14 + Stage: Stage-8 Map Reduce Local Work Alias -> Map Local Tables: - src2 + src1 Fetch Operator limit: -1 + src3 + Fetch Operator + limit: -1 Alias -> Map Local Operator Tree: - src2 - TableScan - alias: src2 - HashTable Sink Operator - condition expressions: - 0 {key} - 1 {key} - handleSkewJoin: false - keys: - 0 [Column[key]] - 1 [Column[key]] - Position of Big Table: 0 - - Stage: Stage-9 - Map Reduce - Alias -> Map Operator Tree: src1 TableScan alias: src1 - Map Join Operator - condition map: - Inner Join 0 to 1 + HashTable Sink Operator condition expressions: 0 {key} 1 {key} @@ -70,28 +42,8 @@ keys: 0 [Column[key]] 1 [Column[key]] - outputColumnNames: _col0, _col4 - Position of Big Table: 0 - File Output Operator - compressed: false - GlobalTableId: 0 - table: - input format: org.apache.hadoop.mapred.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - Local Work: - Map Reduce Local Work - - Stage: Stage-8 - Conditional Operator - - Stage: Stage-12 - Map Reduce Local Work - Alias -> Map Local Tables: + Position of Big Table: 1 src3 - Fetch Operator - limit: -1 - Alias -> Map Local Operator Tree: - src3 TableScan alias: src3 HashTable Sink Operator @@ -104,37 +56,51 @@ 1 [class org.apache.hadoop.hive.ql.udf.generic.GenericUDFBridge(Column[key]()] Position of Big Table: 0 - Stage: Stage-6 + Stage: Stage-7 Map Reduce Alias -> Map Operator Tree: - $INTNAME + src2 + TableScan + alias: src2 Map Join Operator condition map: Inner Join 0 to 1 condition expressions: - 0 {_col0} - 1 {value} + 0 {key} + 1 {key} handleSkewJoin: false keys: - 0 [class org.apache.hadoop.hive.ql.udf.generic.GenericUDFBridge(Column[_col0], Column[_col4]()] - 1 [class org.apache.hadoop.hive.ql.udf.generic.GenericUDFBridge(Column[key]()] - outputColumnNames: _col4, _col9 - Position of Big Table: 0 - Select Operator - expressions: - expr: UDFToInteger(_col4) - type: int - expr: _col9 - type: string - outputColumnNames: _col0, _col1 - File Output Operator - compressed: false - GlobalTableId: 1 - 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.dest_j2 + 0 [Column[key]] + 1 [Column[key]] + outputColumnNames: _col0, _col4 + Position of Big Table: 1 + Map Join Operator + condition map: + Inner Join 0 to 1 + condition expressions: + 0 {_col0} + 1 {value} + handleSkewJoin: false + keys: + 0 [class org.apache.hadoop.hive.ql.udf.generic.GenericUDFBridge(Column[_col0], Column[_col4]()] + 1 [class org.apache.hadoop.hive.ql.udf.generic.GenericUDFBridge(Column[key]()] + outputColumnNames: _col4, _col9 + Position of Big Table: 0 + Select Operator + expressions: + expr: UDFToInteger(_col4) + type: int + expr: _col9 + type: string + outputColumnNames: _col0, _col1 + File Output Operator + compressed: false + GlobalTableId: 1 + 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.dest_j2 Local Work: Map Reduce Local Work @@ -151,213 +117,7 @@ Stage: Stage-3 Stats-Aggr Operator - Stage: Stage-13 - Map Reduce Local Work - Alias -> Map Local Tables: - $INTNAME - Fetch Operator - limit: -1 - Alias -> Map Local Operator Tree: - $INTNAME - HashTable Sink Operator - condition expressions: - 0 {_col0} - 1 {value} - handleSkewJoin: false - keys: - 0 [class org.apache.hadoop.hive.ql.udf.generic.GenericUDFBridge(Column[_col0], Column[_col4]()] - 1 [class org.apache.hadoop.hive.ql.udf.generic.GenericUDFBridge(Column[key]()] - Position of Big Table: 1 - Stage: Stage-7 - Map Reduce - Alias -> Map Operator Tree: - src3 - TableScan - alias: src3 - Map Join Operator - condition map: - Inner Join 0 to 1 - condition expressions: - 0 {_col0} - 1 {value} - handleSkewJoin: false - keys: - 0 [class org.apache.hadoop.hive.ql.udf.generic.GenericUDFBridge(Column[_col0], Column[_col4]()] - 1 [class org.apache.hadoop.hive.ql.udf.generic.GenericUDFBridge(Column[key]()] - outputColumnNames: _col4, _col9 - Position of Big Table: 1 - Select Operator - expressions: - expr: UDFToInteger(_col4) - type: int - expr: _col9 - type: string - outputColumnNames: _col0, _col1 - File Output Operator - compressed: false - GlobalTableId: 1 - 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.dest_j2 - Local Work: - Map Reduce Local Work - - Stage: Stage-2 - Map Reduce - Alias -> Map Operator Tree: - $INTNAME - Reduce Output Operator - key expressions: - expr: (_col0 + _col4) - type: double - sort order: + - Map-reduce partition columns: - expr: (_col0 + _col4) - type: double - tag: 0 - value expressions: - expr: _col0 - type: string - src3 - TableScan - alias: src3 - Reduce Output Operator - key expressions: - expr: UDFToDouble(key) - type: double - sort order: + - Map-reduce partition columns: - expr: UDFToDouble(key) - type: double - tag: 1 - value expressions: - expr: value - type: string - Reduce Operator Tree: - Join Operator - condition map: - Inner Join 0 to 1 - condition expressions: - 0 {VALUE._col4} - 1 {VALUE._col1} - handleSkewJoin: false - outputColumnNames: _col4, _col9 - Select Operator - expressions: - expr: UDFToInteger(_col4) - type: int - expr: _col9 - type: string - outputColumnNames: _col0, _col1 - File Output Operator - compressed: false - GlobalTableId: 1 - 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.dest_j2 - - Stage: Stage-15 - Map Reduce Local Work - Alias -> Map Local Tables: - src1 - Fetch Operator - limit: -1 - Alias -> Map Local Operator Tree: - src1 - TableScan - alias: src1 - HashTable Sink Operator - condition expressions: - 0 {key} - 1 {key} - handleSkewJoin: false - keys: - 0 [Column[key]] - 1 [Column[key]] - Position of Big Table: 1 - - Stage: Stage-10 - Map Reduce - Alias -> Map Operator Tree: - src2 - TableScan - alias: src2 - Map Join Operator - condition map: - Inner Join 0 to 1 - condition expressions: - 0 {key} - 1 {key} - handleSkewJoin: false - keys: - 0 [Column[key]] - 1 [Column[key]] - outputColumnNames: _col0, _col4 - Position of Big Table: 1 - File Output Operator - compressed: false - GlobalTableId: 0 - table: - input format: org.apache.hadoop.mapred.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - Local Work: - Map Reduce Local Work - - Stage: Stage-1 - Map Reduce - Alias -> Map Operator Tree: - src1 - TableScan - alias: src1 - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 0 - value expressions: - expr: key - type: string - src2 - TableScan - alias: src2 - Reduce Output Operator - key expressions: - expr: key - type: string - sort order: + - Map-reduce partition columns: - expr: key - type: string - tag: 1 - value expressions: - expr: key - type: string - Reduce Operator Tree: - Join Operator - condition map: - Inner Join 0 to 1 - condition expressions: - 0 {VALUE._col0} - 1 {VALUE._col0} - handleSkewJoin: false - outputColumnNames: _col0, _col4 - File Output Operator - compressed: false - GlobalTableId: 0 - table: - input format: org.apache.hadoop.mapred.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - - PREHOOK: query: FROM src src1 JOIN src src2 ON (src1.key = src2.key) JOIN src src3 ON (src1.key + src2.key = src3.key) INSERT OVERWRITE TABLE dest_j2 SELECT src1.key, src3.value PREHOOK: type: QUERY Index: ql/src/test/queries/clientpositive/mapjoin_hook.q =================================================================== --- ql/src/test/queries/clientpositive/mapjoin_hook.q (revision 1458165) +++ ql/src/test/queries/clientpositive/mapjoin_hook.q (working copy) @@ -15,6 +15,7 @@ set hive.mapjoin.localtask.max.memory.usage = 0.0001; set hive.mapjoin.check.memory.rows = 2; +set hive.auto.convert.join.noconditionaltask = false; FROM srcpart src1 JOIN src src2 ON (src1.key = src2.key) Index: ql/src/test/queries/clientpositive/infer_bucket_sort_convert_join.q =================================================================== --- ql/src/test/queries/clientpositive/infer_bucket_sort_convert_join.q (revision 1458165) +++ ql/src/test/queries/clientpositive/infer_bucket_sort_convert_join.q (working copy) @@ -16,8 +16,10 @@ set hive.mapjoin.check.memory.rows=1; set hive.mapjoin.localtask.max.memory.usage = 0.0001; +set hive.auto.convert.join.noconditionaltask = false; --- Tests a join which is not converted to a map join, the output should be bucketed and sorted +-- This test tests the scenario when the mapper dies. So, create a conditional task for the mapjoin. +-- Tests a join which is not converted to a map join, the output should be bucketed and sorted. INSERT OVERWRITE TABLE test_table PARTITION (part = '1') SELECT a.key, b.value FROM src a JOIN src b ON a.key = b.key; Index: ql/src/test/queries/clientpositive/auto_join25.q =================================================================== --- ql/src/test/queries/clientpositive/auto_join25.q (revision 1458165) +++ ql/src/test/queries/clientpositive/auto_join25.q (working copy) @@ -1,7 +1,9 @@ set hive.auto.convert.join = true; set hive.mapjoin.localtask.max.memory.usage = 0.0001; set hive.mapjoin.check.memory.rows = 2; +set hive.auto.convert.join.noconditionaltask = false; +-- This test tests the scenario when the mapper dies. So, create a conditional task for the mapjoin CREATE TABLE dest1(key INT, value STRING) STORED AS TEXTFILE; FROM srcpart src1 JOIN src src2 ON (src1.key = src2.key) Index: ql/src/test/queries/clientpositive/join41.q =================================================================== --- ql/src/test/queries/clientpositive/join41.q (revision 0) +++ ql/src/test/queries/clientpositive/join41.q (working copy) @@ -0,0 +1,16 @@ +create table s1 as select * from src where key = 0; + +set hive.auto.convert.join.noconditionaltask=false; +EXPLAIN +SELECT * FROM s1 src1 LEFT OUTER JOIN s1 src2 ON (src1.key = src2.key AND src2.key > 10); +SELECT * FROM s1 src1 LEFT OUTER JOIN s1 src2 ON (src1.key = src2.key AND src2.key > 10); + +set hive.auto.convert.join.noconditionaltask=true; + +-- Make sure the big table is chosen correctly as part of HIVE-4146 +EXPLAIN +SELECT * FROM s1 src1 LEFT OUTER JOIN s1 src2 ON (src1.key = src2.key AND src2.key > 10); +SELECT * FROM s1 src1 LEFT OUTER JOIN s1 src2 ON (src1.key = src2.key AND src2.key > 10); + + + Index: ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/CommonJoinResolver.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/CommonJoinResolver.java (revision 1458165) +++ ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/CommonJoinResolver.java (working copy) @@ -329,31 +329,35 @@ HiveConf.ConfVars.HIVECONVERTJOINNOCONDITIONALTASKTHRESHOLD); boolean bigTableFound = false; - long largestTableSize = 0; + long largestBigTableCandidateSize = 0; long sumTableSizes = 0; for (String alias : aliasToWork.keySet()) { + int tablePosition = getPosition(currWork, joinOp, alias); + boolean bigTableCandidate = bigTableCandidates.contains(tablePosition); Long size = aliasToSize.get(alias); // The size is not available at compile time if the input is a sub-query. // If the size of atleast n-1 inputs for a n-way join are available at compile time, // and the sum of them is less than the specified threshold, then convert the join // into a map-join without the conditional task. if ((size == null) || (size > mapJoinSize)) { - sumTableSizes += largestTableSize; - if (bigTableFound || (sumTableSizes > mapJoinSize)) { + sumTableSizes += largestBigTableCandidateSize; + if (bigTableFound || (sumTableSizes > mapJoinSize) || !bigTableCandidate) { convertJoinMapJoin = false; break; } bigTableFound = true; - bigTablePosition = getPosition(currWork, joinOp, alias); - largestTableSize = mapJoinSize + 1; + bigTablePosition = tablePosition; + largestBigTableCandidateSize = mapJoinSize + 1; } else { - if (size > largestTableSize) { - sumTableSizes += largestTableSize; - largestTableSize = size; - bigTablePosition = getPosition(currWork, joinOp, alias); - } else { + if (bigTableCandidate && size > largestBigTableCandidateSize) { + bigTablePosition = tablePosition; + sumTableSizes += largestBigTableCandidateSize; + largestBigTableCandidateSize = size; + } + else { sumTableSizes += size; } + if (sumTableSizes > mapJoinSize) { convertJoinMapJoin = false; break;