hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gunt...@apache.org
Subject svn commit: r1636047 [6/12] - in /hive/trunk: common/src/java/org/apache/hadoop/hive/common/type/ itests/src/test/resources/ ql/src/gen/vectorization/ExpressionTemplates/ ql/src/gen/vectorization/UDAFTemplates/ ql/src/java/org/apache/hadoop/hive/ql/exe...
Date Sat, 01 Nov 2014 20:55:03 GMT
Added: hive/trunk/ql/src/test/results/clientpositive/tez/vector_decimal_6.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/tez/vector_decimal_6.q.out?rev=1636047&view=auto
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/tez/vector_decimal_6.q.out (added)
+++ hive/trunk/ql/src/test/results/clientpositive/tez/vector_decimal_6.q.out Sat Nov  1 20:55:00 2014
@@ -0,0 +1,303 @@
+PREHOOK: query: DROP TABLE IF EXISTS DECIMAL_6_1_txt
+PREHOOK: type: DROPTABLE
+POSTHOOK: query: DROP TABLE IF EXISTS DECIMAL_6_1_txt
+POSTHOOK: type: DROPTABLE
+PREHOOK: query: DROP TABLE IF EXISTS DECIMAL_6_1
+PREHOOK: type: DROPTABLE
+POSTHOOK: query: DROP TABLE IF EXISTS DECIMAL_6_1
+POSTHOOK: type: DROPTABLE
+PREHOOK: query: DROP TABLE IF EXISTS DECIMAL_6_2_txt
+PREHOOK: type: DROPTABLE
+POSTHOOK: query: DROP TABLE IF EXISTS DECIMAL_6_2_txt
+POSTHOOK: type: DROPTABLE
+PREHOOK: query: DROP TABLE IF EXISTS DECIMAL_6_2
+PREHOOK: type: DROPTABLE
+POSTHOOK: query: DROP TABLE IF EXISTS DECIMAL_6_2
+POSTHOOK: type: DROPTABLE
+PREHOOK: query: DROP TABLE IF EXISTS DECIMAL_6_3_txt
+PREHOOK: type: DROPTABLE
+POSTHOOK: query: DROP TABLE IF EXISTS DECIMAL_6_3_txt
+POSTHOOK: type: DROPTABLE
+PREHOOK: query: DROP TABLE IF EXISTS DECIMAL_6_3
+PREHOOK: type: DROPTABLE
+POSTHOOK: query: DROP TABLE IF EXISTS DECIMAL_6_3
+POSTHOOK: type: DROPTABLE
+PREHOOK: query: CREATE TABLE DECIMAL_6_1_txt(key decimal(10,5), value int)
+ROW FORMAT DELIMITED
+   FIELDS TERMINATED BY ' '
+STORED AS TEXTFILE
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@DECIMAL_6_1_txt
+POSTHOOK: query: CREATE TABLE DECIMAL_6_1_txt(key decimal(10,5), value int)
+ROW FORMAT DELIMITED
+   FIELDS TERMINATED BY ' '
+STORED AS TEXTFILE
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@DECIMAL_6_1_txt
+PREHOOK: query: CREATE TABLE DECIMAL_6_2_txt(key decimal(17,4), value int)
+ROW FORMAT DELIMITED
+   FIELDS TERMINATED BY ' '
+STORED AS TEXTFILE
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@DECIMAL_6_2_txt
+POSTHOOK: query: CREATE TABLE DECIMAL_6_2_txt(key decimal(17,4), value int)
+ROW FORMAT DELIMITED
+   FIELDS TERMINATED BY ' '
+STORED AS TEXTFILE
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@DECIMAL_6_2_txt
+PREHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/kv9.txt' INTO TABLE DECIMAL_6_1_txt
+PREHOOK: type: LOAD
+#### A masked pattern was here ####
+PREHOOK: Output: default@decimal_6_1_txt
+POSTHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/kv9.txt' INTO TABLE DECIMAL_6_1_txt
+POSTHOOK: type: LOAD
+#### A masked pattern was here ####
+POSTHOOK: Output: default@decimal_6_1_txt
+PREHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/kv9.txt' INTO TABLE DECIMAL_6_2_txt
+PREHOOK: type: LOAD
+#### A masked pattern was here ####
+PREHOOK: Output: default@decimal_6_2_txt
+POSTHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/kv9.txt' INTO TABLE DECIMAL_6_2_txt
+POSTHOOK: type: LOAD
+#### A masked pattern was here ####
+POSTHOOK: Output: default@decimal_6_2_txt
+PREHOOK: query: CREATE TABLE DECIMAL_6_1(key decimal(10,5), value int)
+STORED AS ORC
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@DECIMAL_6_1
+POSTHOOK: query: CREATE TABLE DECIMAL_6_1(key decimal(10,5), value int)
+STORED AS ORC
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@DECIMAL_6_1
+PREHOOK: query: CREATE TABLE DECIMAL_6_2(key decimal(17,4), value int)
+STORED AS ORC
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@DECIMAL_6_2
+POSTHOOK: query: CREATE TABLE DECIMAL_6_2(key decimal(17,4), value int)
+STORED AS ORC
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@DECIMAL_6_2
+PREHOOK: query: INSERT OVERWRITE TABLE DECIMAL_6_1 SELECT * FROM DECIMAL_6_1_txt
+PREHOOK: type: QUERY
+PREHOOK: Input: default@decimal_6_1_txt
+PREHOOK: Output: default@decimal_6_1
+POSTHOOK: query: INSERT OVERWRITE TABLE DECIMAL_6_1 SELECT * FROM DECIMAL_6_1_txt
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@decimal_6_1_txt
+POSTHOOK: Output: default@decimal_6_1
+POSTHOOK: Lineage: decimal_6_1.key SIMPLE [(decimal_6_1_txt)decimal_6_1_txt.FieldSchema(name:key, type:decimal(10,5), comment:null), ]
+POSTHOOK: Lineage: decimal_6_1.value SIMPLE [(decimal_6_1_txt)decimal_6_1_txt.FieldSchema(name:value, type:int, comment:null), ]
+PREHOOK: query: INSERT OVERWRITE TABLE DECIMAL_6_2 SELECT * FROM DECIMAL_6_2_txt
+PREHOOK: type: QUERY
+PREHOOK: Input: default@decimal_6_2_txt
+PREHOOK: Output: default@decimal_6_2
+POSTHOOK: query: INSERT OVERWRITE TABLE DECIMAL_6_2 SELECT * FROM DECIMAL_6_2_txt
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@decimal_6_2_txt
+POSTHOOK: Output: default@decimal_6_2
+POSTHOOK: Lineage: decimal_6_2.key SIMPLE [(decimal_6_2_txt)decimal_6_2_txt.FieldSchema(name:key, type:decimal(17,4), comment:null), ]
+POSTHOOK: Lineage: decimal_6_2.value SIMPLE [(decimal_6_2_txt)decimal_6_2_txt.FieldSchema(name:value, type:int, comment:null), ]
+PREHOOK: query: SELECT * FROM DECIMAL_6_1 ORDER BY key, value
+PREHOOK: type: QUERY
+PREHOOK: Input: default@decimal_6_1
+#### A masked pattern was here ####
+POSTHOOK: query: SELECT * FROM DECIMAL_6_1 ORDER BY key, value
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@decimal_6_1
+#### A masked pattern was here ####
+NULL	-1234567890
+NULL	0
+NULL	3
+NULL	4
+NULL	1234567890
+-4400	4400
+-1255.49	-1255
+-1.122	-11
+-1.12	-1
+-0.333	0
+-0.3	0
+0.00000	0
+0	0
+0.333	0
+1.0	1
+1.00000	1
+1.12	1
+1.122	1
+2	2
+3.14	3
+3.14	3
+3.140	4
+10	10
+10.73433	5
+124.00	124
+125.2	125
+23232.23435	2
+PREHOOK: query: SELECT * FROM DECIMAL_6_2 ORDER BY key, value
+PREHOOK: type: QUERY
+PREHOOK: Input: default@decimal_6_2
+#### A masked pattern was here ####
+POSTHOOK: query: SELECT * FROM DECIMAL_6_2 ORDER BY key, value
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@decimal_6_2
+#### A masked pattern was here ####
+NULL	0
+-1234567890.1235	-1234567890
+-4400	4400
+-1255.49	-1255
+-1.122	-11
+-1.12	-1
+-0.333	0
+-0.3	0
+0.0000	0
+0	0
+0.333	0
+1.0	1
+1.0000	1
+1.12	1
+1.122	1
+2	2
+3.14	3
+3.14	3
+3.140	4
+10	10
+10.7343	5
+124.00	124
+125.2	125
+23232.2344	2
+2389432.2375	3
+2389432.2375	4
+1234567890.1235	1234567890
+PREHOOK: query: SELECT T.key from (
+  SELECT key, value from DECIMAL_6_1
+  UNION ALL
+  SELECT key, value from DECIMAL_6_2
+) T order by T.key
+PREHOOK: type: QUERY
+PREHOOK: Input: default@decimal_6_1
+PREHOOK: Input: default@decimal_6_2
+#### A masked pattern was here ####
+POSTHOOK: query: SELECT T.key from (
+  SELECT key, value from DECIMAL_6_1
+  UNION ALL
+  SELECT key, value from DECIMAL_6_2
+) T order by T.key
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@decimal_6_1
+POSTHOOK: Input: default@decimal_6_2
+#### A masked pattern was here ####
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+-1234567890.1235
+-4400
+-4400
+-1255.49
+-1255.49
+-1.122
+-1.122
+-1.12
+-1.12
+-0.333
+-0.333
+-0.3
+-0.3
+0.00000
+0.0000
+0
+0
+0.333
+0.333
+1.0
+1.0
+1.0000
+1.00000
+1.12
+1.12
+1.122
+1.122
+2
+2
+3.14
+3.14
+3.14
+3.14
+3.140
+3.140
+10
+10
+10.7343
+10.73433
+124.00
+124.00
+125.2
+125.2
+23232.23435
+23232.2344
+2389432.2375
+2389432.2375
+1234567890.1235
+PREHOOK: query: CREATE TABLE DECIMAL_6_3 STORED AS ORC AS SELECT key + 5.5 AS k, value * 11 AS v from DECIMAL_6_1 ORDER BY v
+PREHOOK: type: CREATETABLE_AS_SELECT
+PREHOOK: Input: default@decimal_6_1
+PREHOOK: Output: database:default
+PREHOOK: Output: default@DECIMAL_6_3
+POSTHOOK: query: CREATE TABLE DECIMAL_6_3 STORED AS ORC AS SELECT key + 5.5 AS k, value * 11 AS v from DECIMAL_6_1 ORDER BY v
+POSTHOOK: type: CREATETABLE_AS_SELECT
+POSTHOOK: Input: default@decimal_6_1
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@DECIMAL_6_3
+PREHOOK: query: desc DECIMAL_6_3
+PREHOOK: type: DESCTABLE
+PREHOOK: Input: default@decimal_6_3
+POSTHOOK: query: desc DECIMAL_6_3
+POSTHOOK: type: DESCTABLE
+POSTHOOK: Input: default@decimal_6_3
+k                   	double              	                    
+v                   	int                 	                    
+PREHOOK: query: SELECT * FROM DECIMAL_6_3 ORDER BY k, v
+PREHOOK: type: QUERY
+PREHOOK: Input: default@decimal_6_3
+#### A masked pattern was here ####
+POSTHOOK: query: SELECT * FROM DECIMAL_6_3 ORDER BY k, v
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@decimal_6_3
+#### A masked pattern was here ####
+NULL	-695344902
+NULL	0
+NULL	33
+NULL	44
+NULL	695344902
+-4394.5	48400
+-1249.99	-13805
+4.378	-121
+4.38	-11
+5.167	0
+5.2	0
+5.5	0
+5.5	0
+5.833	0
+6.5	11
+6.5	11
+6.62	11
+6.622	11
+7.5	22
+8.64	33
+8.64	33
+8.64	44
+15.5	110
+16.23433	55
+129.5	1364
+130.7	1375
+23237.73435	22

