Author: xuefu
Date: Sun Mar  2 02:07:38 2014
New Revision: 1573250

URL: http://svn.apache.org/r1573250
Log:
HIVE-6459: Change the precison/scale for intermediate sum result in the avg() 
udf (reviewed by Prasad)

Modified:
    
hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/VectorUDAFAvgDecimal.java
    
hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFAverage.java
    hive/trunk/ql/src/test/results/clientpositive/create_genericudaf.q.out
    hive/trunk/ql/src/test/results/clientpositive/decimal_precision.q.out
    hive/trunk/ql/src/test/results/clientpositive/decimal_udf.q.out
    hive/trunk/ql/src/test/results/clientpositive/groupby10.q.out
    hive/trunk/ql/src/test/results/clientpositive/groupby3.q.out
    hive/trunk/ql/src/test/results/clientpositive/groupby3_map.q.out
    
hive/trunk/ql/src/test/results/clientpositive/groupby3_map_multi_distinct.q.out
    hive/trunk/ql/src/test/results/clientpositive/groupby3_map_skew.q.out
    hive/trunk/ql/src/test/results/clientpositive/groupby_grouping_sets3.q.out
    hive/trunk/ql/src/test/results/clientpositive/limit_pushdown.q.out
    hive/trunk/ql/src/test/results/clientpositive/subquery_in.q.out
    hive/trunk/ql/src/test/results/clientpositive/subquery_in_having.q.out
    hive/trunk/ql/src/test/results/clientpositive/subquery_notin.q.out
    hive/trunk/ql/src/test/results/clientpositive/subquery_notin_having.q.out
    hive/trunk/ql/src/test/results/clientpositive/udaf_number_format.q.out
    hive/trunk/ql/src/test/results/clientpositive/udf3.q.out
    hive/trunk/ql/src/test/results/clientpositive/udf8.q.out
    hive/trunk/ql/src/test/results/clientpositive/vector_decimal_aggregate.q.out
    hive/trunk/ql/src/test/results/clientpositive/vectorization_limit.q.out
    hive/trunk/ql/src/test/results/clientpositive/vectorization_pushdown.q.out
    
hive/trunk/ql/src/test/results/clientpositive/vectorization_short_regress.q.out
    hive/trunk/ql/src/test/results/clientpositive/vectorized_mapjoin.q.out
    hive/trunk/ql/src/test/results/clientpositive/vectorized_shufflejoin.q.out
    hive/trunk/ql/src/test/results/compiler/plan/groupby3.q.xml

Modified: 
hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/VectorUDAFAvgDecimal.java
URL: 
http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/VectorUDAFAvgDecimal.java?rev=1573250&r1=1573249&r2=1573250&view=diff
==============================================================================
--- 
hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/VectorUDAFAvgDecimal.java
 (original)
+++ 
hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/aggregates/VectorUDAFAvgDecimal.java
 Sun Mar  2 02:07:38 2014
@@ -139,7 +139,7 @@ public class VectorUDAFAvgDecimal extend
       // expected type for the row-mode aggregation
       // For decimal, the type is "same number of integer digits and 4 more 
decimal digits"
       
-      DecimalTypeInfo dtiSum = 
GenericUDAFAverage.deriveSumTypeInfo(inputScale, inputPrecision);
+      DecimalTypeInfo dtiSum = 
GenericUDAFAverage.deriveSumFieldTypeInfo(inputPrecision, inputScale);
       this.sumScale = (short) dtiSum.scale();
       this.sumPrecision = (short) dtiSum.precision();
       

Modified: 
hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFAverage.java
URL: 
http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFAverage.java?rev=1573250&r1=1573249&r2=1573250&view=diff
==============================================================================
--- 
hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFAverage.java
 (original)
+++ 
hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFAverage.java
 Sun Mar  2 02:07:38 2014
@@ -175,11 +175,16 @@ public class GenericUDAFAverage extends 
     }
 
     private DecimalTypeInfo deriveResultDecimalTypeInfo() {
-      if (mode == Mode.PARTIAL1 || mode == Mode.COMPLETE) {
-        return GenericUDAFAverage.deriveSumTypeInfo(inputOI.scale(), 
inputOI.precision());
+      int prec = inputOI.precision();
+      int scale = inputOI.scale();
+      if (mode == Mode.FINAL || mode == Mode.COMPLETE) {
+        int intPart = prec - scale;
+        // The avg() result type has the same number of integer digits and 4 
more decimal digits.
+        scale = Math.min(scale + 4, HiveDecimal.MAX_SCALE - intPart);
+        return TypeInfoFactory.getDecimalTypeInfo(intPart + scale, scale);
       } else {
-        PrimitiveObjectInspector sfOI = (PrimitiveObjectInspector) sumFieldOI;
-        return (DecimalTypeInfo) sfOI.getTypeInfo();
+        // For intermediate sum field
+        return GenericUDAFAverage.deriveSumFieldTypeInfo(prec, scale);
       }
     }
 
@@ -285,25 +290,27 @@ public class GenericUDAFAverage extends 
         sumField = soi.getStructFieldRef("sum");
         countFieldOI = (LongObjectInspector) 
countField.getFieldObjectInspector();
         sumFieldOI = sumField.getFieldObjectInspector();
+        inputOI = (PrimitiveObjectInspector) 
soi.getStructFieldRef("input").getFieldObjectInspector();
       }
 
       // init output
       if (mode == Mode.PARTIAL1 || mode == Mode.PARTIAL2) {
         // The output of a partial aggregation is a struct containing
         // a "long" count and a "double" sum.
-
         ArrayList<ObjectInspector> foi = new ArrayList<ObjectInspector>();
         foi.add(PrimitiveObjectInspectorFactory.writableLongObjectInspector);
         foi.add(getSumFieldWritableObjectInspector());
+        // We need to "remember" the input object inspector so that we need to 
know the input type
+        // in order to determine the sum field type (precision/scale) for 
Mode.PARTIAL2 and Mode.FINAL.
+        foi.add(inputOI);
         ArrayList<String> fname = new ArrayList<String>();
         fname.add("count");
         fname.add("sum");
+        fname.add("input");
         partialResult = new Object[2];
         partialResult[0] = new LongWritable(0);
         // index 1 set by child
-        return ObjectInspectorFactory.getStandardStructObjectInspector(fname,
-            foi);
-
+        return ObjectInspectorFactory.getStandardStructObjectInspector(fname, 
foi);
       } else {
         return getSumFieldWritableObjectInspector();
       }
