FAQ
Author: hashutosh
Date: Fri Jul 26 23:28:28 2013
New Revision: 1507514

URL: http://svn.apache.org/r1507514
Log:
HIVE-4931 : MAX/MIN aggregates yield incorrect results (Remus Rusanu via Ashutosh Chauhan)

Modified:
     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/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/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/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/VectorUDAFSum.txt
     hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/VectorUDAFVar.txt

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFAvgDouble.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFAvgDouble.java?rev=1507514&r1=1507513&r2=1507514&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFAvgDouble.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFAvgDouble.java Fri Jul 26 23:28:28 2013
@@ -308,7 +308,7 @@ public class VectorUDAFAvgDouble extends
          double[] vector = inputVector.vector;

          if (inputVector.isRepeating) {
- if (inputVector.noNulls || !inputVector.isNull[0]) {
+ if (inputVector.noNulls) {
              if (myagg.isNull) {
                myagg.isNull = false;
                myagg.sum = 0;

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFAvgLong.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFAvgLong.java?rev=1507514&r1=1507513&r2=1507514&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFAvgLong.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFAvgLong.java Fri Jul 26 23:28:28 2013
@@ -308,7 +308,7 @@ public class VectorUDAFAvgLong extends V
          long[] vector = inputVector.vector;

          if (inputVector.isRepeating) {
- if (inputVector.noNulls || !inputVector.isNull[0]) {
+ if (inputVector.noNulls) {
              if (myagg.isNull) {
                myagg.isNull = false;
                myagg.sum = 0;

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFMaxDouble.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFMaxDouble.java?rev=1507514&r1=1507513&r2=1507514&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFMaxDouble.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFMaxDouble.java Fri Jul 26 23:28:28 2013
@@ -97,7 +97,7 @@ public class VectorUDAFMaxDouble extends
        return myagg;
      }

-@Override
+ @Override
      public void aggregateInputSelection(
        VectorAggregationBufferRow[] aggregationBufferSets,
        int aggregrateIndex,
@@ -297,8 +297,8 @@ public class VectorUDAFMaxDouble extends
          double[] vector = inputVector.vector;

          if (inputVector.isRepeating) {
- if ((inputVector.noNulls || !inputVector.isNull[0]) &&
- myagg.isNull || vector[0] < myagg.value) {
+ if (inputVector.noNulls &&
+ (myagg.isNull || (vector[0] > myagg.value))) {
              myagg.isNull = false;
              myagg.value = vector[0];
            }

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFMaxLong.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFMaxLong.java?rev=1507514&r1=1507513&r2=1507514&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFMaxLong.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFMaxLong.java Fri Jul 26 23:28:28 2013
@@ -97,7 +97,7 @@ public class VectorUDAFMaxLong extends V
        return myagg;
      }

-@Override
+ @Override
      public void aggregateInputSelection(
        VectorAggregationBufferRow[] aggregationBufferSets,
        int aggregrateIndex,
@@ -297,8 +297,8 @@ public class VectorUDAFMaxLong extends V
          long[] vector = inputVector.vector;

          if (inputVector.isRepeating) {
- if ((inputVector.noNulls || !inputVector.isNull[0]) &&
- myagg.isNull || vector[0] < myagg.value) {
+ if (inputVector.noNulls &&
+ (myagg.isNull || (vector[0] > myagg.value))) {
              myagg.isNull = false;
              myagg.value = vector[0];
            }

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFMinDouble.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFMinDouble.java?rev=1507514&r1=1507513&r2=1507514&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFMinDouble.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFMinDouble.java Fri Jul 26 23:28:28 2013
@@ -97,7 +97,7 @@ public class VectorUDAFMinDouble extends
        return myagg;
      }

-@Override
+ @Override
      public void aggregateInputSelection(
        VectorAggregationBufferRow[] aggregationBufferSets,
        int aggregrateIndex,
@@ -297,8 +297,8 @@ public class VectorUDAFMinDouble extends
          double[] vector = inputVector.vector;

          if (inputVector.isRepeating) {
- if ((inputVector.noNulls || !inputVector.isNull[0]) &&
- myagg.isNull || vector[0] < myagg.value) {
+ if (inputVector.noNulls &&
+ (myagg.isNull || (vector[0] < myagg.value))) {
              myagg.isNull = false;
              myagg.value = vector[0];
            }

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFMinLong.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFMinLong.java?rev=1507514&r1=1507513&r2=1507514&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFMinLong.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFMinLong.java Fri Jul 26 23:28:28 2013
@@ -97,7 +97,7 @@ public class VectorUDAFMinLong extends V
        return myagg;
      }

-@Override
+ @Override
      public void aggregateInputSelection(
        VectorAggregationBufferRow[] aggregationBufferSets,
        int aggregrateIndex,
@@ -297,8 +297,8 @@ public class VectorUDAFMinLong extends V
          long[] vector = inputVector.vector;

          if (inputVector.isRepeating) {
- if ((inputVector.noNulls || !inputVector.isNull[0]) &&
- myagg.isNull || vector[0] < myagg.value) {
+ if (inputVector.noNulls &&
+ (myagg.isNull || (vector[0] < myagg.value))) {
              myagg.isNull = false;
              myagg.value = vector[0];
            }

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFStdPopDouble.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFStdPopDouble.java?rev=1507514&r1=1507513&r2=1507514&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFStdPopDouble.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFStdPopDouble.java Fri Jul 26 23:28:28 2013
@@ -310,7 +310,7 @@ public class VectorUDAFStdPopDouble exte
        double[] vector = inputVector.vector;

        if (inputVector.isRepeating) {
- if (inputVector.noNulls || !inputVector.isNull[0]) {
+ if (inputVector.noNulls) {
            iterateRepeatingNoNulls(myagg, vector[0], batchSize);
          }
        }

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFStdPopLong.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFStdPopLong.java?rev=1507514&r1=1507513&r2=1507514&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFStdPopLong.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFStdPopLong.java Fri Jul 26 23:28:28 2013
@@ -310,7 +310,7 @@ public class VectorUDAFStdPopLong extend
        long[] vector = inputVector.vector;

        if (inputVector.isRepeating) {
- if (inputVector.noNulls || !inputVector.isNull[0]) {
+ if (inputVector.noNulls) {
            iterateRepeatingNoNulls(myagg, vector[0], batchSize);
          }
        }

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFStdSampDouble.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFStdSampDouble.java?rev=1507514&r1=1507513&r2=1507514&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFStdSampDouble.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFStdSampDouble.java Fri Jul 26 23:28:28 2013
@@ -310,7 +310,7 @@ public class VectorUDAFStdSampDouble ext
        double[] vector = inputVector.vector;

        if (inputVector.isRepeating) {
- if (inputVector.noNulls || !inputVector.isNull[0]) {
+ if (inputVector.noNulls) {
            iterateRepeatingNoNulls(myagg, vector[0], batchSize);
          }
        }

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFStdSampLong.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFStdSampLong.java?rev=1507514&r1=1507513&r2=1507514&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFStdSampLong.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFStdSampLong.java Fri Jul 26 23:28:28 2013
@@ -310,7 +310,7 @@ public class VectorUDAFStdSampLong exten
        long[] vector = inputVector.vector;

        if (inputVector.isRepeating) {
- if (inputVector.noNulls || !inputVector.isNull[0]) {
+ if (inputVector.noNulls) {
            iterateRepeatingNoNulls(myagg, vector[0], batchSize);
          }
        }

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFSumDouble.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFSumDouble.java?rev=1507514&r1=1507513&r2=1507514&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFSumDouble.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFSumDouble.java Fri Jul 26 23:28:28 2013
@@ -290,7 +290,7 @@ public class VectorUDAFSumDouble extends
        double[] vector = inputVector.vector;

        if (inputVector.isRepeating) {
- if (inputVector.noNulls || !inputVector.isNull[0]) {
+ if (inputVector.noNulls) {
          if (myagg.isNull) {
            myagg.isNull = false;
            myagg.sum = 0;

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFSumLong.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFSumLong.java?rev=1507514&r1=1507513&r2=1507514&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFSumLong.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFSumLong.java Fri Jul 26 23:28:28 2013
@@ -290,7 +290,7 @@ public class VectorUDAFSumLong extends V
        long[] vector = inputVector.vector;

        if (inputVector.isRepeating) {
- if (inputVector.noNulls || !inputVector.isNull[0]) {
+ if (inputVector.noNulls) {
          if (myagg.isNull) {
            myagg.isNull = false;
            myagg.sum = 0;

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFVarPopDouble.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFVarPopDouble.java?rev=1507514&r1=1507513&r2=1507514&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFVarPopDouble.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFVarPopDouble.java Fri Jul 26 23:28:28 2013
@@ -310,7 +310,7 @@ public class VectorUDAFVarPopDouble exte
        double[] vector = inputVector.vector;

        if (inputVector.isRepeating) {
- if (inputVector.noNulls || !inputVector.isNull[0]) {
+ if (inputVector.noNulls) {
            iterateRepeatingNoNulls(myagg, vector[0], batchSize);
          }
        }

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFVarPopLong.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFVarPopLong.java?rev=1507514&r1=1507513&r2=1507514&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFVarPopLong.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFVarPopLong.java Fri Jul 26 23:28:28 2013
@@ -310,7 +310,7 @@ public class VectorUDAFVarPopLong extend
        long[] vector = inputVector.vector;

        if (inputVector.isRepeating) {
- if (inputVector.noNulls || !inputVector.isNull[0]) {
+ if (inputVector.noNulls) {
            iterateRepeatingNoNulls(myagg, vector[0], batchSize);
          }
        }

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFVarSampDouble.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFVarSampDouble.java?rev=1507514&r1=1507513&r2=1507514&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFVarSampDouble.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFVarSampDouble.java Fri Jul 26 23:28:28 2013
@@ -310,7 +310,7 @@ public class VectorUDAFVarSampDouble ext
        double[] vector = inputVector.vector;

        if (inputVector.isRepeating) {
- if (inputVector.noNulls || !inputVector.isNull[0]) {
+ if (inputVector.noNulls) {
            iterateRepeatingNoNulls(myagg, vector[0], batchSize);
          }
        }

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFVarSampLong.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFVarSampLong.java?rev=1507514&r1=1507513&r2=1507514&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFVarSampLong.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/gen/VectorUDAFVarSampLong.java Fri Jul 26 23:28:28 2013
@@ -310,7 +310,7 @@ public class VectorUDAFVarSampLong exten
        long[] vector = inputVector.vector;

        if (inputVector.isRepeating) {
- if (inputVector.noNulls || !inputVector.isNull[0]) {
+ if (inputVector.noNulls) {
            iterateRepeatingNoNulls(myagg, vector[0], batchSize);
          }
        }

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=1507514&r1=1507513&r2=1507514&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 Fri Jul 26 23:28:28 2013
@@ -308,7 +308,7 @@ public class <ClassName> extends VectorA
          <ValueType>[] vector = inputVector.vector;

          if (inputVector.isRepeating) {
- if (inputVector.noNulls || !inputVector.isNull[0]) {
+ if (inputVector.noNulls) {
              if (myagg.isNull) {
                myagg.isNull = false;
                myagg.sum = 0;

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=1507514&r1=1507513&r2=1507514&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 Fri Jul 26 23:28:28 2013
@@ -97,7 +97,7 @@ public class <ClassName> extends VectorA
        return myagg;
      }

-@Override
+ @Override
      public void aggregateInputSelection(
        VectorAggregationBufferRow[] aggregationBufferSets,
        int aggregrateIndex,
@@ -297,8 +297,8 @@ public class <ClassName> extends VectorA
          <ValueType>[] vector = inputVector.vector;

          if (inputVector.isRepeating) {
- if ((inputVector.noNulls || !inputVector.isNull[0]) &&
- myagg.isNull || vector[0] < myagg.value) {
+ if (inputVector.noNulls &&
+ (myagg.isNull || (vector[0] <OperatorSymbol> myagg.value))) {
              myagg.isNull = false;
              myagg.value = vector[0];
            }

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=1507514&r1=1507513&r2=1507514&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 Fri Jul 26 23:28:28 2013
@@ -290,7 +290,7 @@ public class <ClassName> extends VectorA
        <ValueType>[] vector = inputVector.vector;

        if (inputVector.isRepeating) {
- if (inputVector.noNulls || !inputVector.isNull[0]) {
+ if (inputVector.noNulls) {
          if (myagg.isNull) {
            myagg.isNull = false;
            myagg.sum = 0;

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=1507514&r1=1507513&r2=1507514&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 Fri Jul 26 23:28:28 2013
@@ -310,7 +310,7 @@ public class <ClassName> extends VectorA
        <ValueType>[] vector = inputVector.vector;

        if (inputVector.isRepeating) {
- if (inputVector.noNulls || !inputVector.isNull[0]) {
+ if (inputVector.noNulls) {
            iterateRepeatingNoNulls(myagg, vector[0], batchSize);
          }
        }

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcommits @
categorieshive, hadoop
postedJul 26, '13 at 11:28p
activeJul 26, '13 at 11:28p
posts1
users1
websitehive.apache.org

1 user in discussion

Hashutosh: 1 post

People

Translate

site design / logo © 2021 Grokbase