Author: gunther
Date: Tue Oct 28 17:20:10 2014
New Revision: 1634923
URL: http://svn.apache.org/r1634923
Log:
HIVE-8628: NPE in case of shuffle join in tez (Vikram Dixit K via Gunther
Hagleitner)
Modified:
hive/branches/branch-0.14/ql/src/java/org/apache/hadoop/hive/ql/exec/CommonMergeJoinOperator.java
Modified:
hive/branches/branch-0.14/ql/src/java/org/apache/hadoop/hive/ql/exec/CommonMergeJoinOperator.java
URL:
http://svn.apache.org/viewvc/hive/branches/branch-0.14/ql/src/java/org/apache/hadoop/hive/ql/exec/CommonMergeJoinOperator.java?rev=1634923&r1=1634922&r2=1634923&view=diff
==============================================================================
---
hive/branches/branch-0.14/ql/src/java/org/apache/hadoop/hive/ql/exec/CommonMergeJoinOperator.java
(original)
+++
hive/branches/branch-0.14/ql/src/java/org/apache/hadoop/hive/ql/exec/CommonMergeJoinOperator.java
Tue Oct 28 17:20:10 2014
@@ -306,6 +306,10 @@ public class CommonMergeJoinOperator ext
public void closeOp(boolean abort) throws HiveException {
joinFinalLeftData();
+ if (!((joinKeysObjectInspectors != null) &&
(joinKeysObjectInspectors[alias] != null))) {
+ super.closeOp(abort);
+ }
+
// clean up
for (int pos = 0; pos < order.length; pos++) {
if (pos != posBigTable) {
@@ -362,6 +366,9 @@ public class CommonMergeJoinOperator ext
joinOneGroup();
dataInCache = false;
for (byte pos = 0; pos < order.length; pos++) {
+ if (candidateStorage[pos] == null) {
+ continue;
+ }
if (this.candidateStorage[pos].rowCount() > 0) {
dataInCache = true;
break;