@@ -363,15 +370,16 @@ public class GenericUDAFAverage extends 
   }
 
   /**
-   * The result type has the same number of integer digits and 4 more decimal 
digits
+   * The intermediate sum field has 10 more integer digits with the same scale.
    * This is exposed as static so that the vectorized AVG operator use the 
same logic
-   * @param scale
    * @param precision
+   * @param scale
    * @return
    */
-  public static DecimalTypeInfo deriveSumTypeInfo(int scale, int precision) {
-      int intPart = precision - scale;
-      scale = Math.min(scale + 4, HiveDecimal.MAX_SCALE - intPart);
-      return TypeInfoFactory.getDecimalTypeInfo(intPart + scale, scale);
+  public static DecimalTypeInfo deriveSumFieldTypeInfo(int precision, int 
scale) {
+    int intPart = precision - scale;
+    intPart = Math.min(intPart + 10, HiveDecimal.MAX_PRECISION - scale);
+    return TypeInfoFactory.getDecimalTypeInfo(intPart + scale, scale);
   }
+
 }

Modified: hive/trunk/ql/src/test/results/clientpositive/create_genericudaf.q.out
URL: 
http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/create_genericudaf.q.out?rev=1573250&r1=1573249&r2=1573250&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/create_genericudaf.q.out 
(original)
+++ hive/trunk/ql/src/test/results/clientpositive/create_genericudaf.q.out Sun 
Mar  2 02:07:38 2014
@@ -49,7 +49,7 @@ STAGE PLANS:
                 Reduce Output Operator
                   sort order: 
                   Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL 
Column stats: NONE
-                  value expressions: _col0 (type: 
struct<count:bigint,sum:double>), _col1 (type: struct<count:bigint,sum:double>)
+                  value expressions: _col0 (type: 
struct<count:bigint,sum:double,input:int>), _col1 (type: 
struct<count:bigint,sum:double,input:string>)
       Reduce Operator Tree:
         Group By Operator
           aggregations: test_avg(VALUE._col0), test_avg(VALUE._col1)

Modified: hive/trunk/ql/src/test/results/clientpositive/decimal_precision.q.out
URL: 
http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/decimal_precision.q.out?rev=1573250&r1=1573249&r2=1573250&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/decimal_precision.q.out 
(original)
+++ hive/trunk/ql/src/test/results/clientpositive/decimal_precision.q.out Sun 
Mar  2 02:07:38 2014
@@ -548,7 +548,7 @@ STAGE PLANS:
                 Reduce Output Operator
                   sort order: 
                   Statistics: Num rows: 1 Data size: 112 Basic stats: COMPLETE 
Column stats: NONE
-                  value expressions: _col0 (type: 
struct<count:bigint,sum:decimal(24,14)>), _col1 (type: decimal(30,10))
+                  value expressions: _col0 (type: 
struct<count:bigint,sum:decimal(30,10),input:decimal(20,10)>), _col1 (type: 
decimal(30,10))
       Reduce Operator Tree:
         Group By Operator
           aggregations: avg(VALUE._col0), sum(VALUE._col1)

Modified: hive/trunk/ql/src/test/results/clientpositive/decimal_udf.q.out
URL: 
http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/decimal_udf.q.out?rev=1573250&r1=1573249&r2=1573250&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/decimal_udf.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/decimal_udf.q.out Sun Mar  2 
02:07:38 2014
@@ -1248,7 +1248,7 @@ STAGE PLANS:
                   sort order: +
                   Map-reduce partition columns: _col0 (type: int)
                   Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE 
Column stats: NONE
-                  value expressions: _col1 (type: decimal(30,10)), _col2 
(type: bigint), _col3 (type: struct<count:bigint,sum:decimal(24,14)>)
+                  value expressions: _col1 (type: decimal(30,10)), _col2 
(type: bigint), _col3 (type: 
struct<count:bigint,sum:decimal(30,10),input:decimal(20,10)>)
       Reduce Operator Tree:
         Group By Operator
           aggregations: sum(VALUE._col0), count(VALUE._col1), avg(VALUE._col2)

Modified: hive/trunk/ql/src/test/results/clientpositive/groupby10.q.out
URL: 
http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/groupby10.q.out?rev=1573250&r1=1573249&r2=1573250&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/groupby10.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/groupby10.q.out Sun Mar  2 
02:07:38 2014
@@ -645,7 +645,7 @@ STAGE PLANS:
               sort order: +
               Map-reduce partition columns: _col0 (type: int)
               Statistics: Num rows: 2 Data size: 280 Basic stats: COMPLETE 
Column stats: NONE
-              value expressions: _col1 (type: double), _col2 (type: 
struct<count:bigint,sum:double>)
+              value expressions: _col1 (type: double), _col2 (type: 
struct<count:bigint,sum:double,input:string>)
       Reduce Operator Tree:
         Group By Operator
           aggregations: sum(VALUE._col0), avg(VALUE._col1)

Modified: hive/trunk/ql/src/test/results/clientpositive/groupby3.q.out
URL: 
http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/groupby3.q.out?rev=1573250&r1=1573249&r2=1573250&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/groupby3.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/groupby3.q.out Sun Mar  2 
02:07:38 2014
@@ -73,7 +73,7 @@ STAGE PLANS:
             Reduce Output Operator
               sort order: 
               Statistics: Num rows: 1 Data size: 176 Basic stats: COMPLETE 
Column stats: NONE
-              value expressions: _col0 (type: double), _col1 (type: 
struct<count:bigint,sum:double>), _col2 (type: 
struct<count:bigint,sum:double>), _col3 (type: string), _col4 (type: string), 
_col5 (type: struct<count:bigint,sum:double,variance:double>), _col6 (type: 
struct<count:bigint,sum:double,variance:double>), _col7 (type: 
struct<count:bigint,sum:double,variance:double>), _col8 (type: 
struct<count:bigint,sum:double,variance:double>)
+              value expressions: _col0 (type: double), _col1 (type: 
struct<count:bigint,sum:double,input:string>), _col2 (type: 
struct<count:bigint,sum:double,input:string>), _col3 (type: string), _col4 
(type: string), _col5 (type: struct<count:bigint,sum:double,variance:double>), 
_col6 (type: struct<count:bigint,sum:double,variance:double>), _col7 (type: 
struct<count:bigint,sum:double,variance:double>), _col8 (type: 
struct<count:bigint,sum:double,variance:double>)
       Reduce Operator Tree:
         Group By Operator
           aggregations: sum(VALUE._col0), avg(VALUE._col1), avg(VALUE._col2), 
max(VALUE._col3), min(VALUE._col4), std(VALUE._col5), stddev_samp(VALUE._col6), 
variance(VALUE._col7), var_samp(VALUE._col8)

