You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by jd...@apache.org on 2015/12/05 00:47:44 UTC

hive git commit: HIVE-12563: NullPointerException with 3-way Tez merge join (Jason Dere, reviewed by Gunther Hagleitner)

Repository: hive
Updated Branches:
  refs/heads/master 3c8b9c27b -> b2efd1a69


HIVE-12563: NullPointerException with 3-way Tez merge join (Jason Dere, reviewed by Gunther Hagleitner)


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

Branch: refs/heads/master
Commit: b2efd1a695ddaf073bbe0bf311075e542e1b865b
Parents: 3c8b9c2
Author: Jason Dere <jd...@hortonworks.com>
Authored: Fri Dec 4 15:45:40 2015 -0800
Committer: Jason Dere <jd...@hortonworks.com>
Committed: Fri Dec 4 15:46:44 2015 -0800

----------------------------------------------------------------------
 .../test/resources/testconfiguration.properties |  1 +
 .../hive/ql/exec/CommonMergeJoinOperator.java   |  2 +-
 .../queries/clientpositive/mergejoin_3way.q     | 15 ++++++++++
 .../clientpositive/tez/mergejoin_3way.q.out     | 30 ++++++++++++++++++++
 4 files changed, 47 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/b2efd1a6/itests/src/test/resources/testconfiguration.properties
----------------------------------------------------------------------
diff --git a/itests/src/test/resources/testconfiguration.properties b/itests/src/test/resources/testconfiguration.properties
index 2819d97..ed84c0f 100644
--- a/itests/src/test/resources/testconfiguration.properties
+++ b/itests/src/test/resources/testconfiguration.properties
@@ -383,6 +383,7 @@ minitez.query.files=bucket_map_join_tez1.q,\
   hybridgrace_hashjoin_1.q,\
   hybridgrace_hashjoin_2.q,\
   mapjoin_decimal.q,\
+  mergejoin_3way.q,\
   lvj_mapjoin.q,\
   llapdecider.q,\
   mrr.q,\

http://git-wip-us.apache.org/repos/asf/hive/blob/b2efd1a6/ql/src/java/org/apache/hadoop/hive/ql/exec/CommonMergeJoinOperator.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/CommonMergeJoinOperator.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/CommonMergeJoinOperator.java
index ede8dc8..1cbd13d 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/CommonMergeJoinOperator.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/CommonMergeJoinOperator.java
@@ -462,7 +462,7 @@ public class CommonMergeJoinOperator extends AbstractMapJoinOperator<CommonMerge
     while (dataInCache) {
       for (byte pos = 0; pos < order.length; pos++) {
         if (this.foundNextKeyGroup[pos] && this.nextKeyWritables[pos] != null) {
-          promoteNextGroupToCandidate(pos);
+          fetchNextGroup(pos);
         }
       }
       joinOneGroup();

http://git-wip-us.apache.org/repos/asf/hive/blob/b2efd1a6/ql/src/test/queries/clientpositive/mergejoin_3way.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/mergejoin_3way.q b/ql/src/test/queries/clientpositive/mergejoin_3way.q
new file mode 100644
index 0000000..4c50f1d
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/mergejoin_3way.q
@@ -0,0 +1,15 @@
+set hive.auto.convert.join=false;
+set hive.cbo.enable=false;
+
+select
+  a.key, b.value, c.value
+from
+  src a,
+  src1 b,
+  src1 c
+where
+  a.key = b.key and a.key = c.key
+  and b.key != '' and b.value != ''
+  and a.value > 'wal_6789'
+  and c.value > 'wal_6789'
+;

http://git-wip-us.apache.org/repos/asf/hive/blob/b2efd1a6/ql/src/test/results/clientpositive/tez/mergejoin_3way.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/tez/mergejoin_3way.q.out b/ql/src/test/results/clientpositive/tez/mergejoin_3way.q.out
new file mode 100644
index 0000000..e644051
--- /dev/null
+++ b/ql/src/test/results/clientpositive/tez/mergejoin_3way.q.out
@@ -0,0 +1,30 @@
+PREHOOK: query: select
+  a.key, b.value, c.value
+from
+  src a,
+  src1 b,
+  src1 c
+where
+  a.key = b.key and a.key = c.key
+  and b.key != '' and b.value != ''
+  and a.value > 'wal_6789'
+  and c.value > 'wal_6789'
+PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+PREHOOK: Input: default@src1
+#### A masked pattern was here ####
+POSTHOOK: query: select
+  a.key, b.value, c.value
+from
+  src a,
+  src1 b,
+  src1 c
+where
+  a.key = b.key and a.key = c.key
+  and b.key != '' and b.value != ''
+  and a.value > 'wal_6789'
+  and c.value > 'wal_6789'
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+POSTHOOK: Input: default@src1
+#### A masked pattern was here ####