Modified: hive/trunk/ql/src/test/results/clientpositive/tez/vector_decimal_aggregate.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/tez/vector_decimal_aggregate.q.out?rev=1636047&r1=1636046&r2=1636047&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/tez/vector_decimal_aggregate.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/tez/vector_decimal_aggregate.q.out Sat Nov  1 20:55:00 2014
@@ -113,14 +113,14 @@ POSTHOOK: query: SELECT cint,
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@decimal_vgby
 #### A masked pattern was here ####
-NULL	3072	9318.4351351351	-4298.1513513514	5018444.1081079808	3072	11160.71538461538500	-5147.90769230769300	6010604.30769230735360
--3728	6	5831542.2692483780	-3367.6517567568	5817556.0411483778	6	6984454.21109769200000	-4033.445769230769	6967702.86724384584710
--563	2	-515.6210729730	-3367.6517567568	-3883.2728297298	2	-617.56077692307690	-4033.445769230769	-4651.00654615384590
-762	2	5831542.2692483780	1531.2194054054	5833073.4886537834	2	6984454.21109769200000	1833.9456923076925	6986288.15678999969250
-6981	3	5831542.269248378	-515.6210729730	5830511.0271024320	3	6984454.211097692	-617.56077692307690	6983219.08954384584620
-253665376	1024	9767.0054054054	-9779.5486486487	-347484.0818378374	1024	11697.96923076923100	-11712.99230769231000	-416182.64030769233089
-528534767	1024	5831542.2692483780	-9777.1594594595	11646372.8607481068	1024	6984454.21109769200000	-11710.13076923077100	13948892.79980307629003
-626923679	1024	9723.4027027027	-9778.9513513514	10541.0525297287	1024	11645.74615384615400	-11712.27692307692300	12625.04759999997746
+NULL	3072	9318.4351351351	-4298.1513513514	5018444.1081079808	3072	11160.715384615385	-5147.907692307693	6010604.3076923073536
+-3728	6	5831542.269248378	-3367.6517567568	5817556.0411483778	6	6984454.211097692	-4033.445769230769	6967702.8672438458471
+-563	2	-515.6210729730	-3367.6517567568	-3883.2728297298	2	-617.5607769230769	-4033.445769230769	-4651.0065461538459
+762	2	5831542.269248378	1531.2194054054	5833073.4886537834	2	6984454.211097692	1833.9456923076925	6986288.1567899996925
+6981	3	5831542.269248378	-515.6210729730	5830511.0271024320	3	6984454.211097692	-617.5607769230769	6983219.0895438458462
+253665376	1024	9767.0054054054	-9779.5486486487	-347484.0818378374	1024	11697.969230769231	-11712.99230769231	-416182.64030769233089
+528534767	1024	5831542.269248378	-9777.1594594595	11646372.8607481068	1024	6984454.211097692	-11710.130769230771	13948892.79980307629003
+626923679	1024	9723.4027027027	-9778.9513513514	10541.0525297287	1024	11645.746153846154	-11712.276923076923	12625.04759999997746
 PREHOOK: query: -- Now add the others...
 EXPLAIN SELECT cint,
     COUNT(cdecimal1), MAX(cdecimal1), MIN(cdecimal1), SUM(cdecimal1), AVG(cdecimal1), STDDEV_POP(cdecimal1), STDDEV_SAMP(cdecimal1),
@@ -217,11 +217,11 @@ POSTHOOK: query: SELECT cint,
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@decimal_vgby
 #### A masked pattern was here ####
-NULL	3072	9318.4351351351	-4298.1513513514	5018444.1081079808	1633.60810810806667	5695.483082135364	5696.4103077145055	3072	11160.71538461538500	-5147.90769230769300	6010604.30769230735360	1956.576923076922966667	6821.495748565159	6822.606289190924
--3728	6	5831542.2692483780	-3367.6517567568	5817556.0411483778	969592.67352472963333	2174330.2092403853	2381859.406131774	6	6984454.21109769200000	-4033.445769230769	6967702.86724384584710	1161283.811207307641183333	2604201.2704476737	2852759.5602156054
--563	2	-515.6210729730	-3367.6517567568	-3883.2728297298	-1941.6364148649	1426.0153418918999	2016.6902366556308	2	-617.56077692307690	-4033.445769230769	-4651.00654615384590	-2325.50327307692295	1707.9424961538462	2415.395441814127
-762	2	5831542.2692483780	1531.2194054054	5833073.4886537834	2916536.7443268917	2915005.5249214866	4122440.3477364695	2	6984454.21109769200000	1833.9456923076925	6986288.15678999969250	3493144.07839499984625	3491310.1327026924	4937458.140118758
-6981	3	5831542.269248378	-515.6210729730	5830511.0271024320	1943503.67570081066667	2749258.455012492	3367140.1929065133	3	6984454.211097692	-617.56077692307690	6983219.08954384584620	2327739.696514615282066667	3292794.4113115156	4032833.0678006653
-253665376	1024	9767.0054054054	-9779.5486486487	-347484.0818378374	-339.33992366976309	5708.9563478862	5711.745967572779	1024	11697.96923076923100	-11712.99230769231000	-416182.64030769233089	-406.428359675480791885	6837.632716002934	6840.973851172274
-528534767	1024	5831542.2692483780	-9777.1594594595	11646372.8607481068	11373.41099682432305	257528.92988206653	257654.7686043977	1024	6984454.21109769200000	-11710.13076923077100	13948892.79980307629003	13621.965624807691689482	308443.1074570801	308593.82484083984
-626923679	1024	9723.4027027027	-9778.9513513514	10541.0525297287	10.29399661106318	5742.09145323734	5744.897264034267	1024	11645.74615384615400	-11712.27692307692300	12625.04759999997746	12.329148046874977988	6877.318722794877	6880.679250101603
+NULL	3072	9318.4351351351	-4298.1513513514	5018444.1081079808	1633.60810810806667	5695.483082135364	5696.4103077145055	3072	11160.715384615385	-5147.907692307693	6010604.3076923073536	1956.576923076922966667	6821.495748565159	6822.606289190924
+-3728	6	5831542.269248378	-3367.6517567568	5817556.0411483778	969592.67352472963333	2174330.2092403853	2381859.406131774	6	6984454.211097692	-4033.445769230769	6967702.8672438458471	1161283.811207307641183333	2604201.2704476737	2852759.5602156054
+-563	2	-515.6210729730	-3367.6517567568	-3883.2728297298	-1941.6364148649	1426.0153418918999	2016.6902366556308	2	-617.5607769230769	-4033.445769230769	-4651.0065461538459	-2325.50327307692295	1707.9424961538462	2415.395441814127
+762	2	5831542.269248378	1531.2194054054	5833073.4886537834	2916536.7443268917	2915005.5249214866	4122440.3477364695	2	6984454.211097692	1833.9456923076925	6986288.1567899996925	3493144.07839499984625	3491310.1327026924	4937458.140118758
+6981	3	5831542.269248378	-515.6210729730	5830511.0271024320	1943503.67570081066667	2749258.455012492	3367140.1929065133	3	6984454.211097692	-617.5607769230769	6983219.0895438458462	2327739.696514615282066667	3292794.4113115156	4032833.0678006653
+253665376	1024	9767.0054054054	-9779.5486486487	-347484.0818378374	-339.33992366976309	5708.9563478862	5711.745967572779	1024	11697.969230769231	-11712.99230769231	-416182.64030769233089	-406.428359675480791885	6837.632716002934	6840.973851172274
+528534767	1024	5831542.269248378	-9777.1594594595	11646372.8607481068	11373.41099682432305	257528.92988206653	257654.7686043977	1024	6984454.211097692	-11710.130769230771	13948892.79980307629003	13621.965624807691689482	308443.1074570801	308593.82484083984
+626923679	1024	9723.4027027027	-9778.9513513514	10541.0525297287	10.29399661106318	5742.09145323734	5744.897264034267	1024	11645.746153846154	-11712.276923076923	12625.04759999997746	12.329148046874977988	6877.318722794877	6880.679250101603