Modified: hive/trunk/ql/src/test/results/clientpositive/groupby3_map.q.out
URL: 
http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/groupby3_map.q.out?rev=1573250&r1=1573249&r2=1573250&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/groupby3_map.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/groupby3_map.q.out Sun Mar  2 
02:07:38 2014
@@ -57,7 +57,7 @@ STAGE PLANS:
                   key expressions: _col0 (type: string)
                   sort order: +
                   Statistics: Num rows: 58 Data size: 5812 Basic stats: 
COMPLETE Column stats: NONE
-                  value expressions: _col1 (type: double), _col2 (type: 
struct<count:bigint,sum:double>), _col3 (type: 
struct<count:bigint,sum:double>), _col4 (type: string), _col5 (type: string), 
_col6 (type: struct<count:bigint,sum:double,variance:double>), _col7 (type: 
struct<count:bigint,sum:double,variance:double>), _col8 (type: 
struct<count:bigint,sum:double,variance:double>), _col9 (type: 
struct<count:bigint,sum:double,variance:double>)
+                  value expressions: _col1 (type: double), _col2 (type: 
struct<count:bigint,sum:double,input:string>), _col3 (type: 
struct<count:bigint,sum:double,input:string>), _col4 (type: string), _col5 
(type: string), _col6 (type: struct<count:bigint,sum:double,variance:double>), 
_col7 (type: struct<count:bigint,sum:double,variance:double>), _col8 (type: 
struct<count:bigint,sum:double,variance:double>), _col9 (type: 
struct<count:bigint,sum:double,variance:double>)
       Reduce Operator Tree:
         Group By Operator
           aggregations: sum(VALUE._col0), avg(VALUE._col1), avg(DISTINCT 
KEY._col0:0._col0), max(VALUE._col3), min(VALUE._col4), std(VALUE._col5), 
stddev_samp(VALUE._col6), variance(VALUE._col7), var_samp(VALUE._col8)

Modified: 
hive/trunk/ql/src/test/results/clientpositive/groupby3_map_multi_distinct.q.out
URL: 
http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/groupby3_map_multi_distinct.q.out?rev=1573250&r1=1573249&r2=1573250&view=diff
==============================================================================
--- 
hive/trunk/ql/src/test/results/clientpositive/groupby3_map_multi_distinct.q.out 
(original)
+++ 
hive/trunk/ql/src/test/results/clientpositive/groupby3_map_multi_distinct.q.out 
Sun Mar  2 02:07:38 2014
@@ -61,7 +61,7 @@ STAGE PLANS:
                   key expressions: _col0 (type: string)
                   sort order: +
                   Statistics: Num rows: 58 Data size: 5812 Basic stats: 
COMPLETE Column stats: NONE
-                  value expressions: _col1 (type: double), _col2 (type: 
struct<count:bigint,sum:double>), _col3 (type: 
struct<count:bigint,sum:double>), _col4 (type: string), _col5 (type: string), 
_col6 (type: struct<count:bigint,sum:double,variance:double>), _col7 (type: 
struct<count:bigint,sum:double,variance:double>), _col8 (type: 
struct<count:bigint,sum:double,variance:double>), _col9 (type: 
struct<count:bigint,sum:double,variance:double>), _col10 (type: double), _col11 
(type: bigint)
+                  value expressions: _col1 (type: double), _col2 (type: 
struct<count:bigint,sum:double,input:string>), _col3 (type: 
struct<count:bigint,sum:double,input:string>), _col4 (type: string), _col5 
(type: string), _col6 (type: struct<count:bigint,sum:double,variance:double>), 
_col7 (type: struct<count:bigint,sum:double,variance:double>), _col8 (type: 
struct<count:bigint,sum:double,variance:double>), _col9 (type: 
struct<count:bigint,sum:double,variance:double>), _col10 (type: double), _col11 
(type: bigint)
       Reduce Operator Tree:
         Group By Operator
           aggregations: sum(VALUE._col0), avg(VALUE._col1), avg(DISTINCT 
KEY._col0:0._col0), max(VALUE._col3), min(VALUE._col4), std(VALUE._col5), 
stddev_samp(VALUE._col6), variance(VALUE._col7), var_samp(VALUE._col8), 
sum(DISTINCT KEY._col0:1._col0), count(DISTINCT KEY._col0:2._col0)

Modified: hive/trunk/ql/src/test/results/clientpositive/groupby3_map_skew.q.out
URL: 
http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/groupby3_map_skew.q.out?rev=1573250&r1=1573249&r2=1573250&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/groupby3_map_skew.q.out 
(original)
+++ hive/trunk/ql/src/test/results/clientpositive/groupby3_map_skew.q.out Sun 
Mar  2 02:07:38 2014
@@ -59,7 +59,7 @@ STAGE PLANS:
                   sort order: +
                   Map-reduce partition columns: _col0 (type: string)
                   Statistics: Num rows: 58 Data size: 5812 Basic stats: 
COMPLETE Column stats: NONE
-                  value expressions: _col1 (type: double), _col2 (type: 
struct<count:bigint,sum:double>), _col3 (type: 
struct<count:bigint,sum:double>), _col4 (type: string), _col5 (type: string), 
_col6 (type: struct<count:bigint,sum:double,variance:double>), _col7 (type: 
struct<count:bigint,sum:double,variance:double>), _col8 (type: 
struct<count:bigint,sum:double,variance:double>), _col9 (type: 
struct<count:bigint,sum:double,variance:double>)
+                  value expressions: _col1 (type: double), _col2 (type: 
struct<count:bigint,sum:double,input:string>), _col3 (type: 
struct<count:bigint,sum:double,input:string>), _col4 (type: string), _col5 
(type: string), _col6 (type: struct<count:bigint,sum:double,variance:double>), 
_col7 (type: struct<count:bigint,sum:double,variance:double>), _col8 (type: 
struct<count:bigint,sum:double,variance:double>), _col9 (type: 
struct<count:bigint,sum:double,variance:double>)
       Reduce Operator Tree:
         Group By Operator
           aggregations: sum(VALUE._col0), avg(VALUE._col1), avg(DISTINCT 
KEY._col0:0._col0), max(VALUE._col3), min(VALUE._col4), std(VALUE._col5), 
stddev_samp(VALUE._col6), variance(VALUE._col7), var_samp(VALUE._col8)
@@ -80,7 +80,7 @@ STAGE PLANS:
             Reduce Output Operator
               sort order: 
               Statistics: Num rows: 1 Data size: 184 Basic stats: COMPLETE 
