Author: gopalv
Date: Mon Oct 13 21:58:06 2014
New Revision: 1631573

URL: http://svn.apache.org/r1631573
Log:
HIVE-8328: Mapjoins in reducer vertices should reuse cached hashtables (Gopal 
V, reviewed by Vikram Dixit)

Modified:
    
hive/branches/branch-0.14/ql/src/java/org/apache/hadoop/hive/ql/exec/MapJoinOperator.java

Modified: 
hive/branches/branch-0.14/ql/src/java/org/apache/hadoop/hive/ql/exec/MapJoinOperator.java
URL: 
http://svn.apache.org/viewvc/hive/branches/branch-0.14/ql/src/java/org/apache/hadoop/hive/ql/exec/MapJoinOperator.java?rev=1631573&r1=1631572&r2=1631573&view=diff
==============================================================================
--- 
hive/branches/branch-0.14/ql/src/java/org/apache/hadoop/hive/ql/exec/MapJoinOperator.java
 (original)
+++ 
hive/branches/branch-0.14/ql/src/java/org/apache/hadoop/hive/ql/exec/MapJoinOperator.java
 Mon Oct 13 21:58:06 2014
@@ -171,9 +171,14 @@ public class MapJoinOperator extends Abs
 
   private void loadHashTable() throws HiveException {
 
-    if ((this.getExecContext() != null)
-        && ((this.getExecContext().getLocalWork() == null) || 
(!this.getExecContext()
-            .getLocalWork().getInputFileChangeSensitive()))) {
+    if ((this.getExecContext() == null)
+        || (this.getExecContext().getLocalWork() == null)
+        || (this.getExecContext().getLocalWork().getInputFileChangeSensitive() 
== false)
+    ) {
+      /*
+       * This early-exit criteria is not applicable if the local work is 
sensitive to input file changes.
+       * But the check does no apply if there is no local work, or if this is 
a reducer vertex (execContext is null).
+       */
       if (hashTblInitedOnce) {
         return;
       } else {


Reply via email to