Author: gopalv
Date: Mon Oct 13 21:57:59 2014
New Revision: 1631572

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

Modified:
    hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/MapJoinOperator.java

Modified: 
hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/MapJoinOperator.java
URL: 
http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/MapJoinOperator.java?rev=1631572&r1=1631571&r2=1631572&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/MapJoinOperator.java 
(original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/MapJoinOperator.java 
Mon Oct 13 21:57:59 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