Added: hive/trunk/ql/src/test/results/clientpositive/tez/vector_decimal_cast.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/tez/vector_decimal_cast.q.out?rev=1636047&view=auto
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/tez/vector_decimal_cast.q.out (added)
+++ hive/trunk/ql/src/test/results/clientpositive/tez/vector_decimal_cast.q.out Sat Nov  1 20:55:00 2014
@@ -0,0 +1,41 @@
+PREHOOK: query: EXPLAIN SELECT cdouble, cint, cboolean1, ctimestamp1, CAST(cdouble AS DECIMAL(20,10)), CAST(cint AS DECIMAL(23,14)), CAST(cboolean1 AS DECIMAL(5,2)), CAST(ctimestamp1 AS DECIMAL(15,0)) FROM alltypesorc WHERE cdouble IS NOT NULL AND cint IS NOT NULL AND cboolean1 IS NOT NULL AND ctimestamp1 IS NOT NULL LIMIT 10
+PREHOOK: type: QUERY
+POSTHOOK: query: EXPLAIN SELECT cdouble, cint, cboolean1, ctimestamp1, CAST(cdouble AS DECIMAL(20,10)), CAST(cint AS DECIMAL(23,14)), CAST(cboolean1 AS DECIMAL(5,2)), CAST(ctimestamp1 AS DECIMAL(15,0)) FROM alltypesorc WHERE cdouble IS NOT NULL AND cint IS NOT NULL AND cboolean1 IS NOT NULL AND ctimestamp1 IS NOT NULL LIMIT 10
+POSTHOOK: type: QUERY
+STAGE DEPENDENCIES:
+  Stage-0 is a root stage
+
+STAGE PLANS:
+  Stage: Stage-0
+    Fetch Operator
+      limit: 10
+      Processor Tree:
+        TableScan
+          alias: alltypesorc
+          Filter Operator
+            predicate: (((cdouble is not null and cint is not null) and cboolean1 is not null) and ctimestamp1 is not null) (type: boolean)
+            Select Operator
+              expressions: cdouble (type: double), cint (type: int), cboolean1 (type: boolean), ctimestamp1 (type: timestamp), CAST( cdouble AS decimal(20,10)) (type: decimal(20,10)), CAST( cint AS decimal(23,14)) (type: decimal(23,14)), CAST( cboolean1 AS decimal(5,2)) (type: decimal(5,2)), CAST( ctimestamp1 AS decimal(15,0)) (type: decimal(15,0))
+              outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7
+              Limit
+                Number of rows: 10
+                ListSink
+
+PREHOOK: query: SELECT cdouble, cint, cboolean1, ctimestamp1, CAST(cdouble AS DECIMAL(20,10)), CAST(cint AS DECIMAL(23,14)), CAST(cboolean1 AS DECIMAL(5,2)), CAST(ctimestamp1 AS DECIMAL(15,0)) FROM alltypesorc WHERE cdouble IS NOT NULL AND cint IS NOT NULL AND cboolean1 IS NOT NULL AND ctimestamp1 IS NOT NULL LIMIT 10
+PREHOOK: type: QUERY
+PREHOOK: Input: default@alltypesorc
+#### A masked pattern was here ####
+POSTHOOK: query: SELECT cdouble, cint, cboolean1, ctimestamp1, CAST(cdouble AS DECIMAL(20,10)), CAST(cint AS DECIMAL(23,14)), CAST(cboolean1 AS DECIMAL(5,2)), CAST(ctimestamp1 AS DECIMAL(15,0)) FROM alltypesorc WHERE cdouble IS NOT NULL AND cint IS NOT NULL AND cboolean1 IS NOT NULL AND ctimestamp1 IS NOT NULL LIMIT 10
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@alltypesorc
+#### A masked pattern was here ####
+-13326.0	528534767	true	1969-12-31 15:59:46.674	-13326.0	528534767	1	-13
+-15813.0	528534767	true	1969-12-31 15:59:55.787	-15813.0	528534767	1	-4
+-9566.0	528534767	true	1969-12-31 15:59:44.187	-9566.0	528534767	1	-16
+15007.0	528534767	true	1969-12-31 15:59:50.434	15007.0	528534767	1	-10
+7021.0	528534767	true	1969-12-31 16:00:15.007	7021.0	528534767	1	15
+4963.0	528534767	true	1969-12-31 16:00:07.021	4963.0	528534767	1	7
+-7824.0	528534767	true	1969-12-31 16:00:04.963	-7824.0	528534767	1	5
+-15431.0	528534767	true	1969-12-31 15:59:52.176	-15431.0	528534767	1	-8
+-15549.0	528534767	true	1969-12-31 15:59:44.569	-15549.0	528534767	1	-15
+5780.0	528534767	true	1969-12-31 15:59:44.451	5780.0	528534767	1	-16

