Index: ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/CommonJoinTaskDispatcher.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/CommonJoinTaskDispatcher.java +++ ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/CommonJoinTaskDispatcher.java @@ -205,21 +205,27 @@ } } + // Merge the 2 trees - remove the FileSinkOperator from the first tree pass it to the + // top of the second Operator childAliasOp = childWork.getAliasToWork().values().iterator().next(); if (fop.getParentOperators().size() > 1) { return; } - - // Merge the 2 trees - remove the FileSinkOperator from the first tree pass it to the - // top of the second Operator parentFOp = fop.getParentOperators().get(0); - parentFOp.getChildOperators().remove(fop); - parentFOp.getChildOperators().add(childAliasOp); - List> parentOps = - new ArrayList>(); - parentOps.add(parentFOp); - childAliasOp.setParentOperators(parentOps); + // remove the unnecessary TableScan + if (childAliasOp instanceof TableScanOperator) { + TableScanOperator tso = (TableScanOperator)childAliasOp; + if (tso.getNumChild() != 1) { + // shouldn't happen + return; + } + childAliasOp = tso.getChildOperators().get(0); + childAliasOp.replaceParent(tso, parentFOp); + } else { + childAliasOp.setParentOperators(Utilities.makeList(parentFOp)); + } + parentFOp.replaceChild(fop, childAliasOp); work.getAliasToPartnInfo().putAll(childWork.getAliasToPartnInfo()); for (Map.Entry childWorkEntry : childWork.getPathToPartitionInfo() Index: ql/src/test/results/clientpositive/auto_join13.q.out =================================================================== --- ql/src/test/results/clientpositive/auto_join13.q.out +++ ql/src/test/results/clientpositive/auto_join13.q.out @@ -112,37 +112,37 @@ 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 + 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 Index: ql/src/test/results/clientpositive/auto_join2.q.out =================================================================== --- ql/src/test/results/clientpositive/auto_join2.q.out +++ ql/src/test/results/clientpositive/auto_join2.q.out @@ -74,33 +74,33 @@ 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 + 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 Index: ql/src/test/results/clientpositive/auto_join22.q.out =================================================================== --- ql/src/test/results/clientpositive/auto_join22.q.out +++ ql/src/test/results/clientpositive/auto_join22.q.out @@ -74,35 +74,35 @@ 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 + 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 Index: ql/src/test/results/clientpositive/auto_sortmerge_join_12.q.out =================================================================== --- ql/src/test/results/clientpositive/auto_sortmerge_join_12.q.out +++ ql/src/test/results/clientpositive/auto_sortmerge_join_12.q.out @@ -201,39 +201,39 @@ predicate: expr: (_col10 = _col5) type: boolean - Map Join Operator - condition map: - Inner Join 0 to 1 - condition expressions: - 0 - 1 - handleSkewJoin: false - keys: - 0 [] - 1 [] - 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 + Map Join Operator + condition map: + Inner Join 0 to 1 + condition expressions: + 0 + 1 + handleSkewJoin: false + keys: + 0 [] + 1 [] + 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 #### A masked pattern was here #### - NumFilesPerFileSink: 1 - table: - input format: org.apache.hadoop.mapred.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - properties: - columns _col0 - columns.types bigint - escape.delim \ - TotalFiles: 1 - GatherStats: false - MultiFileSpray: false + NumFilesPerFileSink: 1 + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + properties: + columns _col0 + columns.types bigint + escape.delim \ + TotalFiles: 1 + GatherStats: false + MultiFileSpray: false Local Work: Map Reduce Local Work Needs Tagging: true Index: ql/src/test/results/clientpositive/join28.q.out =================================================================== --- ql/src/test/results/clientpositive/join28.q.out +++ ql/src/test/results/clientpositive/join28.q.out @@ -91,33 +91,33 @@ expr: _col0 type: string outputColumnNames: _col0 - Map Join Operator - condition map: - Inner Join 0 to 1 - condition expressions: - 0 {_col0} - 1 {value} - handleSkewJoin: false - keys: - 0 [Column[_col0]] - 1 [Column[key]] - outputColumnNames: _col0, _col5 - Position of Big Table: 0 - Select Operator - expressions: - expr: _col0 - type: string - 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 + Map Join Operator + condition map: + Inner Join 0 to 1 + condition expressions: + 0 {_col0} + 1 {value} + handleSkewJoin: false + keys: + 0 [Column[_col0]] + 1 [Column[key]] + outputColumnNames: _col0, _col5 + Position of Big Table: 0 + Select Operator + expressions: + expr: _col0 + type: string + 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 Index: ql/src/test/results/clientpositive/join32.q.out =================================================================== --- ql/src/test/results/clientpositive/join32.q.out +++ ql/src/test/results/clientpositive/join32.q.out @@ -85,51 +85,51 @@ 1 [Column[key]] outputColumnNames: _col0, _col1, _col5 Position of Big Table: 1 - Map Join Operator - condition map: - Inner Join 0 to 1 - condition expressions: - 0 {_col5} {_col0} - 1 {value} - handleSkewJoin: false - keys: - 0 [Column[_col1]] - 1 [Column[value]] - outputColumnNames: _col1, _col4, _col9 - Position of Big Table: 0 - Select Operator - expressions: - expr: _col4 - type: string - expr: _col9 - type: string - expr: _col1 - type: string - outputColumnNames: _col0, _col1, _col2 - File Output Operator - compressed: false - GlobalTableId: 1 + Map Join Operator + condition map: + Inner Join 0 to 1 + condition expressions: + 0 {_col5} {_col0} + 1 {value} + handleSkewJoin: false + keys: + 0 [Column[_col1]] + 1 [Column[value]] + outputColumnNames: _col1, _col4, _col9 + Position of Big Table: 0 + Select Operator + expressions: + expr: _col4 + type: string + expr: _col9 + type: string + expr: _col1 + type: string + outputColumnNames: _col0, _col1, _col2 + File Output Operator + compressed: false + GlobalTableId: 1 #### A masked pattern was here #### - NumFilesPerFileSink: 1 + NumFilesPerFileSink: 1 #### A masked pattern was here #### - table: - input format: org.apache.hadoop.mapred.TextInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat - properties: - bucket_count -1 - columns key,value,val2 - columns.types string:string:string + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + properties: + bucket_count -1 + columns key,value,val2 + columns.types string:string:string #### A masked pattern was here #### - name default.dest_j1 - serialization.ddl struct dest_j1 { string key, string value, string val2} - serialization.format 1 - serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + name default.dest_j1 + serialization.ddl struct dest_j1 { string key, string value, string val2} + serialization.format 1 + serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe #### A masked pattern was here #### - serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe - name: default.dest_j1 - TotalFiles: 1 - GatherStats: true - MultiFileSpray: false + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + name: default.dest_j1 + TotalFiles: 1 + GatherStats: true + MultiFileSpray: false Local Work: Map Reduce Local Work Needs Tagging: true Index: ql/src/test/results/clientpositive/join33.q.out =================================================================== --- ql/src/test/results/clientpositive/join33.q.out +++ ql/src/test/results/clientpositive/join33.q.out @@ -85,51 +85,51 @@ 1 [Column[key]] outputColumnNames: _col0, _col1, _col5 Position of Big Table: 1 - Map Join Operator - condition map: - Inner Join 0 to 1 - condition expressions: - 0 {_col5} {_col0} - 1 {value} - handleSkewJoin: false - keys: - 0 [Column[_col1]] - 1 [Column[value]] - outputColumnNames: _col1, _col4, _col9 - Position of Big Table: 0 - Select Operator - expressions: - expr: _col4 - type: string - expr: _col9 - type: string - expr: _col1 - type: string - outputColumnNames: _col0, _col1, _col2 - File Output Operator - compressed: false - GlobalTableId: 1 + Map Join Operator + condition map: + Inner Join 0 to 1 + condition expressions: + 0 {_col5} {_col0} + 1 {value} + handleSkewJoin: false + keys: + 0 [Column[_col1]] + 1 [Column[value]] + outputColumnNames: _col1, _col4, _col9 + Position of Big Table: 0 + Select Operator + expressions: + expr: _col4 + type: string + expr: _col9 + type: string + expr: _col1 + type: string + outputColumnNames: _col0, _col1, _col2 + File Output Operator + compressed: false + GlobalTableId: 1 #### A masked pattern was here #### - NumFilesPerFileSink: 1 + NumFilesPerFileSink: 1 #### A masked pattern was here #### - table: - input format: org.apache.hadoop.mapred.TextInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat - properties: - bucket_count -1 - columns key,value,val2 - columns.types string:string:string + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + properties: + bucket_count -1 + columns key,value,val2 + columns.types string:string:string #### A masked pattern was here #### - name default.dest_j1 - serialization.ddl struct dest_j1 { string key, string value, string val2} - serialization.format 1 - serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + name default.dest_j1 + serialization.ddl struct dest_j1 { string key, string value, string val2} + serialization.format 1 + serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe #### A masked pattern was here #### - serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe - name: default.dest_j1 - TotalFiles: 1 - GatherStats: true - MultiFileSpray: false + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + name: default.dest_j1 + TotalFiles: 1 + GatherStats: true + MultiFileSpray: false Local Work: Map Reduce Local Work Needs Tagging: true Index: ql/src/test/results/clientpositive/join_star.q.out =================================================================== --- ql/src/test/results/clientpositive/join_star.q.out +++ ql/src/test/results/clientpositive/join_star.q.out @@ -246,35 +246,35 @@ 1 [Column[f1]] outputColumnNames: _col0, _col1, _col3, _col7 Position of Big Table: 0 - Map Join Operator - condition map: - Inner Join 0 to 1 - condition expressions: - 0 {_col7} {_col0} {_col1} - 1 {f4} - handleSkewJoin: false - keys: - 0 [Column[_col3]] - 1 [Column[f3]] - outputColumnNames: _col1, _col4, _col5, _col11 - Position of Big Table: 0 - Select Operator - expressions: - expr: _col4 - type: int - expr: _col5 - type: int - expr: _col1 - type: int - expr: _col11 - type: int - 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 + Map Join Operator + condition map: + Inner Join 0 to 1 + condition expressions: + 0 {_col7} {_col0} {_col1} + 1 {f4} + handleSkewJoin: false + keys: + 0 [Column[_col3]] + 1 [Column[f3]] + outputColumnNames: _col1, _col4, _col5, _col11 + Position of Big Table: 0 + Select Operator + expressions: + expr: _col4 + type: int + expr: _col5 + type: int + expr: _col1 + type: int + expr: _col11 + type: int + 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 Local Work: Map Reduce Local Work @@ -371,35 +371,35 @@ 1 [Column[f1]] outputColumnNames: _col0, _col1, _col7 Position of Big Table: 0 - Map Join Operator - condition map: - Inner Join 0 to 1 - condition expressions: - 0 {_col7} {_col0} {_col1} - 1 {f4} - handleSkewJoin: false - keys: - 0 [Column[_col7]] - 1 [Column[f3]] - outputColumnNames: _col1, _col4, _col5, _col11 - Position of Big Table: 0 - Select Operator - expressions: - expr: _col4 - type: int - expr: _col5 - type: int - expr: _col1 - type: int - expr: _col11 - type: int - 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 + Map Join Operator + condition map: + Inner Join 0 to 1 + condition expressions: + 0 {_col7} {_col0} {_col1} + 1 {f4} + handleSkewJoin: false + keys: + 0 [Column[_col7]] + 1 [Column[f3]] + outputColumnNames: _col1, _col4, _col5, _col11 + Position of Big Table: 0 + Select Operator + expressions: + expr: _col4 + type: int + expr: _col5 + type: int + expr: _col1 + type: int + expr: _col11 + type: int + 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 Local Work: Map Reduce Local Work @@ -496,35 +496,35 @@ 1 [Column[f1]] outputColumnNames: _col0, _col1, _col7 Position of Big Table: 0 - Map Join Operator - condition map: - Left Outer Join0 to 1 - condition expressions: - 0 {_col7} {_col0} {_col1} - 1 {f4} - handleSkewJoin: false - keys: - 0 [Column[_col7]] - 1 [Column[f3]] - outputColumnNames: _col1, _col4, _col5, _col11 - Position of Big Table: 0 - Select Operator - expressions: - expr: _col4 - type: int - expr: _col5 - type: int - expr: _col1 - type: int - expr: _col11 - type: int - 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 + Map Join Operator + condition map: + Left Outer Join0 to 1 + condition expressions: + 0 {_col7} {_col0} {_col1} + 1 {f4} + handleSkewJoin: false + keys: + 0 [Column[_col7]] + 1 [Column[f3]] + outputColumnNames: _col1, _col4, _col5, _col11 + Position of Big Table: 0 + Select Operator + expressions: + expr: _col4 + type: int + expr: _col5 + type: int + expr: _col1 + type: int + expr: _col11 + type: int + 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 Local Work: Map Reduce Local Work @@ -716,96 +716,96 @@ 1 [Column[f1]] outputColumnNames: _col0, _col1, _col3, _col7 Position of Big Table: 0 + Map Join Operator + condition map: + Left Outer Join0 to 1 + condition expressions: + 0 {_col7} {_col0} {_col1} {_col3} + 1 {f4} + handleSkewJoin: false + keys: + 0 [Column[_col7]] + 1 [Column[f3]] + outputColumnNames: _col1, _col4, _col5, _col7, _col11 + Position of Big Table: 0 Map Join Operator condition map: Left Outer Join0 to 1 condition expressions: - 0 {_col7} {_col0} {_col1} {_col3} - 1 {f4} + 0 {_col11} {_col1} {_col4} {_col5} + 1 {f6} handleSkewJoin: false keys: 0 [Column[_col7]] - 1 [Column[f3]] - outputColumnNames: _col1, _col4, _col5, _col7, _col11 + 1 [Column[f5]] + outputColumnNames: _col1, _col5, _col8, _col9, _col15 Position of Big Table: 0 + Map Join Operator + condition map: + Left Outer Join0 to 1 + Left Outer Join0 to 2 + condition expressions: + 0 {_col15} {_col1} {_col5} {_col8} {_col9} + 1 {f8} + 2 {f12} + handleSkewJoin: false + keys: + 0 [Column[_col15]] + 1 [Column[f7]] + 2 [Column[f11]] + outputColumnNames: _col1, _col5, _col9, _col12, _col13, _col19, _col23 + Position of Big Table: 0 Map Join Operator condition map: Left Outer Join0 to 1 condition expressions: - 0 {_col11} {_col1} {_col4} {_col5} - 1 {f6} + 0 {_col1} {_col5} {_col9} {_col12} {_col13} {_col23} {_col19} + 1 {f10} handleSkewJoin: false keys: - 0 [Column[_col7]] - 1 [Column[f5]] - outputColumnNames: _col1, _col5, _col8, _col9, _col15 + 0 [Column[_col19]] + 1 [Column[f9]] + outputColumnNames: _col1, _col5, _col9, _col12, _col13, _col19, _col23, _col27 Position of Big Table: 0 - Map Join Operator - condition map: - Left Outer Join0 to 1 - Left Outer Join0 to 2 - condition expressions: - 0 {_col15} {_col1} {_col5} {_col8} {_col9} - 1 {f8} - 2 {f12} - handleSkewJoin: false - keys: - 0 [Column[_col15]] - 1 [Column[f7]] - 2 [Column[f11]] - outputColumnNames: _col1, _col5, _col9, _col12, _col13, _col19, _col23 - Position of Big Table: 0 - Map Join Operator - condition map: - Left Outer Join0 to 1 - condition expressions: - 0 {_col1} {_col5} {_col9} {_col12} {_col13} {_col23} {_col19} - 1 {f10} - handleSkewJoin: false - keys: - 0 [Column[_col19]] - 1 [Column[f9]] - outputColumnNames: _col1, _col5, _col9, _col12, _col13, _col19, _col23, _col27 - Position of Big Table: 0 - Map Join Operator - condition map: - Left Outer Join0 to 1 - condition expressions: - 0 {_col1} {_col5} {_col9} {_col12} {_col13} {_col19} {_col27} {_col23} - 1 {f14} - handleSkewJoin: false - keys: - 0 [Column[_col19]] - 1 [Column[f13]] - outputColumnNames: _col1, _col5, _col9, _col12, _col13, _col19, _col23, _col27, _col31 - Position of Big Table: 0 - Select Operator - expressions: - expr: _col12 - type: int - expr: _col13 - type: int - expr: _col9 - type: int - expr: _col5 - type: int - expr: _col1 - type: int - expr: _col27 - type: int - expr: _col23 - type: int - expr: _col19 - type: int - expr: _col31 - type: int - outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8 - File Output Operator - compressed: false - GlobalTableId: 0 - table: - input format: org.apache.hadoop.mapred.TextInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + Map Join Operator + condition map: + Left Outer Join0 to 1 + condition expressions: + 0 {_col1} {_col5} {_col9} {_col12} {_col13} {_col19} {_col27} {_col23} + 1 {f14} + handleSkewJoin: false + keys: + 0 [Column[_col19]] + 1 [Column[f13]] + outputColumnNames: _col1, _col5, _col9, _col12, _col13, _col19, _col23, _col27, _col31 + Position of Big Table: 0 + Select Operator + expressions: + expr: _col12 + type: int + expr: _col13 + type: int + expr: _col9 + type: int + expr: _col5 + type: int + expr: _col1 + type: int + expr: _col27 + type: int + expr: _col23 + type: int + expr: _col19 + type: int + expr: _col31 + type: int + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8 + 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 Index: ql/src/test/results/clientpositive/mapjoin_mapjoin.q.out =================================================================== --- ql/src/test/results/clientpositive/mapjoin_mapjoin.q.out +++ ql/src/test/results/clientpositive/mapjoin_mapjoin.q.out @@ -68,29 +68,29 @@ 1 [Column[value]] outputColumnNames: _col0 Position of Big Table: 0 - Map Join Operator - condition map: - Inner Join 0 to 1 - condition expressions: - 0 {_col0} - 1 - handleSkewJoin: false - keys: - 0 [Column[_col0]] - 1 [Column[key]] + Map Join Operator + condition map: + Inner Join 0 to 1 + condition expressions: + 0 {_col0} + 1 + handleSkewJoin: false + keys: + 0 [Column[_col0]] + 1 [Column[key]] + outputColumnNames: _col0 + Position of Big Table: 0 + Select Operator + expressions: + expr: _col0 + type: string outputColumnNames: _col0 - Position of Big Table: 0 - Select Operator - expressions: - expr: _col0 - type: string - outputColumnNames: _col0 - File Output Operator - compressed: false - GlobalTableId: 0 - table: - input format: org.apache.hadoop.mapred.TextInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + 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 @@ -166,38 +166,38 @@ 1 [Column[value]] outputColumnNames: _col0, _col2 Position of Big Table: 0 - Map Join Operator - condition map: - Inner Join 0 to 1 - condition expressions: - 0 {_col2} - 1 - handleSkewJoin: false - keys: - 0 [Column[_col0]] - 1 [Column[key]] + Map Join Operator + condition map: + Inner Join 0 to 1 + condition expressions: + 0 {_col2} + 1 + handleSkewJoin: false + keys: + 0 [Column[_col0]] + 1 [Column[key]] + outputColumnNames: _col2 + Position of Big Table: 0 + Select Operator + expressions: + expr: _col2 + type: string outputColumnNames: _col2 - Position of Big Table: 0 - Select Operator - expressions: + Group By Operator + aggregations: + expr: count() + bucketGroup: false + keys: expr: _col2 type: string - outputColumnNames: _col2 - Group By Operator - aggregations: - expr: count() - bucketGroup: false - keys: - expr: _col2 - 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 + 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 Index: ql/src/test/results/clientpositive/mapjoin_subquery.q.out =================================================================== --- ql/src/test/results/clientpositive/mapjoin_subquery.q.out +++ ql/src/test/results/clientpositive/mapjoin_subquery.q.out @@ -83,31 +83,31 @@ expr: _col0 type: string outputColumnNames: _col0 - Map Join Operator - condition map: - Inner Join 0 to 1 - condition expressions: - 0 {_col0} - 1 {value} - handleSkewJoin: false - keys: - 0 [Column[_col0]] - 1 [Column[key]] - outputColumnNames: _col0, _col5 - Position of Big Table: 0 - Select Operator - expressions: - expr: _col0 - type: string - expr: _col5 - type: string - outputColumnNames: _col0, _col1 - File Output Operator - compressed: false - GlobalTableId: 0 - table: - input format: org.apache.hadoop.mapred.TextInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + Map Join Operator + condition map: + Inner Join 0 to 1 + condition expressions: + 0 {_col0} + 1 {value} + handleSkewJoin: false + keys: + 0 [Column[_col0]] + 1 [Column[key]] + outputColumnNames: _col0, _col5 + Position of Big Table: 0 + Select Operator + expressions: + expr: _col0 + type: string + expr: _col5 + type: string + outputColumnNames: _col0, _col1 + 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 @@ -331,31 +331,31 @@ expr: _col0 type: string outputColumnNames: _col0 - Map Join Operator - condition map: - Inner Join 0 to 1 - condition expressions: - 0 {_col0} - 1 {value} - handleSkewJoin: false - keys: - 0 [Column[_col0]] - 1 [Column[key]] - outputColumnNames: _col0, _col5 - Position of Big Table: 0 - Select Operator - expressions: - expr: _col0 - type: string - expr: _col5 - type: string - 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 + Map Join Operator + condition map: + Inner Join 0 to 1 + condition expressions: + 0 {_col0} + 1 {value} + handleSkewJoin: false + keys: + 0 [Column[_col0]] + 1 [Column[key]] + outputColumnNames: _col0, _col5 + Position of Big Table: 0 + Select Operator + expressions: + expr: _col0 + type: string + expr: _col5 + type: string + 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 Index: ql/src/test/results/clientpositive/mapjoin_subquery2.q.out =================================================================== --- ql/src/test/results/clientpositive/mapjoin_subquery2.q.out +++ ql/src/test/results/clientpositive/mapjoin_subquery2.q.out @@ -140,39 +140,39 @@ expr: _col1 type: string outputColumnNames: _col0, _col1, _col2, _col3 - Map Join Operator - condition map: - Inner Join 0 to 1 - condition expressions: - 0 {_col0} {_col1} {_col2} {_col3} - 1 {id} {name} - handleSkewJoin: false - keys: - 0 [Column[_col0]] - 1 [Column[id]] + Map Join Operator + condition map: + Inner Join 0 to 1 + condition expressions: + 0 {_col0} {_col1} {_col2} {_col3} + 1 {id} {name} + handleSkewJoin: false + keys: + 0 [Column[_col0]] + 1 [Column[id]] + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 + Position of Big Table: 0 + Select Operator + expressions: + expr: _col0 + type: int + expr: _col1 + type: string + expr: _col2 + type: int + expr: _col3 + type: string + expr: _col4 + type: int + expr: _col5 + type: string outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 - Position of Big Table: 0 - Select Operator - expressions: - expr: _col0 - type: int - expr: _col1 - type: string - expr: _col2 - type: int - expr: _col3 - type: string - expr: _col4 - type: int - expr: _col5 - 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 + 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 Index: ql/src/test/results/clientpositive/multiMapJoin1.q.out =================================================================== --- ql/src/test/results/clientpositive/multiMapJoin1.q.out +++ ql/src/test/results/clientpositive/multiMapJoin1.q.out @@ -193,30 +193,30 @@ 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 + 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 @@ -381,30 +381,30 @@ 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 + 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 @@ -572,44 +572,44 @@ expr: _col1 type: string outputColumnNames: _col1 - Map Join Operator - condition map: - Inner Join 0 to 1 - condition expressions: - 0 - 1 {key} - handleSkewJoin: false - keys: - 0 [Column[_col1]] - 1 [Column[value]] + Map Join Operator + condition map: + Inner Join 0 to 1 + condition expressions: + 0 + 1 {key} + handleSkewJoin: false + keys: + 0 [Column[_col1]] + 1 [Column[value]] + outputColumnNames: _col3 + Position of Big Table: 0 + Select Operator + expressions: + expr: _col3 + type: string outputColumnNames: _col3 - Position of Big Table: 0 - Select Operator - expressions: + Group By Operator + aggregations: + expr: count() + bucketGroup: false + keys: expr: _col3 type: string - outputColumnNames: _col3 - Group By Operator - aggregations: - expr: count() - bucketGroup: false - keys: - expr: _col3 + mode: hash + outputColumnNames: _col0, _col1 + Reduce Output Operator + key expressions: + expr: _col0 type: string - mode: hash - 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: bigint + sort order: + + Map-reduce partition columns: + expr: _col0 + type: string + tag: -1 + value expressions: + expr: _col1 + type: bigint Local Work: Map Reduce Local Work Reduce Operator Tree: @@ -1544,47 +1544,47 @@ expr: _col2 type: string outputColumnNames: _col1, _col2 - Map Join Operator - condition map: - Inner Join 0 to 1 - condition expressions: - 0 {_col1} - 1 - handleSkewJoin: false - keys: - 0 [Column[_col2]] - 1 [Column[value]] + Map Join Operator + condition map: + Inner Join 0 to 1 + condition expressions: + 0 {_col1} + 1 + handleSkewJoin: false + keys: + 0 [Column[_col2]] + 1 [Column[value]] + outputColumnNames: _col1 + Position of Big Table: 0 + Select Operator + expressions: + expr: _col1 + type: string outputColumnNames: _col1 - Position of Big Table: 0 - Select Operator - 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[key]] - 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 + Map Join Operator + condition map: + Inner Join 0 to 1 + condition expressions: + 0 + 1 + handleSkewJoin: false + keys: + 0 [Column[_col1]] + 1 [Column[key]] + 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 @@ -1801,47 +1801,47 @@ expr: _col2 type: string outputColumnNames: _col1, _col2 - Map Join Operator - condition map: - Inner Join 0 to 1 - condition expressions: - 0 {_col1} - 1 - handleSkewJoin: false - keys: - 0 [Column[_col2]] - 1 [Column[value]] + Map Join Operator + condition map: + Inner Join 0 to 1 + condition expressions: + 0 {_col1} + 1 + handleSkewJoin: false + keys: + 0 [Column[_col2]] + 1 [Column[value]] + outputColumnNames: _col1 + Position of Big Table: 0 + Select Operator + expressions: + expr: _col1 + type: string outputColumnNames: _col1 - Position of Big Table: 0 - Select Operator - 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[key]] - Position of Big Table: 0 - Select Operator - Group By Operator - aggregations: - expr: count() - bucketGroup: false - mode: hash - outputColumnNames: _col0 - Reduce Output Operator - sort order: - tag: -1 - value expressions: - expr: _col0 - type: bigint + Map Join Operator + condition map: + Inner Join 0 to 1 + condition expressions: + 0 + 1 + handleSkewJoin: false + keys: + 0 [Column[_col1]] + 1 [Column[key]] + Position of Big Table: 0 + Select Operator + Group By Operator + aggregations: + expr: count() + bucketGroup: false + mode: hash + outputColumnNames: _col0 + Reduce Output Operator + sort order: + tag: -1 + value expressions: + expr: _col0 + type: bigint Local Work: Map Reduce Local Work Reduce Operator Tree: Index: ql/src/test/results/clientpositive/multi_join_union.q.out =================================================================== --- ql/src/test/results/clientpositive/multi_join_union.q.out +++ ql/src/test/results/clientpositive/multi_join_union.q.out @@ -143,39 +143,39 @@ 1 [Column[key]] outputColumnNames: _col0, _col1, _col4, _col5 Position of Big Table: 1 - Map Join Operator - condition map: - Inner Join 0 to 1 - condition expressions: - 0 {_col4} {_col5} {_col0} {_col1} - 1 {_col0} {_col1} - handleSkewJoin: false - keys: - 0 [Column[_col5]] - 1 [Column[_col1]] - outputColumnNames: _col0, _col1, _col4, _col5, _col8, _col9 - Position of Big Table: 0 - Select Operator - expressions: - expr: _col4 - type: string - expr: _col5 - type: string - expr: _col0 - type: string - expr: _col1 - type: string - expr: _col8 - type: string - expr: _col9 - type: string - outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 - File Output Operator - compressed: false - GlobalTableId: 0 - table: - input format: org.apache.hadoop.mapred.TextInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + 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