Column stats: NONE
-              value expressions: _col0 (type: double), _col1 (type: 
struct<count:bigint,sum:double>), _col2 (type: 
struct<count:bigint,sum:double>), _col3 (type: string), _col4 (type: string), 
_col5 (type: struct<count:bigint,sum:double,variance:double>), _col6 (type: 
struct<count:bigint,sum:double,variance:double>), _col7 (type: 
struct<count:bigint,sum:double,variance:double>), _col8 (type: 
struct<count:bigint,sum:double,variance:double>)
+              value expressions: _col0 (type: double), _col1 (type: 
struct<count:bigint,sum:double,input:string>), _col2 (type: 
struct<count:bigint,sum:double,input:string>), _col3 (type: string), _col4 
(type: string), _col5 (type: struct<count:bigint,sum:double,variance:double>), 
_col6 (type: struct<count:bigint,sum:double,variance:double>), _col7 (type: 
struct<count:bigint,sum:double,variance:double>), _col8 (type: 
struct<count:bigint,sum:double,variance:double>)
       Reduce Operator Tree:
         Group By Operator
           aggregations: sum(VALUE._col0), avg(VALUE._col1), avg(VALUE._col2), 
max(VALUE._col3), min(VALUE._col4), std(VALUE._col5), stddev_samp(VALUE._col6), 
variance(VALUE._col7), var_samp(VALUE._col8)

Modified: 
hive/trunk/ql/src/test/results/clientpositive/groupby_grouping_sets3.q.out
URL: 
http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/groupby_grouping_sets3.q.out?rev=1573250&r1=1573249&r2=1573250&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/groupby_grouping_sets3.q.out 
(original)
+++ hive/trunk/ql/src/test/results/clientpositive/groupby_grouping_sets3.q.out 
Sun Mar  2 02:07:38 2014
@@ -67,7 +67,7 @@ STAGE PLANS:
                   sort order: +++
                   Map-reduce partition columns: _col0 (type: string), _col1 
(type: string), _col2 (type: string)
                   Statistics: Num rows: 0 Data size: 72 Basic stats: PARTIAL 
Column stats: NONE
-                  value expressions: _col3 (type: 
struct<count:bigint,sum:double>), _col4 (type: bigint)
+                  value expressions: _col3 (type: 
struct<count:bigint,sum:double,input:string>), _col4 (type: bigint)
       Reduce Operator Tree:
         Group By Operator
           aggregations: avg(VALUE._col0), count(VALUE._col1)
@@ -152,7 +152,7 @@ STAGE PLANS:
                   sort order: ++
                   Map-reduce partition columns: _col0 (type: string), _col1 
(type: string)
                   Statistics: Num rows: 0 Data size: 72 Basic stats: PARTIAL 
Column stats: NONE
-                  value expressions: _col2 (type: 
struct<count:bigint,sum:double>), _col3 (type: bigint)
+                  value expressions: _col2 (type: 
struct<count:bigint,sum:double,input:string>), _col3 (type: bigint)
       Reduce Operator Tree:
         Group By Operator
           aggregations: avg(VALUE._col0), count(VALUE._col1)
@@ -176,7 +176,7 @@ STAGE PLANS:
               sort order: +++
               Map-reduce partition columns: _col0 (type: string), _col1 (type: 
string), _col2 (type: string)
               Statistics: Num rows: 0 Data size: 72 Basic stats: PARTIAL 
Column stats: NONE
-              value expressions: _col3 (type: 
struct<count:bigint,sum:double>), _col4 (type: bigint)
+              value expressions: _col3 (type: 
struct<count:bigint,sum:double,input:string>), _col4 (type: bigint)
       Reduce Operator Tree:
         Group By Operator
           aggregations: avg(VALUE._col0), count(VALUE._col1)

Modified: hive/trunk/ql/src/test/results/clientpositive/limit_pushdown.q.out
URL: 
http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/limit_pushdown.q.out?rev=1573250&r1=1573249&r2=1573250&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/limit_pushdown.q.out 
(original)
+++ hive/trunk/ql/src/test/results/clientpositive/limit_pushdown.q.out Sun Mar  
2 02:07:38 2014
@@ -271,7 +271,7 @@ STAGE PLANS:
                   Map-reduce partition columns: _col0 (type: string)
                   Statistics: Num rows: 29 Data size: 5812 Basic stats: 
COMPLETE Column stats: NONE
                   TopN Hash Memory Usage: 0.3
-                  value expressions: _col1 (type: 
struct<count:bigint,sum:double>)
+                  value expressions: _col1 (type: 
struct<count:bigint,sum:double,input:double>)
       Reduce Operator Tree:
         Group By Operator
           aggregations: avg(VALUE._col0)

Modified: hive/trunk/ql/src/test/results/clientpositive/subquery_in.q.out
URL: 
http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/subquery_in.q.out?rev=1573250&r1=1573249&r2=1573250&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/subquery_in.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/subquery_in.q.out Sun Mar  2 
02:07:38 2014
@@ -378,7 +378,7 @@ STAGE PLANS:
             Reduce Output Operator
               sort order: 
               Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column 
stats: NONE
-              value expressions: _col0 (type: struct<count:bigint,sum:double>)
+              value expressions: _col0 (type: 
struct<count:bigint,sum:double,input:int>)
       Reduce Operator Tree:
         Group By Operator
           aggregations: avg(VALUE._col0)

Modified: hive/trunk/ql/src/test/results/clientpositive/subquery_in_having.q.out
URL: 
http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/subquery_in_having.q.out?rev=1573250&r1=1573249&r2=1573250&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/subquery_in_having.q.out 
(original)
+++ hive/trunk/ql/src/test/results/clientpositive/subquery_in_having.q.out Sun 
Mar  2 02:07:38 2014
@@ -444,7 +444,7 @@ STAGE PLANS:
                   sort order: +
                   Map-reduce partition columns: _col0 (type: string)
                   Statistics: Num rows: 30 Data size: 3173 Basic stats: 
COMPLETE Column stats: NONE
-                  value expressions: _col1 (type: 
struct<count:bigint,sum:double>)
+                  value expressions: _col1 (type: 
struct<count:bigint,sum:double,input:int>)
       Reduce Operator Tree:
         Group By Operator
           aggregations: avg(VALUE._col0)
@@ -1198,7 +1198,7 @@ STAGE PLANS:
                   sort order: ++
                   Map-reduce partition columns: _col0 (type: string), _col1 
(type: string)
                   Statistics: Num rows: 15 Data size: 3173 Basic stats: 
COMPLETE Column stats: NONE
-                  value expressions: _col2 (type: 
struct<count:bigint,sum:double>)
+                  value expressions: _col2 (type: 
struct<count:bigint,sum:double,input:int>)
       Reduce Operator Tree:
         Group By Operator
           aggregations: avg(VALUE._col0)