Added: 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=1636047&view=auto
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/tez/vector_decimal_expressions.q.out (added)
+++ hive/trunk/ql/src/test/results/clientpositive/tez/vector_decimal_expressions.q.out Sat Nov  1 20:55:00 2014
@@ -0,0 +1,51 @@
+PREHOOK: query: CREATE TABLE decimal_test STORED AS ORC AS SELECT cdouble, CAST (((cdouble*22.1)/37) AS DECIMAL(20,10)) AS cdecimal1, CAST (((cdouble*9.3)/13) AS DECIMAL(23,14)) AS cdecimal2 FROM alltypesorc
+PREHOOK: type: CREATETABLE_AS_SELECT
+PREHOOK: Input: default@alltypesorc
+PREHOOK: Output: database:default
+PREHOOK: Output: default@decimal_test
+POSTHOOK: query: CREATE TABLE decimal_test STORED AS ORC AS SELECT cdouble, CAST (((cdouble*22.1)/37) AS DECIMAL(20,10)) AS cdecimal1, CAST (((cdouble*9.3)/13) AS DECIMAL(23,14)) AS cdecimal2 FROM alltypesorc
+POSTHOOK: type: CREATETABLE_AS_SELECT
+POSTHOOK: Input: default@alltypesorc
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@decimal_test
+PREHOOK: query: EXPLAIN SELECT cdecimal1 + cdecimal2, cdecimal1 - (2*cdecimal2), ((cdecimal1+2.34)/cdecimal2), (cdecimal1 * (cdecimal2/3.4)), cdecimal1 % 10, CAST(cdecimal1 AS INT), CAST(cdecimal2 AS SMALLINT), CAST(cdecimal2 AS TINYINT), CAST(cdecimal1 AS BIGINT), CAST (cdecimal1 AS BOOLEAN), CAST(cdecimal2 AS DOUBLE), CAST(cdecimal1 AS FLOAT), CAST(cdecimal2 AS STRING), CAST(cdecimal1 AS TIMESTAMP) FROM decimal_test WHERE cdecimal1 > 0 AND cdecimal1 < 12345.5678 AND cdecimal2 != 0 AND cdecimal2 > 1000 AND cdouble IS NOT NULL LIMIT 10
+PREHOOK: type: QUERY
+POSTHOOK: query: EXPLAIN SELECT cdecimal1 + cdecimal2, cdecimal1 - (2*cdecimal2), ((cdecimal1+2.34)/cdecimal2), (cdecimal1 * (cdecimal2/3.4)), cdecimal1 % 10, CAST(cdecimal1 AS INT), CAST(cdecimal2 AS SMALLINT), CAST(cdecimal2 AS TINYINT), CAST(cdecimal1 AS BIGINT), CAST (cdecimal1 AS BOOLEAN), CAST(cdecimal2 AS DOUBLE), CAST(cdecimal1 AS FLOAT), CAST(cdecimal2 AS STRING), CAST(cdecimal1 AS TIMESTAMP) FROM decimal_test WHERE cdecimal1 > 0 AND cdecimal1 < 12345.5678 AND cdecimal2 != 0 AND cdecimal2 > 1000 AND cdouble IS NOT NULL LIMIT 10
+POSTHOOK: type: QUERY
+STAGE DEPENDENCIES:
+  Stage-0 is a root stage
+
+STAGE PLANS:
+  Stage: Stage-0
+    Fetch Operator
+      limit: 10
+      Processor Tree:
+        TableScan
+          alias: decimal_test
+          Filter Operator
+            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 - (2 * cdecimal2)) (type: decimal(26,14)), ((cdecimal1 + 2.34) / cdecimal2) (type: double), (cdecimal1 * (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
+                ListSink
+
+PREHOOK: query: SELECT cdecimal1 + cdecimal2, cdecimal1 - (2*cdecimal2), ((cdecimal1+2.34)/cdecimal2), (cdecimal1 * (cdecimal2/3.4)), cdecimal1 % 10, CAST(cdecimal1 AS INT), CAST(cdecimal2 AS SMALLINT), CAST(cdecimal2 AS TINYINT), CAST(cdecimal1 AS BIGINT), CAST (cdecimal1 AS BOOLEAN), CAST(cdecimal2 AS DOUBLE), CAST(cdecimal1 AS FLOAT), CAST(cdecimal2 AS STRING), CAST(cdecimal1 AS TIMESTAMP) FROM decimal_test WHERE cdecimal1 > 0 AND cdecimal1 < 12345.5678 AND cdecimal2 != 0 AND cdecimal2 > 1000 AND cdouble IS NOT NULL LIMIT 10
+PREHOOK: type: QUERY
+PREHOOK: Input: default@decimal_test
+#### A masked pattern was here ####
+POSTHOOK: query: SELECT cdecimal1 + cdecimal2, cdecimal1 - (2*cdecimal2), ((cdecimal1+2.34)/cdecimal2), (cdecimal1 * (cdecimal2/3.4)), cdecimal1 % 10, CAST(cdecimal1 AS INT), CAST(cdecimal2 AS SMALLINT), CAST(cdecimal2 AS TINYINT), CAST(cdecimal1 AS BIGINT), CAST (cdecimal1 AS BOOLEAN), CAST(cdecimal2 AS DOUBLE), CAST(cdecimal1 AS FLOAT), CAST(cdecimal2 AS STRING), CAST(cdecimal1 AS TIMESTAMP) FROM decimal_test WHERE cdecimal1 > 0 AND cdecimal1 < 12345.5678 AND cdecimal2 != 0 AND cdecimal2 > 1000 AND cdouble IS NOT NULL LIMIT 10
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@decimal_test
+#### A masked pattern was here ####
+19699.417463617423	-12507.913305613346	0.8351496686995997	2.8303425077026896E7	3.6405405405	8963	10735	-17	8963	true	10735.776923076923	8963.641	10735.776923076923	1969-12-31 18:29:23.64054054
+9216.339708939685	-5851.806444906470	0.8353975893550668	6195112.1797296945	3.6243243243	4193	5022	-98	4193	true	5022.715384615385	4193.6245	5022.715384615385	1969-12-31 17:09:53.624324324
+6514.8403326403464	-4136.5212058211928	0.8355907765708067	3095563.9418919063	4.3864864865	2964	3550	-34	2964	true	3550.4538461538464	2964.3865	3550.4538461538464	1969-12-31 16:49:24.386486486
+7587.301455301477	-4817.467775467754	0.8354976172734904	4198623.24324327	2.3783783784	3452	4134	38	3452	true	4134.923076923077	3452.3784	4134.923076923077	1969-12-31 16:57:32.378378378
+19197.9729729730	-12189.5270270270	0.835155361813429	2.6880848817567654E7	5.4729729730	8735	10462	-34	8735	true	10462.5	8735.473	10462.5	1969-12-31 18:25:35.472972973
+17098.9945945946	-10856.8054054054	0.8351828165813104	2.132423090270272E7	0.3945945946	7780	9318	102	7780	true	9318.6	7780.3945	9318.6	1969-12-31 18:09:40.394594594
+12433.723076923077	-7894.646153846154	0.8352770361086894	1.12754688E7	7.6	5657	6776	120	5657	true	6776.123076923077	5657.6	6776.123076923077	1969-12-31 17:34:17.6
+7247.316839916862	-4601.598544698524	0.8355241651897876	3830775.6932432684	7.6783783784	3297	3949	109	3297	true	3949.638461538462	3297.6785	3949.638461538462	1969-12-31 16:54:57.678378378
+14757.1700623700465	-9369.8914760914930	0.8352226654922171	1.5883214124324286E7	4.8162162162	6714	8042	106	6714	true	8042.3538461538465	6714.8164	8042.3538461538465	1969-12-31 17:51:54.816216216
+10964.832016631993	-6961.991060291086	0.8353232978714221	8768719.779729689	9.2243243243	4989	5975	87	4989	true	5975.607692307693	4989.224	5975.607692307693	1969-12-31 17:23:09.224324324

Added: hive/trunk/ql/src/test/results/clientpositive/tez/vector_decimal_mapjoin.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/tez/vector_decimal_mapjoin.q.out?rev=1636047&view=auto
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/tez/vector_decimal_mapjoin.q.out (added)
+++ hive/trunk/ql/src/test/results/clientpositive/tez/vector_decimal_mapjoin.q.out Sat Nov  1 20:55:00 2014
@@ -0,0 +1,211 @@
+PREHOOK: query: -- SORT_QUERY_RESULTS
+
+CREATE TABLE decimal_mapjoin STORED AS ORC AS 
+  SELECT cdouble, CAST (((cdouble*22.1)/37) AS DECIMAL(20,10)) AS cdecimal1, 
+  CAST (((cdouble*9.3)/13) AS DECIMAL(23,14)) AS cdecimal2,
+  cint
+  FROM alltypesorc
+PREHOOK: type: CREATETABLE_AS_SELECT
+PREHOOK: Input: default@alltypesorc
+PREHOOK: Output: database:default
+PREHOOK: Output: default@decimal_mapjoin
+POSTHOOK: query: -- SORT_QUERY_RESULTS
+
+CREATE TABLE decimal_mapjoin STORED AS ORC AS 
+  SELECT cdouble, CAST (((cdouble*22.1)/37) AS DECIMAL(20,10)) AS cdecimal1, 
+  CAST (((cdouble*9.3)/13) AS DECIMAL(23,14)) AS cdecimal2,
+  cint
+  FROM alltypesorc
+POSTHOOK: type: CREATETABLE_AS_SELECT
+POSTHOOK: Input: default@alltypesorc
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@decimal_mapjoin
+PREHOOK: query: EXPLAIN SELECT l.cint, r.cint, l.cdecimal1, r.cdecimal2
+  FROM decimal_mapjoin l
+  JOIN decimal_mapjoin r ON l.cint = r.cint
+  WHERE l.cint = 6981
+PREHOOK: type: QUERY
+POSTHOOK: query: EXPLAIN SELECT l.cint, r.cint, l.cdecimal1, r.cdecimal2
+  FROM decimal_mapjoin l
+  JOIN decimal_mapjoin r ON l.cint = r.cint
+  WHERE l.cint = 6981
+POSTHOOK: type: QUERY
+STAGE DEPENDENCIES:
+  Stage-1 is a root stage
+  Stage-0 depends on stages: Stage-1
+
+STAGE PLANS:
+  Stage: Stage-1
+    Tez
+      Edges:
+        Map 2 <- Map 1 (BROADCAST_EDGE)
+#### A masked pattern was here ####
+      Vertices:
+        Map 1 
+            Map Operator Tree:
+                TableScan
+                  alias: r
+                  Statistics: Num rows: 12288 Data size: 2165060 Basic stats: COMPLETE Column stats: NONE
+                  Filter Operator
+                    predicate: (cint = 6981) (type: boolean)
+                    Statistics: Num rows: 6144 Data size: 1082530 Basic stats: COMPLETE Column stats: NONE
+                    Reduce Output Operator
+                      key expressions: 6981 (type: int)
+                      sort order: +
+                      Statistics: Num rows: 6144 Data size: 1082530 Basic stats: COMPLETE Column stats: NONE
+                      value expressions: cdecimal2 (type: decimal(23,14))
+            Execution mode: vectorized
+        Map 2 
+            Map Operator Tree:
+                TableScan
+                  alias: l
+                  Statistics: Num rows: 12288 Data size: 2165060 Basic stats: COMPLETE Column stats: NONE
+                  Filter Operator
+                    predicate: (cint = 6981) (type: boolean)
+                    Statistics: Num rows: 6144 Data size: 1082530 Basic stats: COMPLETE Column stats: NONE
+                    Map Join Operator
+                      condition map:
+                           Inner Join 0 to 1
+                      condition expressions:
+                        0 {cdecimal1}
+                        1 {cdecimal2}
+                      keys:
+                        0 6981 (type: int)
+                        1 6981 (type: int)
+                      outputColumnNames: _col1, _col9
+                      input vertices:
+                        1 Map 1
+                      Statistics: Num rows: 6758 Data size: 1190783 Basic stats: COMPLETE Column stats: NONE
+                      Select Operator
+                        expressions: 6981 (type: int), 6981 (type: int), _col1 (type: decimal(20,10)), _col9 (type: decimal(23,14))
+                        outputColumnNames: _col0, _col1, _col2, _col3
+                        Statistics: Num rows: 6758 Data size: 1190783 Basic stats: COMPLETE Column stats: NONE
+                        File Output Operator
+                          compressed: false
+                          Statistics: Num rows: 6758 Data size: 1190783 Basic stats: COMPLETE Column stats: NONE
+                          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
+            Execution mode: vectorized
+
+  Stage: Stage-0
+    Fetch Operator
+      limit: -1
+      Processor Tree:
+        ListSink
+
+PREHOOK: query: SELECT l.cint, r.cint, l.cdecimal1, r.cdecimal2
+  FROM decimal_mapjoin l
+  JOIN decimal_mapjoin r ON l.cint = r.cint
+  WHERE l.cint = 6981
+PREHOOK: type: QUERY
+PREHOOK: Input: default@decimal_mapjoin
+#### A masked pattern was here ####
+POSTHOOK: query: SELECT l.cint, r.cint, l.cdecimal1, r.cdecimal2
+  FROM decimal_mapjoin l
+  JOIN decimal_mapjoin r ON l.cint = r.cint
+  WHERE l.cint = 6981
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@decimal_mapjoin
+#### A masked pattern was here ####
+6981	6981	-515.6210729730	-617.5607769230769
+6981	6981	-515.6210729730	-617.5607769230769
+6981	6981	-515.6210729730	-617.5607769230769
+6981	6981	-515.6210729730	-617.5607769230769
+6981	6981	-515.6210729730	6984454.211097692
+6981	6981	-515.6210729730	6984454.211097692
+6981	6981	-515.6210729730	NULL
+6981	6981	-515.6210729730	NULL
+6981	6981	-515.6210729730	NULL
+6981	6981	-515.6210729730	NULL
+6981	6981	-515.6210729730	NULL
+6981	6981	-515.6210729730	NULL
+6981	6981	-515.6210729730	NULL
+6981	6981	-515.6210729730	NULL
+6981	6981	-515.6210729730	NULL
+6981	6981	-515.6210729730	NULL
+6981	6981	-515.6210729730	NULL
+6981	6981	-515.6210729730	NULL
+6981	6981	-515.6210729730	NULL
+6981	6981	-515.6210729730	NULL
+6981	6981	5831542.269248378	-617.5607769230769
+6981	6981	5831542.269248378	-617.5607769230769
+6981	6981	5831542.269248378	6984454.211097692
+6981	6981	5831542.269248378	NULL
+6981	6981	5831542.269248378	NULL
+6981	6981	5831542.269248378	NULL
+6981	6981	5831542.269248378	NULL
+6981	6981	5831542.269248378	NULL
+6981	6981	5831542.269248378	NULL
+6981	6981	5831542.269248378	NULL
+6981	6981	NULL	-617.5607769230769
+6981	6981	NULL	-617.5607769230769
+6981	6981	NULL	-617.5607769230769
+6981	6981	NULL	-617.5607769230769
+6981	6981	NULL	-617.5607769230769
+6981	6981	NULL	-617.5607769230769
+6981	6981	NULL	-617.5607769230769
+6981	6981	NULL	-617.5607769230769
+6981	6981	NULL	-617.5607769230769
+6981	6981	NULL	-617.5607769230769
+6981	6981	NULL	-617.5607769230769
+6981	6981	NULL	-617.5607769230769
+6981	6981	NULL	-617.5607769230769
+6981	6981	NULL	-617.5607769230769
+6981	6981	NULL	6984454.211097692
+6981	6981	NULL	6984454.211097692
+6981	6981	NULL	6984454.211097692
+6981	6981	NULL	6984454.211097692
+6981	6981	NULL	6984454.211097692
+6981	6981	NULL	6984454.211097692
+6981	6981	NULL	6984454.211097692
+6981	6981	NULL	NULL
+6981	6981	NULL	NULL
+6981	6981	NULL	NULL
+6981	6981	NULL	NULL
+6981	6981	NULL	NULL
+6981	6981	NULL	NULL
+6981	6981	NULL	NULL
+6981	6981	NULL	NULL
+6981	6981	NULL	NULL
+6981	6981	NULL	NULL
+6981	6981	NULL	NULL
+6981	6981	NULL	NULL
+6981	6981	NULL	NULL
+6981	6981	NULL	NULL
+6981	6981	NULL	NULL
+6981	6981	NULL	NULL
+6981	6981	NULL	NULL
+6981	6981	NULL	NULL
+6981	6981	NULL	NULL
+6981	6981	NULL	NULL
+6981	6981	NULL	NULL
+6981	6981	NULL	NULL
+6981	6981	NULL	NULL
+6981	6981	NULL	NULL
+6981	6981	NULL	NULL
+6981	6981	NULL	NULL
+6981	6981	NULL	NULL
+6981	6981	NULL	NULL
+6981	6981	NULL	NULL
+6981	6981	NULL	NULL
+6981	6981	NULL	NULL
+6981	6981	NULL	NULL
+6981	6981	NULL	NULL
+6981	6981	NULL	NULL
+6981	6981	NULL	NULL
+6981	6981	NULL	NULL
+6981	6981	NULL	NULL
+6981	6981	NULL	NULL
+6981	6981	NULL	NULL
+6981	6981	NULL	NULL
+6981	6981	NULL	NULL
+6981	6981	NULL	NULL
+6981	6981	NULL	NULL
+6981	6981	NULL	NULL
+6981	6981	NULL	NULL
+6981	6981	NULL	NULL
+6981	6981	NULL	NULL
+6981	6981	NULL	NULL
+6981	6981	NULL	NULL

Added: hive/trunk/ql/src/test/results/clientpositive/tez/vector_decimal_math_funcs.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/tez/vector_decimal_math_funcs.q.out?rev=1636047&view=auto
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/tez/vector_decimal_math_funcs.q.out (added)
+++ hive/trunk/ql/src/test/results/clientpositive/tez/vector_decimal_math_funcs.q.out Sat Nov  1 20:55:00 2014
@@ -0,0 +1,192 @@
+PREHOOK: query: CREATE TABLE decimal_test STORED AS ORC AS SELECT cbigint, cdouble, CAST (((cdouble*22.1)/37) AS DECIMAL(20,10)) AS cdecimal1, CAST (((cdouble*9.3)/13) AS DECIMAL(23,14)) AS cdecimal2 FROM alltypesorc
+PREHOOK: type: CREATETABLE_AS_SELECT
+PREHOOK: Input: default@alltypesorc
+PREHOOK: Output: database:default
+PREHOOK: Output: default@decimal_test
+POSTHOOK: query: CREATE TABLE decimal_test STORED AS ORC AS SELECT cbigint, cdouble, CAST (((cdouble*22.1)/37) AS DECIMAL(20,10)) AS cdecimal1, CAST (((cdouble*9.3)/13) AS DECIMAL(23,14)) AS cdecimal2 FROM alltypesorc
+POSTHOOK: type: CREATETABLE_AS_SELECT
+POSTHOOK: Input: default@alltypesorc
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@decimal_test
+PREHOOK: query: -- Test math functions in vectorized mode to verify they run correctly end-to-end.
+
+explain 
+select
+   cdecimal1
+  ,Round(cdecimal1, 2)
+  ,Round(cdecimal1)
+  ,Floor(cdecimal1)
+  ,Ceil(cdecimal1)
+  ,round(Exp(cdecimal1), 58)
+  ,Ln(cdecimal1)  
+  ,Log10(cdecimal1)
+  -- Use log2 as a representative function to test all input types.
+  ,Log2(cdecimal1)
+  -- Use 15601.0 to test zero handling, as there are no zeroes in the table
+  ,Log2(cdecimal1 - 15601.0)
+  ,Log(2.0, cdecimal1)
+  ,Pow(log2(cdecimal1), 2.0)  
+  ,Power(log2(cdecimal1), 2.0)
+  ,Sqrt(cdecimal1)
+  ,Abs(cdecimal1)
+  ,Sin(cdecimal1)
+  ,Asin(cdecimal1)
+  ,Cos(cdecimal1)
+  ,ACos(cdecimal1)
+  ,Atan(cdecimal1)
+  ,Degrees(cdecimal1)
+  ,Radians(cdecimal1)
+  ,Positive(cdecimal1)
+  ,Negative(cdecimal1)
+  ,Sign(cdecimal1)
+  -- Test nesting
+  ,cos(-sin(log(cdecimal1)) + 3.14159)
+from decimal_test
+-- limit output to a reasonably small number of rows
+where cbigint % 500 = 0
+-- test use of a math function in the WHERE clause
+and sin(cdecimal1) >= -1.0
+PREHOOK: type: QUERY
+POSTHOOK: query: -- Test math functions in vectorized mode to verify they run correctly end-to-end.
+
+explain 
+select
+   cdecimal1
+  ,Round(cdecimal1, 2)
+  ,Round(cdecimal1)
+  ,Floor(cdecimal1)
+  ,Ceil(cdecimal1)
+  ,round(Exp(cdecimal1), 58)
+  ,Ln(cdecimal1)  
+  ,Log10(cdecimal1)
+  -- Use log2 as a representative function to test all input types.
+  ,Log2(cdecimal1)
+  -- Use 15601.0 to test zero handling, as there are no zeroes in the table
+  ,Log2(cdecimal1 - 15601.0)
+  ,Log(2.0, cdecimal1)
+  ,Pow(log2(cdecimal1), 2.0)  
+  ,Power(log2(cdecimal1), 2.0)
+  ,Sqrt(cdecimal1)
+  ,Abs(cdecimal1)
+  ,Sin(cdecimal1)
+  ,Asin(cdecimal1)
+  ,Cos(cdecimal1)
+  ,ACos(cdecimal1)
+  ,Atan(cdecimal1)
+  ,Degrees(cdecimal1)
+  ,Radians(cdecimal1)
+  ,Positive(cdecimal1)
+  ,Negative(cdecimal1)
+  ,Sign(cdecimal1)
+  -- Test nesting
+  ,cos(-sin(log(cdecimal1)) + 3.14159)
+from decimal_test
+-- limit output to a reasonably small number of rows
+where cbigint % 500 = 0
+-- test use of a math function in the WHERE clause
+and sin(cdecimal1) >= -1.0
+POSTHOOK: type: QUERY
+STAGE DEPENDENCIES:
+  Stage-0 is a root stage
+
+STAGE PLANS:
+  Stage: Stage-0
+    Fetch Operator
+      limit: -1
+      Processor Tree:
+        TableScan
+          alias: decimal_test
+          Filter Operator
+            predicate: (((cbigint % 500) = 0) and (sin(cdecimal1) >= -1.0)) (type: boolean)
+            Select Operator
+              expressions: cdecimal1 (type: decimal(20,10)), round(cdecimal1, 2) (type: decimal(13,2)), round(cdecimal1) (type: decimal(11,0)), floor(cdecimal1) (type: decimal(11,0)), ceil(cdecimal1) (type: decimal(11,0)), round(exp(cdecimal1), 58) (type: double), ln(cdecimal1) (type: double), log10(cdecimal1) (type: double), log2(cdecimal1) (type: double), log2((cdecimal1 - 15601.0)) (type: double), log(2.0, cdecimal1) (type: double), power(log2(cdecimal1), 2.0) (type: double), power(log2(cdecimal1), 2.0) (type: double), sqrt(cdecimal1) (type: double), abs(cdecimal1) (type: decimal(38,18)), sin(cdecimal1) (type: double), asin(cdecimal1) (type: double), cos(cdecimal1) (type: double), acos(cdecimal1) (type: double), atan(cdecimal1) (type: double), degrees(cdecimal1) (type: double), radians(cdecimal1) (type: double), cdecimal1 (type: decimal(20,10)), (- cdecimal1) (type: decimal(20,10)), sign(cdecimal1) (type: int), cos(((- sin(log(cdecimal1))) + 3.14159)) (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
+              ListSink
+
+PREHOOK: query: select
+   cdecimal1
+  ,Round(cdecimal1, 2)
+  ,Round(cdecimal1)
+  ,Floor(cdecimal1)
+  ,Ceil(cdecimal1)
+  ,round(Exp(cdecimal1), 58)
+  ,Ln(cdecimal1)  
+  ,Log10(cdecimal1)
+  -- Use log2 as a representative function to test all input types.
+  ,Log2(cdecimal1)
+  -- Use 15601.0 to test zero handling, as there are no zeroes in the table
+  ,Log2(cdecimal1 - 15601.0)
+  ,Log(2.0, cdecimal1)
+  ,Pow(log2(cdecimal1), 2.0)  
+  ,Power(log2(cdecimal1), 2.0)
+  ,Sqrt(cdecimal1)
+  ,Abs(cdecimal1)
+  ,Sin(cdecimal1)
+  ,Asin(cdecimal1)
+  ,Cos(cdecimal1)
+  ,ACos(cdecimal1)
+  ,Atan(cdecimal1)
+  ,Degrees(cdecimal1)
+  ,Radians(cdecimal1)
+  ,Positive(cdecimal1)
+  ,Negative(cdecimal1)
+  ,Sign(cdecimal1)
+  -- Test nesting
+  ,cos(-sin(log(cdecimal1)) + 3.14159)
+from decimal_test
+-- limit output to a reasonably small number of rows
+where cbigint % 500 = 0
+-- test use of a math function in the WHERE clause
+and sin(cdecimal1) >= -1.0
+PREHOOK: type: QUERY
+PREHOOK: Input: default@decimal_test
+#### A masked pattern was here ####
+POSTHOOK: query: select
+   cdecimal1
+  ,Round(cdecimal1, 2)
+  ,Round(cdecimal1)
+  ,Floor(cdecimal1)
+  ,Ceil(cdecimal1)
+  ,round(Exp(cdecimal1), 58)
+  ,Ln(cdecimal1)  
+  ,Log10(cdecimal1)
+  -- Use log2 as a representative function to test all input types.
+  ,Log2(cdecimal1)
+  -- Use 15601.0 to test zero handling, as there are no zeroes in the table
+  ,Log2(cdecimal1 - 15601.0)
+  ,Log(2.0, cdecimal1)
+  ,Pow(log2(cdecimal1), 2.0)  
+  ,Power(log2(cdecimal1), 2.0)
+  ,Sqrt(cdecimal1)
+  ,Abs(cdecimal1)
+  ,Sin(cdecimal1)
+  ,Asin(cdecimal1)
+  ,Cos(cdecimal1)
+  ,ACos(cdecimal1)
+  ,Atan(cdecimal1)
+  ,Degrees(cdecimal1)
+  ,Radians(cdecimal1)
+  ,Positive(cdecimal1)
+  ,Negative(cdecimal1)
+  ,Sign(cdecimal1)
+  -- Test nesting
+  ,cos(-sin(log(cdecimal1)) + 3.14159)
+from decimal_test
+-- limit output to a reasonably small number of rows
+where cbigint % 500 = 0
+-- test use of a math function in the WHERE clause
+and sin(cdecimal1) >= -1.0
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@decimal_test
+#### A masked pattern was here ####
+-119.4594594595	-119.46	-119	-120	-119	1.316485E-52	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	119.4594594595	-0.07885666683797002	NaN	0.9968859644388647	NaN	-1.5624254815943668	-6844.522849943508	-2.0849608902209606	-119.4594594595	119.4594594595	-1	NULL
+9318.4351351351	9318.44	9318	9318	9319	Infinity	9.13974998962673	3.969342986470191	13.185871984999437	NULL	13.185871984999437	173.867220004793	173.867220004793	96.53204201266593	9318.4351351351	0.4540668481851705	NaN	0.8909676185918236	NaN	1.5706890126394983	533907.0049096602	162.63737424163023	9318.4351351351	-9318.4351351351	1	-0.9607267417229353
+9318.4351351351	9318.44	9318	9318	9319	Infinity	9.13974998962673	3.969342986470191	13.185871984999437	NULL	13.185871984999437	173.867220004793	173.867220004793	96.53204201266593	9318.4351351351	0.4540668481851705	NaN	0.8909676185918236	NaN	1.5706890126394983	533907.0049096602	162.63737424163023	9318.4351351351	-9318.4351351351	1	-0.9607267417229353
+9318.4351351351	9318.44	9318	9318	9319	Infinity	9.13974998962673	3.969342986470191	13.185871984999437	NULL	13.185871984999437	173.867220004793	173.867220004793	96.53204201266593	9318.4351351351	0.4540668481851705	NaN	0.8909676185918236	NaN	1.5706890126394983	533907.0049096602	162.63737424163023	9318.4351351351	-9318.4351351351	1	-0.9607267417229353
+-4298.1513513514	-4298.15	-4298	-4299	-4298	0.0	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	4298.1513513514	-0.43730633941118113	NaN	0.899312607223313	NaN	-1.5705636686355597	-246265.93214088667	-75.01689283012556	-4298.1513513514	4298.1513513514	-1	NULL
+-4298.1513513514	-4298.15	-4298	-4299	-4298	0.0	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	4298.1513513514	-0.43730633941118113	NaN	0.899312607223313	NaN	-1.5705636686355597	-246265.93214088667	-75.01689283012556	-4298.1513513514	4298.1513513514	-1	NULL
+-4298.1513513514	-4298.15	-4298	-4299	-4298	0.0	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	4298.1513513514	-0.43730633941118113	NaN	0.899312607223313	NaN	-1.5705636686355597	-246265.93214088667	-75.01689283012556	-4298.1513513514	4298.1513513514	-1	NULL
+-4298.1513513514	-4298.15	-4298	-4299	-4298	0.0	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	4298.1513513514	-0.43730633941118113	NaN	0.899312607223313	NaN	-1.5705636686355597	-246265.93214088667	-75.01689283012556	-4298.1513513514	4298.1513513514	-1	NULL
+-4298.1513513514	-4298.15	-4298	-4299	-4298	0.0	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	4298.1513513514	-0.43730633941118113	NaN	0.899312607223313	NaN	-1.5705636686355597	-246265.93214088667	-75.01689283012556	-4298.1513513514	4298.1513513514	-1	NULL
+-4298.1513513514	-4298.15	-4298	-4299	-4298	0.0	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	4298.1513513514	-0.43730633941118113	NaN	0.899312607223313	NaN	-1.5705636686355597	-246265.93214088667	-75.01689283012556	-4298.1513513514	4298.1513513514	-1	NULL
+-4298.1513513514	-4298.15	-4298	-4299	-4298	0.0	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	4298.1513513514	-0.43730633941118113	NaN	0.899312607223313	NaN	-1.5705636686355597	-246265.93214088667	-75.01689283012556	-4298.1513513514	4298.1513513514	-1	NULL

Added: hive/trunk/ql/src/test/results/clientpositive/tez/vector_decimal_precision.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/tez/vector_decimal_precision.q.out?rev=1636047&view=auto
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/tez/vector_decimal_precision.q.out (added)
+++ hive/trunk/ql/src/test/results/clientpositive/tez/vector_decimal_precision.q.out Sat Nov  1 20:55:00 2014
@@ -0,0 +1,675 @@
+PREHOOK: query: DROP TABLE IF EXISTS DECIMAL_PRECISION_txt
+PREHOOK: type: DROPTABLE
+POSTHOOK: query: DROP TABLE IF EXISTS DECIMAL_PRECISION_txt
+POSTHOOK: type: DROPTABLE
+PREHOOK: query: DROP TABLE IF EXISTS DECIMAL_PRECISION
+PREHOOK: type: DROPTABLE
+POSTHOOK: query: DROP TABLE IF EXISTS DECIMAL_PRECISION
+POSTHOOK: type: DROPTABLE
+PREHOOK: query: CREATE TABLE DECIMAL_PRECISION_txt(dec decimal(20,10))
+ROW FORMAT DELIMITED
+   FIELDS TERMINATED BY ' '
+STORED AS TEXTFILE
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@DECIMAL_PRECISION_txt
+POSTHOOK: query: CREATE TABLE DECIMAL_PRECISION_txt(dec decimal(20,10))
+ROW FORMAT DELIMITED
+   FIELDS TERMINATED BY ' '
+STORED AS TEXTFILE
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@DECIMAL_PRECISION_txt
+PREHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/kv8.txt' INTO TABLE DECIMAL_PRECISION_txt
+PREHOOK: type: LOAD
+#### A masked pattern was here ####
+PREHOOK: Output: default@decimal_precision_txt
+POSTHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/kv8.txt' INTO TABLE DECIMAL_PRECISION_txt
+POSTHOOK: type: LOAD
+#### A masked pattern was here ####
+POSTHOOK: Output: default@decimal_precision_txt
+PREHOOK: query: CREATE TABLE DECIMAL_PRECISION(dec decimal(20,10))
+STORED AS ORC
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@DECIMAL_PRECISION
+POSTHOOK: query: CREATE TABLE DECIMAL_PRECISION(dec decimal(20,10))
+STORED AS ORC
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@DECIMAL_PRECISION
+PREHOOK: query: INSERT OVERWRITE TABLE DECIMAL_PRECISION SELECT * FROM DECIMAL_PRECISION_txt
+PREHOOK: type: QUERY
+PREHOOK: Input: default@decimal_precision_txt
+PREHOOK: Output: default@decimal_precision
+POSTHOOK: query: INSERT OVERWRITE TABLE DECIMAL_PRECISION SELECT * FROM DECIMAL_PRECISION_txt
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@decimal_precision_txt
+POSTHOOK: Output: default@decimal_precision
+POSTHOOK: Lineage: decimal_precision.dec SIMPLE [(decimal_precision_txt)decimal_precision_txt.FieldSchema(name:dec, type:decimal(20,10), comment:null), ]
+PREHOOK: query: SELECT * FROM DECIMAL_PRECISION ORDER BY dec
+PREHOOK: type: QUERY
+PREHOOK: Input: default@decimal_precision
+#### A masked pattern was here ####
+POSTHOOK: query: SELECT * FROM DECIMAL_PRECISION ORDER BY dec
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@decimal_precision
+#### A masked pattern was here ####
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+0.0000000000
+0.0000000000
+0.0000000000
+0.0000000000
+0
+0.1234567890
+0.1234567890
+1.2345678901
+1.2345678901
+1.2345678901
+12.3456789012
+12.3456789012
+12.3456789012
+123.4567890123
+123.4567890123
+123.4567890123
+1234.5678901235
+1234.5678901235
+1234.5678901235
+12345.6789012346
+12345.6789012346
+123456.7890123456
+123456.7890123457
+1234567.890123456
+1234567.8901234568
+12345678.90123456
+12345678.9012345679
+123456789.0123456
+123456789.0123456789
+1234567890.123456
+1234567890.1234567890
+PREHOOK: query: SELECT dec, dec + 1, dec - 1 FROM DECIMAL_PRECISION ORDER BY dec
+PREHOOK: type: QUERY
+PREHOOK: Input: default@decimal_precision
+#### A masked pattern was here ####
+POSTHOOK: query: SELECT dec, dec + 1, dec - 1 FROM DECIMAL_PRECISION ORDER BY dec
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@decimal_precision
+#### A masked pattern was here ####
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+0.0000000000	1.0000000000	-1.0000000000
+0.0000000000	1.0000000000	-1.0000000000
+0.0000000000	1.0000000000	-1.0000000000
+0.0000000000	1.0000000000	-1.0000000000
+0	1	-1
+0.1234567890	1.1234567890	-0.8765432110
+0.1234567890	1.1234567890	-0.8765432110
+1.2345678901	2.2345678901	0.2345678901
+1.2345678901	2.2345678901	0.2345678901
+1.2345678901	2.2345678901	0.2345678901
+12.3456789012	13.3456789012	11.3456789012
+12.3456789012	13.3456789012	11.3456789012
+12.3456789012	13.3456789012	11.3456789012
+123.4567890123	124.4567890123	122.4567890123
+123.4567890123	124.4567890123	122.4567890123
+123.4567890123	124.4567890123	122.4567890123
+1234.5678901235	1235.5678901235	1233.5678901235
+1234.5678901235	1235.5678901235	1233.5678901235
+1234.5678901235	1235.5678901235	1233.5678901235
+12345.6789012346	12346.6789012346	12344.6789012346
+12345.6789012346	12346.6789012346	12344.6789012346
+123456.7890123456	123457.7890123456	123455.7890123456
+123456.7890123457	123457.7890123457	123455.7890123457
+1234567.890123456	1234568.890123456	1234566.890123456
+1234567.8901234568	1234568.8901234568	1234566.8901234568
+12345678.90123456	12345679.90123456	12345677.90123456
+12345678.9012345679	12345679.9012345679	12345677.9012345679
+123456789.0123456	123456790.0123456	123456788.0123456
+123456789.0123456789	123456790.0123456789	123456788.0123456789
+1234567890.123456	1234567891.123456	1234567889.123456
+1234567890.1234567890	1234567891.1234567890	1234567889.1234567890
+PREHOOK: query: SELECT dec, dec * 2, dec / 3  FROM DECIMAL_PRECISION ORDER BY dec
+PREHOOK: type: QUERY
+PREHOOK: Input: default@decimal_precision
+#### A masked pattern was here ####
+POSTHOOK: query: SELECT dec, dec * 2, dec / 3  FROM DECIMAL_PRECISION ORDER BY dec
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@decimal_precision
+#### A masked pattern was here ####
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+NULL	NULL	NULL
+0.0000000000	0.0000000000	0
+0.0000000000	0.0000000000	0
+0.0000000000	0.0000000000	0
+0.0000000000	0.0000000000	0
+0	0	0
+0.1234567890	0.2469135780	0.041152263
+0.1234567890	0.2469135780	0.041152263
+1.2345678901	2.4691357802	0.411522630033
+1.2345678901	2.4691357802	0.411522630033
+1.2345678901	2.4691357802	0.411522630033
+12.3456789012	24.6913578024	4.1152263004
+12.3456789012	24.6913578024	4.1152263004
+12.3456789012	24.6913578024	4.1152263004
+123.4567890123	246.9135780246	41.1522630041
+123.4567890123	246.9135780246	41.1522630041
+123.4567890123	246.9135780246	41.1522630041
+1234.5678901235	2469.1357802470	411.522630041167
+1234.5678901235	2469.1357802470	411.522630041167
+1234.5678901235	2469.1357802470	411.522630041167
+12345.6789012346	24691.3578024692	4115.226300411533
+12345.6789012346	24691.3578024692	4115.226300411533
+123456.7890123456	246913.5780246912	41152.2630041152
+123456.7890123457	246913.5780246914	41152.263004115233
+1234567.890123456	2469135.780246912	411522.630041152
+1234567.8901234568	2469135.7802469136	411522.630041152267
+12345678.90123456	24691357.80246912	4115226.30041152
+12345678.9012345679	24691357.8024691358	4115226.300411522633
+123456789.0123456	246913578.0246912	41152263.0041152
+123456789.0123456789	246913578.0246913578	41152263.0041152263
+1234567890.123456	2469135780.246912	411522630.041152
+1234567890.1234567890	2469135780.2469135780	411522630.041152263
+PREHOOK: query: SELECT dec, dec / 9 FROM DECIMAL_PRECISION ORDER BY dec
+PREHOOK: type: QUERY
+PREHOOK: Input: default@decimal_precision
+#### A masked pattern was here ####
+POSTHOOK: query: SELECT dec, dec / 9 FROM DECIMAL_PRECISION ORDER BY dec
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@decimal_precision
+#### A masked pattern was here ####
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+0.0000000000	0
+0.0000000000	0
+0.0000000000	0
+0.0000000000	0
+0	0
+0.1234567890	0.013717421
+0.1234567890	0.013717421
+1.2345678901	0.137174210011
+1.2345678901	0.137174210011
+1.2345678901	0.137174210011
+12.3456789012	1.371742100133
+12.3456789012	1.371742100133
+12.3456789012	1.371742100133
+123.4567890123	13.717421001367
+123.4567890123	13.717421001367
+123.4567890123	13.717421001367
+1234.5678901235	137.174210013722
+1234.5678901235	137.174210013722
+1234.5678901235	137.174210013722
+12345.6789012346	1371.742100137178
+12345.6789012346	1371.742100137178
+123456.7890123456	13717.421001371733
+123456.7890123457	13717.421001371744
+1234567.890123456	137174.210013717333
+1234567.8901234568	137174.210013717422
+12345678.90123456	1371742.100137173333
+12345678.9012345679	1371742.100137174211
+123456789.0123456	13717421.001371733333
+123456789.0123456789	13717421.0013717421
+1234567890.123456	137174210.013717333333
+1234567890.1234567890	137174210.013717421
+PREHOOK: query: SELECT dec, dec / 27 FROM DECIMAL_PRECISION ORDER BY dec
+PREHOOK: type: QUERY
+PREHOOK: Input: default@decimal_precision
+#### A masked pattern was here ####
+POSTHOOK: query: SELECT dec, dec / 27 FROM DECIMAL_PRECISION ORDER BY dec
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@decimal_precision
+#### A masked pattern was here ####
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+0.0000000000	0
+0.0000000000	0
+0.0000000000	0
+0.0000000000	0
+0	0
+0.1234567890	0.0045724736667
+0.1234567890	0.0045724736667
+1.2345678901	0.0457247366704
+1.2345678901	0.0457247366704
+1.2345678901	0.0457247366704
+12.3456789012	0.4572473667111
+12.3456789012	0.4572473667111
+12.3456789012	0.4572473667111
+123.4567890123	4.5724736671222
+123.4567890123	4.5724736671222
+123.4567890123	4.5724736671222
+1234.5678901235	45.7247366712407
+1234.5678901235	45.7247366712407
+1234.5678901235	45.7247366712407
+12345.6789012346	457.2473667123926
+12345.6789012346	457.2473667123926
+123456.7890123456	4572.4736671239111
+123456.7890123457	4572.4736671239148
+1234567.890123456	45724.7366712391111
+1234567.8901234568	45724.7366712391407
+12345678.90123456	457247.3667123911111
+12345678.9012345679	457247.3667123914037
+123456789.0123456	4572473.6671239111111
+123456789.0123456789	4572473.6671239140333
+1234567890.123456	45724736.6712391111111
+1234567890.1234567890	45724736.6712391403333
+PREHOOK: query: SELECT dec, dec * dec FROM DECIMAL_PRECISION ORDER BY dec
+PREHOOK: type: QUERY
+PREHOOK: Input: default@decimal_precision
+#### A masked pattern was here ####
+POSTHOOK: query: SELECT dec, dec * dec FROM DECIMAL_PRECISION ORDER BY dec
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@decimal_precision
+#### A masked pattern was here ####
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+NULL	NULL
+0.0000000000	0.00000000000000000000
+0.0000000000	0.00000000000000000000
+0.0000000000	0.00000000000000000000
+0.0000000000	0.00000000000000000000
+0	0
+0.1234567890	0.01524157875019052100
+0.1234567890	0.01524157875019052100
+1.2345678901	1.52415787526596567801
+1.2345678901	1.52415787526596567801
+1.2345678901	1.52415787526596567801
+12.3456789012	152.41578753153483936144
+12.3456789012	152.41578753153483936144
+12.3456789012	152.41578753153483936144
+123.4567890123	15241.57875322755800955129
+123.4567890123	15241.57875322755800955129
+123.4567890123	15241.57875322755800955129
+1234.5678901235	1524157.87532399036884525225
+1234.5678901235	1524157.87532399036884525225
+1234.5678901235	1524157.87532399036884525225
+12345.6789012346	152415787.53238916034140423716
+12345.6789012346	152415787.53238916034140423716
+123456.7890123456	15241578753.23881726870921383936
+123456.7890123457	15241578753.23884196006701630849
+1234567.890123456	1524157875323.881726870921383936
+1234567.8901234568	1524157875323.88370217954558146624
+12345678.90123456	152415787532388.1726870921383936
+12345678.9012345679	152415787532388.36774881877789971041
+123456789.0123456	15241578753238817.26870921383936
+123456789.0123456789	15241578753238836.75019051998750190521
+1234567890.123456	NULL
+1234567890.1234567890	NULL
+PREHOOK: query: EXPLAIN SELECT avg(dec), sum(dec) FROM DECIMAL_PRECISION
+PREHOOK: type: QUERY
+POSTHOOK: query: EXPLAIN SELECT avg(dec), sum(dec) FROM DECIMAL_PRECISION
+POSTHOOK: type: QUERY
+STAGE DEPENDENCIES:
+  Stage-1 is a root stage
+  Stage-0 depends on stages: Stage-1
+
+STAGE PLANS:
+  Stage: Stage-1
+    Tez
+      Edges:
+        Reducer 2 <- Map 1 (SIMPLE_EDGE)
+#### A masked pattern was here ####
+      Vertices:
+        Map 1 
+            Map Operator Tree:
+                TableScan
+                  alias: decimal_precision
+                  Statistics: Num rows: 75 Data size: 3472 Basic stats: COMPLETE Column stats: NONE
+                  Select Operator
+                    expressions: dec (type: decimal(20,10))
+                    outputColumnNames: dec
+                    Statistics: Num rows: 75 Data size: 3472 Basic stats: COMPLETE Column stats: NONE
+                    Group By Operator
+                      aggregations: avg(dec), sum(dec)
+                      mode: hash
+                      outputColumnNames: _col0, _col1
+                      Statistics: Num rows: 1 Data size: 112 Basic stats: COMPLETE Column stats: NONE
+                      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(30,10),input:decimal(20,10)>), _col1 (type: decimal(30,10))
+            Execution mode: vectorized
+        Reducer 2 
+            Reduce Operator Tree:
+              Group By Operator
+                aggregations: avg(VALUE._col0), sum(VALUE._col1)
+                mode: mergepartial
+                outputColumnNames: _col0, _col1
+                Statistics: Num rows: 1 Data size: 224 Basic stats: COMPLETE Column stats: NONE
+                Select Operator
+                  expressions: _col0 (type: decimal(24,14)), _col1 (type: decimal(30,10))
+                  outputColumnNames: _col0, _col1
+                  Statistics: Num rows: 1 Data size: 224 Basic stats: COMPLETE Column stats: NONE
+                  File Output Operator
+                    compressed: false
+                    Statistics: Num rows: 1 Data size: 224 Basic stats: COMPLETE Column stats: NONE
+                    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
+
+PREHOOK: query: SELECT avg(dec), sum(dec) FROM DECIMAL_PRECISION
+PREHOOK: type: QUERY
+PREHOOK: Input: default@decimal_precision
+#### A masked pattern was here ####
+POSTHOOK: query: SELECT avg(dec), sum(dec) FROM DECIMAL_PRECISION
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@decimal_precision
+#### A masked pattern was here ####
+88499534.57586576220645	2743485571.8518386284
+PREHOOK: query: SELECT dec * cast('12345678901234567890.12345678' as decimal(38,18)) FROM DECIMAL_PRECISION LIMIT 1
+PREHOOK: type: QUERY
+PREHOOK: Input: default@decimal_precision
+#### A masked pattern was here ####
+POSTHOOK: query: SELECT dec * cast('12345678901234567890.12345678' as decimal(38,18)) FROM DECIMAL_PRECISION LIMIT 1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@decimal_precision
+#### A masked pattern was here ####
+NULL
+PREHOOK: query: SELECT * from DECIMAL_PRECISION WHERE dec > cast('1234567890123456789012345678.12345678' as decimal(38,18)) LIMIT 1
+PREHOOK: type: QUERY
+PREHOOK: Input: default@decimal_precision
+#### A masked pattern was here ####
+POSTHOOK: query: SELECT * from DECIMAL_PRECISION WHERE dec > cast('1234567890123456789012345678.12345678' as decimal(38,18)) LIMIT 1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@decimal_precision
+#### A masked pattern was here ####
+PREHOOK: query: SELECT dec * 12345678901234567890.12345678 FROM DECIMAL_PRECISION LIMIT 1
+PREHOOK: type: QUERY
+PREHOOK: Input: default@decimal_precision
+#### A masked pattern was here ####
+POSTHOOK: query: SELECT dec * 12345678901234567890.12345678 FROM DECIMAL_PRECISION LIMIT 1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@decimal_precision
+#### A masked pattern was here ####
+NULL
+PREHOOK: query: SELECT MIN(cast('12345678901234567890.12345678' as decimal(38,18))) FROM DECIMAL_PRECISION
+PREHOOK: type: QUERY
+PREHOOK: Input: default@decimal_precision
+#### A masked pattern was here ####
+POSTHOOK: query: SELECT MIN(cast('12345678901234567890.12345678' as decimal(38,18))) FROM DECIMAL_PRECISION
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@decimal_precision
+#### A masked pattern was here ####
+12345678901234567890.12345678
+PREHOOK: query: SELECT COUNT(cast('12345678901234567890.12345678' as decimal(38,18))) FROM DECIMAL_PRECISION
+PREHOOK: type: QUERY
+PREHOOK: Input: default@decimal_precision
+#### A masked pattern was here ####
+POSTHOOK: query: SELECT COUNT(cast('12345678901234567890.12345678' as decimal(38,18))) FROM DECIMAL_PRECISION
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@decimal_precision
+#### A masked pattern was here ####
+75
+PREHOOK: query: DROP TABLE DECIMAL_PRECISION_txt
+PREHOOK: type: DROPTABLE
+PREHOOK: Input: default@decimal_precision_txt
+PREHOOK: Output: default@decimal_precision_txt
+POSTHOOK: query: DROP TABLE DECIMAL_PRECISION_txt
+POSTHOOK: type: DROPTABLE
+POSTHOOK: Input: default@decimal_precision_txt
+POSTHOOK: Output: default@decimal_precision_txt
+PREHOOK: query: DROP TABLE DECIMAL_PRECISION
+PREHOOK: type: DROPTABLE
+PREHOOK: Input: default@decimal_precision
+PREHOOK: Output: default@decimal_precision
+POSTHOOK: query: DROP TABLE DECIMAL_PRECISION
+POSTHOOK: type: DROPTABLE
+POSTHOOK: Input: default@decimal_precision
+POSTHOOK: Output: default@decimal_precision

Added: hive/trunk/ql/src/test/results/clientpositive/tez/vector_decimal_trailing.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/tez/vector_decimal_trailing.q.out?rev=1636047&view=auto
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/tez/vector_decimal_trailing.q.out (added)
+++ hive/trunk/ql/src/test/results/clientpositive/tez/vector_decimal_trailing.q.out Sat Nov  1 20:55:00 2014
@@ -0,0 +1,121 @@
+PREHOOK: query: DROP TABLE IF EXISTS DECIMAL_TRAILING_txt
+PREHOOK: type: DROPTABLE
+POSTHOOK: query: DROP TABLE IF EXISTS DECIMAL_TRAILING_txt
+POSTHOOK: type: DROPTABLE
+PREHOOK: query: DROP TABLE IF EXISTS DECIMAL_TRAILING
+PREHOOK: type: DROPTABLE
+POSTHOOK: query: DROP TABLE IF EXISTS DECIMAL_TRAILING
+POSTHOOK: type: DROPTABLE
+PREHOOK: query: CREATE TABLE DECIMAL_TRAILING_txt (
+  id int,
+  a decimal(10,4),
+  b decimal(15,8)
+  )
+ROW FORMAT DELIMITED
+   FIELDS TERMINATED BY ','
+STORED AS TEXTFILE
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@DECIMAL_TRAILING_txt
+POSTHOOK: query: CREATE TABLE DECIMAL_TRAILING_txt (
+  id int,
+  a decimal(10,4),
+  b decimal(15,8)
+  )
+ROW FORMAT DELIMITED
+   FIELDS TERMINATED BY ','
+STORED AS TEXTFILE
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@DECIMAL_TRAILING_txt
+PREHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/kv10.txt' INTO TABLE DECIMAL_TRAILING_txt
+PREHOOK: type: LOAD
+#### A masked pattern was here ####
+PREHOOK: Output: default@decimal_trailing_txt
+POSTHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/kv10.txt' INTO TABLE DECIMAL_TRAILING_txt
+POSTHOOK: type: LOAD
+#### A masked pattern was here ####
+POSTHOOK: Output: default@decimal_trailing_txt
+PREHOOK: query: CREATE TABLE DECIMAL_TRAILING (
+  id int,
+  a decimal(10,4),
+  b decimal(15,8)
+  )
+STORED AS ORC
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@DECIMAL_TRAILING
+POSTHOOK: query: CREATE TABLE DECIMAL_TRAILING (
+  id int,
+  a decimal(10,4),
+  b decimal(15,8)
+  )
+STORED AS ORC
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@DECIMAL_TRAILING
+PREHOOK: query: INSERT OVERWRITE TABLE DECIMAL_TRAILING SELECT * FROM DECIMAL_TRAILING_txt
+PREHOOK: type: QUERY
+PREHOOK: Input: default@decimal_trailing_txt
+PREHOOK: Output: default@decimal_trailing
+POSTHOOK: query: INSERT OVERWRITE TABLE DECIMAL_TRAILING SELECT * FROM DECIMAL_TRAILING_txt
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@decimal_trailing_txt
+POSTHOOK: Output: default@decimal_trailing
+POSTHOOK: Lineage: decimal_trailing.a SIMPLE [(decimal_trailing_txt)decimal_trailing_txt.FieldSchema(name:a, type:decimal(10,4), comment:null), ]
+POSTHOOK: Lineage: decimal_trailing.b SIMPLE [(decimal_trailing_txt)decimal_trailing_txt.FieldSchema(name:b, type:decimal(15,8), comment:null), ]
+POSTHOOK: Lineage: decimal_trailing.id SIMPLE [(decimal_trailing_txt)decimal_trailing_txt.FieldSchema(name:id, type:int, comment:null), ]
+PREHOOK: query: SELECT * FROM DECIMAL_TRAILING ORDER BY id
+PREHOOK: type: QUERY
+PREHOOK: Input: default@decimal_trailing
+#### A masked pattern was here ####
+POSTHOOK: query: SELECT * FROM DECIMAL_TRAILING ORDER BY id
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@decimal_trailing
+#### A masked pattern was here ####
+0	0	0
+1	0	0
+2	NULL	NULL
+3	1.0000	1.00000000
+4	10.0000	10.00000000
+5	100.0000	100.00000000
+6	1000.0000	1000.00000000
+7	10000.0000	10000.00000000
+8	100000.0000	100000.00000000
+9	NULL	1000000.00000000
+10	NULL	NULL
+11	NULL	NULL
+12	NULL	NULL
+13	NULL	NULL
+14	NULL	NULL
+15	NULL	NULL
+16	NULL	NULL
+17	NULL	NULL
+18	1.0000	1.00000000
+19	10.000	10.0000000
+20	100.00	100.000000
+21	1000.0	1000.00000
+22	100000	10000.0000
+23	0.0000	0.00000000
+24	0.000	0.0000000
+25	0.00	0.000000
+26	0.0	0.00000
+27	0	0.00000
+28	12313.2000	134134.31252500
+29	99999.9990	134134.31242553
+PREHOOK: query: DROP TABLE DECIMAL_TRAILING_txt
+PREHOOK: type: DROPTABLE
+PREHOOK: Input: default@decimal_trailing_txt
+PREHOOK: Output: default@decimal_trailing_txt
+POSTHOOK: query: DROP TABLE DECIMAL_TRAILING_txt
+POSTHOOK: type: DROPTABLE
+POSTHOOK: Input: default@decimal_trailing_txt
+POSTHOOK: Output: default@decimal_trailing_txt
+PREHOOK: query: DROP TABLE DECIMAL_TRAILING
+PREHOOK: type: DROPTABLE
+PREHOOK: Input: default@decimal_trailing
+PREHOOK: Output: default@decimal_trailing
+POSTHOOK: query: DROP TABLE DECIMAL_TRAILING
+POSTHOOK: type: DROPTABLE
+POSTHOOK: Input: default@decimal_trailing
+POSTHOOK: Output: default@decimal_trailing



Mime
View raw message