hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gunt...@apache.org
Subject svn commit: r1535174 [2/8] - in /hive/branches/tez: ./ ant/src/org/apache/hadoop/hive/ant/ common/src/java/conf/ hcatalog/core/src/main/java/org/apache/hive/hcatalog/data/transfer/impl/ hcatalog/core/src/main/java/org/apache/hive/hcatalog/mapreduce/ hc...
Date Wed, 23 Oct 2013 20:50:43 GMT
Modified: hive/branches/tez/ql/src/gen/vectorization/ExpressionTemplates/FilterColumnCompareScalar.txt
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/gen/vectorization/ExpressionTemplates/FilterColumnCompareScalar.txt?rev=1535174&r1=1535173&r2=1535174&view=diff
==============================================================================
--- hive/branches/tez/ql/src/gen/vectorization/ExpressionTemplates/FilterColumnCompareScalar.txt
(original)
+++ hive/branches/tez/ql/src/gen/vectorization/ExpressionTemplates/FilterColumnCompareScalar.txt
Wed Oct 23 20:50:38 2013
@@ -21,6 +21,7 @@ package org.apache.hadoop.hive.ql.exec.v
 import org.apache.hadoop.hive.ql.exec.vector.expressions.VectorExpression;
 import org.apache.hadoop.hive.ql.exec.vector.<InputColumnVectorType>;
 import org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch;