Modified: hive/trunk/ql/src/test/results/clientpositive/subquery_notin.q.out
URL: 
http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/subquery_notin.q.out?rev=1573250&r1=1573249&r2=1573250&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/subquery_notin.q.out 
(original)
+++ hive/trunk/ql/src/test/results/clientpositive/subquery_notin.q.out Sun Mar  
2 02:07:38 2014
@@ -692,7 +692,7 @@ STAGE PLANS:
             Reduce Output Operator
               sort order: 
               Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column 
stats: NONE
-              value expressions: _col0 (type: struct<count:bigint,sum:double>)
+              value expressions: _col0 (type: 
struct<count:bigint,sum:double,input:int>)
       Reduce Operator Tree:
         Group By Operator
           aggregations: avg(VALUE._col0)
@@ -794,7 +794,7 @@ STAGE PLANS:
             Reduce Output Operator
               sort order: 
               Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column 
stats: NONE
-              value expressions: _col0 (type: struct<count:bigint,sum:double>)
+              value expressions: _col0 (type: 
struct<count:bigint,sum:double,input:int>)
       Reduce Operator Tree:
         Group By Operator
           aggregations: avg(VALUE._col0)

Modified: 
hive/trunk/ql/src/test/results/clientpositive/subquery_notin_having.q.out
URL: 
http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/subquery_notin_having.q.out?rev=1573250&r1=1573249&r2=1573250&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/subquery_notin_having.q.out 
(original)
+++ hive/trunk/ql/src/test/results/clientpositive/subquery_notin_having.q.out 
Sun Mar  2 02:07:38 2014
@@ -283,7 +283,7 @@ STAGE PLANS:
                   sort order: +
                   Map-reduce partition columns: _col0 (type: string)
                   Statistics: Num rows: 29 Data size: 3173 Basic stats: 
COMPLETE Column stats: NONE
-                  value expressions: _col1 (type: double), _col2 (type: 
double), _col3 (type: struct<count:bigint,sum:double>)
+                  value expressions: _col1 (type: double), _col2 (type: 
double), _col3 (type: struct<count:bigint,sum:double,input:double>)
       Reduce Operator Tree:
         Group By Operator
           aggregations: min(VALUE._col0), max(VALUE._col1), avg(VALUE._col2)
@@ -388,7 +388,7 @@ STAGE PLANS:
                   sort order: +
                   Map-reduce partition columns: _col0 (type: string)
                   Statistics: Num rows: 29 Data size: 3173 Basic stats: 
COMPLETE Column stats: NONE
-                  value expressions: _col1 (type: double), _col2 (type: 
double), _col3 (type: struct<count:bigint,sum:double>)
+                  value expressions: _col1 (type: double), _col2 (type: 
double), _col3 (type: struct<count:bigint,sum:double,input:double>)
       Reduce Operator Tree:
         Group By Operator
           aggregations: min(VALUE._col0), max(VALUE._col1), avg(VALUE._col2)
@@ -431,7 +431,7 @@ STAGE PLANS:
                   sort order: +
                   Map-reduce partition columns: _col0 (type: string)
                   Statistics: Num rows: 29 Data size: 3173 Basic stats: 
COMPLETE Column stats: NONE
-                  value expressions: _col1 (type: double), _col2 (type: 
double), _col3 (type: struct<count:bigint,sum:double>)
+                  value expressions: _col1 (type: double), _col2 (type: 
double), _col3 (type: struct<count:bigint,sum:double,input:double>)
       Reduce Operator Tree:
         Group By Operator
           aggregations: min(VALUE._col0), max(VALUE._col1), avg(VALUE._col2)

Modified: hive/trunk/ql/src/test/results/clientpositive/udaf_number_format.q.out
URL: 
http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/udaf_number_format.q.out?rev=1573250&r1=1573249&r2=1573250&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/udaf_number_format.q.out 
(original)
+++ hive/trunk/ql/src/test/results/clientpositive/udaf_number_format.q.out Sun 
Mar  2 02:07:38 2014
@@ -33,7 +33,7 @@ STAGE PLANS:
                 Reduce Output Operator
                   sort order: 
                   Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE 
Column stats: COMPLETE
-                  value expressions: _col0 (type: double), _col1 (type: 
struct<count:bigint,sum:double>), _col2 (type: 
struct<count:bigint,sum:double,variance:double>), _col3 (type: 
struct<count:bigint,sum:double,variance:double>)
+                  value expressions: _col0 (type: double), _col1 (type: 
struct<count:bigint,sum:double,input:string>), _col2 (type: 
struct<count:bigint,sum:double,variance:double>), _col3 (type: 
struct<count:bigint,sum:double,variance:double>)
       Reduce Operator Tree:
         Group By Operator
           aggregations: sum(VALUE._col0), avg(VALUE._col1), 
variance(VALUE._col2), std(VALUE._col3)

Modified: hive/trunk/ql/src/test/results/clientpositive/udf3.q.out
URL: 
http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/udf3.q.out?rev=1573250&r1=1573249&r2=1573250&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/udf3.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/udf3.q.out Sun Mar  2 
02:07:38 2014
@@ -35,7 +35,7 @@ STAGE PLANS:
                 Reduce Output Operator
                   sort order: 
                   Statistics: Num rows: 1 Data size: 24 Basic stats: COMPLETE 
Column stats: COMPLETE
-                  value expressions: _col0 (type: bigint), _col1 (type: 
bigint), _col2 (type: struct<count:bigint,sum:double>), _col3 (type: int), 
_col4 (type: int)
+                  value expressions: _col0 (type: bigint), _col1 (type: 
bigint), _col2 (type: struct<count:bigint,sum:double,input:int>), _col3 (type: 
int), _col4 (type: int)
       Reduce Operator Tree:
         Group By Operator
           aggregations: count(VALUE._col0), sum(VALUE._col1), 
avg(VALUE._col2), min(VALUE._col3), max(VALUE._col4)

Modified: hive/trunk/ql/src/test/results/clientpositive/udf8.q.out
URL: 
http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/udf8.q.out?rev=1573250&r1=1573249&r2=1573250&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/udf8.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/udf8.q.out Sun Mar  2 
02:07:38 2014
@@ -55,7 +55,7 @@ STAGE PLANS:
                 Reduce Output Operator
                   sort order: 
                   Statistics: Num rows: 1 Data size: 16 Basic stats: COMPLETE 
Column stats: NONE
-                  value expressions: _col0 (type: 
struct<count:bigint,sum:double>), _col1 (type: double), _col2 (type: bigint)
+                  value expressions: _col0 (type: 
struct<count:bigint,sum:double,input:string>), _col1 (type: double), _col2 
(type: bigint)
       Reduce Operator Tree:
         Group By Operator
           aggregations: avg(VALUE._col0), sum(VALUE._col1), count(VALUE._col2)

