Index: ql/src/test/results/clientpositive/vector_left_outer_join.q.out =================================================================== --- ql/src/test/results/clientpositive/vector_left_outer_join.q.out (revision 0) +++ ql/src/test/results/clientpositive/vector_left_outer_join.q.out (revision 0) @@ -0,0 +1,156 @@ +PREHOOK: query: explain +select count(*) from (select c.ctinyint +from alltypesorc c +left outer join alltypesorc cd + on cd.cint = c.cint +left outer join alltypesorc hd + on hd.ctinyint = c.ctinyint +) t1 +PREHOOK: type: QUERY +POSTHOOK: query: explain +select count(*) from (select c.ctinyint +from alltypesorc c +left outer join alltypesorc cd + on cd.cint = c.cint +left outer join alltypesorc hd + on hd.ctinyint = c.ctinyint +) t1 +POSTHOOK: type: QUERY +ABSTRACT SYNTAX TREE: + (TOK_QUERY (TOK_FROM (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_LEFTOUTERJOIN (TOK_LEFTOUTERJOIN (TOK_TABREF (TOK_TABNAME alltypesorc) c) (TOK_TABREF (TOK_TABNAME alltypesorc) cd) (= (. (TOK_TABLE_OR_COL cd) cint) (. (TOK_TABLE_OR_COL c) cint))) (TOK_TABREF (TOK_TABNAME alltypesorc) hd) (= (. (TOK_TABLE_OR_COL hd) ctinyint) (. (TOK_TABLE_OR_COL c) ctinyint)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL c) ctinyint))))) t1)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTIONSTAR count))))) + +STAGE DEPENDENCIES: + Stage-7 is a root stage + Stage-2 depends on stages: Stage-7 + Stage-0 is a root stage + +STAGE PLANS: + Stage: Stage-7 + Map Reduce Local Work + Alias -> Map Local Tables: + t1:cd + Fetch Operator + limit: -1 + t1:hd + Fetch Operator + limit: -1 + Alias -> Map Local Operator Tree: + t1:cd + TableScan + alias: cd + HashTable Sink Operator + condition expressions: + 0 {ctinyint} + 1 + handleSkewJoin: false + keys: + 0 [Column[cint]] + 1 [Column[cint]] + Position of Big Table: 0 + t1:hd + TableScan + alias: hd + HashTable Sink Operator + condition expressions: + 0 + 1 + handleSkewJoin: false + keys: + 0 [Column[_col0]] + 1 [Column[ctinyint]] + Position of Big Table: 0 + + Stage: Stage-2 + Map Reduce + Alias -> Map Operator Tree: + t1:c + TableScan + alias: c + Map Join Operator + condition map: + Left Outer Join0 to 1 + condition expressions: + 0 {ctinyint} + 1 + handleSkewJoin: false + keys: + 0 [Column[cint]] + 1 [Column[cint]] + outputColumnNames: _col0 + Position of Big Table: 0 + Vectorized execution: true + Map Join Operator + condition map: + Left Outer Join0 to 1 + condition expressions: + 0 + 1 + handleSkewJoin: false + keys: + 0 [Column[_col0]] + 1 [Column[ctinyint]] + Position of Big Table: 0 + Vectorized execution: true + Select Operator + Vectorized execution: true + Group By Operator + aggregations: + expr: count() + bucketGroup: false + mode: hash + outputColumnNames: _col0 + Vectorized execution: true + Reduce Output Operator + sort order: + tag: -1 + value expressions: + expr: _col0 + type: bigint + Local Work: + Map Reduce Local Work + Reduce Operator Tree: + Group By Operator + aggregations: + expr: count(VALUE._col0) + bucketGroup: false + mode: mergepartial + outputColumnNames: _col0 + Select Operator + expressions: + expr: _col0 + type: bigint + 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 + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + Stage: Stage-0 + Fetch Operator + limit: -1 + + +PREHOOK: query: select count(*) from (select c.ctinyint +from alltypesorc c +left outer join alltypesorc cd + on cd.cint = c.cint +left outer join alltypesorc hd + on hd.ctinyint = c.ctinyint +) t1 +PREHOOK: type: QUERY +PREHOOK: Input: default@alltypesorc +#### A masked pattern was here #### +POSTHOOK: query: select count(*) from (select c.ctinyint +from alltypesorc c +left outer join alltypesorc cd + on cd.cint = c.cint +left outer join alltypesorc hd + on hd.ctinyint = c.ctinyint +) t1 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@alltypesorc +#### A masked pattern was here #### +192735557 Index: ql/src/test/queries/clientpositive/vector_left_outer_join.q =================================================================== --- ql/src/test/queries/clientpositive/vector_left_outer_join.q (revision 0) +++ ql/src/test/queries/clientpositive/vector_left_outer_join.q (revision 0) @@ -0,0 +1,21 @@ +set hive.vectorized.execution.enabled=true; +set hive.auto.convert.join=true; +explain +select count(*) from (select c.ctinyint +from alltypesorc c +left outer join alltypesorc cd + on cd.cint = c.cint +left outer join alltypesorc hd + on hd.ctinyint = c.ctinyint +) t1 +; +select count(*) from (select c.ctinyint +from alltypesorc c +left outer join alltypesorc cd + on cd.cint = c.cint +left outer join alltypesorc hd + on hd.ctinyint = c.ctinyint +) t1; + +set hive.auto.convert.join=false; +set hive.vectorized.execution.enabled=false; Index: ql/src/java/org/apache/hadoop/hive/ql/exec/CommonJoinOperator.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/exec/CommonJoinOperator.java (revision 1541617) +++ ql/src/java/org/apache/hadoop/hive/ql/exec/CommonJoinOperator.java (working copy) @@ -434,7 +434,7 @@ } } if (forward) { - internalForward(forwardCache, null); + internalForward(forwardCache, outputObjInspector); countAfterReport = 0; } }