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

svn commit: r1509425 [1/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/...

Author: hashutosh
Date: Thu Aug  1 20:30:52 2013
New Revision: 1509425

URL: http://svn.apache.org/r1509425
Log:
HIVE-4541 : Run check-style on the branch and fix style issues. (Jitendra Nath Pandey via Ashutosh Chauhan)

Modified:
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorGroupByOperator.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorHashKeyWrapperBatch.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizedRowBatchCtx.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizedSerde.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/ColAndCol.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/ColOrCol.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/ConstantVectorExpression.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/IdentityExpression.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/IsNotNull.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/IsNull.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/LongColDivideLongColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/LongColDivideLongScalar.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/LongScalarDivideLongColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/StringExpr.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/StringLength.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/StringLower.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/StringSubstrColStart.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/StringSubstrColStartLen.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/StringUnaryUDF.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/StringUpper.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/VectorUDFDayOfMonthLong.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/VectorUDFHourLong.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/VectorUDFMinuteLong.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/VectorUDFMonthLong.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/VectorUDFSecondLong.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/VectorUDFTimestampFieldLong.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/VectorUDFUnixTimeStampLong.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/VectorUDFWeekOfYearLong.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/VectorUDFYearLong.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/VectorAggregateExpression.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/VectorUDAFCount.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/VectorUDAFCountStar.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFAvgDouble.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFAvgLong.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFMaxDouble.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFMaxLong.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFMaxString.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFMinDouble.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFMinLong.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFMinString.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFStdPopDouble.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFStdPopLong.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFStdSampDouble.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFStdSampLong.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFSumDouble.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFSumLong.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFVarPopDouble.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFVarPopLong.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFVarSampDouble.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFVarSampLong.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/DoubleColAddDoubleColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/DoubleColAddDoubleScalar.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/DoubleColAddLongColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/DoubleColAddLongScalar.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/DoubleColDivideDoubleColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/DoubleColDivideDoubleScalar.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/DoubleColDivideLongColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/DoubleColDivideLongScalar.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/DoubleColEqualDoubleScalar.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/DoubleColGreaterDoubleScalar.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/DoubleColGreaterEqualDoubleScalar.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/DoubleColLessDoubleScalar.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/DoubleColLessEqualDoubleScalar.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/DoubleColModuloDoubleColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/DoubleColModuloDoubleScalar.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/DoubleColModuloLongColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/DoubleColModuloLongScalar.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/DoubleColMultiplyDoubleColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/DoubleColMultiplyDoubleScalar.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/DoubleColMultiplyLongColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/DoubleColMultiplyLongScalar.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/DoubleColNotEqualDoubleScalar.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/DoubleColSubtractDoubleColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/DoubleColSubtractDoubleScalar.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/DoubleColSubtractLongColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/DoubleColSubtractLongScalar.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/DoubleColUnaryMinus.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/DoubleScalarAddDoubleColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/DoubleScalarAddLongColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/DoubleScalarDivideDoubleColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/DoubleScalarDivideLongColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/DoubleScalarModuloDoubleColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/DoubleScalarModuloLongColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/DoubleScalarMultiplyDoubleColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/DoubleScalarMultiplyLongColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/DoubleScalarSubtractDoubleColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/DoubleScalarSubtractLongColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterDoubleColEqualDoubleColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterDoubleColEqualDoubleScalar.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterDoubleColEqualLongColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterDoubleColEqualLongScalar.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterDoubleColGreaterDoubleColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterDoubleColGreaterDoubleScalar.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterDoubleColGreaterEqualDoubleColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterDoubleColGreaterEqualDoubleScalar.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterDoubleColGreaterEqualLongColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterDoubleColGreaterEqualLongScalar.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterDoubleColGreaterLongColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterDoubleColGreaterLongScalar.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterDoubleColLessDoubleColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterDoubleColLessDoubleScalar.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterDoubleColLessEqualDoubleColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterDoubleColLessEqualDoubleScalar.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterDoubleColLessEqualLongColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterDoubleColLessEqualLongScalar.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterDoubleColLessLongColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterDoubleColLessLongScalar.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterDoubleColNotEqualDoubleColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterDoubleColNotEqualDoubleScalar.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterDoubleColNotEqualLongColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterDoubleColNotEqualLongScalar.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterDoubleScalarEqualDoubleColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterDoubleScalarEqualLongColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterDoubleScalarGreaterDoubleColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterDoubleScalarGreaterEqualDoubleColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterDoubleScalarGreaterEqualLongColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterDoubleScalarGreaterLongColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterDoubleScalarLessDoubleColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterDoubleScalarLessEqualDoubleColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterDoubleScalarLessEqualLongColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterDoubleScalarLessLongColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterDoubleScalarNotEqualDoubleColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterDoubleScalarNotEqualLongColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterLongColEqualDoubleColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterLongColEqualDoubleScalar.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterLongColEqualLongColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterLongColEqualLongScalar.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterLongColGreaterDoubleColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterLongColGreaterDoubleScalar.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterLongColGreaterEqualDoubleColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterLongColGreaterEqualDoubleScalar.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterLongColGreaterEqualLongColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterLongColGreaterEqualLongScalar.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterLongColGreaterLongColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterLongColGreaterLongScalar.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterLongColLessDoubleColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterLongColLessDoubleScalar.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterLongColLessEqualDoubleColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterLongColLessEqualDoubleScalar.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterLongColLessEqualLongColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterLongColLessEqualLongScalar.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterLongColLessLongColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterLongColLessLongScalar.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterLongColNotEqualDoubleColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterLongColNotEqualDoubleScalar.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterLongColNotEqualLongColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterLongColNotEqualLongScalar.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterLongScalarEqualDoubleColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterLongScalarEqualLongColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterLongScalarGreaterDoubleColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterLongScalarGreaterEqualDoubleColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterLongScalarGreaterEqualLongColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterLongScalarGreaterLongColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterLongScalarLessDoubleColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterLongScalarLessEqualDoubleColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterLongScalarLessEqualLongColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterLongScalarLessLongColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterLongScalarNotEqualDoubleColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/FilterLongScalarNotEqualLongColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongColAddDoubleColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongColAddDoubleScalar.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongColAddLongColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongColAddLongScalar.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongColDivideDoubleColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongColDivideDoubleScalar.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongColEqualDoubleScalar.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongColGreaterDoubleScalar.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongColGreaterEqualDoubleScalar.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongColLessDoubleScalar.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongColLessEqualDoubleScalar.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongColModuloDoubleColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongColModuloDoubleScalar.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongColModuloLongColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongColModuloLongScalar.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongColMultiplyDoubleColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongColMultiplyDoubleScalar.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongColMultiplyLongColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongColMultiplyLongScalar.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongColNotEqualDoubleScalar.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongColSubtractDoubleColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongColSubtractDoubleScalar.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongColSubtractLongColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongColSubtractLongScalar.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongColUnaryMinus.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongScalarAddDoubleColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongScalarAddLongColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongScalarDivideDoubleColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongScalarModuloDoubleColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongScalarModuloLongColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongScalarMultiplyDoubleColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongScalarMultiplyLongColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongScalarSubtractDoubleColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/LongScalarSubtractLongColumn.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/CodeGen.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/ColumnArithmeticColumn.txt
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/ColumnArithmeticScalar.txt
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/ColumnCompareScalar.txt
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/ColumnUnaryMinus.txt
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/FilterColumnCompareColumn.txt
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/FilterColumnCompareScalar.txt
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/FilterScalarCompareColumn.txt
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/ScalarArithmeticColumn.txt
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/VectorUDAFAvg.txt
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/VectorUDAFMinMax.txt
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/VectorUDAFMinMaxString.txt
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/VectorUDAFSum.txt
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/VectorUDAFVar.txt
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/udf/IUDFUnaryString.java
    hive/branches/vectorization/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/TestVectorFilterOperator.java
    hive/branches/vectorization/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/TestVectorGroupByOperator.java
    hive/branches/vectorization/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/TestVectorSelectOperator.java
    hive/branches/vectorization/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/TestVectorizationContext.java
    hive/branches/vectorization/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/TestVectorizedRowBatchCtx.java
    hive/branches/vectorization/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/expressions/TestConstantVectorExpression.java
    hive/branches/vectorization/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/expressions/TestUnaryMinus.java
    hive/branches/vectorization/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/expressions/TestVectorArithmeticExpressions.java
    hive/branches/vectorization/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/expressions/TestVectorExpressionWriters.java
    hive/branches/vectorization/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/expressions/TestVectorFilterExpressions.java
    hive/branches/vectorization/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/expressions/TestVectorLogicalExpressions.java
    hive/branches/vectorization/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/expressions/TestVectorScalarColArithmetic.java
    hive/branches/vectorization/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/expressions/TestVectorTimestampExpressions.java
    hive/branches/vectorization/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/util/FakeVectorRowBatchFromObjectIterables.java
    hive/branches/vectorization/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/util/VectorizedRowGroupGenUtil.java

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorGroupByOperator.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorGroupByOperator.java?rev=1509425&r1=1509424&r2=1509425&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorGroupByOperator.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorGroupByOperator.java Thu Aug  1 20:30:52 2013
@@ -110,7 +110,7 @@ public class VectorGroupByOperator exten
   private transient int avgVariableSize;
 
   /**
-   * Current number of entries in the hash table
+   * Current number of entries in the hash table.
    */
   private transient int numEntriesHashTable;
 
@@ -130,7 +130,7 @@ public class VectorGroupByOperator exten
   private static final int FLUSH_CHECK_THRESHOLD = 10000;
 
   /**
-   * Percent of entries to flush when memory threshold exceeded
+   * Percent of entries to flush when memory threshold exceeded.
    */
   private static final float PERCENT_ENTRIES_TO_FLUSH = 0.1f;
 

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorHashKeyWrapperBatch.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorHashKeyWrapperBatch.java?rev=1509425&r1=1509424&r2=1509425&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorHashKeyWrapperBatch.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorHashKeyWrapperBatch.java Thu Aug  1 20:30:52 2013
@@ -34,13 +34,12 @@ import org.apache.hadoop.hive.ql.util.Ja
 public class VectorHashKeyWrapperBatch {
 
   /**
-   * Helper class for looking up a key value based on key index
-   *
+   * Helper class for looking up a key value based on key index.
    */
   private static class KeyLookupHelper {
-    public int longIndex;
-    public int doubleIndex;
-    public int stringIndex;
+    private int longIndex;
+    private int doubleIndex;
+    private int stringIndex;
   }
 
   /**
@@ -49,22 +48,22 @@ public class VectorHashKeyWrapperBatch {
   private VectorExpression[] keyExpressions;
 
   /**
-   * indices of LONG primitive keys
+   * indices of LONG primitive keys.
    */
   private int[] longIndices;
 
   /**
-   * indices of DOUBLE primitive keys
+   * indices of DOUBLE primitive keys.
    */
   private int[] doubleIndices;
 
-  /*
-   * indices of string (byte[]) primitive keys
+  /**
+   * indices of string (byte[]) primitive keys.
    */
   private int[] stringIndices;
 
   /**
-   * pre-allocated batch size vector of keys wrappers.
+   * Pre-allocated batch size vector of keys wrappers.
    * N.B. these keys are **mutable** and should never be used in a HashMap.
    * Always clone the key wrapper to obtain an immutable keywrapper suitable
    * to use a key in a HashMap.
@@ -72,7 +71,7 @@ public class VectorHashKeyWrapperBatch {
   private VectorHashKeyWrapper[] vectorHashKeyWrappers;
 
   /**
-   * lookup vector to map from key index to primitive type index
+   * Lookup vector to map from key index to primitive type index.
    */
   private KeyLookupHelper[] indexLookup;
 
@@ -90,7 +89,7 @@ public class VectorHashKeyWrapperBatch {
   }
 
   /**
-   * Accessor for the batch-sized array of key wrappers
+   * Accessor for the batch-sized array of key wrappers.
    */
   public VectorHashKeyWrapper[] getVectorHashKeyWrappers() {
     return vectorHashKeyWrappers;
@@ -106,7 +105,7 @@ public class VectorHashKeyWrapperBatch {
    * @param batch
    * @throws HiveException
    */
-  public void evaluateBatch (VectorizedRowBatch batch) throws HiveException {
+  public void evaluateBatch(VectorizedRowBatch batch) throws HiveException {
     for(int i = 0; i < keyExpressions.length; ++i) {
       keyExpressions[i].evaluate(batch);
     }
@@ -127,7 +126,8 @@ public class VectorHashKeyWrapperBatch {
       } else if (!columnVector.noNulls && !columnVector.isRepeating && batch.selectedInUse) {
         assignLongNullsNoRepeatingSelection (i, batch.size, columnVector, batch.selected);
       } else {
-        throw new HiveException (String.format("Unimplemented Long null/repeat/selected combination %b/%b/%b",
+        throw new HiveException (String.format(
+            "Unimplemented Long null/repeat/selected combination %b/%b/%b",
             columnVector.noNulls, columnVector.isRepeating, batch.selectedInUse));
       }
     }
@@ -148,7 +148,8 @@ public class VectorHashKeyWrapperBatch {
       } else if (!columnVector.noNulls && !columnVector.isRepeating && batch.selectedInUse) {
         assignDoubleNullsNoRepeatingSelection (i, batch.size, columnVector, batch.selected);
       } else {
-        throw new HiveException (String.format("Unimplemented Double null/repeat/selected combination %b/%b/%b",
+        throw new HiveException (String.format(
+            "Unimplemented Double null/repeat/selected combination %b/%b/%b",
             columnVector.noNulls, columnVector.isRepeating, batch.selectedInUse));
       }
     }
@@ -169,7 +170,8 @@ public class VectorHashKeyWrapperBatch {
       } else if (!columnVector.noNulls && !columnVector.isRepeating && batch.selectedInUse) {
         assignStringNullsNoRepeatingSelection (i, batch.size, columnVector, batch.selected);
       } else {
-        throw new HiveException (String.format("Unimplemented String null/repeat/selected combination %b/%b/%b",
+        throw new HiveException (String.format(
+            "Unimplemented String null/repeat/selected combination %b/%b/%b",
             columnVector.noNulls, columnVector.isRepeating, batch.selectedInUse));
       }
     }
@@ -505,7 +507,8 @@ public class VectorHashKeyWrapperBatch {
     compiledKeyWrapperBatch.keysFixedSize += model.lengthForDoubleArrayOfSize(doubleIndicesIndex);
     compiledKeyWrapperBatch.keysFixedSize += model.lengthForObjectArrayOfSize(stringIndicesIndex);
     compiledKeyWrapperBatch.keysFixedSize += model.lengthForIntArrayOfSize(longIndicesIndex) * 2;
-    compiledKeyWrapperBatch.keysFixedSize += model.lengthForBooleanArrayOfSize(keyExpressions.length);
+    compiledKeyWrapperBatch.keysFixedSize +=
+        model.lengthForBooleanArrayOfSize(keyExpressions.length);
 
     return compiledKeyWrapperBatch;
   }
@@ -520,16 +523,16 @@ public class VectorHashKeyWrapperBatch {
 
     KeyLookupHelper klh = indexLookup[i];
     if (klh.longIndex >= 0) {
-      return kw.getIsLongNull(klh.longIndex) ? null : 
+      return kw.getIsLongNull(klh.longIndex) ? null :
         keyOutputWriter.writeValue(kw.getLongValue(klh.longIndex));
     } else if (klh.doubleIndex >= 0) {
       return kw.getIsDoubleNull(klh.doubleIndex) ? null :
           keyOutputWriter.writeValue(kw.getDoubleValue(klh.doubleIndex));
     } else if (klh.stringIndex >= 0) {
-      return kw.getIsBytesNull(klh.stringIndex) ? null : 
+      return kw.getIsBytesNull(klh.stringIndex) ? null :
           keyOutputWriter.writeValue(
-              kw.getBytes(klh.stringIndex), 
-                kw.getByteStart(klh.stringIndex), 
+              kw.getBytes(klh.stringIndex),
+                kw.getByteStart(klh.stringIndex),
                 kw.getByteLength(klh.stringIndex));
     } else {
       throw new HiveException(String.format(

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizedRowBatchCtx.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizedRowBatchCtx.java?rev=1509425&r1=1509424&r2=1509425&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizedRowBatchCtx.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizedRowBatchCtx.java Thu Aug  1 20:30:52 2013
@@ -26,6 +26,7 @@ import java.util.Map;
 import java.util.Properties;
 
 import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hive.metastore.api.hive_metastoreConstants;
 import org.apache.hadoop.hive.ql.exec.Utilities;
 import org.apache.hadoop.hive.ql.io.HiveFileFormatUtils;
 import org.apache.hadoop.hive.ql.io.IOPrepareCache;
@@ -46,10 +47,8 @@ import org.apache.hadoop.mapred.FileSpli
 /**
  * Context for Vectorized row batch. this calss does eager deserialization of row data using serde
  * in the RecordReader layer.
- * It has supports partitions in this layer so that the vectorized batch is populated correctly with
- * the partition column.
- * VectorizedRowBatchCtx.
- *
+ * It has supports partitions in this layer so that the vectorized batch is populated correctly
+ * with the partition column.
  */
 public class VectorizedRowBatchCtx {
 
@@ -63,7 +62,7 @@ public class VectorizedRowBatchCtx {
   private Deserializer deserializer;
 
   // Hash map of partition values. Key=TblColName value=PartitionValue
-  private LinkedHashMap<String, String> partitionValues;
+  private Map<String, String> partitionValues;
 
   // Column projection list - List of column indexes to include. This
   // list does not contain partition columns
@@ -82,7 +81,7 @@ public class VectorizedRowBatchCtx {
    *          Hash map of partition values. Key=TblColName value=PartitionValue
    */
   public VectorizedRowBatchCtx(StructObjectInspector rawRowOI, StructObjectInspector rowOI,
-      Deserializer deserializer, LinkedHashMap<String, String> partitionValues) {
+      Deserializer deserializer, Map<String, String> partitionValues) {
     this.rowOI = rowOI;
     this.rawRowOI = rawRowOI;
     this.deserializer = deserializer;
@@ -147,8 +146,7 @@ public class VectorizedRowBatchCtx {
     deserializer = partDeserializer;
 
     // Check to see if this split is part of a partition of a table
-    String pcols = partProps
-        .getProperty(org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.META_TABLE_PARTITION_COLUMNS);
+    String pcols = partProps.getProperty(hive_metastoreConstants.META_TABLE_PARTITION_COLUMNS);
 
     if (pcols != null && pcols.length() > 0) {
 
@@ -212,7 +210,8 @@ public class VectorizedRowBatchCtx {
       // partition column then create the column vector. Also note that partition columns are not
       // in the included list.
       if ((colsToInclude == null) || colsToInclude.contains(j)
-          || ((partitionValues != null) && (partitionValues.get(fieldRefs.get(j).getFieldName()) != null))) {
+          || ((partitionValues != null) &&
+              (partitionValues.get(fieldRefs.get(j).getFieldName()) != null))) {
         ObjectInspector foi = fieldRefs.get(j).getFieldObjectInspector();
         switch (foi.getCategory()) {
         case PRIMITIVE: {

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizedSerde.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizedSerde.java?rev=1509425&r1=1509424&r2=1509425&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizedSerde.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizedSerde.java Thu Aug  1 20:30:52 2013
@@ -22,11 +22,14 @@ import org.apache.hadoop.hive.serde2.Ser
 import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector;
 import org.apache.hadoop.io.Writable;
 
+/**
+ * Serdes that support vectorized {@link VectorizedRowBatch} must implement this interface.
+ */
 public interface VectorizedSerde {
 
   Writable serializeVector(VectorizedRowBatch vrg, ObjectInspector objInspector)
       throws SerDeException;
 
   void deserializeVector(Object rowBlob, int rowsInBlob, VectorizedRowBatch reuseBatch)
-      throws SerDeException;      
+      throws SerDeException;
 }

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/ColAndCol.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/ColAndCol.java?rev=1509425&r1=1509424&r2=1509425&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/ColAndCol.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/ColAndCol.java Thu Aug  1 20:30:52 2013
@@ -20,19 +20,21 @@ package org.apache.hadoop.hive.ql.exec.v
 import org.apache.hadoop.hive.ql.exec.vector.LongColumnVector;
 import org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch;
 
+/**
+ * Evaluate AND of two boolean columns and store result in the output boolean column.
+ */
 public class ColAndCol extends VectorExpression {
-	int colNum1;
-	int colNum2;
-	int outputColumn;
-
-	public ColAndCol(int colNum1, int colNum2, int outputColumn)
-	{
-		this.colNum1 = colNum1;
-		this.colNum2 = colNum2;
-		this.outputColumn = outputColumn;
-	}
+  private final int colNum1;
+  private final int colNum2;
+  private final int outputColumn;
+
+  public ColAndCol(int colNum1, int colNum2, int outputColumn) {
+    this.colNum1 = colNum1;
+    this.colNum2 = colNum2;
+    this.outputColumn = outputColumn;
+  }
 
-	@Override
+  @Override
   public void evaluate(VectorizedRowBatch batch) {
 
     if (childExpressions != null) {
@@ -49,11 +51,11 @@ public class ColAndCol extends VectorExp
     LongColumnVector outV = (LongColumnVector) batch.cols[outputColumn];
     long[] outputVector = outV.vector;
     if (n <= 0) {
-      //Nothing to do
+      // Nothing to do
       return;
     }
 
-    //Handle null
+    // Handle null
     if (inputColVector1.noNulls && !inputColVector2.noNulls) {
       outV.noNulls = false;
       if (inputColVector2.isRepeating) {
@@ -61,12 +63,12 @@ public class ColAndCol extends VectorExp
         outV.isNull[0] = true;
       } else {
         if (batch.selectedInUse) {
-          for(int j = 0; j != n; j++) {
+          for (int j = 0; j != n; j++) {
             int i = sel[j];
             outV.isNull[i] = inputColVector2.isNull[i];
           }
         } else {
-          for(int i = 0; i != n; i++) {
+          for (int i = 0; i != n; i++) {
             outV.isNull[i] = inputColVector2.isNull[i];
           }
         }
@@ -107,23 +109,23 @@ public class ColAndCol extends VectorExp
       }
     }
 
-    //Now disregard null in second pass.
-    if ( (inputColVector1.isRepeating) && (inputColVector2.isRepeating) )  {
-      //All must be selected otherwise size would be zero
-      //Repeating property will not change.
+    // Now disregard null in second pass.
+    if ((inputColVector1.isRepeating) && (inputColVector2.isRepeating)) {
+      // All must be selected otherwise size would be zero
+      // Repeating property will not change.
       outV.isRepeating = true;
-      outputVector[0] = vector1[0] & vector2[0] ;
+      outputVector[0] = vector1[0] & vector2[0];
     } else if (batch.selectedInUse) {
-			for(int j=0; j != n; j++) {
-				int i = sel[j];
-				outputVector[i] = vector1[i] & vector2[i] ;
-			}
-		} else {
-			for(int i = 0; i != n; i++) {
-			  outputVector[i] = vector1[i] & vector2[i];
-			}
-		}
-	}
+      for (int j = 0; j != n; j++) {
+        int i = sel[j];
+        outputVector[i] = vector1[i] & vector2[i];
+      }
+    } else {
+      for (int i = 0; i != n; i++) {
+        outputVector[i] = vector1[i] & vector2[i];
+      }
+    }
+  }
 
   @Override
   public int getOutputColumn() {

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/ColOrCol.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/ColOrCol.java?rev=1509425&r1=1509424&r2=1509425&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/ColOrCol.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/ColOrCol.java Thu Aug  1 20:30:52 2013
@@ -21,19 +21,23 @@ package org.apache.hadoop.hive.ql.exec.v
 import org.apache.hadoop.hive.ql.exec.vector.LongColumnVector;
 import org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch;
 
+/**
+ * This class performs OR expression on two input columns and stores,
+ * the boolean output in a separate output column. The boolean values
+ * are supposed to be represented as 0/1 in a long vector.
+ */
 public class ColOrCol extends VectorExpression {
-	int colNum1;
-	int colNum2;
-	int outputColumn;
+  private final int colNum1;
+  private final int colNum2;
+  private final int outputColumn;
 
-	public ColOrCol(int colNum1, int colNum2, int outputColumn)
-	{
-		this.colNum1 = colNum1;
-		this.colNum2 = colNum2;
-		this.outputColumn = outputColumn;
-	}
+  public ColOrCol(int colNum1, int colNum2, int outputColumn) {
+    this.colNum1 = colNum1;
+    this.colNum2 = colNum2;
+    this.outputColumn = outputColumn;
+  }
 
-	@Override
+  @Override
   public void evaluate(VectorizedRowBatch batch) {
 
     if (childExpressions != null) {
@@ -50,71 +54,71 @@ public class ColOrCol extends VectorExpr
     LongColumnVector outV = (LongColumnVector) batch.cols[outputColumn];
     long[] outputVector = outV.vector;
     if (n <= 0) {
-      //Nothing to do
+      // Nothing to do
       return;
     }
 
     if (inputColVector1.noNulls && inputColVector2.noNulls) {
-      if ( (inputColVector1.isRepeating) && (inputColVector2.isRepeating) )  {
-        //All must be selected otherwise size would be zero
-        //Repeating property will not change.
+      if ((inputColVector1.isRepeating) && (inputColVector2.isRepeating)) {
+        // All must be selected otherwise size would be zero
+        // Repeating property will not change.
         outV.isRepeating = true;
-        outputVector[0] = vector1[0] | vector2[0] ;
+        outputVector[0] = vector1[0] | vector2[0];
       } else if (inputColVector1.isRepeating && !inputColVector2.isRepeating) {
         if (batch.selectedInUse) {
-          for(int j=0; j != n; j++) {
+          for (int j = 0; j != n; j++) {
             int i = sel[j];
-            outputVector[i] = vector1[0] | vector2[i] ;
+            outputVector[i] = vector1[0] | vector2[i];
           }
         } else {
-          for(int i = 0; i != n; i++) {
+          for (int i = 0; i != n; i++) {
             outputVector[i] = vector1[0] | vector2[i];
           }
         }
         outV.isRepeating = false;
       } else if (!inputColVector1.isRepeating && inputColVector2.isRepeating) {
         if (batch.selectedInUse) {
-          for(int j=0; j != n; j++) {
+          for (int j = 0; j != n; j++) {
             int i = sel[j];
-            outputVector[i] = vector1[i] | vector2[0] ;
+            outputVector[i] = vector1[i] | vector2[0];
           }
         } else {
-          for(int i = 0; i != n; i++) {
+          for (int i = 0; i != n; i++) {
             outputVector[i] = vector1[i] | vector2[0];
           }
         }
         outV.isRepeating = false;
-      } else /* neither side is repeating */ {
+      } else /* neither side is repeating */{
         if (batch.selectedInUse) {
-    			for(int j=0; j != n; j++) {
-    				int i = sel[j];
-    				outputVector[i] = vector1[i] | vector2[i] ;
-    			}
-    		} else {
-    			for(int i = 0; i != n; i++) {
-    			  outputVector[i] = vector1[i] | vector2[i];
-    			}
-  		  }
+          for (int j = 0; j != n; j++) {
+            int i = sel[j];
+            outputVector[i] = vector1[i] | vector2[i];
+          }
+        } else {
+          for (int i = 0; i != n; i++) {
+            outputVector[i] = vector1[i] | vector2[i];
+          }
+        }
         outV.isRepeating = false;
       }
       outV.noNulls = true;
     } else if (inputColVector1.noNulls && !inputColVector2.noNulls) {
       // only input 2 side has nulls
-      if ( (inputColVector1.isRepeating) && (inputColVector2.isRepeating) )  {
-        //All must be selected otherwise size would be zero
-        //Repeating property will not change.
+      if ((inputColVector1.isRepeating) && (inputColVector2.isRepeating)) {
+        // All must be selected otherwise size would be zero
+        // Repeating property will not change.
         outV.isRepeating = true;
-        outputVector[0] = vector1[0] | vector2[0] ;
-        outV.isNull[0] =  (vector1[0] == 0) && inputColVector2.isNull[0];
+        outputVector[0] = vector1[0] | vector2[0];
+        outV.isNull[0] = (vector1[0] == 0) && inputColVector2.isNull[0];
       } else if (inputColVector1.isRepeating && !inputColVector2.isRepeating) {
         if (batch.selectedInUse) {
-          for(int j=0; j != n; j++) {
+          for (int j = 0; j != n; j++) {
             int i = sel[j];
-            outputVector[i] = vector1[0] | vector2[i] ;
+            outputVector[i] = vector1[0] | vector2[i];
             outV.isNull[i] = (vector1[0] == 0) && inputColVector2.isNull[i];
           }
         } else {
-          for(int i = 0; i != n; i++) {
+          for (int i = 0; i != n; i++) {
             outputVector[i] = vector1[0] | vector2[i];
             outV.isNull[i] = (vector1[0] == 0) && inputColVector2.isNull[i];
           }
@@ -122,27 +126,27 @@ public class ColOrCol extends VectorExpr
         outV.isRepeating = false;
       } else if (!inputColVector1.isRepeating && inputColVector2.isRepeating) {
         if (batch.selectedInUse) {
-          for(int j=0; j != n; j++) {
+          for (int j = 0; j != n; j++) {
             int i = sel[j];
-            outputVector[i] = vector1[i] | vector2[0] ;
+            outputVector[i] = vector1[i] | vector2[0];
             outV.isNull[i] = (vector1[i] == 0) && inputColVector2.isNull[0];
           }
         } else {
-          for(int i = 0; i != n; i++) {
+          for (int i = 0; i != n; i++) {
             outputVector[i] = vector1[i] | vector2[0];
             outV.isNull[i] = (vector1[i] == 0) && inputColVector2.isNull[0];
           }
         }
         outV.isRepeating = false;
-      } else /* neither side is repeating */ {
+      } else /* neither side is repeating */{
         if (batch.selectedInUse) {
-          for(int j=0; j != n; j++) {
+          for (int j = 0; j != n; j++) {
             int i = sel[j];
-            outputVector[i] = vector1[i] | vector2[i] ;
+            outputVector[i] = vector1[i] | vector2[i];
             outV.isNull[i] = (vector1[i] == 0) && inputColVector2.isNull[i];
           }
         } else {
-          for(int i = 0; i != n; i++) {
+          for (int i = 0; i != n; i++) {
             outputVector[i] = vector1[i] | vector2[i];
             outV.isNull[i] = (vector1[i] == 0) && inputColVector2.isNull[i];
           }
@@ -152,69 +156,69 @@ public class ColOrCol extends VectorExpr
       outV.noNulls = false;
     } else if (!inputColVector1.noNulls && inputColVector2.noNulls) {
       // only input 1 side has nulls
-      if ( (inputColVector1.isRepeating) && (inputColVector2.isRepeating) )  {
-        //All must be selected otherwise size would be zero
-        //Repeating property will not change.
+      if ((inputColVector1.isRepeating) && (inputColVector2.isRepeating)) {
+        // All must be selected otherwise size would be zero
+        // Repeating property will not change.
         outV.isRepeating = true;
-        outputVector[0] = vector1[0] | vector2[0] ;
-        outV.isNull[0] =  inputColVector1.isNull[0] && (vector2[0] == 0);
+        outputVector[0] = vector1[0] | vector2[0];
+        outV.isNull[0] = inputColVector1.isNull[0] && (vector2[0] == 0);
       } else if (inputColVector1.isRepeating && !inputColVector2.isRepeating) {
         if (batch.selectedInUse) {
-          for(int j=0; j != n; j++) {
+          for (int j = 0; j != n; j++) {
             int i = sel[j];
-            outputVector[i] = vector1[0] | vector2[i] ;
-            outV.isNull[i] =  inputColVector1.isNull[0] && (vector2[i] == 0);
+            outputVector[i] = vector1[0] | vector2[i];
+            outV.isNull[i] = inputColVector1.isNull[0] && (vector2[i] == 0);
           }
         } else {
-          for(int i = 0; i != n; i++) {
+          for (int i = 0; i != n; i++) {
             outputVector[i] = vector1[0] | vector2[i];
-            outV.isNull[i] =  inputColVector1.isNull[0] && (vector2[i] == 0);
+            outV.isNull[i] = inputColVector1.isNull[0] && (vector2[i] == 0);
           }
         }
         outV.isRepeating = false;
       } else if (!inputColVector1.isRepeating && inputColVector2.isRepeating) {
         if (batch.selectedInUse) {
-          for(int j=0; j != n; j++) {
+          for (int j = 0; j != n; j++) {
             int i = sel[j];
-            outputVector[i] = vector1[i] | vector2[0] ;
-            outV.isNull[i] =  inputColVector1.isNull[i] && (vector2[0] == 0);
+            outputVector[i] = vector1[i] | vector2[0];
+            outV.isNull[i] = inputColVector1.isNull[i] && (vector2[0] == 0);
           }
         } else {
-          for(int i = 0; i != n; i++) {
+          for (int i = 0; i != n; i++) {
             outputVector[i] = vector1[i] | vector2[0];
-            outV.isNull[i] =  inputColVector1.isNull[i] && (vector2[0] == 0);
+            outV.isNull[i] = inputColVector1.isNull[i] && (vector2[0] == 0);
           }
         }
         outV.isRepeating = false;
-      } else /* neither side is repeating */ {
+      } else /* neither side is repeating */{
         if (batch.selectedInUse) {
-          for(int j=0; j != n; j++) {
+          for (int j = 0; j != n; j++) {
             int i = sel[j];
-            outputVector[i] = vector1[i] | vector2[i] ;
-            outV.isNull[i] =  inputColVector1.isNull[i] && (vector2[i] == 0);
+            outputVector[i] = vector1[i] | vector2[i];
+            outV.isNull[i] = inputColVector1.isNull[i] && (vector2[i] == 0);
           }
         } else {
-          for(int i = 0; i != n; i++) {
+          for (int i = 0; i != n; i++) {
             outputVector[i] = vector1[i] | vector2[i];
-            outV.isNull[i] =  inputColVector1.isNull[i] && (vector2[i] == 0);
+            outV.isNull[i] = inputColVector1.isNull[i] && (vector2[i] == 0);
           }
         }
         outV.isRepeating = false;
       }
       outV.noNulls = false;
-    } else  /* !inputColVector1.noNulls && !inputColVector2.noNulls */ {
+    } else /* !inputColVector1.noNulls && !inputColVector2.noNulls */{
       // either input 1 or input 2 may have nulls
-      if ( (inputColVector1.isRepeating) && (inputColVector2.isRepeating) )  {
-        //All must be selected otherwise size would be zero
-        //Repeating property will not change.
+      if ((inputColVector1.isRepeating) && (inputColVector2.isRepeating)) {
+        // All must be selected otherwise size would be zero
+        // Repeating property will not change.
         outV.isRepeating = true;
-        outputVector[0] = vector1[0] | vector2[0] ;
+        outputVector[0] = vector1[0] | vector2[0];
         outV.isNull[0] = ((vector1[0] == 0) && inputColVector2.isNull[0])
             || (inputColVector1.isNull[0] && (vector2[0] == 0))
             || (inputColVector1.isNull[0] && inputColVector2.isNull[0]);
       } else if (inputColVector1.isRepeating && !inputColVector2.isRepeating) {
         if (batch.selectedInUse) {
-          for(int j=0; j != n; j++) {
+          for (int j = 0; j != n; j++) {
             int i = sel[j];
             outputVector[i] = vector1[0] | vector2[i];
             outV.isNull[i] = ((vector1[0] == 0) && inputColVector2.isNull[i])
@@ -222,7 +226,7 @@ public class ColOrCol extends VectorExpr
                 || (inputColVector1.isNull[0] && inputColVector2.isNull[i]);
           }
         } else {
-          for(int i = 0; i != n; i++) {
+          for (int i = 0; i != n; i++) {
             outputVector[i] = vector1[0] | vector2[i];
             outV.isNull[i] = ((vector1[0] == 0) && inputColVector2.isNull[i])
                 || (inputColVector1.isNull[0] && (vector2[i] == 0))
@@ -232,15 +236,15 @@ public class ColOrCol extends VectorExpr
         outV.isRepeating = false;
       } else if (!inputColVector1.isRepeating && inputColVector2.isRepeating) {
         if (batch.selectedInUse) {
-          for(int j=0; j != n; j++) {
+          for (int j = 0; j != n; j++) {
             int i = sel[j];
-            outputVector[i] = vector1[i] | vector2[0] ;
+            outputVector[i] = vector1[i] | vector2[0];
             outV.isNull[i] = ((vector1[i] == 0) && inputColVector2.isNull[0])
                 || (inputColVector1.isNull[i] && (vector2[0] == 0))
                 || (inputColVector1.isNull[i] && inputColVector2.isNull[0]);
           }
         } else {
-          for(int i = 0; i != n; i++) {
+          for (int i = 0; i != n; i++) {
             outputVector[i] = vector1[i] | vector2[0];
             outV.isNull[i] = ((vector1[i] == 0) && inputColVector2.isNull[0])
                 || (inputColVector1.isNull[i] && (vector2[0] == 0))
@@ -248,17 +252,17 @@ public class ColOrCol extends VectorExpr
           }
         }
         outV.isRepeating = false;
-      } else /* neither side is repeating */ {
+      } else /* neither side is repeating */{
         if (batch.selectedInUse) {
-          for(int j=0; j != n; j++) {
+          for (int j = 0; j != n; j++) {
             int i = sel[j];
-            outputVector[i] = vector1[i] | vector2[i] ;
+            outputVector[i] = vector1[i] | vector2[i];
             outV.isNull[i] = ((vector1[i] == 0) && inputColVector2.isNull[i])
                 || (inputColVector1.isNull[i] && (vector2[i] == 0))
                 || (inputColVector1.isNull[i] && inputColVector2.isNull[i]);
           }
         } else {
-          for(int i = 0; i != n; i++) {
+          for (int i = 0; i != n; i++) {
             outputVector[i] = vector1[i] | vector2[i];
             outV.isNull[i] = ((vector1[i] == 0) && inputColVector2.isNull[i])
                 || (inputColVector1.isNull[i] && (vector2[i] == 0))
@@ -269,7 +273,7 @@ public class ColOrCol extends VectorExpr
       }
       outV.noNulls = false;
     }
-	}
+  }
 
   @Override
   public int getOutputColumn() {

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/ConstantVectorExpression.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/ConstantVectorExpression.java?rev=1509425&r1=1509424&r2=1509425&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/ConstantVectorExpression.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/ConstantVectorExpression.java Thu Aug  1 20:30:52 2013
@@ -23,6 +23,9 @@ 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;
 
+/**
+ * Constant is represented as a vector with repeating values.
+ */
 public class ConstantVectorExpression extends VectorExpression {
 
   private static enum Type {

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/IdentityExpression.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/IdentityExpression.java?rev=1509425&r1=1509424&r2=1509425&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/IdentityExpression.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/IdentityExpression.java Thu Aug  1 20:30:52 2013
@@ -19,9 +19,12 @@ package org.apache.hadoop.hive.ql.exec.v
 
 import org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch;
 
+/**
+ * An expression representing a column, only children are evaluated.
+ */
 public class IdentityExpression extends VectorExpression {
-	int colNum;
-  String type;
+	private final int colNum;
+  private final String type;
 
 	public IdentityExpression(int colNum, String type) {
 		this.colNum = colNum;

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/IsNotNull.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/IsNotNull.java?rev=1509425&r1=1509424&r2=1509425&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/IsNotNull.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/IsNotNull.java Thu Aug  1 20:30:52 2013
@@ -26,8 +26,8 @@ import org.apache.hadoop.hive.ql.exec.ve
  * The boolean output is stored in the specified output column.
  */
 public class IsNotNull extends VectorExpression {
-  int colNum;
-  int outputColumn;
+  private final int colNum;
+  private final int outputColumn;
 
   public IsNotNull(int colNum, int outputColumn) {
     this.colNum = colNum;

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/IsNull.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/IsNull.java?rev=1509425&r1=1509424&r2=1509425&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/IsNull.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/IsNull.java Thu Aug  1 20:30:52 2013
@@ -26,8 +26,8 @@ import org.apache.hadoop.hive.ql.exec.ve
  * The boolean output is stored in the specified output column.
  */
 public class IsNull extends VectorExpression {
-  int colNum;
-  int outputColumn;
+  private final int colNum;
+  private final int outputColumn;
 
   public IsNull(int colNum, int outputColumn) {
     this.colNum = colNum;

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/LongColDivideLongColumn.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/LongColDivideLongColumn.java?rev=1509425&r1=1509424&r2=1509425&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/LongColDivideLongColumn.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/LongColDivideLongColumn.java Thu Aug  1 20:30:52 2013
@@ -15,12 +15,11 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
+
 package org.apache.hadoop.hive.ql.exec.vector.expressions;
 
-import org.apache.hadoop.hive.ql.exec.vector.expressions.VectorExpression;
-import org.apache.hadoop.hive.ql.exec.vector.expressions.NullUtil;
-import org.apache.hadoop.hive.ql.exec.vector.*;
+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.VectorizedRowBatch;
 
 /**
@@ -54,24 +53,24 @@ public class LongColDivideLongColumn ext
     long[] vector1 = inputColVector1.vector;
     long[] vector2 = inputColVector2.vector;
     double[] outputVector = outputColVector.vector;
-    
+
     // return immediately if batch is empty
     if (n == 0) {
       return;
     }
-    
+
     outputColVector.isRepeating = inputColVector1.isRepeating && inputColVector2.isRepeating;
-    
-    // Handle nulls first  
+
+    // Handle nulls first
     NullUtil.propagateNullsColCol(
       inputColVector1, inputColVector2, outputColVector, sel, n, batch.selectedInUse);
-          
+
     /* Disregard nulls for processing. In other words,
-     * the arithmetic operation is performed even if one or 
+     * the arithmetic operation is performed even if one or
      * more inputs are null. This is to improve speed by avoiding
      * conditional checks in the inner loop.
-     */ 
-    if (inputColVector1.isRepeating && inputColVector2.isRepeating) { 
+     */
+    if (inputColVector1.isRepeating && inputColVector2.isRepeating) {
       outputVector[0] = vector1[0] / (double) vector2[0];
     } else if (inputColVector1.isRepeating) {
       if (batch.selectedInUse) {
@@ -107,9 +106,9 @@ public class LongColDivideLongColumn ext
         }
       }
     }
-    
-    /* For the case when the output can have null values, follow 
-     * the convention that the data values must be 1 for long and 
+
+    /* For the case when the output can have null values, follow
+     * the convention that the data values must be 1 for long and
      * NaN for double. This is to prevent possible later zero-divide errors
      * in complex arithmetic expressions like col2 / (col1 - 1)
      * in the case when some col1 entries are null.

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/LongColDivideLongScalar.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/LongColDivideLongScalar.java?rev=1509425&r1=1509424&r2=1509425&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/LongColDivideLongScalar.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/LongColDivideLongScalar.java Thu Aug  1 20:30:52 2013
@@ -15,14 +15,12 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
+
 package org.apache.hadoop.hive.ql.exec.vector.expressions;
 
-import org.apache.hadoop.hive.ql.exec.vector.expressions.VectorExpression;
-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.VectorizedRowBatch;
-import org.apache.hadoop.hive.ql.exec.vector.expressions.NullUtil;
 
 /**
  * This operation is handled as a special case because Hive
@@ -30,9 +28,9 @@ import org.apache.hadoop.hive.ql.exec.ve
  * from a template like the other arithmetic operations are.
  */
 public class LongColDivideLongScalar extends VectorExpression {
-  private int colNum;
-  private long value;
-  private int outputColumn;
+  private final int colNum;
+  private final long value;
+  private final int outputColumn;
 
   public LongColDivideLongScalar(int colNum, long value, int outputColumn) {
     this.colNum = colNum;
@@ -57,7 +55,7 @@ public class LongColDivideLongScalar ext
     int n = batch.size;
     long[] vector = inputColVector.vector;
     double[] outputVector = outputColVector.vector;
-    
+
     // return immediately if batch is empty
     if (n == 0) {
       return;
@@ -65,9 +63,9 @@ public class LongColDivideLongScalar ext
 
     if (inputColVector.isRepeating) {
       outputVector[0] = vector[0] / (double) value;
-      
+
       // Even if there are no nulls, we always copy over entry 0. Simplifies code.
-      outputIsNull[0] = inputIsNull[0]; 
+      outputIsNull[0] = inputIsNull[0];
     } else if (inputColVector.noNulls) {
       if (batch.selectedInUse) {
         for(int j = 0; j != n; j++) {
@@ -93,9 +91,9 @@ public class LongColDivideLongScalar ext
         System.arraycopy(inputIsNull, 0, outputIsNull, 0, n);
       }
     }
-    
+
     /* Set double data vector array entries for NULL elements to the correct value.
-     * Unlike other col-scalar operations, this one doesn't benefit from carrying 
+     * Unlike other col-scalar operations, this one doesn't benefit from carrying
      * over NaN values from the input array.
      */
     NullUtil.setNullDataEntriesDouble(outputColVector, batch.selectedInUse, sel, n);
@@ -105,7 +103,7 @@ public class LongColDivideLongScalar ext
   public int getOutputColumn() {
     return outputColumn;
   }
-  
+
   @Override
   public String getOutputType() {
     return "double";

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/LongScalarDivideLongColumn.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/LongScalarDivideLongColumn.java?rev=1509425&r1=1509424&r2=1509425&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/LongScalarDivideLongColumn.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/LongScalarDivideLongColumn.java Thu Aug  1 20:30:52 2013
@@ -15,14 +15,12 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
+
 package org.apache.hadoop.hive.ql.exec.vector.expressions;
 
-import org.apache.hadoop.hive.ql.exec.vector.expressions.VectorExpression;
-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.VectorizedRowBatch;
-import org.apache.hadoop.hive.ql.exec.vector.expressions.NullUtil;
 
 /**
  * This operation is handled as a special case because Hive
@@ -30,9 +28,9 @@ import org.apache.hadoop.hive.ql.exec.ve
  * from a template like the other arithmetic operations are.
  */
 public class LongScalarDivideLongColumn extends VectorExpression {
-  private int colNum;
+  private final int colNum;
   private final double value;
-  private int outputColumn;
+  private final int outputColumn;
 
   public LongScalarDivideLongColumn(long value, int colNum, int outputColumn) {
     this.colNum = colNum;
@@ -57,7 +55,7 @@ public class LongScalarDivideLongColumn 
     int n = batch.size;
     long[] vector = inputColVector.vector;
     double[] outputVector = outputColVector.vector;
-    
+
     // return immediately if batch is empty
     if (n == 0) {
       return;
@@ -65,9 +63,9 @@ public class LongScalarDivideLongColumn 
 
     if (inputColVector.isRepeating) {
       outputVector[0] = value / vector[0];
-      
+
       // Even if there are no nulls, we always copy over entry 0. Simplifies code.
-      outputIsNull[0] = inputIsNull[0]; 
+      outputIsNull[0] = inputIsNull[0];
     } else if (inputColVector.noNulls) {
       if (batch.selectedInUse) {
         for(int j = 0; j != n; j++) {
@@ -93,9 +91,9 @@ public class LongScalarDivideLongColumn 
         System.arraycopy(inputIsNull, 0, outputIsNull, 0, n);
       }
     }
-    
+
     /* Set double data vector array entries for NULL elements to the correct value.
-     * Unlike other col-scalar operations, this one doesn't benefit from carrying 
+     * Unlike other col-scalar operations, this one doesn't benefit from carrying
      * over NaN values from the input array.
      */
     NullUtil.setNullDataEntriesDouble(outputColVector, batch.selectedInUse, sel, n);
@@ -105,7 +103,7 @@ public class LongScalarDivideLongColumn 
   public int getOutputColumn() {
     return outputColumn;
   }
-  
+
   @Override
   public String getOutputType() {
     return "double";

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/StringExpr.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/StringExpr.java?rev=1509425&r1=1509424&r2=1509425&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/StringExpr.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/StringExpr.java Thu Aug  1 20:30:52 2013
@@ -18,21 +18,21 @@
 
 package org.apache.hadoop.hive.ql.exec.vector.expressions;
 
-/** 
- * String expression evaluation helper functions
+/**
+ * String expression evaluation helper functions.
  */
 public class StringExpr {
-  
-  /* Compare two strings from two byte arrays each 
-   * with their own start position and length. 
-   * Use lexicographic unsigned byte value order. 
+
+  /* Compare two strings from two byte arrays each
+   * with their own start position and length.
+   * Use lexicographic unsigned byte value order.
    * This is what's used for UTF-8 sort order.
-   * Return negative value if arg1 < arg2, 0 if arg1 = arg2, 
+   * Return negative value if arg1 < arg2, 0 if arg1 = arg2,
    * positive if arg1 > arg2.
    */
   public static int compare(byte[] arg1, int start1, int len1, byte[] arg2, int start2, int len2) {
     for (int i = 0; i < len1 && i < len2; i++) {
-      int b1 = arg1[i + start1] & 0xff; 
+      int b1 = arg1[i + start1] & 0xff;
       int b2 = arg2[i + start2] & 0xff;
       if (b1 != b2) {
         return b1 - b2;

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/StringLength.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/StringLength.java?rev=1509425&r1=1509424&r2=1509425&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/StringLength.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/StringLength.java Thu Aug  1 20:30:52 2013
@@ -22,11 +22,15 @@ 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;
 
+/**
+ * Calculate the length of the strings in the input column vector, and store
+ * it in the output column vector.
+ */
 public class StringLength extends VectorExpression {
-  private int colNum;
-  private int outputColumn;
-  
-  public StringLength (int colNum, int outputColumn) {
+  private final int colNum;
+  private final int outputColumn;
+
+  public StringLength(int colNum, int outputColumn) {
     this.colNum = colNum;
     this.outputColumn = outputColumn;
   }
@@ -34,45 +38,44 @@ public class StringLength extends Vector
   // Calculate the length of the UTF-8 strings in input vector and place results in output vector.
   @Override
   public void evaluate(VectorizedRowBatch batch) {
-    
+
     if (childExpressions != null) {
       super.evaluateChildren(batch);
     }
-    
+
     BytesColumnVector inputColVector = (BytesColumnVector) batch.cols[colNum];
-    LongColumnVector outV = (LongColumnVector) batch.cols[outputColumn];  
+    LongColumnVector outV = (LongColumnVector) batch.cols[outputColumn];
     int[] sel = batch.selected;
     int n = batch.size;
     byte[][] vector = inputColVector.vector;
-    int start[] = inputColVector.start;
-    int length[] = inputColVector.length;
-    long[] resultLen = outV.vector; 
-    
+    int [] start = inputColVector.start;
+    int [] length = inputColVector.length;
+    long[] resultLen = outV.vector;
+
     if (n == 0) {
-      
       //Nothing to do
       return;
     }
-    
+
     if (inputColVector.noNulls) {
       outV.noNulls = true;
       if (inputColVector.isRepeating) {
         outV.isRepeating = true;
-        resultLen[0] = UTF8StringLength(vector[0], start[0], length[0]);
+        resultLen[0] = utf8StringLength(vector[0], start[0], length[0]);
       } else if (batch.selectedInUse) {
         for(int j = 0; j != n; j++) {
           int i = sel[j];
-          resultLen[i] = UTF8StringLength(vector[i], start[i], length[i]);
+          resultLen[i] = utf8StringLength(vector[i], start[i], length[i]);
         }
         outV.isRepeating = false;
       } else {
         for(int i = 0; i != n; i++) {
-          resultLen[i] = UTF8StringLength(vector[i], start[i], length[i]);
+          resultLen[i] = utf8StringLength(vector[i], start[i], length[i]);
         }
         outV.isRepeating = false;
       }
     } else {
-      
+
       /*
        * Handle case with nulls. Don't do function if the value is null, to save time,
        * because calling the function can be expensive.
@@ -82,13 +85,13 @@ public class StringLength extends Vector
         outV.isRepeating = true;
         outV.isNull[0] = inputColVector.isNull[0];
         if (!inputColVector.isNull[0]) {
-          resultLen[0] = UTF8StringLength(vector[0], start[0], length[0]);
+          resultLen[0] = utf8StringLength(vector[0], start[0], length[0]);
         }
       } else if (batch.selectedInUse) {
         for(int j = 0; j != n; j++) {
           int i = sel[j];
           if (!inputColVector.isNull[i]) {
-            resultLen[i] = UTF8StringLength(vector[i], start[i], length[i]);
+            resultLen[i] = utf8StringLength(vector[i], start[i], length[i]);
           }
           outV.isNull[i] = inputColVector.isNull[i];
         }
@@ -96,7 +99,7 @@ public class StringLength extends Vector
       } else {
         for(int i = 0; i != n; i++) {
           if (!inputColVector.isNull[i]) {
-            resultLen[i] = UTF8StringLength(vector[i], start[i], length[i]);
+            resultLen[i] = utf8StringLength(vector[i], start[i], length[i]);
           }
           outV.isNull[i] = inputColVector.isNull[i];
         }
@@ -104,22 +107,21 @@ public class StringLength extends Vector
       }
     }
   }
-  
-  /* 
+
+  /*
    * Return length in characters of UTF8 string in byte array
    * beginning at start that is len bytes long.
    */
-  static long UTF8StringLength(byte[] s, int start, int len)
-  {
+  static long utf8StringLength(byte[] s, int start, int len) {
     long resultLength = 0;
     for (int i = start; i < start + len; i++) {
-      
-      /* Byte bit patterns of the form 10xxxxxx are continuation 
-       * bytes. All other bit patterns are the first byte of 
+
+      /* Byte bit patterns of the form 10xxxxxx are continuation
+       * bytes. All other bit patterns are the first byte of
        * a character.
        */
       if ((s[i] & 0xc0) != 0x80) {
-        resultLength++;  
+        resultLength++;
       }
     }
     return resultLength;

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/StringLower.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/StringLower.java?rev=1509425&r1=1509424&r2=1509425&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/StringLower.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/StringLower.java Thu Aug  1 20:30:52 2013
@@ -15,11 +15,16 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package org.apache.hadoop.hive.ql.exec.vector.expressions;
 
-import org.apache.hadoop.hive.ql.udf.UDFLower;
 import org.apache.hadoop.hive.ql.udf.IUDFUnaryString;
+import org.apache.hadoop.hive.ql.udf.UDFLower;
 
+/**
+ * Expression to convert a string to lower case.
+ * Extends {@link StringUnaryUDF}.
+ */
 public class StringLower extends StringUnaryUDF {
   public StringLower(int colNum, int outputColumn) {
     super(colNum, outputColumn, (IUDFUnaryString) new UDFLower());

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/StringSubstrColStart.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/StringSubstrColStart.java?rev=1509425&r1=1509424&r2=1509425&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/StringSubstrColStart.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/StringSubstrColStart.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;
 
 import java.io.UnsupportedEncodingException;
@@ -6,19 +24,21 @@ import org.apache.hadoop.hive.ql.exec.ve
 import org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch;
 
 /**
- * This class provides the implementation of vectorized substring, with a single start index parameter.
- * If the start index is invalid (outside of the string boundaries) then an empty string will be in the output.
+ * This class provides the implementation of vectorized substring, with a single start index
+ * parameter. If the start index is invalid (outside of the string boundaries) then an empty
+ * string will be in the output.
  */
 public class StringSubstrColStart extends VectorExpression {
   private final int startIdx;
   private final int colNum;
   private final int outputColumn;
-  private static byte[] EMPTY_STRING;
+  private static byte[] EMPTYSTRING;
 
-  // Populating the Empty string bytes. Putting it as static since it should be immutable and can be shared
+  // Populating the Empty string bytes. Putting it as static since it should be immutable and can
+  // be shared.
   static {
     try {
-      EMPTY_STRING = "".getBytes("UTF-8");
+      EMPTYSTRING = "".getBytes("UTF-8");
     } catch(UnsupportedEncodingException e) {
       e.printStackTrace();
     }
@@ -31,8 +51,8 @@ public class StringSubstrColStart extend
   }
 
   /**
-   * Given the substring start index param it finds the starting offset of the passed in utf8 string byte array
-   * that matches the index.
+   * Given the substring start index param it finds the starting offset of the passed in utf8
+   * string byte array that matches the index.
    * @param utf8String byte array that holds the utf8 string
    * @param start start offset of the byte array the string starts at
    * @param len length of the bytes the string holds in the byte array
@@ -94,7 +114,7 @@ public class StringSubstrColStart extend
       if (!inV.noNulls && inV.isNull[0]) {
         outV.isNull[0] = true;
         outV.noNulls = false;
-        outV.setRef(0, EMPTY_STRING, 0, EMPTY_STRING.length);
+        outV.setRef(0, EMPTYSTRING, 0, EMPTYSTRING.length);
         return;
       } else {
         outV.noNulls = true;
@@ -102,7 +122,7 @@ public class StringSubstrColStart extend
         if (offset != -1) {
           outV.setRef(0, vector[0], offset, len[0] - offset);
         } else {
-          outV.setRef(0, EMPTY_STRING, 0, EMPTY_STRING.length);
+          outV.setRef(0, EMPTYSTRING, 0, EMPTYSTRING.length);
         }
       }
     } else {
@@ -113,12 +133,13 @@ public class StringSubstrColStart extend
           for (int i = 0; i != n; ++i) {
             int selected = sel[i];
             if (!inV.isNull[selected]) {
-              int offset = getSubstrStartOffset(vector[selected], start[selected], len[selected], startIdx);
+              int offset = getSubstrStartOffset(vector[selected], start[selected], len[selected],
+                  startIdx);
               outV.isNull[selected] = false;
               if (offset != -1) {
                 outV.setRef(selected, vector[selected], offset, len[selected] - offset);
               } else {
-                outV.setRef(selected, EMPTY_STRING, 0, EMPTY_STRING.length);
+                outV.setRef(selected, EMPTYSTRING, 0, EMPTYSTRING.length);
               }
             } else {
               outV.isNull[selected] = true;
@@ -128,11 +149,12 @@ public class StringSubstrColStart extend
           outV.noNulls = true;
           for (int i = 0; i != n; ++i) {
             int selected = sel[i];
-            int offset = getSubstrStartOffset(vector[selected], start[selected], len[selected], startIdx);
+            int offset = getSubstrStartOffset(vector[selected], start[selected], len[selected],
+                startIdx);
             if (offset != -1) {
               outV.setRef(selected, vector[selected], offset, len[selected] - offset);
             } else {
-              outV.setRef(selected, EMPTY_STRING, 0, EMPTY_STRING.length);
+              outV.setRef(selected, EMPTYSTRING, 0, EMPTYSTRING.length);
             }
           }
         }
@@ -146,7 +168,7 @@ public class StringSubstrColStart extend
               if (offset != -1) {
                 outV.setRef(i, vector[i], offset, len[i] - offset);
               } else {
-                outV.setRef(i, EMPTY_STRING, 0, EMPTY_STRING.length);
+                outV.setRef(i, EMPTYSTRING, 0, EMPTYSTRING.length);
               }
             }
           }
@@ -157,7 +179,7 @@ public class StringSubstrColStart extend
             if (offset != -1) {
               outV.setRef(i, vector[i], offset, len[i] - offset);
             } else {
-              outV.setRef(i, EMPTY_STRING, 0, EMPTY_STRING.length);
+              outV.setRef(i, EMPTYSTRING, 0, EMPTYSTRING.length);
             }
           }
         }