Modified: 
hive/trunk/ql/src/test/results/clientpositive/vector_decimal_aggregate.q.out
URL: 
http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/vector_decimal_aggregate.q.out?rev=1573250&r1=1573249&r2=1573250&view=diff
==============================================================================
--- 
hive/trunk/ql/src/test/results/clientpositive/vector_decimal_aggregate.q.out 
(original)
+++ 
hive/trunk/ql/src/test/results/clientpositive/vector_decimal_aggregate.q.out 
Sun Mar  2 02:07:38 2014
@@ -53,7 +53,7 @@ STAGE PLANS:
                   sort order: +
                   Map-reduce partition columns: _col0 (type: int)
                   Statistics: Num rows: 12288 Data size: 2165060 Basic stats: 
COMPLETE Column stats: NONE
-                  value expressions: _col1 (type: bigint), _col2 (type: 
decimal(20,10)), _col3 (type: decimal(20,10)), _col4 (type: decimal(30,10)), 
_col5 (type: struct<count:bigint,sum:decimal(24,14)>), _col6 (type: 
struct<count:bigint,sum:double,variance:double>), _col7 (type: 
struct<count:bigint,sum:double,variance:double>), _col8 (type: bigint), _col9 
(type: decimal(23,14)), _col10 (type: decimal(23,14)), _col11 (type: 
decimal(33,14)), _col12 (type: struct<count:bigint,sum:decimal(27,18)>), _col13 
(type: struct<count:bigint,sum:double,variance:double>), _col14 (type: 
struct<count:bigint,sum:double,variance:double>), _col15 (type: bigint)
+                  value expressions: _col1 (type: bigint), _col2 (type: 
decimal(20,10)), _col3 (type: decimal(20,10)), _col4 (type: decimal(30,10)), 
_col5 (type: struct<count:bigint,sum:decimal(30,10),input:decimal(20,10)>), 
_col6 (type: struct<count:bigint,sum:double,variance:double>), _col7 (type: 
struct<count:bigint,sum:double,variance:double>), _col8 (type: bigint), _col9 
(type: decimal(23,14)), _col10 (type: decimal(23,14)), _col11 (type: 
decimal(33,14)), _col12 (type: 
struct<count:bigint,sum:decimal(33,14),input:decimal(23,14)>), _col13 (type: 
struct<count:bigint,sum:double,variance:double>), _col14 (type: 
struct<count:bigint,sum:double,variance:double>), _col15 (type: bigint)
       Execution mode: vectorized
       Reduce Operator Tree:
         Group By Operator
@@ -100,7 +100,7 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@decimal_vgby
 #### A masked pattern was here ####
 NULL   3072    9318.4351351351 -4298.1513513514        5018444.1081079808      
1633.60810810806667     5695.4830821353335      5696.410307714474       3072    
11160.715384615385      -5147.907692307693      6010604.3076923073536   
1956.576923076922966667 6821.495748565141       6822.606289190906
--3728  6       5831542.269248378       -3367.6517567568        
5817556.0411483778      16510.89638306946651    2174330.2092403853      
2381859.406131774       6       6984454.211097692       -4033.445769230769      
6967702.8672438458471   1161283.811207307641183333      2604201.2704476737      
2852759.5602156054
+-3728  6       5831542.269248378       -3367.6517567568        
5817556.0411483778      969592.67352472963333   2174330.2092403853      
2381859.406131774       6       6984454.211097692       -4033.445769230769      
6967702.8672438458471   23734.593328551958196667        2604201.2704476737      
2852759.5602156054
 -563   2       -515.621072973  -3367.6517567568        -3883.2728297298        
-1941.6364148649        1426.0153418919 2016.6902366556312      2       
-617.5607769230769      -4033.445769230769      -4651.0065461538459     
-2325.50327307692295    1707.9424961538462      2415.395441814127
 762    2       5831542.269248378       1531.2194054054 5833073.4886537834      
2916536.7443268917      2915005.524921486       4122440.347736469       2       
6984454.211097692       1833.9456923076925      6986288.1567899996925   
3493144.07839499984625  3491310.132702692       4937458.140118757
 6981   3       5831542.269248378       -515.621072973  5830511.027102432       
1943503.67570081066667  2749258.4550124914      3367140.192906513       3       
6984454.211097692       -617.5607769230769      6983219.0895438458462   
2327739.696514615282066667      3292794.4113115156      4032833.0678006653

Modified: 
hive/trunk/ql/src/test/results/clientpositive/vectorization_limit.q.out
URL: 
http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/vectorization_limit.q.out?rev=1573250&r1=1573249&r2=1573250&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/vectorization_limit.q.out 
(original)
+++ hive/trunk/ql/src/test/results/clientpositive/vectorization_limit.q.out Sun 
Mar  2 02:07:38 2014
@@ -169,7 +169,7 @@ STAGE PLANS:
                   Map-reduce partition columns: _col0 (type: tinyint)
                   Statistics: Num rows: 31436 Data size: 377237 Basic stats: 
COMPLETE Column stats: NONE
                   TopN Hash Memory Usage: 0.3
-                  value expressions: _col1 (type: 
struct<count:bigint,sum:double>)
+                  value expressions: _col1 (type: 
struct<count:bigint,sum:double,input:double>)
       Execution mode: vectorized
       Reduce Operator Tree:
         Group By Operator

Modified: 
hive/trunk/ql/src/test/results/clientpositive/vectorization_pushdown.q.out
URL: 
http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/vectorization_pushdown.q.out?rev=1573250&r1=1573249&r2=1573250&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/vectorization_pushdown.q.out 
(original)
+++ hive/trunk/ql/src/test/results/clientpositive/vectorization_pushdown.q.out 
Sun Mar  2 02:07:38 2014
@@ -30,7 +30,7 @@ STAGE PLANS:
                   Reduce Output Operator
                     sort order: 
                     Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL 
Column stats: NONE
-                    value expressions: _col0 (type: 
struct<count:bigint,sum:double>)
+                    value expressions: _col0 (type: 
struct<count:bigint,sum:double,input:bigint>)
       Execution mode: vectorized
       Reduce Operator Tree:
         Group By Operator

Modified: 
hive/trunk/ql/src/test/results/clientpositive/vectorization_short_regress.q.out
URL: 
http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/vectorization_short_regress.q.out?rev=1573250&r1=1573249&r2=1573250&view=diff
==============================================================================
--- 
hive/trunk/ql/src/test/results/clientpositive/vectorization_short_regress.q.out 
(original)
+++ 
hive/trunk/ql/src/test/results/clientpositive/vectorization_short_regress.q.out 
Sun Mar  2 02:07:38 2014
@@ -157,7 +157,7 @@ STAGE PLANS:
                   Reduce Output Operator
                     sort order: 
                     Statistics: Num rows: 1 Data size: 20 Basic stats: 
