hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hashut...@apache.org
Subject svn commit: r1509425 [5/6] - in /hive/branches/vectorization/ql/src: java/org/apache/hadoop/hive/ql/exec/vector/ java/org/apache/hadoop/hive/ql/exec/vector/expressions/ java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/ java/org/apache/...
Date Thu, 01 Aug 2013 20:30:56 GMT
Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongColNotEqualDoubleScalar.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongColNotEqualDoubleScalar.java?rev=1509425&r1=1509424&r2=1509425&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongColNotEqualDoubleScalar.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongColNotEqualDoubleScalar.java Thu Aug  1 20:30:52 2013
@@ -23,6 +23,11 @@ import org.apache.hadoop.hive.ql.exec.ve
 import org.apache.hadoop.hive.ql.exec.vector.LongColumnVector;
 import org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch;
 
+/**
+ * Generated from template ColumnCompareScalar.txt, which covers binary comparison 
+ * expressions between a column and a scalar. The boolean output is stored in a 
+ * separate boolean column.
+ */
 public class LongColNotEqualDoubleScalar extends VectorExpression {
   private int colNum;
   private double value;

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongColSubtractDoubleColumn.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongColSubtractDoubleColumn.java?rev=1509425&r1=1509424&r2=1509425&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongColSubtractDoubleColumn.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongColSubtractDoubleColumn.java Thu Aug  1 20:30:52 2013
@@ -23,10 +23,14 @@ import org.apache.hadoop.hive.ql.exec.ve
 import org.apache.hadoop.hive.ql.exec.vector.*;
 import org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch;
 
+/**
+ * Generated from template ColumnArithmeticColumn.txt, which covers binary arithmetic 
+ * expressions between columns.
+ */
 public class LongColSubtractDoubleColumn extends VectorExpression {
-  int colNum1;
-  int colNum2;
-  int outputColumn;
+  private int colNum1;
+  private int colNum2;
+  private int outputColumn;
 
   public LongColSubtractDoubleColumn(int colNum1, int colNum2, int outputColumn) {
     this.colNum1 = colNum1;

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongColSubtractDoubleScalar.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongColSubtractDoubleScalar.java?rev=1509425&r1=1509424&r2=1509425&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongColSubtractDoubleScalar.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongColSubtractDoubleScalar.java Thu Aug  1 20:30:52 2013
@@ -24,6 +24,10 @@ import org.apache.hadoop.hive.ql.exec.ve
 import org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch;
 import org.apache.hadoop.hive.ql.exec.vector.expressions.NullUtil;
 
+/**
+ * Generated from template ColumnArithmeticScalar.txt, which covers binary arithmetic 
+ * expressions between a column and a scalar.
+ */
 public class LongColSubtractDoubleScalar extends VectorExpression {
   private int colNum;
   private double value;

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongColSubtractLongColumn.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongColSubtractLongColumn.java?rev=1509425&r1=1509424&r2=1509425&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongColSubtractLongColumn.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongColSubtractLongColumn.java Thu Aug  1 20:30:52 2013
@@ -23,10 +23,14 @@ import org.apache.hadoop.hive.ql.exec.ve
 import org.apache.hadoop.hive.ql.exec.vector.*;
 import org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch;
 
+/**
+ * Generated from template ColumnArithmeticColumn.txt, which covers binary arithmetic 
+ * expressions between columns.
+ */
 public class LongColSubtractLongColumn extends VectorExpression {
-  int colNum1;
-  int colNum2;
-  int outputColumn;
+  private int colNum1;
+  private int colNum2;
+  private int outputColumn;
 
   public LongColSubtractLongColumn(int colNum1, int colNum2, int outputColumn) {
     this.colNum1 = colNum1;

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongColSubtractLongScalar.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongColSubtractLongScalar.java?rev=1509425&r1=1509424&r2=1509425&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongColSubtractLongScalar.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongColSubtractLongScalar.java Thu Aug  1 20:30:52 2013
@@ -24,6 +24,10 @@ import org.apache.hadoop.hive.ql.exec.ve
 import org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch;
 import org.apache.hadoop.hive.ql.exec.vector.expressions.NullUtil;
 
+/**
+ * Generated from template ColumnArithmeticScalar.txt, which covers binary arithmetic 
+ * expressions between a column and a scalar.
+ */
 public class LongColSubtractLongScalar extends VectorExpression {
   private int colNum;
   private long value;

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongColUnaryMinus.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongColUnaryMinus.java?rev=1509425&r1=1509424&r2=1509425&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongColUnaryMinus.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongColUnaryMinus.java Thu Aug  1 20:30:52 2013
@@ -22,9 +22,12 @@ import org.apache.hadoop.hive.ql.exec.ve
 import org.apache.hadoop.hive.ql.exec.vector.*;
 import org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch;
 
+/**
+ * Generated from template ColumnUnaryMinus.txt, which covers unary negation operator. 
+ */
 public class LongColUnaryMinus extends VectorExpression {
-  int colNum;
-  int outputColumn;
+  private int colNum;
+  private int outputColumn;
 
   public LongColUnaryMinus(int colNum, int outputColumn) {
     this.colNum = colNum;
@@ -64,11 +67,11 @@ public class LongColUnaryMinus extends V
       if (batch.selectedInUse) {
         for(int j=0; j != n; j++) {
           int i = sel[j];
-          outputVector[i] = - vector[i];
+          outputVector[i] = -vector[i];
         }
       } else {
         for(int i = 0; i != n; i++) {
-          outputVector[i] = - vector[i];
+          outputVector[i] = -vector[i];
         }
       }
       outputColVector.isRepeating = false;
@@ -76,12 +79,12 @@ public class LongColUnaryMinus extends V
       if (batch.selectedInUse) {
         for(int j=0; j != n; j++) {
           int i = sel[j];
-          outputVector[i] = - vector[i];
+          outputVector[i] = -vector[i];
           outputIsNull[i] = inputIsNull[i];
-	    }
+        }
       } else {
         for(int i = 0; i != n; i++) {
-          outputVector[i] = - vector[i];
+          outputVector[i] = -vector[i];
         }
         System.arraycopy(inputIsNull, 0, outputIsNull, 0, n);
       }

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongScalarAddDoubleColumn.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongScalarAddDoubleColumn.java?rev=1509425&r1=1509424&r2=1509425&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongScalarAddDoubleColumn.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongScalarAddDoubleColumn.java Thu Aug  1 20:30:52 2013
@@ -31,6 +31,7 @@ import org.apache.hadoop.hive.ql.exec.ve
 import org.apache.hadoop.hive.ql.exec.vector.expressions.NullUtil;
 
 /**
+ * Generated from template ScalarArithmeticColumn.txt.
  * Implements a vectorized arithmetic operator with a scalar on the left and a
  * column vector on the right. The result is output to an output column vector.
  */

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongScalarAddLongColumn.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongScalarAddLongColumn.java?rev=1509425&r1=1509424&r2=1509425&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongScalarAddLongColumn.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongScalarAddLongColumn.java Thu Aug  1 20:30:52 2013
@@ -31,6 +31,7 @@ import org.apache.hadoop.hive.ql.exec.ve
 import org.apache.hadoop.hive.ql.exec.vector.expressions.NullUtil;
 
 /**
+ * Generated from template ScalarArithmeticColumn.txt.
  * Implements a vectorized arithmetic operator with a scalar on the left and a
  * column vector on the right. The result is output to an output column vector.
  */

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongScalarDivideDoubleColumn.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongScalarDivideDoubleColumn.java?rev=1509425&r1=1509424&r2=1509425&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongScalarDivideDoubleColumn.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongScalarDivideDoubleColumn.java Thu Aug  1 20:30:52 2013
@@ -31,6 +31,7 @@ import org.apache.hadoop.hive.ql.exec.ve
 import org.apache.hadoop.hive.ql.exec.vector.expressions.NullUtil;
 
 /**
+ * Generated from template ScalarArithmeticColumn.txt.
  * Implements a vectorized arithmetic operator with a scalar on the left and a
  * column vector on the right. The result is output to an output column vector.
  */

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongScalarModuloDoubleColumn.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongScalarModuloDoubleColumn.java?rev=1509425&r1=1509424&r2=1509425&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongScalarModuloDoubleColumn.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongScalarModuloDoubleColumn.java Thu Aug  1 20:30:52 2013
@@ -31,6 +31,7 @@ import org.apache.hadoop.hive.ql.exec.ve
 import org.apache.hadoop.hive.ql.exec.vector.expressions.NullUtil;
 
 /**
+ * Generated from template ScalarArithmeticColumn.txt.
  * Implements a vectorized arithmetic operator with a scalar on the left and a
  * column vector on the right. The result is output to an output column vector.
  */

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongScalarModuloLongColumn.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongScalarModuloLongColumn.java?rev=1509425&r1=1509424&r2=1509425&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongScalarModuloLongColumn.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongScalarModuloLongColumn.java Thu Aug  1 20:30:52 2013
@@ -31,6 +31,7 @@ import org.apache.hadoop.hive.ql.exec.ve
 import org.apache.hadoop.hive.ql.exec.vector.expressions.NullUtil;
 
 /**
+ * Generated from template ScalarArithmeticColumn.txt.
  * Implements a vectorized arithmetic operator with a scalar on the left and a
  * column vector on the right. The result is output to an output column vector.
  */

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongScalarMultiplyDoubleColumn.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongScalarMultiplyDoubleColumn.java?rev=1509425&r1=1509424&r2=1509425&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongScalarMultiplyDoubleColumn.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongScalarMultiplyDoubleColumn.java Thu Aug  1 20:30:52 2013
@@ -31,6 +31,7 @@ import org.apache.hadoop.hive.ql.exec.ve
 import org.apache.hadoop.hive.ql.exec.vector.expressions.NullUtil;
 
 /**
+ * Generated from template ScalarArithmeticColumn.txt.
  * Implements a vectorized arithmetic operator with a scalar on the left and a
  * column vector on the right. The result is output to an output column vector.
  */

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongScalarMultiplyLongColumn.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongScalarMultiplyLongColumn.java?rev=1509425&r1=1509424&r2=1509425&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongScalarMultiplyLongColumn.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongScalarMultiplyLongColumn.java Thu Aug  1 20:30:52 2013
@@ -31,6 +31,7 @@ import org.apache.hadoop.hive.ql.exec.ve
 import org.apache.hadoop.hive.ql.exec.vector.expressions.NullUtil;
 
 /**
+ * Generated from template ScalarArithmeticColumn.txt.
  * Implements a vectorized arithmetic operator with a scalar on the left and a
  * column vector on the right. The result is output to an output column vector.
  */

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongScalarSubtractDoubleColumn.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongScalarSubtractDoubleColumn.java?rev=1509425&r1=1509424&r2=1509425&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongScalarSubtractDoubleColumn.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongScalarSubtractDoubleColumn.java Thu Aug  1 20:30:52 2013
@@ -31,6 +31,7 @@ import org.apache.hadoop.hive.ql.exec.ve
 import org.apache.hadoop.hive.ql.exec.vector.expressions.NullUtil;
 
 /**
+ * Generated from template ScalarArithmeticColumn.txt.
  * Implements a vectorized arithmetic operator with a scalar on the left and a
  * column vector on the right. The result is output to an output column vector.
  */

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongScalarSubtractLongColumn.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongScalarSubtractLongColumn.java?rev=1509425&r1=1509424&r2=1509425&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongScalarSubtractLongColumn.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongScalarSubtractLongColumn.java Thu Aug  1 20:30:52 2013
@@ -31,6 +31,7 @@ import org.apache.hadoop.hive.ql.exec.ve
 import org.apache.hadoop.hive.ql.exec.vector.expressions.NullUtil;
 
 /**
+ * Generated from template ScalarArithmeticColumn.txt.
  * Implements a vectorized arithmetic operator with a scalar on the left and a
  * column vector on the right. The result is output to an output column vector.
  */

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/CodeGen.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/CodeGen.java?rev=1509425&r1=1509424&r2=1509425&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/CodeGen.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/CodeGen.java Thu Aug  1 20:30:52 2013
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package org.apache.hadoop.hive.ql.exec.vector.expressions.templates;
 
 import java.io.BufferedReader;
@@ -7,9 +25,12 @@ import java.io.FileReader;
 import java.io.FileWriter;
 import java.io.IOException;
 
+/**
+ * This class generates java classes from the templates.
+ */
 public class CodeGen {
 
-  static String [][] templateExpansions =
+  private static String [][] templateExpansions =
     {
       {"ColumnArithmeticScalar", "Add", "long", "long", "+"},
       {"ColumnArithmeticScalar", "Subtract", "long", "long", "-"},
@@ -195,14 +216,20 @@ public class CodeGen {
         {"ColumnUnaryMinus", "long"},
         {"ColumnUnaryMinus", "double"},
 
-        //template, <ClassName>, <ValueType>, <OperatorSymbol>, <DescriptionName>, <DescriptionValue>
-        {"VectorUDAFMinMax", "VectorUDAFMinLong", "long", "<", "min", "_FUNC_(expr) - Returns the minimum value of expr (vectorized, type: long)"},
-        {"VectorUDAFMinMax", "VectorUDAFMinDouble", "double", "<", "min", "_FUNC_(expr) - Returns the minimum value of expr (vectorized, type: double)"},
-        {"VectorUDAFMinMax", "VectorUDAFMaxLong", "long", ">", "max", "_FUNC_(expr) - Returns the maximum value of expr (vectorized, type: long)"},
-        {"VectorUDAFMinMax", "VectorUDAFMaxDouble", "double", ">", "max", "_FUNC_(expr) - Returns the maximum value of expr (vectorized, type: double)"},
-
-        {"VectorUDAFMinMaxString", "VectorUDAFMinString", "<", "min", "_FUNC_(expr) - Returns the minimum value of expr (vectorized, type: string)"},
-        {"VectorUDAFMinMaxString", "VectorUDAFMaxString", ">", "max", "_FUNC_(expr) - Returns the minimum value of expr (vectorized, type: string)"},
+      // template, <ClassName>, <ValueType>, <OperatorSymbol>, <DescriptionName>, <DescriptionValue>
+      {"VectorUDAFMinMax", "VectorUDAFMinLong", "long", "<", "min",
+          "_FUNC_(expr) - Returns the minimum value of expr (vectorized, type: long)"},
+      {"VectorUDAFMinMax", "VectorUDAFMinDouble", "double", "<", "min",
+          "_FUNC_(expr) - Returns the minimum value of expr (vectorized, type: double)"},
+      {"VectorUDAFMinMax", "VectorUDAFMaxLong", "long", ">", "max",
+          "_FUNC_(expr) - Returns the maximum value of expr (vectorized, type: long)"},
+      {"VectorUDAFMinMax", "VectorUDAFMaxDouble", "double", ">", "max",
+          "_FUNC_(expr) - Returns the maximum value of expr (vectorized, type: double)"},
+
+      {"VectorUDAFMinMaxString", "VectorUDAFMinString", "<", "min",
+          "_FUNC_(expr) - Returns the minimum value of expr (vectorized, type: string)"},
+      {"VectorUDAFMinMaxString", "VectorUDAFMaxString", ">", "max",
+          "_FUNC_(expr) - Returns the minimum value of expr (vectorized, type: string)"},
 
         //template, <ClassName>, <ValueType>
         {"VectorUDAFSum", "VectorUDAFSumLong", "long"},
@@ -210,15 +237,32 @@ public class CodeGen {
         {"VectorUDAFAvg", "VectorUDAFAvgLong", "long"},
         {"VectorUDAFAvg", "VectorUDAFAvgDouble", "double"},
 
-      //template, <ClassName>, <ValueType>, <VarianceFormula>, <DescriptionName>, <DescriptionValue>
-        {"VectorUDAFVar", "VectorUDAFVarPopLong", "long", "myagg.variance / myagg.count", "variance, var_pop", "_FUNC_(x) - Returns the variance of a set of numbers (vectorized, long)"},
-        {"VectorUDAFVar", "VectorUDAFVarPopDouble", "double", "myagg.variance / myagg.count", "variance, var_pop", "_FUNC_(x) - Returns the variance of a set of numbers (vectorized, double)"},
-        {"VectorUDAFVar", "VectorUDAFVarSampLong", "long", "myagg.variance / (myagg.count-1.0)", "var_samp", "_FUNC_(x) - Returns the sample variance of a set of numbers (vectorized, long)"},
-        {"VectorUDAFVar", "VectorUDAFVarSampDouble", "double", "myagg.variance / (myagg.count-1.0)", "var_samp", "_FUNC_(x) - Returns the sample variance of a set of numbers (vectorized, double)"},
-        {"VectorUDAFVar", "VectorUDAFStdPopLong", "long", "Math.sqrt(myagg.variance / (myagg.count))", "std,stddev,stddev_pop", "_FUNC_(x) - Returns the standard deviation of a set of numbers (vectorized, long)"},
-        {"VectorUDAFVar", "VectorUDAFStdPopDouble", "double", "Math.sqrt(myagg.variance / (myagg.count))", "std,stddev,stddev_pop", "_FUNC_(x) - Returns the standard deviation of a set of numbers (vectorized, double)"},
-        {"VectorUDAFVar", "VectorUDAFStdSampLong", "long", "Math.sqrt(myagg.variance / (myagg.count-1.0))", "stddev_samp", "_FUNC_(x) - Returns the sample standard deviation of a set of numbers (vectorized, long)"},
-        {"VectorUDAFVar", "VectorUDAFStdSampDouble", "double", "Math.sqrt(myagg.variance / (myagg.count-1.0))", "stddev_samp", "_FUNC_(x) - Returns the sample standard deviation of a set of numbers (vectorized, double)"},
+      // template, <ClassName>, <ValueType>, <VarianceFormula>, <DescriptionName>,
+      // <DescriptionValue>
+      {"VectorUDAFVar", "VectorUDAFVarPopLong", "long", "myagg.variance / myagg.count",
+          "variance, var_pop",
+          "_FUNC_(x) - Returns the variance of a set of numbers (vectorized, long)"},
+      {"VectorUDAFVar", "VectorUDAFVarPopDouble", "double", "myagg.variance / myagg.count",
+          "variance, var_pop",
+          "_FUNC_(x) - Returns the variance of a set of numbers (vectorized, double)"},
+      {"VectorUDAFVar", "VectorUDAFVarSampLong", "long", "myagg.variance / (myagg.count-1.0)",
+          "var_samp",
+          "_FUNC_(x) - Returns the sample variance of a set of numbers (vectorized, long)"},
+      {"VectorUDAFVar", "VectorUDAFVarSampDouble", "double", "myagg.variance / (myagg.count-1.0)",
+          "var_samp",
+          "_FUNC_(x) - Returns the sample variance of a set of numbers (vectorized, double)"},
+      {"VectorUDAFVar", "VectorUDAFStdPopLong", "long",
+          "Math.sqrt(myagg.variance / (myagg.count))", "std,stddev,stddev_pop",
+          "_FUNC_(x) - Returns the standard deviation of a set of numbers (vectorized, long)"},
+      {"VectorUDAFVar", "VectorUDAFStdPopDouble", "double",
+          "Math.sqrt(myagg.variance / (myagg.count))", "std,stddev,stddev_pop",
+          "_FUNC_(x) - Returns the standard deviation of a set of numbers (vectorized, double)"},
+      {"VectorUDAFVar", "VectorUDAFStdSampLong", "long",
+          "Math.sqrt(myagg.variance / (myagg.count-1.0))", "stddev_samp",
+          "_FUNC_(x) - Returns the sample standard deviation of a set of numbers (vectorized, long)"},
+      {"VectorUDAFVar", "VectorUDAFStdSampDouble", "double",
+          "Math.sqrt(myagg.variance / (myagg.count-1.0))", "stddev_samp",
+          "_FUNC_(x) - Returns the sample standard deviation of a set of numbers (vectorized, double)"},
 
     };
 
@@ -239,13 +283,13 @@ public class CodeGen {
     templateDirectory = System.getProperty("user.dir");
     File f = new File(templateDirectory);
     outputDirectory = joinPath(f.getParent(), "gen");
-    testCodeGen =  new TestCodeGen(joinPath(f.getParent(), "test"),templateDirectory);
+    testCodeGen =  new TestCodeGen(joinPath(f.getParent(), "test"), templateDirectory);
   }
 
   public CodeGen(String templateDirectory, String outputDirectory, String testOutputDirectory) {
     this.templateDirectory = templateDirectory;
     this.outputDirectory = outputDirectory;
-    testCodeGen =  new TestCodeGen(testOutputDirectory,templateDirectory);
+    testCodeGen =  new TestCodeGen(testOutputDirectory, templateDirectory);
   }
 
   /**
@@ -418,16 +462,17 @@ public class CodeGen {
   private void generateFilterStringColumnCompareScalar(String[] tdesc) throws IOException {
     String operatorName = tdesc[1];
     String className = "FilterStringCol" + operatorName + "StringScalar";
-    generateFilterStringColumnCompareScalar(tdesc,className);
+    generateFilterStringColumnCompareScalar(tdesc, className);
   }
 
   private void generateFilterStringColumnCompareColumn(String[] tdesc) throws IOException {
     String operatorName = tdesc[1];
     String className = "FilterStringCol" + operatorName + "StringColumn";
-    generateFilterStringColumnCompareScalar(tdesc,className);
+    generateFilterStringColumnCompareScalar(tdesc, className);
   }
 
-  private void generateFilterStringColumnCompareScalar(String[] tdesc, String className) throws IOException {
+  private void generateFilterStringColumnCompareScalar(String[] tdesc, String className)
+      throws IOException {
    String operatorSymbol = tdesc[2];
    String outputFile = joinPath(this.outputDirectory, className + ".java");
    // Read the template into a string;
@@ -569,16 +614,14 @@ public class CodeGen {
     templateString = templateString.replaceAll("<ReturnType>", returnType);
     writeFile(outputFile, templateString);
 
-    if(returnType==null)
-    {
+    if(returnType==null) {
       testCodeGen.addColumnScalarFilterTestCases(
           true,
           className,
           inputColumnVectorType,
           operandType2,
           operatorSymbol);
-    }else
-    {
+    } else {
       testCodeGen.addColumnScalarOperationTestCases(
           true,
           className,
@@ -586,7 +629,6 @@ public class CodeGen {
           outputColumnVectorType,
           operandType2);
     }
-
   }
 
   private void generateScalarBinaryOperatorColumn(String[] tdesc, String returnType,
@@ -610,16 +652,14 @@ public class CodeGen {
      templateString = templateString.replaceAll("<ReturnType>", returnType);
      writeFile(outputFile, templateString);
 
-     if(returnType==null)
-     {
+     if(returnType==null) {
        testCodeGen.addColumnScalarFilterTestCases(
            false,
            className,
            inputColumnVectorType,
            operandType1,
            operatorSymbol);
-     }else
-     {
+     } else {
        testCodeGen.addColumnScalarOperationTestCases(
            false,
            className,

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/ColumnArithmeticColumn.txt
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/ColumnArithmeticColumn.txt?rev=1509425&r1=1509424&r2=1509425&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/ColumnArithmeticColumn.txt (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/ColumnArithmeticColumn.txt Thu Aug  1 20:30:52 2013
@@ -23,10 +23,14 @@ import org.apache.hadoop.hive.ql.exec.ve
 import org.apache.hadoop.hive.ql.exec.vector.*;
 import org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch;
 
+/**
+ * Generated from template ColumnArithmeticColumn.txt, which covers binary arithmetic 
+ * expressions between columns.
+ */
 public class <ClassName> extends VectorExpression {
-  int colNum1;
-  int colNum2;
-  int outputColumn;
+  private int colNum1;
+  private int colNum2;
+  private int outputColumn;
 
   public <ClassName>(int colNum1, int colNum2, int outputColumn) {
     this.colNum1 = colNum1;

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/ColumnArithmeticScalar.txt
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/ColumnArithmeticScalar.txt?rev=1509425&r1=1509424&r2=1509425&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/ColumnArithmeticScalar.txt (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/ColumnArithmeticScalar.txt Thu Aug  1 20:30:52 2013
@@ -24,6 +24,10 @@ import org.apache.hadoop.hive.ql.exec.ve
 import org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch;
 import org.apache.hadoop.hive.ql.exec.vector.expressions.NullUtil;
 
+/**
+ * Generated from template ColumnArithmeticScalar.txt, which covers binary arithmetic 
+ * expressions between a column and a scalar.
+ */
 public class <ClassName> extends VectorExpression {
   private int colNum;
   private <OperandType2> value;

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/ColumnCompareScalar.txt
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/ColumnCompareScalar.txt?rev=1509425&r1=1509424&r2=1509425&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/ColumnCompareScalar.txt (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/ColumnCompareScalar.txt Thu Aug  1 20:30:52 2013
@@ -23,6 +23,11 @@ import org.apache.hadoop.hive.ql.exec.ve
 import org.apache.hadoop.hive.ql.exec.vector.<OutputColumnVectorType>;
 import org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch;
 
+/**
+ * Generated from template ColumnCompareScalar.txt, which covers binary comparison 
+ * expressions between a column and a scalar. The boolean output is stored in a 
+ * separate boolean column.
+ */
 public class <ClassName> extends VectorExpression {
   private int colNum;
   private <OperandType2> value;

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/ColumnUnaryMinus.txt
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/ColumnUnaryMinus.txt?rev=1509425&r1=1509424&r2=1509425&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/ColumnUnaryMinus.txt (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/ColumnUnaryMinus.txt Thu Aug  1 20:30:52 2013
@@ -22,9 +22,12 @@ import org.apache.hadoop.hive.ql.exec.ve
 import org.apache.hadoop.hive.ql.exec.vector.*;
 import org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch;
 
+/**
+ * Generated from template ColumnUnaryMinus.txt, which covers unary negation operator. 
+ */
 public class <ClassName> extends VectorExpression {
-  int colNum;
-  int outputColumn;
+  private int colNum;
+  private int outputColumn;
 
   public <ClassName>(int colNum, int outputColumn) {
     this.colNum = colNum;
@@ -64,11 +67,11 @@ public class <ClassName> extends VectorE
       if (batch.selectedInUse) {
         for(int j=0; j != n; j++) {
           int i = sel[j];
-          outputVector[i] = - vector[i];
+          outputVector[i] = -vector[i];
         }
       } else {
         for(int i = 0; i != n; i++) {
-          outputVector[i] = - vector[i];
+          outputVector[i] = -vector[i];
         }
       }
       outputColVector.isRepeating = false;
@@ -76,12 +79,12 @@ public class <ClassName> extends VectorE
       if (batch.selectedInUse) {
         for(int j=0; j != n; j++) {
           int i = sel[j];
-          outputVector[i] = - vector[i];
+          outputVector[i] = -vector[i];
           outputIsNull[i] = inputIsNull[i];
-	    }
+        }
       } else {
         for(int i = 0; i != n; i++) {
-          outputVector[i] = - vector[i];
+          outputVector[i] = -vector[i];
         }
         System.arraycopy(inputIsNull, 0, outputIsNull, 0, n);
       }

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/FilterColumnCompareColumn.txt
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/FilterColumnCompareColumn.txt?rev=1509425&r1=1509424&r2=1509425&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/FilterColumnCompareColumn.txt (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/FilterColumnCompareColumn.txt Thu Aug  1 20:30:52 2013
@@ -22,9 +22,14 @@ import org.apache.hadoop.hive.ql.exec.ve
 import org.apache.hadoop.hive.ql.exec.vector.*;
 import org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch;
 
+/**
+ * Generated from template FilterColumnCompareColumn.txt, which covers binary comparison 
+ * expressions between two columns, however output is not produced in a separate column. 
+ * The selected vector of the input {@link VectorizedRowBatch} is updated for in-place filtering.
+ */
 public class <ClassName> extends VectorExpression {
-  int colNum1;
-  int colNum2;
+  private int colNum1;
+  private int colNum2;
 
   public <ClassName>(int colNum1, int colNum2) { 
     this.colNum1 = colNum1;

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/FilterColumnCompareScalar.txt
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/FilterColumnCompareScalar.txt?rev=1509425&r1=1509424&r2=1509425&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/FilterColumnCompareScalar.txt (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/FilterColumnCompareScalar.txt Thu Aug  1 20:30:52 2013
@@ -22,7 +22,11 @@ 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.VectorizedRowBatch;
 
-
+/**
+ * Generated from template FilterColumnCompareScalar.txt, which covers binary comparison 
+ * expressions between a column and a scalar, however output is not produced in a separate column. 
+ * The selected vector of the input {@link VectorizedRowBatch} is updated for in-place filtering.
+ */
 public class <ClassName> extends VectorExpression {
   private int colNum;
   private <OperandType2> value;

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/FilterScalarCompareColumn.txt
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/FilterScalarCompareColumn.txt?rev=1509425&r1=1509424&r2=1509425&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/FilterScalarCompareColumn.txt (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/FilterScalarCompareColumn.txt Thu Aug  1 20:30:52 2013
@@ -22,6 +22,11 @@ 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.VectorizedRowBatch;
 
+/**
+ * Generated from template FilterScalarCompareColumn.txt, which covers binary comparison 
+ * expressions between a scalar and a column, however output is not produced in a separate column. 
+ * The selected vector of the input {@link VectorizedRowBatch} is updated for in-place filtering.
+ */
 public class <ClassName> extends VectorExpression {
   private int colNum;
   private <OperandType1> value;

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/ScalarArithmeticColumn.txt
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/ScalarArithmeticColumn.txt?rev=1509425&r1=1509424&r2=1509425&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/ScalarArithmeticColumn.txt (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/ScalarArithmeticColumn.txt Thu Aug  1 20:30:52 2013
@@ -31,6 +31,7 @@ import org.apache.hadoop.hive.ql.exec.ve
 import org.apache.hadoop.hive.ql.exec.vector.expressions.NullUtil;
 
 /**
+ * Generated from template ScalarArithmeticColumn.txt.
  * Implements a vectorized arithmetic operator with a scalar on the left and a
  * column vector on the right. The result is output to an output column vector.
  */

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/VectorUDAFAvg.txt
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/VectorUDAFAvg.txt?rev=1509425&r1=1509424&r2=1509425&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/VectorUDAFAvg.txt (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/VectorUDAFAvg.txt Thu Aug  1 20:30:52 2013
@@ -19,11 +19,11 @@
 package org.apache.hadoop.hive.ql.exec.vector.expressions.aggregates.gen;
 
 import java.util.ArrayList;
+import java.util.List;
 
 import org.apache.hadoop.hive.ql.exec.Description;
 import org.apache.hadoop.hive.ql.exec.vector.expressions.VectorExpression;
 import org.apache.hadoop.hive.ql.exec.vector.expressions.aggregates.VectorAggregateExpression;
-import org.apache.hadoop.hive.ql.exec.vector.expressions.aggregates.VectorAggregateExpression.AggregationBuffer;
 import org.apache.hadoop.hive.ql.exec.vector.VectorAggregationBufferRow;
 import org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch;
 import org.apache.hadoop.hive.ql.exec.vector.LongColumnVector;
@@ -35,25 +35,21 @@ import org.apache.hadoop.io.LongWritable
 import org.apache.hadoop.hive.serde2.io.DoubleWritable;
 import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector;
 import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorFactory;
-import org.apache.hadoop.hive.serde2.objectinspector.PrimitiveObjectInspector;
-import org.apache.hadoop.hive.serde2.objectinspector.StructField;
 import org.apache.hadoop.hive.serde2.objectinspector.StructObjectInspector;
-import org.apache.hadoop.hive.serde2.objectinspector.primitive.DoubleObjectInspector;
-import org.apache.hadoop.hive.serde2.objectinspector.primitive.LongObjectInspector;
 import org.apache.hadoop.hive.serde2.objectinspector.primitive.PrimitiveObjectInspectorFactory;
-import org.apache.hadoop.hive.serde2.objectinspector.primitive.PrimitiveObjectInspectorUtils;
-import org.apache.hadoop.hive.serde2.typeinfo.PrimitiveTypeInfo;
 
-import org.apache.hadoop.hive.ql.io.orc.*;
-
-@Description(name = "avg", value = "_FUNC_(expr) - Returns the average value of expr (vectorized, type: <ValueType>)")
+/**
+ * Generated from template VectorUDAFAvg.txt.
+ */
+@Description(name = "avg",
+    value = "_FUNC_(expr) - Returns the average value of expr (vectorized, type: <ValueType>)")
 public class <ClassName> extends VectorAggregateExpression {
     
     /** class for storing the current aggregate value. */
     static class Aggregation implements AggregationBuffer {
-      double sum;
-      long count;
-      boolean isNull;
+      private double sum;
+      private long count;
+      private boolean isNull;
       
       public void sumValue(<ValueType> value) {
         if (isNull) {
@@ -91,10 +87,10 @@ public class <ClassName> extends VectorA
     }
 
     private void initPartialResultInspector() {
-        ArrayList<ObjectInspector> foi = new ArrayList<ObjectInspector>();
+        List<ObjectInspector> foi = new ArrayList<ObjectInspector>();
         foi.add(PrimitiveObjectInspectorFactory.writableLongObjectInspector);
         foi.add(PrimitiveObjectInspectorFactory.writableDoubleObjectInspector);
-        ArrayList<String> fname = new ArrayList<String>();
+        List<String> fname = new ArrayList<String>();
         fname.add("count");
         fname.add("sum");
         soi = ObjectInspectorFactory.getStandardStructObjectInspector(fname, foi);
@@ -291,11 +287,13 @@ public class <ClassName> extends VectorA
 
     
     @Override
-    public void aggregateInput(AggregationBuffer agg, VectorizedRowBatch batch) throws HiveException {
+    public void aggregateInput(AggregationBuffer agg, VectorizedRowBatch batch) 
+        throws HiveException {
         
         inputExpression.evaluate(batch);
         
-        <InputColumnVectorType> inputVector = (<InputColumnVectorType>)batch.cols[this.inputExpression.getOutputColumn()];
+        <InputColumnVectorType> inputVector = 
+            (<InputColumnVectorType>)batch.cols[this.inputExpression.getOutputColumn()];
         
         int batchSize = batch.size;
         

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/VectorUDAFMinMax.txt
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/VectorUDAFMinMax.txt?rev=1509425&r1=1509424&r2=1509425&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/VectorUDAFMinMax.txt (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/VectorUDAFMinMax.txt Thu Aug  1 20:30:52 2013
@@ -18,13 +18,9 @@
 
 package org.apache.hadoop.hive.ql.exec.vector.expressions.aggregates.gen;
 
-import java.util.ArrayList;
-
 import org.apache.hadoop.hive.ql.exec.Description;
 import org.apache.hadoop.hive.ql.exec.vector.expressions.VectorExpression;
 import org.apache.hadoop.hive.ql.exec.vector.expressions.aggregates.VectorAggregateExpression;
-import org.apache.hadoop.hive.ql.exec.vector.expressions.aggregates.
-    VectorAggregateExpression.AggregationBuffer;
 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.exec.vector.VectorAggregationBufferRow;
@@ -34,30 +30,21 @@ import org.apache.hadoop.hive.ql.exec.ve
 import org.apache.hadoop.hive.ql.metadata.HiveException;
 import org.apache.hadoop.hive.ql.plan.AggregationDesc;
 import org.apache.hadoop.hive.ql.util.JavaDataModel;
-import org.apache.hadoop.io.LongWritable;
-import org.apache.hadoop.hive.serde2.io.DoubleWritable;
 import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector;
-import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorFactory;
-import org.apache.hadoop.hive.serde2.objectinspector.PrimitiveObjectInspector;
-import org.apache.hadoop.hive.serde2.objectinspector.StructField;
-import org.apache.hadoop.hive.serde2.objectinspector.StructObjectInspector;
-import org.apache.hadoop.hive.serde2.objectinspector.primitive.DoubleObjectInspector;
-import org.apache.hadoop.hive.serde2.objectinspector.primitive.LongObjectInspector;
-import org.apache.hadoop.hive.serde2.objectinspector.primitive.PrimitiveObjectInspectorFactory;
-import org.apache.hadoop.hive.serde2.objectinspector.primitive.PrimitiveObjectInspectorUtils;
 
 /**
 * <ClassName>. Vectorized implementation for MIN/MAX aggregates. 
 */
-@Description(name = "<DescriptionName>", value = "<DescriptionValue>")
+@Description(name = "<DescriptionName>", 
+    value = "<DescriptionValue>")
 public class <ClassName> extends VectorAggregateExpression {
     
     /** 
-    /* class for storing the current aggregate value.
-    */
+     * class for storing the current aggregate value.
+     */
     static private final class Aggregation implements AggregationBuffer {
-      <ValueType> value;
-      boolean isNull;
+      private <ValueType> value;
+      private boolean isNull;
 
       public void checkValue(<ValueType> value) {
         if (isNull) {

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/VectorUDAFMinMaxString.txt
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/VectorUDAFMinMaxString.txt?rev=1509425&r1=1509424&r2=1509425&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/VectorUDAFMinMaxString.txt (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/VectorUDAFMinMaxString.txt Thu Aug  1 20:30:52 2013
@@ -24,7 +24,6 @@ import org.apache.hadoop.hive.ql.exec.De
 import org.apache.hadoop.hive.ql.exec.vector.expressions.StringExpr;
 import org.apache.hadoop.hive.ql.exec.vector.expressions.VectorExpression;
 import org.apache.hadoop.hive.ql.exec.vector.expressions.aggregates.VectorAggregateExpression;
-import org.apache.hadoop.hive.ql.exec.vector.expressions.aggregates.VectorAggregateExpression.AggregationBuffer;
 import org.apache.hadoop.hive.ql.exec.vector.VectorAggregationBufferRow;
 import org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch;
 import org.apache.hadoop.hive.ql.exec.vector.BytesColumnVector;
@@ -32,30 +31,25 @@ import org.apache.hadoop.hive.ql.plan.Ag
 import org.apache.hadoop.hive.ql.util.JavaDataModel;
 import org.apache.hadoop.hive.ql.metadata.HiveException;
 import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector;
-import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorFactory;
-import org.apache.hadoop.hive.serde2.objectinspector.PrimitiveObjectInspector;
-import org.apache.hadoop.hive.serde2.objectinspector.StructField;
-import org.apache.hadoop.hive.serde2.objectinspector.StructObjectInspector;
-import org.apache.hadoop.hive.serde2.objectinspector.primitive.BinaryObjectInspector;
 import org.apache.hadoop.hive.serde2.objectinspector.primitive.PrimitiveObjectInspectorFactory;
-import org.apache.hadoop.hive.serde2.objectinspector.primitive.PrimitiveObjectInspectorUtils;
 import org.apache.hadoop.io.Text;
 
 /**
 * <ClassName>. Vectorized implementation for MIN/MAX aggregates. 
 */
-@Description(name = "<DescriptionName>", value = "<DescriptionValue>")
+@Description(name = "<DescriptionName>", 
+    value = "<DescriptionValue>")
 public class <ClassName> extends VectorAggregateExpression {
 
     /** 
-    /* class for storing the current aggregate value.
-    */
+     * class for storing the current aggregate value.
+     */
     static private final class Aggregation implements AggregationBuffer {
 
-      final static int MIN_BUFFER_SIZE = 16;
-      byte[] bytes = new byte[MIN_BUFFER_SIZE];
-      int length;
-      boolean isNull;
+      private final static int MIN_BUFFER_SIZE = 16;
+      private byte[] bytes = new byte[MIN_BUFFER_SIZE];
+      private int length;
+      private boolean isNull;
 
       public void checkValue(byte[] bytes, int start, int length) {
         if (isNull) {

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/VectorUDAFSum.txt
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/VectorUDAFSum.txt?rev=1509425&r1=1509424&r2=1509425&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/VectorUDAFSum.txt (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/VectorUDAFSum.txt Thu Aug  1 20:30:52 2013
@@ -18,12 +18,9 @@
 
 package org.apache.hadoop.hive.ql.exec.vector.expressions.aggregates.gen;
 
-import java.util.ArrayList;
-
 import org.apache.hadoop.hive.ql.exec.Description;
 import org.apache.hadoop.hive.ql.exec.vector.expressions.VectorExpression;
 import org.apache.hadoop.hive.ql.exec.vector.expressions.aggregates.VectorAggregateExpression;
-import org.apache.hadoop.hive.ql.exec.vector.expressions.aggregates.VectorAggregateExpression.AggregationBuffer;
 import org.apache.hadoop.hive.ql.exec.vector.VectorAggregationBufferRow;
 import org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch;
 import org.apache.hadoop.hive.ql.exec.vector.LongColumnVector;
@@ -34,27 +31,21 @@ import org.apache.hadoop.hive.ql.util.Ja
 import org.apache.hadoop.io.LongWritable;
 import org.apache.hadoop.hive.serde2.io.DoubleWritable;
 import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector;
-import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorFactory;
-import org.apache.hadoop.hive.serde2.objectinspector.PrimitiveObjectInspector;
-import org.apache.hadoop.hive.serde2.objectinspector.StructField;
-import org.apache.hadoop.hive.serde2.objectinspector.StructObjectInspector;
-import org.apache.hadoop.hive.serde2.objectinspector.primitive.DoubleObjectInspector;
-import org.apache.hadoop.hive.serde2.objectinspector.primitive.LongObjectInspector;
 import org.apache.hadoop.hive.serde2.objectinspector.primitive.PrimitiveObjectInspectorFactory;
-import org.apache.hadoop.hive.serde2.objectinspector.primitive.PrimitiveObjectInspectorUtils;
 
 /**
 * <ClassName>. Vectorized implementation for SUM aggregates. 
 */
-@Description(name = "sum", value = "_FUNC_(expr) - Returns the sum value of expr (vectorized, type: <ValueType>)")
+@Description(name = "sum", 
+    value = "_FUNC_(expr) - Returns the sum value of expr (vectorized, type: <ValueType>)")
 public class <ClassName> extends VectorAggregateExpression {
     
     /** 
-    /* class for storing the current aggregate value.
-    */
+     * class for storing the current aggregate value.
+     */
     private static final class Aggregation implements AggregationBuffer {
-      <ValueType> sum;
-      boolean isNull;
+      private <ValueType> sum;
+      private boolean isNull;
       
       public void sumValue(<ValueType> value) {
         if (isNull) {
@@ -71,8 +62,8 @@ public class <ClassName> extends VectorA
       }
     }
     
-    VectorExpression inputExpression;
-    private <OutputType> result;
+    private final VectorExpression inputExpression;
+    private final <OutputType> result;
     
     public <ClassName>(VectorExpression inputExpression) {
       super();

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/VectorUDAFVar.txt
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/VectorUDAFVar.txt?rev=1509425&r1=1509424&r2=1509425&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/VectorUDAFVar.txt (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/VectorUDAFVar.txt Thu Aug  1 20:30:52 2013
@@ -19,11 +19,11 @@
 package org.apache.hadoop.hive.ql.exec.vector.expressions.aggregates.gen;
 
 import java.util.ArrayList;
+import java.util.List;
 
 import org.apache.hadoop.hive.ql.exec.Description;
 import org.apache.hadoop.hive.ql.exec.vector.expressions.VectorExpression;
 import org.apache.hadoop.hive.ql.exec.vector.expressions.aggregates.VectorAggregateExpression;
-import org.apache.hadoop.hive.ql.exec.vector.expressions.aggregates.VectorAggregateExpression.AggregationBuffer;
 import org.apache.hadoop.hive.ql.exec.vector.VectorAggregationBufferRow;
 import org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch;
 import org.apache.hadoop.hive.ql.exec.vector.LongColumnVector;
@@ -35,28 +35,23 @@ import org.apache.hadoop.io.LongWritable
 import org.apache.hadoop.hive.serde2.io.DoubleWritable;
 import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector;
 import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorFactory;
-import org.apache.hadoop.hive.serde2.objectinspector.PrimitiveObjectInspector;
-import org.apache.hadoop.hive.serde2.objectinspector.StructField;
-import org.apache.hadoop.hive.serde2.objectinspector.StructObjectInspector;
-import org.apache.hadoop.hive.serde2.objectinspector.primitive.DoubleObjectInspector;
-import org.apache.hadoop.hive.serde2.objectinspector.primitive.LongObjectInspector;
 import org.apache.hadoop.hive.serde2.objectinspector.primitive.PrimitiveObjectInspectorFactory;
-import org.apache.hadoop.hive.serde2.objectinspector.primitive.PrimitiveObjectInspectorUtils;
 
 /**
 * <ClassName>. Vectorized implementation for VARIANCE aggregates. 
 */
-@Description(name = "<DescriptionName>", value = "<DescriptionValue>")
+@Description(name = "<DescriptionName>",
+    value = "<DescriptionValue>")
 public class <ClassName> extends VectorAggregateExpression {
     
     /** 
     /* class for storing the current aggregate value. 
     */
     private static final class Aggregation implements AggregationBuffer {
-      double sum;
-      long count;
-      double variance;
-      boolean isNull;
+      private double sum;
+      private long count;
+      private double variance;
+      private boolean isNull;
       
       public void init() {
         isNull = false;
@@ -94,12 +89,12 @@ public class <ClassName> extends VectorA
     }
 
   private void initPartialResultInspector() {
-        ArrayList<ObjectInspector> foi = new ArrayList<ObjectInspector>();
+        List<ObjectInspector> foi = new ArrayList<ObjectInspector>();
         foi.add(PrimitiveObjectInspectorFactory.writableLongObjectInspector);
         foi.add(PrimitiveObjectInspectorFactory.writableDoubleObjectInspector);
         foi.add(PrimitiveObjectInspectorFactory.writableDoubleObjectInspector);
 
-        ArrayList<String> fname = new ArrayList<String>();
+        List<String> fname = new ArrayList<String>();
         fname.add("count");
         fname.add("sum");
         fname.add("variance");

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/IUDFUnaryString.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/IUDFUnaryString.java?rev=1509425&r1=1509424&r2=1509425&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/IUDFUnaryString.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/IUDFUnaryString.java Thu Aug  1 20:30:52 2013
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package org.apache.hadoop.hive.ql.udf;
 
 import org.apache.hadoop.io.Text;

Modified: hive/branches/vectorization/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/TestVectorFilterOperator.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/TestVectorFilterOperator.java?rev=1509425&r1=1509424&r2=1509425&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/TestVectorFilterOperator.java (original)
+++ hive/branches/vectorization/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/TestVectorFilterOperator.java Thu Aug  1 20:30:52 2013
@@ -24,23 +24,24 @@ import org.apache.hadoop.hive.ql.exec.ve
 import org.apache.hadoop.hive.ql.exec.vector.expressions.VectorExpression;
 import org.apache.hadoop.hive.ql.exec.vector.expressions.gen.FilterLongColEqualDoubleScalar;
 import org.apache.hadoop.hive.ql.exec.vector.expressions.gen.FilterLongColGreaterLongColumn;
-import org.apache.hadoop.hive.ql.exec.vector.expressions.gen.FilterLongColGreaterLongScalar;
 import org.apache.hadoop.hive.ql.metadata.HiveException;
 import org.junit.Test;
 
+/**
+ * Test cases for vectorized filter operator.
+ */
 public class TestVectorFilterOperator {
-  
-  /*
+
+  /**
    * Fundamental logic and performance tests for vector filters belong here.
-   * 
+   *
    * For tests about filters to cover specific operator and data type combinations,
    * see also the other filter tests under org.apache.hadoop.hive.ql.exec.vector.expressions
    */
-
   public static class FakeDataReader {
-    int size;
-    VectorizedRowBatch vrg;
-    int currentSize = 0;
+    private final int size;
+    private final VectorizedRowBatch vrg;
+    private int currentSize = 0;
     private final int numCols;
     private final int len = 1024;
 
@@ -51,9 +52,7 @@ public class TestVectorFilterOperator {
       for (int i = 0; i < numCols; i++) {
         try {
           Thread.sleep(2);
-        } catch (InterruptedException e) {
-
-        }
+        } catch (InterruptedException ignore) {}
         vrg.cols[i] = getLongVector(len);
       }
     }

Modified: hive/branches/vectorization/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/TestVectorGroupByOperator.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/TestVectorGroupByOperator.java?rev=1509425&r1=1509424&r2=1509425&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/TestVectorGroupByOperator.java (original)
+++ hive/branches/vectorization/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/TestVectorGroupByOperator.java Thu Aug  1 20:30:52 2013
@@ -1665,7 +1665,8 @@ public class TestVectorGroupByOperator {
       HashMap<Object, Object> expected) throws HiveException {
 
     @SuppressWarnings("unchecked")
-    FakeVectorRowBatchFromLongIterables fdr = new FakeVectorRowBatchFromLongIterables(batchSize, list, values);
+    FakeVectorRowBatchFromLongIterables fdr = new FakeVectorRowBatchFromLongIterables(batchSize,
+        list, values);
     testAggregateLongKeyIterable (aggregateName, fdr, expected);
   }
 
@@ -1701,7 +1702,8 @@ public class TestVectorGroupByOperator {
       Object expected) throws HiveException {
 
     @SuppressWarnings("unchecked")
-    FakeVectorRowBatchFromLongIterables fdr = new FakeVectorRowBatchFromLongIterables(batchSize, values);
+    FakeVectorRowBatchFromLongIterables fdr = new FakeVectorRowBatchFromLongIterables(batchSize,
+        values);
     testAggregateLongIterable (aggregateName, fdr, expected);
   }
 
@@ -1711,7 +1713,8 @@ public class TestVectorGroupByOperator {
       Object expected) throws HiveException {
 
     @SuppressWarnings("unchecked")
-    FakeVectorRowBatchFromLongIterables fdr = new FakeVectorRowBatchFromLongIterables(batchSize, values);
+    FakeVectorRowBatchFromLongIterables fdr = new FakeVectorRowBatchFromLongIterables(batchSize,
+        values);
     testAggregateCountStarIterable (fdr, expected);
   }
 
@@ -1904,7 +1907,8 @@ public class TestVectorGroupByOperator {
     mapColumnNames.put("A", 0);
     VectorizationContext ctx = new VectorizationContext(mapColumnNames, 1);
 
-    GroupByDesc desc = buildGroupByDescType (ctx, aggregateName, "A", TypeInfoFactory.stringTypeInfo);
+    GroupByDesc desc = buildGroupByDescType(ctx, aggregateName, "A",
+        TypeInfoFactory.stringTypeInfo);
 
     VectorGroupByOperator vgo = new VectorGroupByOperator(ctx, desc);
 
@@ -1934,7 +1938,8 @@ public class TestVectorGroupByOperator {
     mapColumnNames.put("A", 0);
     VectorizationContext ctx = new VectorizationContext(mapColumnNames, 1);
 
-    GroupByDesc desc = buildGroupByDescType (ctx, aggregateName, "A", TypeInfoFactory.doubleTypeInfo);
+    GroupByDesc desc = buildGroupByDescType (ctx, aggregateName, "A",
+        TypeInfoFactory.doubleTypeInfo);
 
     VectorGroupByOperator vgo = new VectorGroupByOperator(ctx, desc);
 

Modified: hive/branches/vectorization/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/TestVectorSelectOperator.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/TestVectorSelectOperator.java?rev=1509425&r1=1509424&r2=1509425&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/TestVectorSelectOperator.java (original)
+++ hive/branches/vectorization/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/TestVectorSelectOperator.java Thu Aug  1 20:30:52 2013
@@ -39,6 +39,9 @@ import org.apache.hadoop.hive.serde2.obj
 import org.apache.hadoop.hive.serde2.typeinfo.TypeInfoFactory;
 import org.junit.Test;
 
+/**
+ * Unit tests for vectorized select operator.
+ */
 public class TestVectorSelectOperator {
 
   static class ValidatorVectorSelectOperator extends VectorSelectOperator {

Modified: hive/branches/vectorization/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/TestVectorizationContext.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/TestVectorizationContext.java?rev=1509425&r1=1509424&r2=1509425&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/TestVectorizationContext.java (original)
+++ hive/branches/vectorization/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/TestVectorizationContext.java Thu Aug  1 20:30:52 2013
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package org.apache.hadoop.hive.ql.exec.vector;
 
 import static org.junit.Assert.assertEquals;

Modified: hive/branches/vectorization/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/TestVectorizedRowBatchCtx.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/TestVectorizedRowBatchCtx.java?rev=1509425&r1=1509424&r2=1509425&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/TestVectorizedRowBatchCtx.java (original)
+++ hive/branches/vectorization/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/TestVectorizedRowBatchCtx.java Thu Aug  1 20:30:52 2013
@@ -59,7 +59,7 @@ import org.junit.Before;
 import org.junit.Test;
 
 /**
- * Class that tests the functionality of VectorizedRowBatchCtx
+ * Class that tests the functionality of VectorizedRowBatchCtx.
  */
 public class TestVectorizedRowBatchCtx {
 
@@ -81,7 +81,7 @@ public class TestVectorizedRowBatchCtx {
     fs.delete(testFilePath, false);
   }
 
-  private void InitSerde() {
+  private void initSerde() {
     tbl = new Properties();
 
     // Set the configuration parameters
@@ -325,8 +325,7 @@ public class TestVectorizedRowBatchCtx {
 
   @Test
   public void TestCtx() throws Exception {
-
-    InitSerde();
+    initSerde();
     WriteRCFile(this.fs, this.testFilePath, this.conf);
     VectorizedRowBatch batch = GetRowBatch();
     ValidateRowBatch(batch);

Modified: hive/branches/vectorization/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/expressions/TestConstantVectorExpression.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/expressions/TestConstantVectorExpression.java?rev=1509425&r1=1509424&r2=1509425&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/expressions/TestConstantVectorExpression.java (original)
+++ hive/branches/vectorization/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/expressions/TestConstantVectorExpression.java Thu Aug  1 20:30:52 2013
@@ -30,6 +30,9 @@ import org.apache.hadoop.hive.ql.exec.ve
 import org.apache.hadoop.hive.ql.exec.vector.util.VectorizedRowGroupGenUtil;
 import org.junit.Test;
 
+/**
+ * Test vector expressions with constants.
+ */
 public class TestConstantVectorExpression {
 
   @Test

Modified: hive/branches/vectorization/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/expressions/TestUnaryMinus.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/expressions/TestUnaryMinus.java?rev=1509425&r1=1509424&r2=1509425&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/expressions/TestUnaryMinus.java (original)
+++ hive/branches/vectorization/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/expressions/TestUnaryMinus.java Thu Aug  1 20:30:52 2013
@@ -26,12 +26,15 @@ import org.apache.hadoop.hive.ql.exec.ve
 import org.apache.hadoop.hive.ql.exec.vector.util.VectorizedRowGroupGenUtil;
 import org.junit.Test;
 
+/**
+ * Unit tests for unary minus.
+ */
 public class TestUnaryMinus {
 
   @Test
   public void testUnaryMinus() {
     VectorizedRowBatch vrg = VectorizedRowGroupGenUtil.getVectorizedRowBatch(1024, 2, 23);
-    LongColUnaryMinus expr = new LongColUnaryMinus(0,1);
+    LongColUnaryMinus expr = new LongColUnaryMinus(0, 1);
     expr.evaluate(vrg);
     //verify
     long[] inVector = ((LongColumnVector) vrg.cols[0]).vector;

Modified: hive/branches/vectorization/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/expressions/TestVectorArithmeticExpressions.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/expressions/TestVectorArithmeticExpressions.java?rev=1509425&r1=1509424&r2=1509425&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/expressions/TestVectorArithmeticExpressions.java (original)
+++ hive/branches/vectorization/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/expressions/TestVectorArithmeticExpressions.java Thu Aug  1 20:30:52 2013
@@ -23,22 +23,23 @@ import static org.junit.Assert.assertFal
 import static org.junit.Assert.assertTrue;
 import junit.framework.Assert;
 
-import org.apache.hadoop.hive.ql.exec.vector.LongColumnVector;
 import org.apache.hadoop.hive.ql.exec.vector.DoubleColumnVector;
+import org.apache.hadoop.hive.ql.exec.vector.LongColumnVector;
 import org.apache.hadoop.hive.ql.exec.vector.TestVectorizedRowBatch;
 import org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch;
 import org.apache.hadoop.hive.ql.exec.vector.expressions.gen.LongColAddLongColumn;
 import org.apache.hadoop.hive.ql.exec.vector.expressions.gen.LongColAddLongScalar;
-import org.apache.hadoop.hive.ql.exec.vector.expressions.LongColDivideLongColumn;
 import org.apache.hadoop.hive.ql.exec.vector.util.VectorizedRowGroupGenUtil;
 import org.junit.Test;
 
+/**
+ * Unit tests for vectori arithmetic expressions.
+ */
 public class TestVectorArithmeticExpressions {
 
   @Test
   public void testLongColAddLongScalarNoNulls()  {
-    VectorizedRowBatch vrg = getVectorizedRowBatchSingleLongVector
-        (VectorizedRowBatch.DEFAULT_SIZE);
+    VectorizedRowBatch vrg = getVectorizedRowBatchSingleLongVector(VectorizedRowBatch.DEFAULT_SIZE);
     LongColAddLongScalar expr = new LongColAddLongScalar(0, 23, 1);
     expr.evaluate(vrg);
     //verify
@@ -60,7 +61,7 @@ public class TestVectorArithmeticExpress
     vrg.size = size;
     return vrg;
   }
-  
+
   public static VectorizedRowBatch getVectorizedRowBatch2LongInDoubleOut() {
     VectorizedRowBatch batch = new VectorizedRowBatch(3);
     LongColumnVector lcv, lcv2;
@@ -73,7 +74,7 @@ public class TestVectorArithmeticExpress
     batch.cols[1] = lcv2;
     for (int i = 0; i < VectorizedRowBatch.DEFAULT_SIZE; i++) {
       lcv2.vector[i] = i * 37;
-    }    
+    }
     batch.cols[2] = new DoubleColumnVector();
     batch.size = VectorizedRowBatch.DEFAULT_SIZE;
     return batch;
@@ -81,14 +82,14 @@ public class TestVectorArithmeticExpress
 
   @Test
   public void testLongColAddLongScalarWithNulls()  {
-    VectorizedRowBatch batch = getVectorizedRowBatchSingleLongVector
-        (VectorizedRowBatch.DEFAULT_SIZE);
+    VectorizedRowBatch batch = getVectorizedRowBatchSingleLongVector(
+        VectorizedRowBatch.DEFAULT_SIZE);
     LongColumnVector lcv = (LongColumnVector) batch.cols[0];
     LongColumnVector lcvOut = (LongColumnVector) batch.cols[1];
     TestVectorizedRowBatch.addRandomNulls(lcv);
     LongColAddLongScalar expr = new LongColAddLongScalar(0, 23, 1);
     expr.evaluate(batch);
-    
+
     // verify
     for (int i=0; i < VectorizedRowBatch.DEFAULT_SIZE; i++) {
       if (!lcv.isNull[i]) {
@@ -109,8 +110,7 @@ public class TestVectorArithmeticExpress
     LongColAddLongScalar expr;
 
     // Case 1: is repeating, no nulls
-    batch = getVectorizedRowBatchSingleLongVector
-        (VectorizedRowBatch.DEFAULT_SIZE);
+    batch = getVectorizedRowBatchSingleLongVector(VectorizedRowBatch.DEFAULT_SIZE);
     in = (LongColumnVector) batch.cols[0];
     in.isRepeating = true;
     out = (LongColumnVector) batch.cols[1];
@@ -123,8 +123,7 @@ public class TestVectorArithmeticExpress
     Assert.assertEquals(out.vector[0], 0 * 37 + 23);
 
     // Case 2: is repeating, has nulls
-    batch = getVectorizedRowBatchSingleLongVector
-        (VectorizedRowBatch.DEFAULT_SIZE);
+    batch = getVectorizedRowBatchSingleLongVector(VectorizedRowBatch.DEFAULT_SIZE);
     in = (LongColumnVector) batch.cols[0];
     in.isRepeating = true;
     in.noNulls = false;
@@ -142,9 +141,9 @@ public class TestVectorArithmeticExpress
     Assert.assertEquals(true, out.isNull[0]);
     verifyLongNullDataVectorEntries(out, batch.selected, batch.selectedInUse, batch.size);
   }
-  
-  /* Make sure all the NULL entries in this long column output vector have their data vector 
-   * element set to the correct value, as per the specification, to prevent later arithmetic 
+
+  /* Make sure all the NULL entries in this long column output vector have their data vector
+   * element set to the correct value, as per the specification, to prevent later arithmetic
    * errors (e.g. zero-divide).
    */
   public static void verifyLongNullDataVectorEntries(
@@ -155,8 +154,7 @@ public class TestVectorArithmeticExpress
       if (v.isNull[0]) {
         assertEquals(LongColumnVector.NULL_VALUE, v.vector[0]);
       }
-    }
-    else if (selectedInUse) {
+    } else if (selectedInUse) {
       for (int j = 0; j != n; j++) {
         int i = sel[j];
         if (v.isNull[i]) {
@@ -167,7 +165,7 @@ public class TestVectorArithmeticExpress
       for (int i = 0; i != n; i++) {
         if (v.isNull[i]) {
           assertEquals(LongColumnVector.NULL_VALUE, v.vector[i]);
-        }        
+        }
       }
     }
   }
@@ -217,7 +215,7 @@ public class TestVectorArithmeticExpress
     LongColAddLongColumn expr2 = new LongColAddLongColumn(3, 4, 5);
     expr2.evaluate(vrg);
     for (int i = 0; i < VectorizedRowBatch.DEFAULT_SIZE; i++) {
-      assertEquals(seed * ( 4 + 5*(i+1)), lcv5.vector[i]);
+      assertEquals(seed * (4 + 5*(i+1)), lcv5.vector[i]);
     }
 
     // Repeating with other as nullable
@@ -237,48 +235,48 @@ public class TestVectorArithmeticExpress
     assertTrue(lcv5.isRepeating);
     assertTrue(lcv5.isNull[0]);
     verifyLongNullDataVectorEntries(lcv5, vrg.selected, vrg.selectedInUse, vrg.size);
-    
+
     // Neither input has nulls. Verify that this propagates to output.
     vrg.selectedInUse = false;
     lcv0.noNulls = true;
     lcv1.noNulls = true;
     lcv0.isRepeating = false;
-    lcv1.isRepeating = false;   
+    lcv1.isRepeating = false;
     lcv2.noNulls = false;         // set output noNulls to true to make sure it gets over-written
     lcv2.isRepeating = true;      // similarly with isRepeating
     expr.evaluate(vrg);
     assertTrue(lcv2.noNulls);
     assertFalse(lcv2.isRepeating);
   }
-  
+
   @Test
   public void testLongColDivideLongColumn() {
-    
+
     /* Testing for equality of doubles after a math operation is
      * not always reliable so use this as a tolerance.
      */
-    final double eps = 1e-7d; 
+    final double eps = 1e-7d;
     VectorizedRowBatch batch = getVectorizedRowBatch2LongInDoubleOut();
     LongColDivideLongColumn expr = new LongColDivideLongColumn(0, 1, 2);
     batch.cols[0].isNull[1] = true;
     batch.cols[0].noNulls = false;
     batch.cols[1].noNulls = false;
     DoubleColumnVector out = (DoubleColumnVector) batch.cols[2];
-    
+
     // Set so we can verify they are reset by operation
     out.noNulls = true;
     out.isRepeating = true;
-    
+
     expr.evaluate(batch);
-    
+
     // 0/0 for entry 0 should work but generate NaN
     assertTrue(Double.isNaN(out.vector[0]));
-    
+
     // verify NULL output in entry 1 is correct
     assertTrue(out.isNull[1]);
     assertTrue(Double.isNaN(out.vector[1]));
 
-    // check entries beyond first 2 
+    // check entries beyond first 2
     for (int i = 2; i != batch.size; i++) {
       assertTrue(out.vector[i] > 1.0d - eps && out.vector[i] < 1.0d + eps);
     }

Modified: hive/branches/vectorization/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/expressions/TestVectorExpressionWriters.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/expressions/TestVectorExpressionWriters.java?rev=1509425&r1=1509424&r2=1509425&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/expressions/TestVectorExpressionWriters.java (original)
+++ hive/branches/vectorization/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/expressions/TestVectorExpressionWriters.java Thu Aug  1 20:30:52 2013
@@ -46,6 +46,9 @@ import org.apache.hadoop.io.Text;
 import org.apache.hadoop.io.Writable;
 import org.junit.Test;
 
+/**
+ * Unit tests for vector expression writers.
+ */
 public class TestVectorExpressionWriters {
 
   private final int vectorSize = 5;

Modified: hive/branches/vectorization/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/expressions/TestVectorFilterExpressions.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/expressions/TestVectorFilterExpressions.java?rev=1509425&r1=1509424&r2=1509425&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/expressions/TestVectorFilterExpressions.java (original)
+++ hive/branches/vectorization/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/expressions/TestVectorFilterExpressions.java Thu Aug  1 20:30:52 2013
@@ -35,6 +35,9 @@ import org.apache.hadoop.hive.ql.exec.ve
 import org.junit.Assert;
 import org.junit.Test;
 
+/**
+ * Unit tests for filter expressions.
+ */
 public class TestVectorFilterExpressions {
 
   @Test
@@ -76,8 +79,7 @@ public class TestVectorFilterExpressions
   }
 
   @Test
-  public void testColOpScalarNumericFilterNullAndRepeatingLogic()
-  {
+  public void testColOpScalarNumericFilterNullAndRepeatingLogic() {
     // No nulls, not repeating
     FilterLongColGreaterLongScalar f = new FilterLongColGreaterLongScalar(0, 1);
     VectorizedRowBatch batch = this.getSimpleLongBatch();

Modified: hive/branches/vectorization/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/expressions/TestVectorLogicalExpressions.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/expressions/TestVectorLogicalExpressions.java?rev=1509425&r1=1509424&r2=1509425&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/expressions/TestVectorLogicalExpressions.java (original)
+++ hive/branches/vectorization/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/expressions/TestVectorLogicalExpressions.java Thu Aug  1 20:30:52 2013
@@ -116,7 +116,7 @@ public class TestVectorLogicalExpression
     i = 5; v0.vector[i] = 0; v0.isNull[i] = true; v1.vector[i] = 1; v1.isNull[i] = false;  // NULL 1
     i = 6; v0.vector[i] = 0; v0.isNull[i] = false; v1.vector[i] = 0; v1.isNull[i] = true;  // 0 NULL
     i = 7; v0.vector[i] = 1; v0.isNull[i] = false; v1.vector[i] = 1; v1.isNull[i] = true;  // 1 NULL
-    i = 8; v0.vector[i] = 1; v0.isNull[i] = true; v1.vector[i] = 1; v1.isNull[i] = true;  // NULL NULL
+    i = 8; v0.vector[i] = 1; v0.isNull[i] = true; v1.vector[i] = 1; v1.isNull[i] = true; // NULL NULL
 
     v0.noNulls = false;
     v1.noNulls = false;

Modified: hive/branches/vectorization/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/expressions/TestVectorScalarColArithmetic.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/expressions/TestVectorScalarColArithmetic.java?rev=1509425&r1=1509424&r2=1509425&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/expressions/TestVectorScalarColArithmetic.java (original)
+++ hive/branches/vectorization/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/expressions/TestVectorScalarColArithmetic.java Thu Aug  1 20:30:52 2013
@@ -22,14 +22,12 @@ import static org.junit.Assert.assertFal
 import static org.junit.Assert.assertTrue;
 import junit.framework.Assert;
 
-import org.apache.hadoop.hive.ql.exec.vector.expressions.gen.LongScalarSubtractLongColumn;
-import org.apache.hadoop.hive.ql.exec.vector.expressions.gen.LongScalarModuloLongColumn;
-import org.apache.hadoop.hive.ql.exec.vector.expressions.LongColDivideLongScalar;
-import org.apache.hadoop.hive.ql.exec.vector.expressions.LongScalarDivideLongColumn;
 import org.apache.hadoop.hive.ql.exec.vector.DoubleColumnVector;
 import org.apache.hadoop.hive.ql.exec.vector.LongColumnVector;
 import org.apache.hadoop.hive.ql.exec.vector.TestVectorizedRowBatch;
 import org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch;
+import org.apache.hadoop.hive.ql.exec.vector.expressions.gen.LongScalarModuloLongColumn;
+import org.apache.hadoop.hive.ql.exec.vector.expressions.gen.LongScalarSubtractLongColumn;
 import org.junit.Test;
 
 /**
@@ -37,12 +35,12 @@ import org.junit.Test;
  * the left and a column vector on the right.
  */
 public class TestVectorScalarColArithmetic {
-  
+
   /* Testing for equality of doubles after a math operation is
    * not always reliable so use this as a tolerance.
    */
-  private final static double eps = 1e-7d; 
-  
+  private final double EPS = 1e-7d;
+
   private VectorizedRowBatch getVectorizedRowBatchSingleLongVector(int size) {
     VectorizedRowBatch batch = new VectorizedRowBatch(2, size);
     LongColumnVector lcv = new LongColumnVector(size);
@@ -67,13 +65,13 @@ public class TestVectorScalarColArithmet
     batch.size = size;
     return batch;
   }
-  
+
   @Test
   public void testLongScalarModuloLongColNoNulls()  {
     VectorizedRowBatch batch = getBatchSingleLongVectorPositiveNonZero();
     LongScalarModuloLongColumn expr = new LongScalarModuloLongColumn(100, 0, 1);
     expr.evaluate(batch);
-    
+
     // verify
     for (int i = 0; i < VectorizedRowBatch.DEFAULT_SIZE; i++) {
       Assert.assertEquals(100 % ((i + 1) * 37), ((LongColumnVector) batch.cols[1]).vector[i]);
@@ -81,14 +79,14 @@ public class TestVectorScalarColArithmet
     Assert.assertTrue(((LongColumnVector)batch.cols[1]).noNulls);
     Assert.assertFalse(((LongColumnVector)batch.cols[1]).isRepeating);
   }
-  
+
   @Test
   public void testLongScalarSubtractLongColNoNulls()  {
     VectorizedRowBatch batch = getVectorizedRowBatchSingleLongVector(
         VectorizedRowBatch.DEFAULT_SIZE);
     LongScalarSubtractLongColumn expr = new LongScalarSubtractLongColumn(100, 0, 1);
     expr.evaluate(batch);
-    
+
     //verify
     for (int i = 0; i < VectorizedRowBatch.DEFAULT_SIZE; i++) {
       Assert.assertEquals(100 - i * 37, ((LongColumnVector) batch.cols[1]).vector[i]);
@@ -105,7 +103,7 @@ public class TestVectorScalarColArithmet
     TestVectorizedRowBatch.addRandomNulls(lcv);
     LongScalarSubtractLongColumn expr = new LongScalarSubtractLongColumn(100, 0, 1);
     expr.evaluate(batch);
-    
+
     //verify
     for (int i=0; i < VectorizedRowBatch.DEFAULT_SIZE; i++) {
       if (!lcv.isNull[i]) {
@@ -117,7 +115,7 @@ public class TestVectorScalarColArithmet
     Assert.assertFalse(((LongColumnVector)batch.cols[1]).noNulls);
     Assert.assertFalse(((LongColumnVector)batch.cols[1]).isRepeating);
     TestVectorArithmeticExpressions.verifyLongNullDataVectorEntries(
-        (LongColumnVector) batch.cols[1], batch.selected, batch.selectedInUse, batch.size); 
+        (LongColumnVector) batch.cols[1], batch.selected, batch.selectedInUse, batch.size);
   }
 
   @Test
@@ -135,7 +133,7 @@ public class TestVectorScalarColArithmet
     out.isRepeating = false;
     expr = new LongScalarSubtractLongColumn(100, 0, 1);
     expr.evaluate(batch);
-    
+
     // verify
     Assert.assertTrue(out.isRepeating);
     Assert.assertTrue(out.noNulls);
@@ -155,46 +153,46 @@ public class TestVectorScalarColArithmet
     out.noNulls = true;
     expr = new LongScalarSubtractLongColumn(100, 0, 1);
     expr.evaluate(batch);
-    
+
     // verify
     Assert.assertTrue(out.isRepeating);
     Assert.assertFalse(out.noNulls);
     Assert.assertEquals(true, out.isNull[0]);
     TestVectorArithmeticExpressions.verifyLongNullDataVectorEntries(
-        out, batch.selected, batch.selectedInUse, batch.size); 
+        out, batch.selected, batch.selectedInUse, batch.size);
   }
-  
-  private static boolean equalsWithinTolerance(double a, double b) {
-    return Math.abs(a - b) < eps;
+
+  private boolean equalsWithinTolerance(double a, double b) {
+    return Math.abs(a - b) < EPS;
   }
-  
+
   @Test
   public void testLongScalarDivide() {
-    VectorizedRowBatch batch = 
+    VectorizedRowBatch batch =
         TestVectorArithmeticExpressions.getVectorizedRowBatch2LongInDoubleOut();
     LongColDivideLongScalar expr = new LongColDivideLongScalar(0, 100, 2);
     batch.cols[0].isNull[0] = true;
     batch.cols[0].noNulls = false;
     DoubleColumnVector out = (DoubleColumnVector) batch.cols[2];
     out.noNulls = true;     // set now so we can verify it changed
-    out.isRepeating = true; 
+    out.isRepeating = true;
     expr.evaluate(batch);
-    
+
     // verify NULL output in entry 0 is correct
     assertTrue(out.isNull[0]);
     assertTrue(Double.isNaN(out.vector[0]));
 
-    // check entries beyond first one 
+    // check entries beyond first one
     for (int i = 1; i != batch.size; i++) {
       assertTrue(equalsWithinTolerance((i * 37) / 100d, out.vector[i]));
     }
     assertFalse(out.noNulls);
     assertFalse(out.isRepeating);
   }
-  
-  @Test 
+
+  @Test
   public void testScalarLongDivide() {
-    VectorizedRowBatch batch = 
+    VectorizedRowBatch batch =
         TestVectorArithmeticExpressions.getVectorizedRowBatch2LongInDoubleOut();
     LongScalarDivideLongColumn expr = new LongScalarDivideLongColumn(100, 0, 2);
     batch.cols[0].isNull[1] = true;
@@ -203,15 +201,15 @@ public class TestVectorScalarColArithmet
     out.noNulls = true;     // set now so we can verify it changed
     out.isRepeating = true;
     expr.evaluate(batch);
-    
+
     // verify zero-divide result for position 0
     assertTrue(Double.isInfinite(out.vector[0]));
-    
+
     // verify NULL output in entry 1 is correct
     assertTrue(out.isNull[1]);
     assertTrue(Double.isNaN(out.vector[1]));
 
-    // check entries beyond 2nd one 
+    // check entries beyond 2nd one
     for (int i = 2; i != batch.size; i++) {
       assertTrue(equalsWithinTolerance(100d / (i * 37), out.vector[i]));
     }



Mime
View raw message