+import org.apache.hadoop.hive.ql.exec.vector.VectorExpressionDescriptor;
 
 /**
  * Generated from template FilterColumnCompareScalar.txt, which covers binary comparison

@@ -155,4 +156,18 @@ public class <ClassName> extends VectorE
   public void setValue(<OperandType2> value) {
     this.value = value;
   }
+
+  @Override
+  public VectorExpressionDescriptor.Descriptor getDescriptor() {
+    return (new VectorExpressionDescriptor.Builder())
+        .setMode(
+            VectorExpressionDescriptor.Mode.FILTER)
+        .setNumArguments(2)
+        .setArgumentTypes(
+            VectorExpressionDescriptor.ArgumentType.getType("<OperandType1>"),
+            VectorExpressionDescriptor.ArgumentType.getType("<OperandType2>"))
+        .setInputExpressionTypes(
+            VectorExpressionDescriptor.InputExpressionType.COLUMN,
+            VectorExpressionDescriptor.InputExpressionType.SCALAR).build();
+  }
 }

Modified: hive/branches/tez/ql/src/gen/vectorization/ExpressionTemplates/FilterScalarCompareColumn.txt
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/gen/vectorization/ExpressionTemplates/FilterScalarCompareColumn.txt?rev=1535174&r1=1535173&r2=1535174&view=diff
==============================================================================
--- hive/branches/tez/ql/src/gen/vectorization/ExpressionTemplates/FilterScalarCompareColumn.txt
(original)
+++ hive/branches/tez/ql/src/gen/vectorization/ExpressionTemplates/FilterScalarCompareColumn.txt
Wed Oct 23 20:50:38 2013
@@ -21,6 +21,7 @@ package org.apache.hadoop.hive.ql.exec.v
 import org.apache.hadoop.hive.ql.exec.vector.expressions.VectorExpression;
 import org.apache.hadoop.hive.ql.exec.vector.<InputColumnVectorType>;
 import org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch;
+import org.apache.hadoop.hive.ql.exec.vector.VectorExpressionDescriptor;
 
 /**
  * Generated from template FilterScalarCompareColumn.txt, which covers binary comparison

@@ -34,7 +35,7 @@ public class <ClassName> extends VectorE
   private int colNum;
   private <OperandType1> value;
 
-  public <ClassName>(int colNum, <OperandType1> value) { 
+  public <ClassName>(<OperandType1> value, int colNum) { 
     this.colNum = colNum;
     this.value = value;
   }
@@ -155,4 +156,18 @@ public class <ClassName> extends VectorE
   public void setValue(<OperandType1> value) {
     this.value = value;
   }
+
+  @Override
+  public VectorExpressionDescriptor.Descriptor getDescriptor() {
+    return (new VectorExpressionDescriptor.Builder())
+        .setMode(
+            VectorExpressionDescriptor.Mode.FILTER)
+        .setNumArguments(2)
+        .setArgumentTypes(
+            VectorExpressionDescriptor.ArgumentType.getType("<OperandType1>"),
+            VectorExpressionDescriptor.ArgumentType.getType("<OperandType2>"))
+        .setInputExpressionTypes(
+            VectorExpressionDescriptor.InputExpressionType.SCALAR,
+            VectorExpressionDescriptor.InputExpressionType.COLUMN).build();
+  }
 }

Modified: hive/branches/tez/ql/src/gen/vectorization/ExpressionTemplates/FilterStringColumnCompareColumn.txt
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/gen/vectorization/ExpressionTemplates/FilterStringColumnCompareColumn.txt?rev=1535174&r1=1535173&r2=1535174&view=diff
==============================================================================
--- hive/branches/tez/ql/src/gen/vectorization/ExpressionTemplates/FilterStringColumnCompareColumn.txt
(original)
+++ hive/branches/tez/ql/src/gen/vectorization/ExpressionTemplates/FilterStringColumnCompareColumn.txt
Wed Oct 23 20:50:38 2013
@@ -22,6 +22,7 @@ import org.apache.hadoop.hive.ql.exec.ve
 import org.apache.hadoop.hive.ql.exec.vector.expressions.StringExpr;
 import org.apache.hadoop.hive.ql.exec.vector.BytesColumnVector;
 import org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch;
+import org.apache.hadoop.hive.ql.exec.vector.VectorExpressionDescriptor;
 
 /**
  * Filter the rows in a batch by comparing one string column to another. 
@@ -474,4 +475,18 @@ public class <ClassName> extends VectorE
   public void setColNum2(int colNum2) {
     this.colNum2 = colNum2;
   }
+
+  @Override
+  public VectorExpressionDescriptor.Descriptor getDescriptor() {
+    return (new VectorExpressionDescriptor.Builder())
+        .setMode(
+            VectorExpressionDescriptor.Mode.FILTER)
+        .setNumArguments(2)
+        .setArgumentTypes(
+            VectorExpressionDescriptor.ArgumentType.getType("string"),
+            VectorExpressionDescriptor.ArgumentType.getType("string"))
+        .setInputExpressionTypes(
+            VectorExpressionDescriptor.InputExpressionType.COLUMN,
+            VectorExpressionDescriptor.InputExpressionType.COLUMN).build();
+  }
 }

Modified: hive/branches/tez/ql/src/gen/vectorization/ExpressionTemplates/FilterStringColumnCompareScalar.txt
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/gen/vectorization/ExpressionTemplates/FilterStringColumnCompareScalar.txt?rev=1535174&r1=1535173&r2=1535174&view=diff
==============================================================================
--- hive/branches/tez/ql/src/gen/vectorization/ExpressionTemplates/FilterStringColumnCompareScalar.txt
(original)
+++ hive/branches/tez/ql/src/gen/vectorization/ExpressionTemplates/FilterStringColumnCompareScalar.txt
Wed Oct 23 20:50:38 2013
@@ -22,6 +22,7 @@ import org.apache.hadoop.hive.ql.exec.ve
 import org.apache.hadoop.hive.ql.exec.vector.expressions.StringExpr;
 import org.apache.hadoop.hive.ql.exec.vector.BytesColumnVector;
 import org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch;
+import org.apache.hadoop.hive.ql.exec.vector.VectorExpressionDescriptor;
 
 /**
  * This is a generated class to evaluate a <OperatorSymbol> comparison on a vector
of strings.
@@ -158,4 +159,18 @@ public class <ClassName> extends VectorE
   public void setValue(byte[] value) {
     this.value = value;
   }
+
+  @Override
+  public VectorExpressionDescriptor.Descriptor getDescriptor() {
+    return (new VectorExpressionDescriptor.Builder())
+        .setMode(
+            VectorExpressionDescriptor.Mode.FILTER)
+        .setNumArguments(2)
+        .setArgumentTypes(
+            VectorExpressionDescriptor.ArgumentType.getType("string"),
+            VectorExpressionDescriptor.ArgumentType.getType("string"))
+        .setInputExpressionTypes(
+            VectorExpressionDescriptor.InputExpressionType.COLUMN,
+            VectorExpressionDescriptor.InputExpressionType.SCALAR).build();
+  }
 }

Modified: hive/branches/tez/ql/src/gen/vectorization/ExpressionTemplates/FilterStringScalarCompareColumn.txt
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/gen/vectorization/ExpressionTemplates/FilterStringScalarCompareColumn.txt?rev=1535174&r1=1535173&r2=1535174&view=diff
==============================================================================
--- hive/branches/tez/ql/src/gen/vectorization/ExpressionTemplates/FilterStringScalarCompareColumn.txt
(original)
+++ hive/branches/tez/ql/src/gen/vectorization/ExpressionTemplates/FilterStringScalarCompareColumn.txt
Wed Oct 23 20:50:38 2013
@@ -22,6 +22,7 @@ import org.apache.hadoop.hive.ql.exec.ve
 import org.apache.hadoop.hive.ql.exec.vector.expressions.StringExpr;
 import org.apache.hadoop.hive.ql.exec.vector.BytesColumnVector;
 import org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch;
+import org.apache.hadoop.hive.ql.exec.vector.VectorExpressionDescriptor;
 
 /**
  * This is a generated class to evaluate a <OperatorSymbol> comparison on a vector
of strings.
@@ -34,7 +35,7 @@ public class <ClassName> extends VectorE
   private int colNum;
   private byte[] value;
 
-  public <ClassName>(int colNum, byte[] value) {
+  public <ClassName>(byte[] value, int colNum) {
     this.colNum = colNum;
     this.value = value;
   }
@@ -159,4 +160,18 @@ public class <ClassName> extends VectorE
   public void setValue(byte[] value) {
     this.value = value;
   }
+
+  @Override
+  public VectorExpressionDescriptor.Descriptor getDescriptor() {
+    return (new VectorExpressionDescriptor.Builder())
+        .setMode(
+            VectorExpressionDescriptor.Mode.FILTER)
+        .setNumArguments(2)
+        .setArgumentTypes(
+            VectorExpressionDescriptor.ArgumentType.getType("string"),
+            VectorExpressionDescriptor.ArgumentType.getType("string"))
+        .setInputExpressionTypes(
+            VectorExpressionDescriptor.InputExpressionType.SCALAR,
+            VectorExpressionDescriptor.InputExpressionType.COLUMN).build();
+  }
 }

Modified: hive/branches/tez/ql/src/gen/vectorization/ExpressionTemplates/ScalarArithmeticColumn.txt
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/gen/vectorization/ExpressionTemplates/ScalarArithmeticColumn.txt?rev=1535174&r1=1535173&r2=1535174&view=diff
==============================================================================
--- hive/branches/tez/ql/src/gen/vectorization/ExpressionTemplates/ScalarArithmeticColumn.txt
(original)
+++ hive/branches/tez/ql/src/gen/vectorization/ExpressionTemplates/ScalarArithmeticColumn.txt
Wed Oct 23 20:50:38 2013
@@ -19,6 +19,7 @@
 package org.apache.hadoop.hive.ql.exec.vector.expressions.gen;
 
 import org.apache.hadoop.hive.ql.exec.vector.expressions.VectorExpression;
+import org.apache.hadoop.hive.ql.exec.vector.VectorExpressionDescriptor;
 
 /*
  * Because of the templatized nature of the code, either or both
@@ -143,5 +144,18 @@ public class <ClassName> extends VectorE
   public void setOutputColumn(int outputColumn) {
     this.outputColumn = outputColumn;
   }
-  
+
+  @Override
+  public VectorExpressionDescriptor.Descriptor getDescriptor() {
+    return (new VectorExpressionDescriptor.Builder())
+        .setMode(
+            VectorExpressionDescriptor.Mode.PROJECTION)
+        .setNumArguments(2)
+        .setArgumentTypes(
+            VectorExpressionDescriptor.ArgumentType.getType("<OperandType1>"),
+            VectorExpressionDescriptor.ArgumentType.getType("<OperandType2>"))
+        .setInputExpressionTypes(
+            VectorExpressionDescriptor.InputExpressionType.SCALAR,
+            VectorExpressionDescriptor.InputExpressionType.COLUMN).build();
+  }
 }

Modified: hive/branches/tez/ql/src/gen/vectorization/ExpressionTemplates/ScalarCompareColumn.txt
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/gen/vectorization/ExpressionTemplates/ScalarCompareColumn.txt?rev=1535174&r1=1535173&r2=1535174&view=diff
==============================================================================
--- hive/branches/tez/ql/src/gen/vectorization/ExpressionTemplates/ScalarCompareColumn.txt
(original)
+++ hive/branches/tez/ql/src/gen/vectorization/ExpressionTemplates/ScalarCompareColumn.txt
Wed Oct 23 20:50:38 2013
@@ -22,6 +22,7 @@ import org.apache.hadoop.hive.ql.exec.ve
 import org.apache.hadoop.hive.ql.exec.vector.<InputColumnVectorType>;
 import org.apache.hadoop.hive.ql.exec.vector.<OutputColumnVectorType>;
 import org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch;
+import org.apache.hadoop.hive.ql.exec.vector.VectorExpressionDescriptor;
 
 /**
  * Generated from template ColumnCompareScalar.txt, which covers binary comparison 
@@ -146,4 +147,18 @@ public class <ClassName> extends VectorE
   public void setOutputColumn(int outputColumn) {
     this.outputColumn = outputColumn;
   }
+
+  @Override
+  public VectorExpressionDescriptor.Descriptor getDescriptor() {
+    return (new VectorExpressionDescriptor.Builder())
+        .setMode(
+            VectorExpressionDescriptor.Mode.PROJECTION)
+        .setNumArguments(2)
+        .setArgumentTypes(
+            VectorExpressionDescriptor.ArgumentType.getType("<OperandType1>"),
+            VectorExpressionDescriptor.ArgumentType.getType("<OperandType2>"))
+        .setInputExpressionTypes(
+            VectorExpressionDescriptor.InputExpressionType.SCALAR,
+            VectorExpressionDescriptor.InputExpressionType.COLUMN).build();
+  }
 }

Modified: hive/branches/tez/ql/src/gen/vectorization/ExpressionTemplates/StringColumnCompareColumn.txt
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/gen/vectorization/ExpressionTemplates/StringColumnCompareColumn.txt?rev=1535174&r1=1535173&r2=1535174&view=diff
==============================================================================
--- hive/branches/tez/ql/src/gen/vectorization/ExpressionTemplates/StringColumnCompareColumn.txt
(original)
+++ hive/branches/tez/ql/src/gen/vectorization/ExpressionTemplates/StringColumnCompareColumn.txt
Wed Oct 23 20:50:38 2013
@@ -23,6 +23,7 @@ import org.apache.hadoop.hive.ql.exec.ve
 import org.apache.hadoop.hive.ql.exec.vector.BytesColumnVector;
 import org.apache.hadoop.hive.ql.exec.vector.LongColumnVector;
 import org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch;
+import org.apache.hadoop.hive.ql.exec.vector.VectorExpressionDescriptor;
 
 /**
  * Filter the rows in a batch by comparing one string column to another. 
@@ -490,4 +491,18 @@ public class <ClassName> extends VectorE
   public void setOutputColumn(int outputColumn) {
     this.outputColumn = outputColumn;
   }
+
+  @Override
+  public VectorExpressionDescriptor.Descriptor getDescriptor() {
+    return (new VectorExpressionDescriptor.Builder())
+        .setMode(
+            VectorExpressionDescriptor.Mode.PROJECTION)
+        .setNumArguments(2)
+        .setArgumentTypes(
+            VectorExpressionDescriptor.ArgumentType.getType("string"),
+            VectorExpressionDescriptor.ArgumentType.getType("string"))
+        .setInputExpressionTypes(
+            VectorExpressionDescriptor.InputExpressionType.COLUMN,
+            VectorExpressionDescriptor.InputExpressionType.COLUMN).build();
+  }
 }

Modified: hive/branches/tez/ql/src/gen/vectorization/ExpressionTemplates/StringColumnCompareScalar.txt
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/gen/vectorization/ExpressionTemplates/StringColumnCompareScalar.txt?rev=1535174&r1=1535173&r2=1535174&view=diff
==============================================================================
--- hive/branches/tez/ql/src/gen/vectorization/ExpressionTemplates/StringColumnCompareScalar.txt
(original)
+++ hive/branches/tez/ql/src/gen/vectorization/ExpressionTemplates/StringColumnCompareScalar.txt
Wed Oct 23 20:50:38 2013
@@ -23,6 +23,7 @@ import org.apache.hadoop.hive.ql.exec.ve
 import org.apache.hadoop.hive.ql.exec.vector.BytesColumnVector;
 import org.apache.hadoop.hive.ql.exec.vector.LongColumnVector;
 import org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch;
+import org.apache.hadoop.hive.ql.exec.vector.VectorExpressionDescriptor;
 
 /**
  * This is a generated class to evaluate a <OperatorSymbol> comparison on a vector
of strings.
@@ -162,4 +163,18 @@ public class <ClassName> extends VectorE
   public void setOutputColumn(int outputColumn) {
     this.outputColumn = outputColumn;
   }
+
+  @Override
+  public VectorExpressionDescriptor.Descriptor getDescriptor() {
+    return (new VectorExpressionDescriptor.Builder())
+        .setMode(
+            VectorExpressionDescriptor.Mode.PROJECTION)
+        .setNumArguments(2)
+        .setArgumentTypes(
+            VectorExpressionDescriptor.ArgumentType.getType("string"),
+            VectorExpressionDescriptor.ArgumentType.getType("string"))
+        .setInputExpressionTypes(
+            VectorExpressionDescriptor.InputExpressionType.COLUMN,
+            VectorExpressionDescriptor.InputExpressionType.SCALAR).build();
+  }
 }

Modified: hive/branches/tez/ql/src/gen/vectorization/ExpressionTemplates/StringScalarCompareColumn.txt
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/gen/vectorization/ExpressionTemplates/StringScalarCompareColumn.txt?rev=1535174&r1=1535173&r2=1535174&view=diff
==============================================================================
--- hive/branches/tez/ql/src/gen/vectorization/ExpressionTemplates/StringScalarCompareColumn.txt
(original)
+++ hive/branches/tez/ql/src/gen/vectorization/ExpressionTemplates/StringScalarCompareColumn.txt
Wed Oct 23 20:50:38 2013
@@ -23,6 +23,7 @@ import org.apache.hadoop.hive.ql.exec.ve
 import org.apache.hadoop.hive.ql.exec.vector.BytesColumnVector;
 import org.apache.hadoop.hive.ql.exec.vector.LongColumnVector;
 import org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch;
+import org.apache.hadoop.hive.ql.exec.vector.VectorExpressionDescriptor;
 
 /**
  * This is a generated class to evaluate a <OperatorSymbol> comparison on a vector
of strings.
@@ -36,7 +37,7 @@ public class <ClassName> extends VectorE
   private byte[] value;
   private int outputColumn;
 
-  public <ClassName>(int colNum, byte[] value, int outputColumn) {
+  public <ClassName>(byte[] value, int colNum, int outputColumn) {
     this.colNum = colNum;
     this.value = value;
     this.outputColumn = outputColumn;
@@ -162,4 +163,18 @@ public class <ClassName> extends VectorE
   public void setOutputColumn(int outputColumn) {
     this.outputColumn = outputColumn;
   }
+
+  @Override
+  public VectorExpressionDescriptor.Descriptor getDescriptor() {
+    return (new VectorExpressionDescriptor.Builder())
+        .setMode(
+            VectorExpressionDescriptor.Mode.PROJECTION)
+        .setNumArguments(2)
+        .setArgumentTypes(
+            VectorExpressionDescriptor.ArgumentType.getType("string"),
+            VectorExpressionDescriptor.ArgumentType.getType("string"))
+        .setInputExpressionTypes(
+            VectorExpressionDescriptor.InputExpressionType.SCALAR,
+            VectorExpressionDescriptor.InputExpressionType.COLUMN).build();
+  }
 }

Modified: hive/branches/tez/ql/src/gen/vectorization/TestTemplates/TestColumnScalarFilterVectorExpressionEvaluation.txt
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/gen/vectorization/TestTemplates/TestColumnScalarFilterVectorExpressionEvaluation.txt?rev=1535174&r1=1535173&r2=1535174&view=diff
==============================================================================
--- hive/branches/tez/ql/src/gen/vectorization/TestTemplates/TestColumnScalarFilterVectorExpressionEvaluation.txt
(original)
+++ hive/branches/tez/ql/src/gen/vectorization/TestTemplates/TestColumnScalarFilterVectorExpressionEvaluation.txt
Wed Oct 23 20:50:38 2013
@@ -32,7 +32,7 @@
     } while(scalarValue == 0);
 
     <VectorExpClassName> vectorExpression =
-      new <VectorExpClassName>(0, scalarValue);
+      new <VectorExpClassName>(<ConstructorParams>);
 
     vectorExpression.evaluate(rowBatch);
 
@@ -75,4 +75,4 @@
         + selectedIndex,
         false, rowBatch.selectedInUse);
     }
-  }
\ No newline at end of file
+  }

Modified: hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/ErrorMsg.java
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/ErrorMsg.java?rev=1535174&r1=1535173&r2=1535174&view=diff
==============================================================================
--- hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/ErrorMsg.java (original)
+++ hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/ErrorMsg.java Wed Oct 23 20:50:38
2013
@@ -363,6 +363,8 @@ public enum ErrorMsg {
   INVALID_BIGTABLE_MAPJOIN(10246, "{0} table chosen for streaming is not valid", true),
   MISSING_OVER_CLAUSE(10247, "Missing over clause for function : "),
   PARTITION_SPEC_TYPE_MISMATCH(10248, "Cannot add partition column {0} of type {1} as it
cannot be converted to type {2}", true),
+  UNSUPPORTED_SUBQUERY_EXPRESSION(10249, "Unsupported SubQuery Expression"),
+  INVALID_SUBQUERY_EXPRESSION(10250, "Invalid SubQuery expression"),
 
   INVALID_HDFS_URI(10248, "{0} is not a hdfs uri", true),
   INVALID_DIR(10249, "{0} is not a directory", true),

Modified: hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/exec/OperatorFactory.java
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/exec/OperatorFactory.java?rev=1535174&r1=1535173&r2=1535174&view=diff
==============================================================================
--- hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/exec/OperatorFactory.java (original)
+++ hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/exec/OperatorFactory.java Wed
Oct 23 20:50:38 2013
@@ -30,6 +30,7 @@ import org.apache.hadoop.hive.ql.exec.ve
 import org.apache.hadoop.hive.ql.exec.vector.VectorReduceSinkOperator;
 import org.apache.hadoop.hive.ql.exec.vector.VectorSelectOperator;
 import org.apache.hadoop.hive.ql.exec.vector.VectorizationContext;
+import org.apache.hadoop.hive.ql.metadata.HiveException;
 import org.apache.hadoop.hive.ql.plan.CollectDesc;
 import org.apache.hadoop.hive.ql.plan.DemuxDesc;
 import org.apache.hadoop.hive.ql.plan.DummyStoreDesc;
@@ -128,7 +129,7 @@ public final class OperatorFactory {
   }
 
   public static <T extends OperatorDesc> Operator<T> getVectorOperator(T conf,
-      VectorizationContext vContext) {
+      VectorizationContext vContext) throws HiveException {
     Class<T> descClass = (Class<T>) conf.getClass();
     for (OpTuple o : vectorOpvec) {
       if (o.descClass == descClass) {
@@ -140,11 +141,11 @@ public final class OperatorFactory {
           return op;
         } catch (Exception e) {
           e.printStackTrace();
-          throw new RuntimeException(e);
+          throw new HiveException(e);
         }
       }
     }
-    throw new RuntimeException("No vector operator for descriptor class "
+    throw new HiveException("No vector operator for descriptor class "
         + descClass.getName());
   }
 

Modified: hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/exec/PartitionKeySampler.java
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/exec/PartitionKeySampler.java?rev=1535174&r1=1535173&r2=1535174&view=diff
==============================================================================
--- hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/exec/PartitionKeySampler.java
(original)
+++ hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/exec/PartitionKeySampler.java
Wed Oct 23 20:50:38 2013
@@ -120,7 +120,7 @@ public class PartitionKeySampler impleme
     int sampleNum = conf.getIntVar(HiveConf.ConfVars.HIVESAMPLINGNUMBERFORORDERBY);
     float samplePercent = conf.getFloatVar(HiveConf.ConfVars.HIVESAMPLINGPERCENTFORORDERBY);
     if (samplePercent < 0.0 || samplePercent > 1.0) {
-      throw new RuntimeException("Percentile value must be within the range of 0 to 1.");
+      throw new IllegalArgumentException("Percentile value must be within the range of 0
to 1.");
     }
     FetchSampler sampler = new FetchSampler(work, job, operator);
     sampler.setSampleNum(sampleNum);

Modified: hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/exec/mr/ExecDriver.java
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/exec/mr/ExecDriver.java?rev=1535174&r1=1535173&r2=1535174&view=diff
==============================================================================
--- hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/exec/mr/ExecDriver.java (original)
+++ hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/exec/mr/ExecDriver.java Wed Oct
23 20:50:38 2013
@@ -387,10 +387,16 @@ public class ExecDriver extends Task<Map
         try {
           handleSampling(driverContext, mWork, job, conf);
           job.setPartitionerClass(HiveTotalOrderPartitioner.class);
-        } catch (Exception e) {
+        } catch (IllegalStateException e) {
           console.printInfo("Not enough sampling data.. Rolling back to single reducer task");
           rWork.setNumReduceTasks(1);
           job.setNumReduceTasks(1);
+        } catch (Exception e) {
+          LOG.error("Sampling error", e);
+          console.printError(e.toString(),
+              "\n" + org.apache.hadoop.util.StringUtils.stringifyException(e));
+          rWork.setNumReduceTasks(1);
+          job.setNumReduceTasks(1);
         }
       }
 

Modified: hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezSessionState.java
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezSessionState.java?rev=1535174&r1=1535173&r2=1535174&view=diff
==============================================================================
--- hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezSessionState.java
(original)
+++ hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezSessionState.java
Wed Oct 23 20:50:38 2013
@@ -80,20 +80,13 @@ public class TezSessionState {
    * @throws URISyntaxException
    * @throws LoginException
    * @throws TezException
-   * @throws HiveException
    */
   public void open(String sessionId, HiveConf conf)