COMPLETE Column stats: NONE
-                    value expressions: _col0 (type: 
struct<count:bigint,sum:double>), _col1 (type: double), _col2 (type: 
struct<count:bigint,sum:double,variance:double>), _col3 (type: 
struct<count:bigint,sum:double,variance:double>), _col4 (type: 
struct<count:bigint,sum:double,variance:double>), _col5 (type: 
struct<count:bigint,sum:double>), _col6 (type: 
struct<count:bigint,sum:double,variance:double>), _col7 (type: tinyint), _col8 
(type: bigint)
+                    value expressions: _col0 (type: 
struct<count:bigint,sum:double,input:int>), _col1 (type: double), _col2 (type: 
struct<count:bigint,sum:double,variance:double>), _col3 (type: 
struct<count:bigint,sum:double,variance:double>), _col4 (type: 
struct<count:bigint,sum:double,variance:double>), _col5 (type: 
struct<count:bigint,sum:double,input:float>), _col6 (type: 
struct<count:bigint,sum:double,variance:double>), _col7 (type: tinyint), _col8 
(type: bigint)
       Execution mode: vectorized
       Reduce Operator Tree:
         Group By Operator
@@ -361,7 +361,7 @@ STAGE PLANS:
                   Reduce Output Operator
                     sort order: 
                     Statistics: Num rows: 1 Data size: 24 Basic stats: 
COMPLETE Column stats: NONE
-                    value expressions: _col0 (type: int), _col1 (type: 
struct<count:bigint,sum:double,variance:double>), _col2 (type: 
struct<count:bigint,sum:double,variance:double>), _col3 (type: double), _col4 
(type: struct<count:bigint,sum:double>), _col5 (type: int), _col6 (type: 
double), _col7 (type: struct<count:bigint,sum:double,variance:double>), _col8 
(type: struct<count:bigint,sum:double,variance:double>)
+                    value expressions: _col0 (type: int), _col1 (type: 
struct<count:bigint,sum:double,variance:double>), _col2 (type: 
struct<count:bigint,sum:double,variance:double>), _col3 (type: double), _col4 
(type: struct<count:bigint,sum:double,input:tinyint>), _col5 (type: int), _col6 
(type: double), _col7 (type: struct<count:bigint,sum:double,variance:double>), 
_col8 (type: struct<count:bigint,sum:double,variance:double>)
       Execution mode: vectorized
       Reduce Operator Tree:
         Group By Operator
@@ -556,7 +556,7 @@ STAGE PLANS:
                   Reduce Output Operator
                     sort order: 
                     Statistics: Num rows: 1 Data size: 24 Basic stats: 
COMPLETE Column stats: NONE
-                    value expressions: _col0 (type: 
struct<count:bigint,sum:double,variance:double>), _col1 (type: bigint), _col2 
(type: tinyint), _col3 (type: struct<count:bigint,sum:double,variance:double>), 
_col4 (type: int), _col5 (type: 
struct<count:bigint,sum:double,variance:double>), _col6 (type: bigint), _col7 
(type: struct<count:bigint,sum:double>)
+                    value expressions: _col0 (type: 
struct<count:bigint,sum:double,variance:double>), _col1 (type: bigint), _col2 
(type: tinyint), _col3 (type: struct<count:bigint,sum:double,variance:double>), 
_col4 (type: int), _col5 (type: 
struct<count:bigint,sum:double,variance:double>), _col6 (type: bigint), _col7 
(type: struct<count:bigint,sum:double,input:tinyint>)
       Execution mode: vectorized
       Reduce Operator Tree:
         Group By Operator
@@ -730,7 +730,7 @@ STAGE PLANS:
                   Reduce Output Operator
                     sort order: 
                     Statistics: Num rows: 1 Data size: 12 Basic stats: 
COMPLETE Column stats: NONE
-                    value expressions: _col0 (type: 
struct<count:bigint,sum:double>), _col1 (type: bigint), _col2 (type: 
struct<count:bigint,sum:double,variance:double>), _col3 (type: 
struct<count:bigint,sum:double,variance:double>), _col4 (type: 
struct<count:bigint,sum:double,variance:double>), _col5 (type: float)
+                    value expressions: _col0 (type: 
struct<count:bigint,sum:double,input:tinyint>), _col1 (type: bigint), _col2 
(type: struct<count:bigint,sum:double,variance:double>), _col3 (type: 
struct<count:bigint,sum:double,variance:double>), _col4 (type: 
struct<count:bigint,sum:double,variance:double>), _col5 (type: float)
       Execution mode: vectorized
       Reduce Operator Tree:
         Group By Operator
@@ -5949,7 +5949,7 @@ STAGE PLANS:
                     sort order: ++
                     Map-reduce partition columns: _col0 (type: timestamp), 
_col1 (type: string)
                     Statistics: Num rows: 1209 Data size: 377237 Basic stats: 
COMPLETE Column stats: NONE
-                    value expressions: _col2 (type: 
struct<count:bigint,sum:double,variance:double>), _col3 (type: 
struct<count:bigint,sum:double>), _col4 (type: bigint), _col5 (type: tinyint), 
_col6 (type: struct<count:bigint,sum:double,variance:double>), _col7 (type: 
struct<count:bigint,sum:double,variance:double>), _col8 (type: 
struct<count:bigint,sum:double>), _col9 (type: 
struct<count:bigint,sum:double,variance:double>), _col10 (type: 
struct<count:bigint,sum:double>), _col11 (type: double), _col12 (type: 
struct<count:bigint,sum:double,variance:double>), _col13 (type: 
struct<count:bigint,sum:double,variance:double>), _col14 (type: bigint)
+                    value expressions: _col2 (type: 
struct<count:bigint,sum:double,variance:double>), _col3 (type: 
struct<count:bigint,sum:double,input:smallint>), _col4 (type: bigint), _col5 
(type: tinyint), _col6 (type: struct<count:bigint,sum:double,variance:double>), 
_col7 (type: struct<count:bigint,sum:double,variance:double>), _col8 (type: 
struct<count:bigint,sum:double,input:int>), _col9 (type: 
struct<count:bigint,sum:double,variance:double>), _col10 (type: 
struct<count:bigint,sum:double,input:float>), _col11 (type: double), _col12 
(type: struct<count:bigint,sum:double,variance:double>), _col13 (type: 
struct<count:bigint,sum:double,variance:double>), _col14 (type: bigint)
       Execution mode: vectorized
       Reduce Operator Tree:
         Group By Operator
