hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hashut...@apache.org
Subject svn commit: r1669675 - in /hive/trunk/ql/src: java/org/apache/hadoop/hive/ql/optimizer/ test/results/clientpositive/ test/results/clientpositive/tez/
Date Fri, 27 Mar 2015 20:31:18 GMT
Author: hashutosh
Date: Fri Mar 27 20:31:18 2015
New Revision: 1669675

URL: http://svn.apache.org/r1669675
Log:
HIVE-10099 : Enable constant folding for Decimal (Ashutosh Chauhan via Prasanth Jayachandran)

Modified:
    hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/ConstantPropagateProcFactory.java
    hive/trunk/ql/src/test/results/clientpositive/annotate_stats_select.q.out
    hive/trunk/ql/src/test/results/clientpositive/decimal_udf.q.out
    hive/trunk/ql/src/test/results/clientpositive/decimal_udf2.q.out
    hive/trunk/ql/src/test/results/clientpositive/literal_decimal.q.out
    hive/trunk/ql/src/test/results/clientpositive/tez/vector_decimal_expressions.q.out
    hive/trunk/ql/src/test/results/clientpositive/tez/vector_decimal_udf.q.out
    hive/trunk/ql/src/test/results/clientpositive/tez/vector_decimal_udf2.q.out
    hive/trunk/ql/src/test/results/clientpositive/udf7.q.out
    hive/trunk/ql/src/test/results/clientpositive/vector_decimal_expressions.q.out
    hive/trunk/ql/src/test/results/clientpositive/vector_decimal_round_2.q.out
    hive/trunk/ql/src/test/results/clientpositive/vector_decimal_udf.q.out
    hive/trunk/ql/src/test/results/clientpositive/vector_decimal_udf2.q.out

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/ConstantPropagateProcFactory.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/ConstantPropagateProcFactory.java?rev=1669675&r1=1669674&r2=1669675&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/ConstantPropagateProcFactory.java
(original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/ConstantPropagateProcFactory.java
Fri Mar 27 20:31:18 2015
@@ -517,16 +517,17 @@ public final class ConstantPropagateProc
       if (PrimitiveObjectInspectorUtils.isPrimitiveWritableClass(clz)) {
         PrimitiveObjectInspector poi = (PrimitiveObjectInspector) oi;
         TypeInfo typeInfo = poi.getTypeInfo();
-
-        // Handling parameterized types (varchar, decimal, etc).
-        if (typeInfo.getTypeName().contains(serdeConstants.DECIMAL_TYPE_NAME)
-            || typeInfo.getTypeName().contains(serdeConstants.VARCHAR_TYPE_NAME)
+        // Handling parameterized types (varchar etc).
+        if (typeInfo.getTypeName().contains(serdeConstants.VARCHAR_TYPE_NAME)
             || typeInfo.getTypeName().contains(serdeConstants.CHAR_TYPE_NAME)) {
 
           // Do not support parameterized types.
           return null;
         }
         o = poi.getPrimitiveJavaObject(o);
+        if (typeInfo.getTypeName().contains(serdeConstants.DECIMAL_TYPE_NAME)) {
+          return new ExprNodeConstantDesc(typeInfo, o);
+        }
       } else if (PrimitiveObjectInspectorUtils.isPrimitiveJavaClass(clz)) {
 
       } else {

Modified: hive/trunk/ql/src/test/results/clientpositive/annotate_stats_select.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/annotate_stats_select.q.out?rev=1669675&r1=1669674&r2=1669675&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/annotate_stats_select.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/annotate_stats_select.q.out Fri Mar 27 20:31:18
2015
@@ -531,7 +531,7 @@ STAGE PLANS:
           alias: alltypes_orc
           Statistics: Num rows: 2 Data size: 1686 Basic stats: COMPLETE Column stats: COMPLETE
           Select Operator
-            expressions: CAST( '58.174' AS decimal(10,0)) (type: decimal(10,0))
+            expressions: 58 (type: decimal(10,0))
             outputColumnNames: _col0
             Statistics: Num rows: 2 Data size: 224 Basic stats: COMPLETE Column stats: COMPLETE
             ListSink

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=1669675&r1=1669674&r2=1669675&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 Fri Mar 27 20:31:18 2015
@@ -649,7 +649,7 @@ STAGE PLANS:
           alias: decimal_udf
           Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
           Filter Operator
-            predicate: ((key * CAST( value AS decimal(10,0))) > CAST( 0 AS decimal(31,10)))
(type: boolean)
+            predicate: ((key * CAST( value AS decimal(10,0))) > 0) (type: boolean)
             Statistics: Num rows: 1 Data size: 119 Basic stats: COMPLETE Column stats: NONE
             Select Operator
               expressions: key (type: decimal(20,10)), value (type: int)
@@ -907,7 +907,7 @@ STAGE PLANS:
           alias: decimal_udf
           Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
           Select Operator
-            expressions: (key / CAST( 0 AS decimal(10,0))) (type: decimal(22,12))
+            expressions: (key / 0) (type: decimal(22,12))
             outputColumnNames: _col0
             Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
             Limit
@@ -973,7 +973,7 @@ STAGE PLANS:
           alias: decimal_udf
           Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
           Filter Operator
-            predicate: (key <> CAST( 0 AS decimal(20,10))) (type: boolean)
+            predicate: (key <> 0) (type: boolean)
             Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
             Select Operator
               expressions: (key / key) (type: decimal(38,24))
@@ -1808,7 +1808,7 @@ STAGE PLANS:
           alias: decimal_udf
           Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
           Select Operator
-            expressions: ((key + CAST( 1 AS decimal(10,0))) % (key / CAST( 2 AS decimal(10,0))))
(type: decimal(22,12))
+            expressions: ((key + 1) % (key / 2)) (type: decimal(22,12))
             outputColumnNames: _col0
             Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
             ListSink

Modified: hive/trunk/ql/src/test/results/clientpositive/decimal_udf2.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/decimal_udf2.q.out?rev=1669675&r1=1669674&r2=1669675&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/decimal_udf2.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/decimal_udf2.q.out Fri Mar 27 20:31:18 2015
@@ -44,10 +44,10 @@ STAGE PLANS:
             alias: decimal_udf2
             Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: (key = CAST( 10 AS decimal(20,10))) (type: boolean)
+              predicate: (key = 10) (type: boolean)
               Statistics: Num rows: 1 Data size: 119 Basic stats: COMPLETE Column stats:
NONE
               Select Operator
-                expressions: acos(key) (type: double), asin(key) (type: double), atan(key)
(type: double), cos(key) (type: double), sin(key) (type: double), tan(key) (type: double),
radians(key) (type: double)
+                expressions: NaN (type: double), NaN (type: double), 1.4711276743037347 (type:
double), -0.8390715290764524 (type: double), -0.5440211108893698 (type: double), 0.6483608274590866
(type: double), 0.17453292519943295 (type: double)
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6
                 Statistics: Num rows: 1 Data size: 119 Basic stats: COMPLETE Column stats:
NONE
                 File Output Operator
@@ -101,10 +101,10 @@ STAGE PLANS:
             alias: decimal_udf2
             Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: (key = CAST( 10 AS decimal(20,10))) (type: boolean)
+              predicate: (key = 10) (type: boolean)
               Statistics: Num rows: 1 Data size: 119 Basic stats: COMPLETE Column stats:
NONE
               Select Operator
-                expressions: exp(key) (type: double), ln(key) (type: double), log(key) (type:
double), log(key, key) (type: double), log(key, value) (type: double), log(value, key) (type:
double), log10(key) (type: double), sqrt(key) (type: double)
+                expressions: 22026.465794806718 (type: double), 2.302585092994046 (type:
double), 2.302585092994046 (type: double), 1.0 (type: double), log(10, value) (type: double),
log(value, 10) (type: double), 1.0 (type: double), 3.1622776601683795 (type: double)
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7
                 Statistics: Num rows: 1 Data size: 119 Basic stats: COMPLETE Column stats:
NONE
                 File Output Operator

Modified: hive/trunk/ql/src/test/results/clientpositive/literal_decimal.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/literal_decimal.q.out?rev=1669675&r1=1669674&r2=1669675&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/literal_decimal.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/literal_decimal.q.out Fri Mar 27 20:31:18
2015
@@ -14,7 +14,7 @@ STAGE PLANS:
           alias: src
           Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: COMPLETE
           Select Operator
-            expressions: (- 1) (type: decimal(1,0)), 0 (type: decimal(1,0)), 1 (type: decimal(1,0)),
3.14 (type: decimal(3,2)), (- 3.14) (type: decimal(3,2)), 99999999999999999 (type: decimal(17,0)),
99999999999999999.9999999999999 (type: decimal(30,13)), 1E99 (type: decimal(1,0))
+            expressions: -1 (type: decimal(1,0)), 0 (type: decimal(1,0)), 1 (type: decimal(1,0)),
3.14 (type: decimal(3,2)), -3.14 (type: decimal(3,2)), 99999999999999999 (type: decimal(17,0)),
99999999999999999.9999999999999 (type: decimal(30,13)), 1E99 (type: decimal(1,0))
             outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7
             Statistics: Num rows: 500 Data size: 448000 Basic stats: COMPLETE Column stats:
COMPLETE
             Limit

Modified: hive/trunk/ql/src/test/results/clientpositive/tez/vector_decimal_expressions.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/tez/vector_decimal_expressions.q.out?rev=1669675&r1=1669674&r2=1669675&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/tez/vector_decimal_expressions.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/tez/vector_decimal_expressions.q.out Fri
Mar 27 20:31:18 2015
@@ -23,9 +23,9 @@ STAGE PLANS:
         TableScan
           alias: decimal_test
           Filter Operator
-            predicate: (((((cdecimal1 > CAST( 0 AS decimal(20,10))) and (cdecimal1 <
CAST( 12345.5678 AS decimal(25,15)))) and (cdecimal2 <> CAST( 0 AS decimal(24,14))))
and (cdecimal2 > CAST( 1000 AS decimal(24,14)))) and cdouble is not null) (type: boolean)
+            predicate: (((((cdecimal1 > 0) and (cdecimal1 < 12345.5678)) and (cdecimal2
<> 0)) and (cdecimal2 > 1000)) and cdouble is not null) (type: boolean)
             Select Operator
-              expressions: (cdecimal1 + cdecimal2) (type: decimal(25,14)), (cdecimal1 - (CAST(
2 AS decimal(10,0)) * cdecimal2)) (type: decimal(26,14)), ((UDFToDouble(cdecimal1) + 2.34)
/ UDFToDouble(cdecimal2)) (type: double), (UDFToDouble(cdecimal1) * (UDFToDouble(cdecimal2)
/ 3.4)) (type: double), (cdecimal1 % CAST( 10 AS decimal(10,0))) (type: decimal(12,10)), UDFToInteger(cdecimal1)
(type: int), UDFToShort(cdecimal2) (type: smallint), UDFToByte(cdecimal2) (type: tinyint),
UDFToLong(cdecimal1) (type: bigint), UDFToBoolean(cdecimal1) (type: boolean), UDFToDouble(cdecimal2)
(type: double), UDFToFloat(cdecimal1) (type: float), UDFToString(cdecimal2) (type: string),
CAST( cdecimal1 AS TIMESTAMP) (type: timestamp)
+              expressions: (cdecimal1 + cdecimal2) (type: decimal(25,14)), (cdecimal1 - (2
* cdecimal2)) (type: decimal(26,14)), ((UDFToDouble(cdecimal1) + 2.34) / UDFToDouble(cdecimal2))
(type: double), (UDFToDouble(cdecimal1) * (UDFToDouble(cdecimal2) / 3.4)) (type: double),
(cdecimal1 % 10) (type: decimal(12,10)), UDFToInteger(cdecimal1) (type: int), UDFToShort(cdecimal2)
(type: smallint), UDFToByte(cdecimal2) (type: tinyint), UDFToLong(cdecimal1) (type: bigint),
UDFToBoolean(cdecimal1) (type: boolean), UDFToDouble(cdecimal2) (type: double), UDFToFloat(cdecimal1)
(type: float), UDFToString(cdecimal2) (type: string), CAST( cdecimal1 AS TIMESTAMP) (type:
timestamp)
               outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7,
_col8, _col9, _col10, _col11, _col12, _col13
               Limit
                 Number of rows: 10

Modified: hive/trunk/ql/src/test/results/clientpositive/tez/vector_decimal_udf.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/tez/vector_decimal_udf.q.out?rev=1669675&r1=1669674&r2=1669675&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/tez/vector_decimal_udf.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/tez/vector_decimal_udf.q.out Fri Mar 27
20:31:18 2015
@@ -820,7 +820,7 @@ STAGE PLANS:
                   alias: decimal_udf
                   Statistics: Num rows: 38 Data size: 4296 Basic stats: COMPLETE Column stats:
NONE
                   Filter Operator
-                    predicate: ((key * CAST( value AS decimal(10,0))) > CAST( 0 AS decimal(31,10)))
(type: boolean)
+                    predicate: ((key * CAST( value AS decimal(10,0))) > 0) (type: boolean)
                     Statistics: Num rows: 12 Data size: 1356 Basic stats: COMPLETE Column
stats: NONE
                     Select Operator
                       expressions: key (type: decimal(20,10)), value (type: int)
@@ -1142,7 +1142,7 @@ STAGE PLANS:
                   alias: decimal_udf
                   Statistics: Num rows: 38 Data size: 4296 Basic stats: COMPLETE Column stats:
NONE
                   Select Operator
-                    expressions: (key / CAST( 0 AS decimal(10,0))) (type: decimal(22,12))
+                    expressions: (key / 0) (type: decimal(22,12))
                     outputColumnNames: _col0
                     Statistics: Num rows: 38 Data size: 4296 Basic stats: COMPLETE Column
stats: NONE
                     Limit
@@ -1240,7 +1240,7 @@ STAGE PLANS:
                   alias: decimal_udf
                   Statistics: Num rows: 38 Data size: 4296 Basic stats: COMPLETE Column stats:
NONE
                   Filter Operator
-                    predicate: (key <> CAST( 0 AS decimal(20,10))) (type: boolean)
+                    predicate: (key <> 0) (type: boolean)
                     Statistics: Num rows: 38 Data size: 4296 Basic stats: COMPLETE Column
stats: NONE
                     Select Operator
                       expressions: (key / key) (type: decimal(38,24))
@@ -2230,7 +2230,7 @@ STAGE PLANS:
                   alias: decimal_udf
                   Statistics: Num rows: 38 Data size: 4296 Basic stats: COMPLETE Column stats:
NONE
                   Select Operator
-                    expressions: ((key + CAST( 1 AS decimal(10,0))) % (key / CAST( 2 AS decimal(10,0))))
(type: decimal(22,12))
+                    expressions: ((key + 1) % (key / 2)) (type: decimal(22,12))
                     outputColumnNames: _col0
                     Statistics: Num rows: 38 Data size: 4296 Basic stats: COMPLETE Column
stats: NONE
                     File Output Operator

Modified: hive/trunk/ql/src/test/results/clientpositive/tez/vector_decimal_udf2.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/tez/vector_decimal_udf2.q.out?rev=1669675&r1=1669674&r2=1669675&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/tez/vector_decimal_udf2.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/tez/vector_decimal_udf2.q.out Fri Mar 27
20:31:18 2015
@@ -71,10 +71,10 @@ STAGE PLANS:
                   alias: decimal_udf2
                   Statistics: Num rows: 38 Data size: 4296 Basic stats: COMPLETE Column stats:
NONE
                   Filter Operator
-                    predicate: (key = CAST( 10 AS decimal(20,10))) (type: boolean)
+                    predicate: (key = 10) (type: boolean)
                     Statistics: Num rows: 19 Data size: 2148 Basic stats: COMPLETE Column
stats: NONE
                     Select Operator
-                      expressions: acos(key) (type: double), asin(key) (type: double), atan(key)
(type: double), cos(key) (type: double), sin(key) (type: double), tan(key) (type: double),
radians(key) (type: double)
+                      expressions: NaN (type: double), NaN (type: double), 1.4711276743037347
(type: double), -0.8390715290764524 (type: double), -0.5440211108893698 (type: double), 0.6483608274590866
(type: double), 0.17453292519943295 (type: double)
                       outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6
                       Statistics: Num rows: 19 Data size: 2148 Basic stats: COMPLETE Column
stats: NONE
                       File Output Operator
@@ -132,10 +132,10 @@ STAGE PLANS:
                   alias: decimal_udf2
                   Statistics: Num rows: 38 Data size: 4296 Basic stats: COMPLETE Column stats:
NONE
                   Filter Operator
-                    predicate: (key = CAST( 10 AS decimal(20,10))) (type: boolean)
+                    predicate: (key = 10) (type: boolean)
                     Statistics: Num rows: 19 Data size: 2148 Basic stats: COMPLETE Column
stats: NONE
                     Select Operator
-                      expressions: exp(key) (type: double), ln(key) (type: double), log(key)
(type: double), log(key, key) (type: double), log(key, value) (type: double), log(value, key)
(type: double), log10(key) (type: double), sqrt(key) (type: double)
+                      expressions: 22026.465794806718 (type: double), 2.302585092994046 (type:
double), 2.302585092994046 (type: double), 1.0 (type: double), log(10, value) (type: double),
log(value, 10) (type: double), 1.0 (type: double), 3.1622776601683795 (type: double)
                       outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6,
_col7
                       Statistics: Num rows: 19 Data size: 2148 Basic stats: COMPLETE Column
stats: NONE
                       File Output Operator

Modified: hive/trunk/ql/src/test/results/clientpositive/udf7.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/udf7.q.out?rev=1669675&r1=1669674&r2=1669675&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/udf7.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/udf7.q.out Fri Mar 27 20:31:18 2015
@@ -36,33 +36,21 @@ SELECT ROUND(LN(3.0),12), LN(0.0), LN(-1
        POW(CAST (2 AS DECIMAL), CAST(3 AS INT)) FROM dest1
 POSTHOOK: type: QUERY
 STAGE DEPENDENCIES:
-  Stage-1 is a root stage
-  Stage-0 depends on stages: Stage-1
+  Stage-0 is a root stage
 
 STAGE PLANS:
-  Stage: Stage-1
-    Map Reduce
-      Map Operator Tree:
-          TableScan
-            alias: dest1
-            Statistics: Num rows: 1 Data size: 7 Basic stats: COMPLETE Column stats: COMPLETE
-            Select Operator
-              expressions: 1.098612288668 (type: double), null (type: void), null (type:
void), 1.098612288668 (type: double), null (type: void), null (type: void), 1.584962500721
(type: double), null (type: void), null (type: void), 0.47712125472 (type: double), null (type:
void), null (type: void), 1.584962500721 (type: double), null (type: void), null (type: void),
null (type: void), -1.0 (type: double), 7.389056098931 (type: double), 8.0 (type: double),
8.0 (type: double), 0.125 (type: double), 8.0 (type: double), 2.0 (type: double), NaN (type:
double), 1.0 (type: double), power(CAST( 1 AS decimal(10,0)), 0) (type: double), power(CAST(
2 AS decimal(10,0)), 3) (type: double), power(CAST( 2 AS decimal(10,0)), 3) (type: double)
-              outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7,
_col8, _col9, _col10, _col11, _col12, _col13, _col14, _col15, _col16, _col17, _col18, _col19,
_col20, _col21, _col22, _col23, _col24, _col25, _col26, _col27
-              Statistics: Num rows: 1 Data size: 136 Basic stats: COMPLETE Column stats:
COMPLETE
-              File Output Operator
-                compressed: false
-                Statistics: Num rows: 1 Data size: 136 Basic stats: COMPLETE Column stats:
COMPLETE
-                table:
-                    input format: org.apache.hadoop.mapred.TextInputFormat
-                    output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
-                    serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-
   Stage: Stage-0
     Fetch Operator
       limit: -1
       Processor Tree:
-        ListSink
+        TableScan
+          alias: dest1
+          Statistics: Num rows: 1 Data size: 7 Basic stats: COMPLETE Column stats: COMPLETE
+          Select Operator
+            expressions: 1.098612288668 (type: double), null (type: void), null (type: void),
1.098612288668 (type: double), null (type: void), null (type: void), 1.584962500721 (type:
double), null (type: void), null (type: void), 0.47712125472 (type: double), null (type: void),
null (type: void), 1.584962500721 (type: double), null (type: void), null (type: void), null
(type: void), -1.0 (type: double), 7.389056098931 (type: double), 8.0 (type: double), 8.0
(type: double), 0.125 (type: double), 8.0 (type: double), 2.0 (type: double), NaN (type: double),
1.0 (type: double), 1.0 (type: double), 8.0 (type: double), 8.0 (type: double)
+            outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8,
_col9, _col10, _col11, _col12, _col13, _col14, _col15, _col16, _col17, _col18, _col19, _col20,
_col21, _col22, _col23, _col24, _col25, _col26, _col27
+            Statistics: Num rows: 1 Data size: 136 Basic stats: COMPLETE Column stats: COMPLETE
+            ListSink
 
 PREHOOK: query: SELECT ROUND(LN(3.0),12), LN(0.0), LN(-1), ROUND(LOG(3.0),12), LOG(0.0),
        LOG(-1), ROUND(LOG2(3.0),12), LOG2(0.0), LOG2(-1),

Modified: hive/trunk/ql/src/test/results/clientpositive/vector_decimal_expressions.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/vector_decimal_expressions.q.out?rev=1669675&r1=1669674&r2=1669675&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/vector_decimal_expressions.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/vector_decimal_expressions.q.out Fri Mar
27 20:31:18 2015
@@ -24,10 +24,10 @@ STAGE PLANS:
             alias: decimal_test
             Statistics: Num rows: 12288 Data size: 2128368 Basic stats: COMPLETE Column stats:
NONE
             Filter Operator
-              predicate: (((((cdecimal1 > CAST( 0 AS decimal(20,10))) and (cdecimal1 <
CAST( 12345.5678 AS decimal(25,15)))) and (cdecimal2 <> CAST( 0 AS decimal(24,14))))
and (cdecimal2 > CAST( 1000 AS decimal(24,14)))) and cdouble is not null) (type: boolean)
+              predicate: (((((cdecimal1 > 0) and (cdecimal1 < 12345.5678)) and (cdecimal2
<> 0)) and (cdecimal2 > 1000)) and cdouble is not null) (type: boolean)
               Statistics: Num rows: 228 Data size: 39491 Basic stats: COMPLETE Column stats:
NONE
               Select Operator
-                expressions: (cdecimal1 + cdecimal2) (type: decimal(25,14)), (cdecimal1 -
(CAST( 2 AS decimal(10,0)) * cdecimal2)) (type: decimal(26,14)), ((UDFToDouble(cdecimal1)
+ 2.34) / UDFToDouble(cdecimal2)) (type: double), (UDFToDouble(cdecimal1) * (UDFToDouble(cdecimal2)
/ 3.4)) (type: double), (cdecimal1 % CAST( 10 AS decimal(10,0))) (type: decimal(12,10)), UDFToInteger(cdecimal1)
(type: int), UDFToShort(cdecimal2) (type: smallint), UDFToByte(cdecimal2) (type: tinyint),
UDFToLong(cdecimal1) (type: bigint), UDFToBoolean(cdecimal1) (type: boolean), UDFToDouble(cdecimal2)
(type: double), UDFToFloat(cdecimal1) (type: float), UDFToString(cdecimal2) (type: string),
CAST( cdecimal1 AS TIMESTAMP) (type: timestamp)
+                expressions: (cdecimal1 + cdecimal2) (type: decimal(25,14)), (cdecimal1 -
(2 * cdecimal2)) (type: decimal(26,14)), ((UDFToDouble(cdecimal1) + 2.34) / UDFToDouble(cdecimal2))
(type: double), (UDFToDouble(cdecimal1) * (UDFToDouble(cdecimal2) / 3.4)) (type: double),
(cdecimal1 % 10) (type: decimal(12,10)), UDFToInteger(cdecimal1) (type: int), UDFToShort(cdecimal2)
(type: smallint), UDFToByte(cdecimal2) (type: tinyint), UDFToLong(cdecimal1) (type: bigint),
UDFToBoolean(cdecimal1) (type: boolean), UDFToDouble(cdecimal2) (type: double), UDFToFloat(cdecimal1)
(type: float), UDFToString(cdecimal2) (type: string), CAST( cdecimal1 AS TIMESTAMP) (type:
timestamp)
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7,
_col8, _col9, _col10, _col11, _col12, _col13
                 Statistics: Num rows: 228 Data size: 39491 Basic stats: COMPLETE Column stats:
NONE
                 Limit

Modified: hive/trunk/ql/src/test/results/clientpositive/vector_decimal_round_2.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/vector_decimal_round_2.q.out?rev=1669675&r1=1669674&r2=1669675&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/vector_decimal_round_2.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/vector_decimal_round_2.q.out Fri Mar 27
20:31:18 2015
@@ -431,7 +431,7 @@ STAGE PLANS:
             alias: decimal_tbl_4_orc
             Statistics: Num rows: 1 Data size: 224 Basic stats: COMPLETE Column stats: NONE
             Select Operator
-              expressions: round(pos, 9) (type: decimal(30,9)), round(neg, 9) (type: decimal(30,9)),
round(1809242.3151111344, 9) (type: decimal(17,9)), round((- 1809242.3151111344), 9) (type:
decimal(17,9))
+              expressions: round(pos, 9) (type: decimal(30,9)), round(neg, 9) (type: decimal(30,9)),
1809242.315111134 (type: decimal(17,9)), -1809242.315111134 (type: decimal(17,9))
               outputColumnNames: _col0, _col1, _col2, _col3
               Statistics: Num rows: 1 Data size: 224 Basic stats: COMPLETE Column stats:
NONE
               Reduce Output Operator
@@ -439,6 +439,7 @@ STAGE PLANS:
                 sort order: +
                 Statistics: Num rows: 1 Data size: 224 Basic stats: COMPLETE Column stats:
NONE
                 value expressions: _col1 (type: decimal(30,9)), _col2 (type: decimal(17,9)),
_col3 (type: decimal(17,9))
+      Execution mode: vectorized
       Reduce Operator Tree:
         Select Operator
           expressions: KEY.reducesinkkey0 (type: decimal(30,9)), VALUE._col0 (type: decimal(30,9)),
VALUE._col1 (type: decimal(17,9)), VALUE._col2 (type: decimal(17,9))

Modified: hive/trunk/ql/src/test/results/clientpositive/vector_decimal_udf.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/vector_decimal_udf.q.out?rev=1669675&r1=1669674&r2=1669675&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/vector_decimal_udf.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/vector_decimal_udf.q.out Fri Mar 27 20:31:18
2015
@@ -790,7 +790,7 @@ STAGE PLANS:
             alias: decimal_udf
             Statistics: Num rows: 38 Data size: 4296 Basic stats: COMPLETE Column stats:
NONE
             Filter Operator
-              predicate: ((key * CAST( value AS decimal(10,0))) > CAST( 0 AS decimal(31,10)))
(type: boolean)
+              predicate: ((key * CAST( value AS decimal(10,0))) > 0) (type: boolean)
               Statistics: Num rows: 12 Data size: 1356 Basic stats: COMPLETE Column stats:
NONE
               Select Operator
                 expressions: key (type: decimal(20,10)), value (type: int)
@@ -1100,7 +1100,7 @@ STAGE PLANS:
             alias: decimal_udf
             Statistics: Num rows: 38 Data size: 4296 Basic stats: COMPLETE Column stats:
NONE
             Select Operator
-              expressions: (key / CAST( 0 AS decimal(10,0))) (type: decimal(22,12))
+              expressions: (key / 0) (type: decimal(22,12))
               outputColumnNames: _col0
               Statistics: Num rows: 38 Data size: 4296 Basic stats: COMPLETE Column stats:
NONE
               Limit
@@ -1192,7 +1192,7 @@ STAGE PLANS:
             alias: decimal_udf
             Statistics: Num rows: 38 Data size: 4296 Basic stats: COMPLETE Column stats:
NONE
             Filter Operator
-              predicate: (key <> CAST( 0 AS decimal(20,10))) (type: boolean)
+              predicate: (key <> 0) (type: boolean)
               Statistics: Num rows: 38 Data size: 4296 Basic stats: COMPLETE Column stats:
NONE
               Select Operator
                 expressions: (key / key) (type: decimal(38,24))
@@ -2157,7 +2157,7 @@ STAGE PLANS:
             alias: decimal_udf
             Statistics: Num rows: 38 Data size: 4296 Basic stats: COMPLETE Column stats:
NONE
             Select Operator
-              expressions: ((key + CAST( 1 AS decimal(10,0))) % (key / CAST( 2 AS decimal(10,0))))
(type: decimal(22,12))
+              expressions: ((key + 1) % (key / 2)) (type: decimal(22,12))
               outputColumnNames: _col0
               Statistics: Num rows: 38 Data size: 4296 Basic stats: COMPLETE Column stats:
NONE
               File Output Operator

Modified: hive/trunk/ql/src/test/results/clientpositive/vector_decimal_udf2.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/vector_decimal_udf2.q.out?rev=1669675&r1=1669674&r2=1669675&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/vector_decimal_udf2.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/vector_decimal_udf2.q.out Fri Mar 27 20:31:18
2015
@@ -68,10 +68,10 @@ STAGE PLANS:
             alias: decimal_udf2
             Statistics: Num rows: 38 Data size: 4296 Basic stats: COMPLETE Column stats:
NONE
             Filter Operator
-              predicate: (key = CAST( 10 AS decimal(20,10))) (type: boolean)
+              predicate: (key = 10) (type: boolean)
               Statistics: Num rows: 19 Data size: 2148 Basic stats: COMPLETE Column stats:
NONE
               Select Operator
-                expressions: acos(key) (type: double), asin(key) (type: double), atan(key)
(type: double), cos(key) (type: double), sin(key) (type: double), tan(key) (type: double),
radians(key) (type: double)
+                expressions: NaN (type: double), NaN (type: double), 1.4711276743037347 (type:
double), -0.8390715290764524 (type: double), -0.5440211108893698 (type: double), 0.6483608274590866
(type: double), 0.17453292519943295 (type: double)
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6
                 Statistics: Num rows: 19 Data size: 2148 Basic stats: COMPLETE Column stats:
NONE
                 File Output Operator
@@ -126,10 +126,10 @@ STAGE PLANS:
             alias: decimal_udf2
             Statistics: Num rows: 38 Data size: 4296 Basic stats: COMPLETE Column stats:
NONE
             Filter Operator
-              predicate: (key = CAST( 10 AS decimal(20,10))) (type: boolean)
+              predicate: (key = 10) (type: boolean)
               Statistics: Num rows: 19 Data size: 2148 Basic stats: COMPLETE Column stats:
NONE
               Select Operator
-                expressions: exp(key) (type: double), ln(key) (type: double), log(key) (type:
double), log(key, key) (type: double), log(key, value) (type: double), log(value, key) (type:
double), log10(key) (type: double), sqrt(key) (type: double)
+                expressions: 22026.465794806718 (type: double), 2.302585092994046 (type:
double), 2.302585092994046 (type: double), 1.0 (type: double), log(10, value) (type: double),
log(value, 10) (type: double), 1.0 (type: double), 3.1622776601683795 (type: double)
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7
                 Statistics: Num rows: 19 Data size: 2148 Basic stats: COMPLETE Column stats:
NONE
                 File Output Operator



Mime
View raw message