diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/MapJoinOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/MapJoinOperator.java index e3877d9..4a82845 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/MapJoinOperator.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/MapJoinOperator.java @@ -171,9 +171,14 @@ public void generateMapMetaData() throws HiveException, SerDeException { 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 {