hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hashut...@apache.org
Subject svn commit: r1519833 - in /hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql: exec/vector/VectorFilterOperator.java exec/vector/VectorSelectOperator.java optimizer/physical/Vectorizer.java plan/AbstractOperatorDesc.java
Date Tue, 03 Sep 2013 20:16:10 GMT
Author: hashutosh
Date: Tue Sep  3 20:16:10 2013
New Revision: 1519833

URL: http://svn.apache.org/r1519833
Log:
HIVE-5187 : Enhance explain to indicate vectorized execution of operators. (Jitendra Nath
Pandey via Ashutosh Chauhan)

Modified:
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorFilterOperator.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorSelectOperator.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/Vectorizer.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/plan/AbstractOperatorDesc.java

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorFilterOperator.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorFilterOperator.java?rev=1519833&r1=1519832&r2=1519833&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorFilterOperator.java
(original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorFilterOperator.java
Tue Sep  3 20:16:10 2013
@@ -48,11 +48,11 @@ public class VectorFilterOperator extend
     vContext.setOperatorType(OperatorType.FILTER);
     ExprNodeDesc oldExpression = ((FilterDesc) conf).getPredicate();
     conditionEvaluator = vContext.getVectorExpression(oldExpression);
+    this.conf = (FilterDesc) conf;
   }
 
   public VectorFilterOperator() {
     super();
-    this.conf = (FilterDesc) conf;
   }
 
 

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorSelectOperator.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorSelectOperator.java?rev=1519833&r1=1519832&r2=1519833&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorSelectOperator.java
(original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorSelectOperator.java
Tue Sep  3 20:16:10 2013
@@ -27,7 +27,6 @@ import org.apache.hadoop.hive.ql.exec.ve
 import org.apache.hadoop.hive.ql.exec.vector.expressions.VectorExpressionWriter;
 import org.apache.hadoop.hive.ql.exec.vector.expressions.VectorExpressionWriterFactory;
 import org.apache.hadoop.hive.ql.metadata.HiveException;
-import org.apache.hadoop.hive.ql.plan.Explain;
 import org.apache.hadoop.hive.ql.plan.ExprNodeDesc;
 import org.apache.hadoop.hive.ql.plan.OperatorDesc;
 import org.apache.hadoop.hive.ql.plan.SelectDesc;
@@ -130,7 +129,6 @@ public class VectorSelectOperator extend
     return "SEL";
   }
 
-  @Explain (displayName = "vector expressions")
   public VectorExpression[] getvExpressions() {
     return vExpressions;
   }

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/Vectorizer.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/Vectorizer.java?rev=1519833&r1=1519832&r2=1519833&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/Vectorizer.java
(original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/Vectorizer.java
Tue Sep  3 20:16:10 2013
@@ -60,6 +60,7 @@ import org.apache.hadoop.hive.ql.lib.Tas
 import org.apache.hadoop.hive.ql.metadata.HiveException;
 import org.apache.hadoop.hive.ql.parse.RowResolver;
 import org.apache.hadoop.hive.ql.parse.SemanticException;
+import org.apache.hadoop.hive.ql.plan.AbstractOperatorDesc;
 import org.apache.hadoop.hive.ql.plan.AggregationDesc;
 import org.apache.hadoop.hive.ql.plan.ExprNodeDesc;
 import org.apache.hadoop.hive.ql.plan.ExprNodeGenericFuncDesc;
@@ -534,6 +535,7 @@ public class Vectorizer implements Physi
           c.replaceParent(op, vectorOp);
         }
       }
+      ((AbstractOperatorDesc) vectorOp.getConf()).setVectorMode(true);
     }
     return vectorOp;
   }

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/plan/AbstractOperatorDesc.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/plan/AbstractOperatorDesc.java?rev=1519833&r1=1519832&r2=1519833&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/plan/AbstractOperatorDesc.java
(original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/plan/AbstractOperatorDesc.java
Tue Sep  3 20:16:10 2013
@@ -19,8 +19,20 @@
 package org.apache.hadoop.hive.ql.plan;
 
 public class AbstractOperatorDesc implements OperatorDesc {
+
+  private boolean vectorMode = false;
+
   @Override
   public Object clone() throws CloneNotSupportedException {
     throw new CloneNotSupportedException("clone not supported");
   }
+
+  @Explain(displayName = "Vectorized execution", displayOnlyOnTrue = true)
+  public boolean getVectorModeOn() {
+    return vectorMode;
+  }
+
+  public void setVectorMode(boolean vm) {
+    this.vectorMode = vm;
+  }
 }



Mime
View raw message