hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jcama...@apache.org
Subject hive git commit: HIVE-12465: Hive might produce wrong results when (outer) joins are merged (Jesus Camacho Rodriguez, reviewed by Ashutosh Chauhan)
Date Fri, 27 Nov 2015 09:29:03 GMT
Repository: hive
Updated Branches:
  refs/heads/branch-1 b9eb66760 -> f3fa4e46a


HIVE-12465: Hive might produce wrong results when (outer) joins are merged (Jesus Camacho
Rodriguez, reviewed by Ashutosh Chauhan)


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/f3fa4e46
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/f3fa4e46
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/f3fa4e46

Branch: refs/heads/branch-1
Commit: f3fa4e46ac8e82eba85949b9bd71a86652563c35
Parents: b9eb667
Author: Jesus Camacho Rodriguez <jcamacho@apache.org>
Authored: Fri Nov 27 10:28:47 2015 +0100
Committer: Jesus Camacho Rodriguez <jcamacho@apache.org>
Committed: Fri Nov 27 10:28:47 2015 +0100

----------------------------------------------------------------------
 .../java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java  | 2 +-
 ql/src/test/results/clientpositive/mergejoin.q.out              | 5 +----
 ql/src/test/results/clientpositive/tez/mergejoin.q.out          | 5 +----
 3 files changed, 3 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/f3fa4e46/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java b/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
index 5d2a9bd..1ec2d94 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
@@ -2267,7 +2267,7 @@ public class SemanticAnalyzer extends BaseSemanticAnalyzer {
           if (rightCondAl1.size() != 0) {
             QBJoinTree leftTree = joinTree.getJoinSrc();
             List<String> leftTreeLeftSrc = new ArrayList<String>();
-            if (leftTree != null) {
+            if (leftTree != null && leftTree.getNoOuterJoin()) {
               String leftTreeRightSource = leftTree.getRightAliases() != null &&
                   leftTree.getRightAliases().length > 0 ?
                   leftTree.getRightAliases()[0] : null;

http://git-wip-us.apache.org/repos/asf/hive/blob/f3fa4e46/ql/src/test/results/clientpositive/mergejoin.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/mergejoin.q.out b/ql/src/test/results/clientpositive/mergejoin.q.out
index cb96ab3..eebf0ce 100644
--- a/ql/src/test/results/clientpositive/mergejoin.q.out
+++ b/ql/src/test/results/clientpositive/mergejoin.q.out
@@ -2604,6 +2604,7 @@ POSTHOOK: Input: default@tab_part@ds=2008-04-08
 #### A masked pattern was here ####
 NULL	NULL	NULL	98	val_98	2008-04-08
 NULL	NULL	NULL	98	val_98	2008-04-08
+Warning: Shuffle Join JOIN[9][tables = [a, b]] in Stage 'Stage-1:MAPRED' is a cross product
 PREHOOK: query: select * from
 (select * from tab where tab.key = 0)a
 full outer join
@@ -2624,10 +2625,6 @@ POSTHOOK: Input: default@tab@ds=2008-04-08
 POSTHOOK: Input: default@tab_part
 POSTHOOK: Input: default@tab_part@ds=2008-04-08
 #### A masked pattern was here ####
-NULL	NULL	NULL	98	val_98	2008-04-08	98	val_98	2008-04-08
-NULL	NULL	NULL	98	val_98	2008-04-08	98	val_98	2008-04-08
-NULL	NULL	NULL	98	val_98	2008-04-08	98	val_98	2008-04-08
-NULL	NULL	NULL	98	val_98	2008-04-08	98	val_98	2008-04-08
 Warning: Shuffle Join JOIN[9][tables = [a, b]] in Stage 'Stage-1:MAPRED' is a cross product
 PREHOOK: query: select * from
 (select * from tab where tab.key = 0)a

http://git-wip-us.apache.org/repos/asf/hive/blob/f3fa4e46/ql/src/test/results/clientpositive/tez/mergejoin.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/tez/mergejoin.q.out b/ql/src/test/results/clientpositive/tez/mergejoin.q.out
index c4be404..65cc9a8 100644
--- a/ql/src/test/results/clientpositive/tez/mergejoin.q.out
+++ b/ql/src/test/results/clientpositive/tez/mergejoin.q.out
@@ -2577,6 +2577,7 @@ POSTHOOK: Input: default@tab_part@ds=2008-04-08
 #### A masked pattern was here ####
 NULL	NULL	NULL	98	val_98	2008-04-08
 NULL	NULL	NULL	98	val_98	2008-04-08
+Warning: Shuffle Join MERGEJOIN[24][tables = [a, b]] in Stage 'Reducer 2' is a cross product
 PREHOOK: query: select * from
 (select * from tab where tab.key = 0)a
 full outer join
@@ -2597,10 +2598,6 @@ POSTHOOK: Input: default@tab@ds=2008-04-08
 POSTHOOK: Input: default@tab_part
 POSTHOOK: Input: default@tab_part@ds=2008-04-08
 #### A masked pattern was here ####
-NULL	NULL	NULL	98	val_98	2008-04-08	98	val_98	2008-04-08
-NULL	NULL	NULL	98	val_98	2008-04-08	98	val_98	2008-04-08
-NULL	NULL	NULL	98	val_98	2008-04-08	98	val_98	2008-04-08
-NULL	NULL	NULL	98	val_98	2008-04-08	98	val_98	2008-04-08
 Warning: Shuffle Join MERGEJOIN[17][tables = [a, b]] in Stage 'Reducer 2' is a cross product
 PREHOOK: query: select * from
 (select * from tab where tab.key = 0)a


Mime
View raw message