You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by gu...@apache.org on 2013/08/15 01:37:28 UTC

svn commit: r1514096 - /hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/parse/TaskCompiler.java

Author: gunther
Date: Wed Aug 14 23:37:27 2013
New Revision: 1514096

URL: http://svn.apache.org/r1514096
Log:
HIVE-5080: Add hook to do additional optimization on the operator plan in tez (Gunther Hagleitner)

Modified:
    hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/parse/TaskCompiler.java

Modified: hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/parse/TaskCompiler.java
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/parse/TaskCompiler.java?rev=1514096&r1=1514095&r2=1514096&view=diff
==============================================================================
--- hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/parse/TaskCompiler.java (original)
+++ hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/parse/TaskCompiler.java Wed Aug 14 23:37:27 2013
@@ -93,6 +93,8 @@ public abstract class TaskCompiler {
       return;
     }
 
+    optimizeOperatorPlan(pCtx, inputs, outputs);
+
     /*
      * In case of a select, use a fetch task instead of a move task.
      * If the select is from analyze table column rewrite, don't create a fetch task. Instead create
@@ -335,6 +337,13 @@ public abstract class TaskCompiler {
   protected abstract void generateCountersTask(Task<? extends Serializable> rootTask);
 
   /*
+   * Called at the beginning of the compile phase to have another chance to optimize the operator plan
+   */
+  protected void optimizeOperatorPlan(ParseContext pCtxSet, Set<ReadEntity> inputs, 
+      Set<WriteEntity> outputs) throws SemanticException {
+  }
+
+  /*
    * Called after the tasks have been generated to run another round of optimization
    */
   protected abstract void optimizeTaskPlan(List<Task<? extends Serializable>> rootTasks,