@@ -6450,7 +6450,7 @@ STAGE PLANS:
                     sort order: +
                     Map-reduce partition columns: _col0 (type: boolean)
                     Statistics: Num rows: 523 Data size: 146469 Basic stats: 
COMPLETE Column stats: NONE
-                    value expressions: _col1 (type: float), _col2 (type: 
bigint), _col3 (type: struct<count:bigint,sum:double,variance:double>), _col4 
(type: struct<count:bigint,sum:double>), _col5 (type: bigint), _col6 (type: 
struct<count:bigint,sum:double,variance:double>), _col7 (type: bigint), _col8 
(type: struct<count:bigint,sum:double,variance:double>), _col9 (type: 
struct<count:bigint,sum:double,variance:double>), _col10 (type: 
struct<count:bigint,sum:double>)
+                    value expressions: _col1 (type: float), _col2 (type: 
bigint), _col3 (type: struct<count:bigint,sum:double,variance:double>), _col4 
(type: struct<count:bigint,sum:double,input:double>), _col5 (type: bigint), 
_col6 (type: struct<count:bigint,sum:double,variance:double>), _col7 (type: 
bigint), _col8 (type: struct<count:bigint,sum:double,variance:double>), _col9 
(type: struct<count:bigint,sum:double,variance:double>), _col10 (type: 
struct<count:bigint,sum:double,input:int>)
       Execution mode: vectorized
       Reduce Operator Tree:
         Group By Operator

Modified: hive/trunk/ql/src/test/results/clientpositive/vectorized_mapjoin.q.out
URL: 
http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/vectorized_mapjoin.q.out?rev=1573250&r1=1573249&r2=1573250&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/vectorized_mapjoin.q.out 
(original)
+++ hive/trunk/ql/src/test/results/clientpositive/vectorized_mapjoin.q.out Sun 
Mar  2 02:07:38 2014
@@ -60,7 +60,7 @@ STAGE PLANS:
                   Reduce Output Operator
                     sort order: 
                     Statistics: Num rows: 1 Data size: 16 Basic stats: 
COMPLETE Column stats: NONE
-                    value expressions: _col0 (type: bigint), _col1 (type: 
int), _col2 (type: int), _col3 (type: struct<count:bigint,sum:double>)
+                    value expressions: _col0 (type: bigint), _col1 (type: 
int), _col2 (type: int), _col3 (type: struct<count:bigint,sum:double,input:int>)
       Local Work:
         Map Reduce Local Work
       Execution mode: vectorized

Modified: 
hive/trunk/ql/src/test/results/clientpositive/vectorized_shufflejoin.q.out
URL: 
http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/vectorized_shufflejoin.q.out?rev=1573250&r1=1573249&r2=1573250&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/vectorized_shufflejoin.q.out 
(original)
+++ hive/trunk/ql/src/test/results/clientpositive/vectorized_shufflejoin.q.out 
Sun Mar  2 02:07:38 2014
@@ -66,7 +66,7 @@ STAGE PLANS:
             Reduce Output Operator
               sort order: 
               Statistics: Num rows: 1 Data size: 16 Basic stats: COMPLETE 
Column stats: NONE
-              value expressions: _col0 (type: bigint), _col1 (type: int), 
_col2 (type: int), _col3 (type: struct<count:bigint,sum:double>)
+              value expressions: _col0 (type: bigint), _col1 (type: int), 
_col2 (type: int), _col3 (type: struct<count:bigint,sum:double,input:int>)
       Reduce Operator Tree:
         Group By Operator
           aggregations: count(VALUE._col0), max(VALUE._col1), 
min(VALUE._col2), avg(VALUE._col3)

Modified: hive/trunk/ql/src/test/results/compiler/plan/groupby3.q.xml
URL: 
http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/compiler/plan/groupby3.q.xml?rev=1573250&r1=1573249&r2=1573250&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/compiler/plan/groupby3.q.xml (original)
+++ hive/trunk/ql/src/test/results/compiler/plan/groupby3.q.xml Sun Mar  2 
02:07:38 2014
@@ -214,6 +214,9 @@
                          <void method="add"> 
                           <string>sum</string> 
                          </void> 
+                         <void method="add"> 
+                          <string>input</string> 
+                         </void> 
                         </object> 
                        </void> 
                        <void property="allStructFieldTypeInfos"> 
@@ -232,6 +235,9 @@
                            </void> 
                           </object> 
                          </void> 
+                         <void method="add"> 
+                          <object idref="PrimitiveTypeInfo0"/> 
+                         </void> 
                         </object> 
                        </void> 
                       </object> 
@@ -406,7 +412,7 @@
                        </void> 
                        <void method="put"> 
                         <string>columns.types</string> 
-                        
<string>double,struct&lt;count:bigint,sum:double&gt;,struct&lt;count:bigint,sum:double&gt;,string,string</string>
 
+                        
<string>double,struct&lt;count:bigint,sum:double,input:string&gt;,struct&lt;count:bigint,sum:double,input:string&gt;,string,string</string>
 
                        </void> 
                        <void method="put"> 
                         <string>escape.delim</string> 
@@ -465,7 +471,7 @@
                         <object idref="StructTypeInfo0"/> 
                        </void> 
                        <void property="typeName"> 
-                        <string>struct&lt;count:bigint,sum:double&gt;</string> 
+                        
<string>struct&lt;count:bigint,sum:double,input:string&gt;</string> 
                        </void> 
                       </object> 
                      </void> 
@@ -478,7 +484,7 @@
                         <object idref="StructTypeInfo0"/> 
                        </void> 
                        <void property="typeName"> 
-                        <string>struct&lt;count:bigint,sum:double&gt;</string> 
+                        
<string>struct&lt;count:bigint,sum:double,input:string&gt;</string> 
                        </void> 
                       </object> 
                      </void> 
@@ -988,7 +994,7 @@
                      <object idref="StructTypeInfo0"/> 
                     </void> 
                     <void property="typeName"> 
-                     <string>struct&lt;count:bigint,sum:double&gt;</string> 
+                     
<string>struct&lt;count:bigint,sum:double,input:string&gt;</string> 
                     </void> 
                    </object> 
                   </void> 
@@ -1004,7 +1010,7 @@
                      <object idref="StructTypeInfo0"/> 
                     </void> 
                     <void property="typeName"> 
-                     <string>struct&lt;count:bigint,sum:double&gt;</string> 
+                     
<string>struct&lt;count:bigint,sum:double,input:string&gt;</string> 
                     </void> 
                    </object> 
                   </void> 


Reply via email to