-      throws IOException, LoginException, URISyntaxException, TezException, HiveException
{
+      throws IOException, LoginException, URISyntaxException, TezException {
 
     this.sessionId = sessionId;
     this.conf = conf;
 
-    // Get the following out of the way when you start the session these take a
-    // while and should be done when we start up.
-    FileSystem.get(conf);
-    ShimLoader.getHadoopShims().getUGIForConf(conf);
-    Hive.get(conf).getAllDatabases();
-
     // create the tez tmp dir
     tezScratchDir = createTezDir(sessionId);
 

Modified: hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorFilterOperator.java
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorFilterOperator.java?rev=1535174&r1=1535173&r2=1535174&view=diff
==============================================================================
--- hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorFilterOperator.java
(original)
+++ hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorFilterOperator.java
Wed Oct 23 20:50:38 2013
@@ -45,9 +45,8 @@ public class VectorFilterOperator extend
   public VectorFilterOperator(VectorizationContext vContext, OperatorDesc conf)
       throws HiveException {
     this();
-    vContext.setOperatorType(OperatorType.FILTER);
     ExprNodeDesc oldExpression = ((FilterDesc) conf).getPredicate();
-    conditionEvaluator = vContext.getVectorExpression(oldExpression);
+    conditionEvaluator = vContext.getVectorExpression(oldExpression, VectorExpressionDescriptor.Mode.FILTER);
     this.conf = (FilterDesc) conf;
   }
 

Modified: hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorGroupByOperator.java
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorGroupByOperator.java?rev=1535174&r1=1535173&r2=1535174&view=diff
==============================================================================
--- hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorGroupByOperator.java
(original)
+++ hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorGroupByOperator.java
Wed Oct 23 20:50:38 2013
@@ -123,7 +123,6 @@ public class VectorGroupByOperator exten
     this();
     GroupByDesc desc = (GroupByDesc) conf;
     this.conf = desc;
-    vContext.setOperatorType(OperatorType.GROUPBY);
     List<ExprNodeDesc> keysDesc = desc.getKeys();
     keyExpressions = vContext.getVectorExpressions(keysDesc);
     ArrayList<AggregationDesc> aggrDesc = desc.getAggregators();

Modified: hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorMapJoinOperator.java
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorMapJoinOperator.java?rev=1535174&r1=1535173&r2=1535174&view=diff
==============================================================================
--- hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorMapJoinOperator.java
(original)
+++ hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorMapJoinOperator.java
Wed Oct 23 20:50:38 2013
@@ -100,11 +100,9 @@ public class VectorMapJoinOperator exten
     tagLen = desc.getTagLength();
     noOuterJoin = desc.isNoOuterJoin();
 
-    vContext.setOperatorType(OperatorType.FILTER);
     Map<Byte, List<ExprNodeDesc>> filterExpressions = desc.getFilters();
-    bigTableFilterExpressions = vContext.getVectorExpressions(filterExpressions.get(posBigTable));
-
-    vContext.setOperatorType(OperatorType.MAPJOIN);
+    bigTableFilterExpressions = vContext.getVectorExpressions(filterExpressions.get(posBigTable),
+        VectorExpressionDescriptor.Mode.FILTER);
 
     List<ExprNodeDesc> keyDesc = desc.getKeys().get(posBigTable);
     keyExpressions = vContext.getVectorExpressions(keyDesc);

Modified: hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorReduceSinkOperator.java
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorReduceSinkOperator.java?rev=1535174&r1=1535173&r2=1535174&view=diff
==============================================================================
--- hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorReduceSinkOperator.java
(original)
+++ hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorReduceSinkOperator.java
Wed Oct 23 20:50:38 2013
@@ -93,7 +93,6 @@ public class VectorReduceSinkOperator ex
     this();
     ReduceSinkDesc desc = (ReduceSinkDesc) conf;
     this.conf = desc;
-    vContext.setOperatorType(OperatorType.REDUCESINK);
     keyEval = vContext.getVectorExpressions(desc.getKeyCols());
     valueEval = vContext.getVectorExpressions(desc.getValueCols());
     partitionEval = vContext.getVectorExpressions(desc.getPartitionCols());

Modified: hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorSelectOperator.java
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorSelectOperator.java?rev=1535174&r1=1535173&r2=1535174&view=diff
==============================================================================
--- hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorSelectOperator.java
(original)
+++ hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorSelectOperator.java
Wed Oct 23 20:50:38 2013
@@ -52,7 +52,6 @@ public class VectorSelectOperator extend
       throws HiveException {
     this.conf = (SelectDesc) conf;
     List<ExprNodeDesc> colList = this.conf.getColList();
-    vContext.setOperatorType(OperatorType.SELECT);
     vExpressions = new VectorExpression[colList.size()];
     for (int i = 0; i < colList.size(); i++) {
       ExprNodeDesc expr = colList.get(i);



Mime
View raw message