hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From li...@apache.org
Subject hive git commit: HIVE-16155: No need for ConditionalTask if no conditional map join is created (Rui reviewed by Xuefu)
Date Mon, 13 Mar 2017 04:16:31 GMT
Repository: hive
Updated Branches:
  refs/heads/master e32f6622f -> 37ed5aa5b


HIVE-16155: No need for ConditionalTask if no conditional map join is created (Rui reviewed
by Xuefu)


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

Branch: refs/heads/master
Commit: 37ed5aa5b1bd733a0e74c55c1707559d78dea087
Parents: e32f662
Author: Rui Li <lirui@apache.org>
Authored: Mon Mar 13 12:16:28 2017 +0800
Committer: Rui Li <lirui@apache.org>
Committed: Mon Mar 13 12:16:28 2017 +0800

----------------------------------------------------------------------
 .../optimizer/physical/CommonJoinTaskDispatcher.java | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/37ed5aa5/ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/CommonJoinTaskDispatcher.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/CommonJoinTaskDispatcher.java
b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/CommonJoinTaskDispatcher.java
index f7f6d1e..8ed3079 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/CommonJoinTaskDispatcher.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/CommonJoinTaskDispatcher.java
@@ -483,12 +483,6 @@ public class CommonJoinTaskDispatcher extends AbstractJoinTaskDispatcher
impleme
         if (!bigTableCandidates.contains(pos)) {
           continue;
         }
-        // deep copy a new mapred work from xml
-        // Once HIVE-4396 is in, it would be faster to use a cheaper method to clone the
plan
-        MapredWork newWork = SerializationUtilities.clonePlan(currTask.getWork());
-
-        // create map join task and set big table as i
-        MapRedTask newTask = convertTaskToMapJoinTask(newWork, pos);
 
         Operator<?> startOp = joinOp.getParentOperators().get(pos);
         Set<String> aliases = GenMapRedUtils.findAliases(currWork, startOp);
@@ -498,6 +492,11 @@ public class CommonJoinTaskDispatcher extends AbstractJoinTaskDispatcher
impleme
           continue;
         }
 
+        MapredWork newWork = SerializationUtilities.clonePlan(currTask.getWork());
+
+        // create map join task and set big table as i
+        MapRedTask newTask = convertTaskToMapJoinTask(newWork, pos);
+
         // add into conditional task
         listWorks.add(newTask.getWork());
         listTasks.add(newTask);
@@ -515,6 +514,10 @@ public class CommonJoinTaskDispatcher extends AbstractJoinTaskDispatcher
impleme
       throw new SemanticException("Generate Map Join Task Error: " + e.getMessage(), e);
     }
 
+    if (listTasks.isEmpty()) {
+      return currTask;
+    }
+
     // insert current common join task to conditional task
     listWorks.add(currTask.getWork());
     listTasks.add(currTask);


Mime
View raw message