hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xu...@apache.org
Subject svn commit: r1543916 [2/2] - in /hive/trunk: common/src/java/org/apache/hadoop/hive/common/type/ common/src/test/org/apache/hadoop/hive/common/type/ jdbc/src/java/org/apache/hive/jdbc/ ql/src/java/org/apache/hadoop/hive/ql/exec/ ql/src/java/org/apache/...
Date Wed, 20 Nov 2013 19:58:01 GMT
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=1543916&r1=1543915&r2=1543916&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 Wed Nov 20 19:58:00 2013
@@ -2,12 +2,12 @@ PREHOOK: query: DROP TABLE IF EXISTS DEC
 PREHOOK: type: DROPTABLE
 POSTHOOK: query: DROP TABLE IF EXISTS DECIMAL_UDF
 POSTHOOK: type: DROPTABLE
-PREHOOK: query: CREATE TABLE DECIMAL_UDF (key decimal(65,30), value int) 
+PREHOOK: query: CREATE TABLE DECIMAL_UDF (key decimal(38,18), value int)
 ROW FORMAT DELIMITED
    FIELDS TERMINATED BY ' '
 STORED AS TEXTFILE
 PREHOOK: type: CREATETABLE
-POSTHOOK: query: CREATE TABLE DECIMAL_UDF (key decimal(65,30), value int) 
+POSTHOOK: query: CREATE TABLE DECIMAL_UDF (key decimal(38,18), value int)
 ROW FORMAT DELIMITED
    FIELDS TERMINATED BY ' '
 STORED AS TEXTFILE
@@ -41,7 +41,7 @@ STAGE PLANS:
           Select Operator
             expressions:
                   expr: (key + key)
-                  type: decimal(65,30)
+                  type: decimal(38,18)
             outputColumnNames: _col0
             ListSink
 
@@ -89,7 +89,7 @@ NULL
 6.28
 6.28
 6.28
-1.9999999999999999999999998
+2
 -2469135780.246913578
 2469135780.24691356
 PREHOOK: query: EXPLAIN SELECT key + value FROM DECIMAL_UDF
@@ -112,7 +112,7 @@ STAGE PLANS:
           Select Operator
             expressions:
                   expr: (key + value)
-                  type: decimal(65,30)
+                  type: decimal(38,18)
             outputColumnNames: _col0
             ListSink
 
@@ -160,7 +160,7 @@ NULL
 6.14
 6.14
 7.14
-1.9999999999999999999999999
+2
 -2469135780.123456789
 2469135780.12345678
 PREHOOK: query: EXPLAIN SELECT key + (value/2) FROM DECIMAL_UDF
@@ -183,7 +183,7 @@ STAGE PLANS:
           Select Operator
             expressions:
                   expr: (key + (value / 2))
-                  type: decimal(65,30)
+                  type: decimal(38,18)
             outputColumnNames: _col0
             ListSink
 
@@ -231,7 +231,7 @@ NULL
 4.64
 4.64
 5.14
-1.4999999999999999999999999
+1.5
 -1851851835.123456789
 1851851835.12345678
 PREHOOK: query: EXPLAIN SELECT key + '1.0' FROM DECIMAL_UDF
@@ -327,7 +327,7 @@ STAGE PLANS:
           Select Operator
             expressions:
                   expr: (key - key)
-                  type: decimal(65,30)
+                  type: decimal(38,18)
             outputColumnNames: _col0
             ListSink
 
@@ -398,7 +398,7 @@ STAGE PLANS:
           Select Operator
             expressions:
                   expr: (key - value)
-                  type: decimal(65,30)
+                  type: decimal(38,18)
             outputColumnNames: _col0
             ListSink
 
@@ -446,7 +446,7 @@ NULL
 0.14
 0.14
 -0.86
--0.0000000000000000000000001
+0
 -0.123456789
 0.12345678
 PREHOOK: query: EXPLAIN SELECT key - (value/2) FROM DECIMAL_UDF
@@ -469,7 +469,7 @@ STAGE PLANS:
           Select Operator
             expressions:
                   expr: (key - (value / 2))
-                  type: decimal(65,30)
+                  type: decimal(38,18)
             outputColumnNames: _col0
             ListSink
 
@@ -517,7 +517,7 @@ NULL
 1.64
 1.64
 1.14
-0.4999999999999999999999999
+0.5
 -617283945.123456789
 617283945.12345678
 PREHOOK: query: EXPLAIN SELECT key - '1.0' FROM DECIMAL_UDF
@@ -613,7 +613,7 @@ STAGE PLANS:
           Select Operator
             expressions:
                   expr: (key * key)
-                  type: decimal(65,30)
+                  type: decimal(38,36)
             outputColumnNames: _col0
             ListSink
 
@@ -626,17 +626,17 @@ POSTHOOK: query: SELECT key * key FROM D
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@decimal_udf
 #### A masked pattern was here ####
-19360000
+NULL
 NULL
 0
 0
-10000
-100
+NULL
+NULL
 1
 0.01
 0.0001
-40000
-400
+NULL
+NULL
 4
 0
 0.04
@@ -655,15 +655,15 @@ NULL
 1.258884
 1.2544
 1.258884
-15376
-15675.04
-1576255.1401
+NULL
+NULL
+NULL
 9.8596
 9.8596
 9.8596
+1
+NULL
 NULL
-1524157875323883675.019051998750190521
-1524157875323883652.7968299765279684
 PREHOOK: query: EXPLAIN SELECT key * value FROM DECIMAL_UDF
 PREHOOK: type: QUERY
 POSTHOOK: query: EXPLAIN SELECT key * value FROM DECIMAL_UDF
@@ -684,7 +684,7 @@ STAGE PLANS:
           Select Operator
             expressions:
                   expr: (key * value)
-                  type: decimal(65,30)
+                  type: decimal(38,18)
             outputColumnNames: _col0
             ListSink
 
@@ -732,7 +732,7 @@ NULL
 9.42
 9.42
 12.56
-0.9999999999999999999999999
+1
 1524157875171467887.50190521
 1524157875171467876.3907942
 PREHOOK: query: EXPLAIN SELECT key * (value/2) FROM DECIMAL_UDF
@@ -755,7 +755,7 @@ STAGE PLANS:
           Select Operator
             expressions:
                   expr: (key * (value / 2))
-                  type: decimal(65,30)
+                  type: decimal(38,24)
             outputColumnNames: _col0
             ListSink
 
@@ -803,9 +803,9 @@ NULL
 4.71
 4.71
 6.28
-0.49999999999999999999999995
-762078937585733943.750952605
-762078937585733938.1953971
+0.5
+NULL
+NULL
 PREHOOK: query: EXPLAIN SELECT key * '2.0' FROM DECIMAL_UDF
 PREHOOK: type: QUERY
 POSTHOOK: query: EXPLAIN SELECT key * '2.0' FROM DECIMAL_UDF
@@ -899,7 +899,7 @@ STAGE PLANS:
           Select Operator
             expressions:
                   expr: (key / 0)
-                  type: decimal(65,30)
+                  type: decimal(38,20)
             outputColumnNames: _col0
             Limit
               ListSink
@@ -973,7 +973,7 @@ STAGE PLANS:
             Select Operator
               expressions:
                     expr: (key / key)
-                    type: decimal(65,30)
+                    type: decimal(38,38)
               outputColumnNames: _col0
               ListSink
 
@@ -986,40 +986,40 @@ POSTHOOK: query: SELECT key / key FROM D
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@decimal_udf
 #### A masked pattern was here ####
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
 PREHOOK: query: EXPLAIN SELECT key / value FROM DECIMAL_UDF WHERE value is not null and value
<> 0
 PREHOOK: type: QUERY
 POSTHOOK: query: EXPLAIN SELECT key / value FROM DECIMAL_UDF WHERE value is not null and
value <> 0
@@ -1044,7 +1044,7 @@ STAGE PLANS:
             Select Operator
               expressions:
                     expr: (key / value)
-                    type: decimal(65,30)
+                    type: decimal(38,29)
               outputColumnNames: _col0
               ListSink
 
@@ -1066,7 +1066,7 @@ POSTHOOK: Input: default@decimal_udf
 1
 1
 1
-1.046666666666666666666666666667
+1.04666666666666666666666666667
 1.12
 1.12
 0.102
@@ -1074,13 +1074,13 @@ POSTHOOK: Input: default@decimal_udf
 1.122
 1
 1.0016
-1.000390438247011952191235059761
-1.046666666666666666666666666667
-1.046666666666666666666666666667
+1.00039043824701195219123505976
+1.04666666666666666666666666667
+1.04666666666666666666666666667
 0.785
-0.9999999999999999999999999
-1.0000000001
-1.000000000099999992709999933661
+1
+NULL
+NULL
 PREHOOK: query: EXPLAIN SELECT key / (value/2) FROM DECIMAL_UDF  WHERE value is not null
and value <> 0
 PREHOOK: type: QUERY
 POSTHOOK: query: EXPLAIN SELECT key / (value/2) FROM DECIMAL_UDF  WHERE value is not null
and value <> 0
@@ -1105,7 +1105,7 @@ STAGE PLANS:
             Select Operator
               expressions:
                     expr: (key / (value / 2))
-                    type: decimal(65,30)
+                    type: decimal(38,35)
               outputColumnNames: _col0
               ListSink
 
@@ -1118,7 +1118,7 @@ POSTHOOK: query: SELECT key / (value/2) 
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@decimal_udf
 #### A masked pattern was here ####
--2
+NULL
 2
 2
 2
@@ -1127,7 +1127,7 @@ POSTHOOK: Input: default@decimal_udf
 2
 2
 2
-2.093333333333333333333333333333
+2.09333333333333333333333333333333333
 2.24
 2.24
 0.204
@@ -1135,13 +1135,13 @@ POSTHOOK: Input: default@decimal_udf
 2.244
 2
 2.0032
-2.000780876494023904382470119522
-2.093333333333333333333333333333
-2.093333333333333333333333333333
+NULL
+2.09333333333333333333333333333333333
+2.09333333333333333333333333333333333
 1.57
-1.9999999999999999999999998
-2.0000000002
-2.000000000199999985419999867322
+2
+NULL
+NULL
 PREHOOK: query: EXPLAIN SELECT key / '2.0' FROM DECIMAL_UDF
 PREHOOK: type: QUERY
 POSTHOOK: query: EXPLAIN SELECT key / '2.0' FROM DECIMAL_UDF
@@ -1235,7 +1235,7 @@ STAGE PLANS:
           Select Operator
             expressions:
                   expr: abs(key)
-                  type: decimal(65,30)
+                  type: decimal(38,18)
             outputColumnNames: _col0
             ListSink
 
@@ -1283,7 +1283,7 @@ NULL
 3.14
 3.14
 3.14
-0.9999999999999999999999999
+1
 1234567890.123456789
 1234567890.12345678
 PREHOOK: query: -- avg
@@ -1312,7 +1312,7 @@ STAGE PLANS:
                     expr: value
                     type: int
                     expr: key
-                    type: decimal(65,30)
+                    type: decimal(38,18)
               outputColumnNames: value, key
               Group By Operator
                 aggregations:
@@ -1336,11 +1336,11 @@ STAGE PLANS:
                   tag: -1
                   value expressions:
                         expr: _col1
-                        type: decimal(65,30)
+                        type: decimal(38,18)
                         expr: _col2
                         type: bigint
                         expr: _col3
-                        type: struct<count:bigint,sum:decimal(65,30)>
+                        type: struct<count:bigint,sum:decimal(38,18)>
       Reduce Operator Tree:
         Group By Operator
           aggregations:
@@ -1358,9 +1358,9 @@ STAGE PLANS:
                   expr: _col0
                   type: int
                   expr: (_col1 / _col2)
-                  type: decimal(65,30)
+                  type: decimal(38,38)
                   expr: _col3
-                  type: decimal(65,30)
+                  type: decimal(38,18)
             outputColumnNames: _col0, _col1, _col2
             File Output Operator
               compressed: false
@@ -1385,9 +1385,9 @@ STAGE PLANS:
                     expr: _col0
                     type: int
                     expr: _col1
-                    type: decimal(65,30)
+                    type: decimal(38,38)
                     expr: _col2
-                    type: decimal(65,30)
+                    type: decimal(38,18)
       Reduce Operator Tree:
         Extract
           File Output Operator
@@ -1411,23 +1411,23 @@ POSTHOOK: query: SELECT value, sum(key) 
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@decimal_udf
 #### A masked pattern was here ####
--1234567890	-1234567890.123456789	-1234567890.123456789
--1255	-1255.49	-1255.49
--11	-1.122	-1.122
--1	-1.12	-1.12
-0	0.025384615384615384615384615385	0.025384615384615384615384615385
-1	1.04839999999999999999999998	1.04839999999999999999999998
-2	2	2
-3	3.14	3.14
-4	3.14	3.14
-10	10	10
-20	20	20
-100	100	100
-124	124	124
-125	125.2	125.2
-200	200	200
-4400	-4400	-4400
-1234567890	1234567890.12345678	1234567890.12345678
+-1234567890	NULL	-1234567890.123456789
+-1255	NULL	-1255.49
+-11	NULL	-1.122
+-1	NULL	-1.12
+0	NULL	0.025384615384615385
+1	NULL	1.0484
+2	NULL	2
+3	NULL	3.14
+4	NULL	3.14
+10	NULL	10
+20	NULL	20
+100	NULL	100
+124	NULL	124
+125	NULL	125.2
+200	NULL	200
+4400	NULL	-4400
+1234567890	NULL	1234567890.12345678
 PREHOOK: query: -- negative
 EXPLAIN SELECT -key FROM DECIMAL_UDF
 PREHOOK: type: QUERY
@@ -1450,7 +1450,7 @@ STAGE PLANS:
           Select Operator
             expressions:
                   expr: (- key)
-                  type: decimal(65,30)
+                  type: decimal(38,18)
             outputColumnNames: _col0
             ListSink
 
@@ -1498,7 +1498,7 @@ NULL
 -3.14
 -3.14
 -3.14
--0.9999999999999999999999999
+-1
 1234567890.123456789
 -1234567890.12345678
 PREHOOK: query: -- positive
@@ -1523,7 +1523,7 @@ STAGE PLANS:
           Select Operator
             expressions:
                   expr: key
-                  type: decimal(65,30)
+                  type: decimal(38,18)
             outputColumnNames: _col0
             ListSink
 
@@ -1571,7 +1571,7 @@ NULL
 3.14
 3.14
 3.14
-0.9999999999999999999999999
+1
 -1234567890.123456789
 1234567890.12345678
 PREHOOK: query: -- ceiling
@@ -1596,7 +1596,7 @@ STAGE PLANS:
           Select Operator
             expressions:
                   expr: ceil(key)
-                  type: decimal(65,30)
+                  type: decimal(38,18)
             outputColumnNames: _col0
             ListSink
 
@@ -1669,7 +1669,7 @@ STAGE PLANS:
           Select Operator
             expressions:
                   expr: floor(key)
-                  type: decimal(65,30)
+                  type: decimal(38,18)
             outputColumnNames: _col0
             ListSink
 
@@ -1717,7 +1717,7 @@ NULL
 3
 3
 3
-0
+1
 -1234567891
 1234567890
 PREHOOK: query: -- round
@@ -1742,7 +1742,7 @@ STAGE PLANS:
           Select Operator
             expressions:
                   expr: round(key, 2)
-                  type: decimal(38,2)
+                  type: decimal(23,2)
             outputColumnNames: _col0
             ListSink
 
@@ -1815,7 +1815,7 @@ STAGE PLANS:
           Select Operator
             expressions:
                   expr: power(key, 2)
-                  type: decimal(65,30)
+                  type: decimal(38,18)
             outputColumnNames: _col0
             ListSink
 
@@ -1863,7 +1863,7 @@ NULL
 9.8596
 9.8596
 9.8596
-NULL
+1
 1524157875323883675.019051998750190521
 1524157875323883652.7968299765279684
 PREHOOK: query: -- modulo
@@ -1888,7 +1888,7 @@ STAGE PLANS:
           Select Operator
             expressions:
                   expr: ((key + 1) % (key / 2))
-                  type: decimal(65,30)
+                  type: decimal(38,20)
             outputColumnNames: _col0
             ListSink
 
@@ -1936,7 +1936,7 @@ NULL
 1
 1
 1
-0.0000000000000000000000001
+0
 -617283944.0617283945
 1
 PREHOOK: query: -- stddev, var
@@ -1964,7 +1964,7 @@ STAGE PLANS:
                     expr: value
                     type: int
                     expr: key
-                    type: decimal(65,30)
+                    type: decimal(38,18)
               outputColumnNames: value, key
               Group By Operator
                 aggregations:
@@ -2073,7 +2073,7 @@ STAGE PLANS:
                     expr: value
                     type: int
                     expr: key
-                    type: decimal(65,30)
+                    type: decimal(38,18)
               outputColumnNames: value, key
               Group By Operator
                 aggregations:
@@ -2180,7 +2180,7 @@ STAGE PLANS:
             Select Operator
               expressions:
                     expr: key
-                    type: decimal(65,30)
+                    type: decimal(38,18)
               outputColumnNames: key
               Group By Operator
                 aggregations:
@@ -2251,7 +2251,7 @@ STAGE PLANS:
             Select Operator
               expressions:
                     expr: key
-                    type: decimal(65,30)
+                    type: decimal(38,18)
               outputColumnNames: key
               Group By Operator
                 aggregations:
@@ -2264,7 +2264,7 @@ STAGE PLANS:
                   tag: -1
                   value expressions:
                         expr: _col0
-                        type: decimal(65,30)
+                        type: decimal(38,18)
       Reduce Operator Tree:
         Group By Operator
           aggregations:
@@ -2275,7 +2275,7 @@ STAGE PLANS:
           Select Operator
             expressions:
                   expr: _col0
-                  type: decimal(65,30)
+                  type: decimal(38,18)
             outputColumnNames: _col0
             File Output Operator
               compressed: false
@@ -2322,7 +2322,7 @@ STAGE PLANS:
             Select Operator
               expressions:
                     expr: key
-                    type: decimal(65,30)
+                    type: decimal(38,18)
               outputColumnNames: key
               Group By Operator
                 aggregations:
@@ -2335,7 +2335,7 @@ STAGE PLANS:
                   tag: -1
                   value expressions:
                         expr: _col0
-                        type: decimal(65,30)
+                        type: decimal(38,18)
       Reduce Operator Tree:
         Group By Operator
           aggregations:
@@ -2346,7 +2346,7 @@ STAGE PLANS:
           Select Operator
             expressions:
                   expr: _col0
-                  type: decimal(65,30)
+                  type: decimal(38,18)
             outputColumnNames: _col0
             File Output Operator
               compressed: false
@@ -2393,7 +2393,7 @@ STAGE PLANS:
             Select Operator
               expressions:
                     expr: key
-                    type: decimal(65,30)
+                    type: decimal(38,18)
               outputColumnNames: key
               Group By Operator
                 aggregations:

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=1543916&r1=1543915&r2=1543916&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 Wed Nov 20 19:58:00
2013
@@ -18,7 +18,7 @@ STAGE PLANS:
           Select Operator
             expressions:
                   expr: (- 1)
-                  type: decimal(65,30)
+                  type: decimal(38,18)
                   expr: 0
                   type: decimal(1,0)
                   expr: 1
@@ -26,7 +26,7 @@ STAGE PLANS:
                   expr: 3.14
                   type: decimal(3,2)
                   expr: (- 3.14)
-                  type: decimal(65,30)
+                  type: decimal(38,18)
                   expr: 99999999999999999
                   type: decimal(17,0)
                   expr: 99999999999999999.9999999999999

Modified: hive/trunk/ql/src/test/results/clientpositive/ql_rewrite_gbtoidx.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/ql_rewrite_gbtoidx.q.out?rev=1543916&r1=1543915&r2=1543916&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/ql_rewrite_gbtoidx.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/ql_rewrite_gbtoidx.q.out Wed Nov 20 19:58:00
2013
@@ -1022,7 +1022,7 @@ STAGE PLANS:
                   expr: _col4
                   type: int
                   expr: ((_col5 - _col2) / _col2)
-                  type: decimal(39,20)
+                  type: decimal(38,20)
             outputColumnNames: _col0, _col1, _col2
             File Output Operator
               compressed: false

Modified: hive/trunk/ql/src/test/results/clientpositive/serde_regex.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/serde_regex.q.out?rev=1543916&r1=1543915&r2=1543916&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/serde_regex.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/serde_regex.q.out Wed Nov 20 19:58:00 2013
@@ -129,7 +129,7 @@ POSTHOOK: Input: default@serde_regex
 POSTHOOK: Output: default@serde_regex
 PREHOOK: query: EXPLAIN
 CREATE TABLE serde_regex1(
-  key decimal(65,30),
+  key decimal(38,18),
   value int)
 ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.RegexSerDe'
 WITH SERDEPROPERTIES (
@@ -139,7 +139,7 @@ STORED AS TEXTFILE
 PREHOOK: type: CREATETABLE
 POSTHOOK: query: EXPLAIN
 CREATE TABLE serde_regex1(
-  key decimal(65,30),
+  key decimal(38,18),
   value int)
 ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.RegexSerDe'
 WITH SERDEPROPERTIES (
@@ -148,7 +148,7 @@ WITH SERDEPROPERTIES (
 STORED AS TEXTFILE
 POSTHOOK: type: CREATETABLE
 ABSTRACT SYNTAX TREE:
-  (TOK_CREATETABLE (TOK_TABNAME serde_regex1) TOK_LIKETABLE (TOK_TABCOLLIST (TOK_TABCOL key
(TOK_DECIMAL 65 30)) (TOK_TABCOL value TOK_INT)) (TOK_TABLESERIALIZER (TOK_SERDENAME 'org.apache.hadoop.hive.serde2.RegexSerDe'
(TOK_TABLEPROPERTIES (TOK_TABLEPROPLIST (TOK_TABLEPROPERTY "input.regex" "([^ ]*) ([^ ]*)")))))
TOK_TBLTEXTFILE)
+  (TOK_CREATETABLE (TOK_TABNAME serde_regex1) TOK_LIKETABLE (TOK_TABCOLLIST (TOK_TABCOL key
(TOK_DECIMAL 38 18)) (TOK_TABCOL value TOK_INT)) (TOK_TABLESERIALIZER (TOK_SERDENAME 'org.apache.hadoop.hive.serde2.RegexSerDe'
(TOK_TABLEPROPERTIES (TOK_TABLEPROPLIST (TOK_TABLEPROPERTY "input.regex" "([^ ]*) ([^ ]*)")))))
TOK_TBLTEXTFILE)
 
 STAGE DEPENDENCIES:
   Stage-0 is a root stage
@@ -157,7 +157,7 @@ STAGE PLANS:
   Stage: Stage-0
       Create Table Operator:
         Create Table
-          columns: key decimal(65,30), value int
+          columns: key decimal(38,18), value int
           if not exists: false
           input format: org.apache.hadoop.mapred.TextInputFormat
           # buckets: -1
@@ -170,7 +170,7 @@ STAGE PLANS:
 
 
 PREHOOK: query: CREATE TABLE serde_regex1(
-  key decimal(65,30),
+  key decimal(38,18),
   value int)
 ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.RegexSerDe'
 WITH SERDEPROPERTIES (
@@ -179,7 +179,7 @@ WITH SERDEPROPERTIES (
 STORED AS TEXTFILE
 PREHOOK: type: CREATETABLE
 POSTHOOK: query: CREATE TABLE serde_regex1(
-  key decimal(65,30),
+  key decimal(38,18),
   value int)
 ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.RegexSerDe'
 WITH SERDEPROPERTIES (
@@ -222,7 +222,7 @@ NULL	0
 0.3	0
 0.33	0
 0.333	0
-0.9999999999999999999999999	1
+1	1
 1	1
 1	1
 1.12	1

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=1543916&r1=1543915&r2=1543916&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/udf7.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/udf7.q.out Wed Nov 20 19:58:00 2013
@@ -100,11 +100,11 @@ STAGE PLANS:
                     expr: power((- 1), 2)
                     type: double
                     expr: power(CAST( 1 AS decimal(10,0)), 0)
-                    type: decimal(65,30)
+                    type: decimal(38,18)
                     expr: power(CAST( 2 AS decimal(10,0)), 3)
-                    type: decimal(65,30)
+                    type: decimal(38,18)
                     expr: pow(CAST( 2 AS decimal(10,0)), 3)
-                    type: decimal(65,30)
+                    type: decimal(38,18)
               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
               File Output Operator
                 compressed: false

Modified: hive/trunk/ql/src/test/results/clientpositive/udf_case.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/udf_case.q.out?rev=1543916&r1=1543915&r2=1543916&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/udf_case.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/udf_case.q.out Wed Nov 20 19:58:00 2013
@@ -180,7 +180,7 @@ SELECT CASE 1
        CASE 1
         WHEN 1.0 THEN 123
         WHEN 2 THEN 1.0
-        ELSE 0.0BD
+        ELSE 222.02BD
        END,
        CASE 'abc'
         WHEN cast('abc' as varchar(3)) THEN 'abcd'
@@ -199,7 +199,7 @@ SELECT CASE 1
        CASE 1
         WHEN 1.0 THEN 123
         WHEN 2 THEN 1.0
-        ELSE 0.0BD
+        ELSE 222.02BD
        END,
        CASE 'abc'
         WHEN cast('abc' as varchar(3)) THEN 'abcd'

Modified: hive/trunk/ql/src/test/results/clientpositive/udf_when.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/udf_when.q.out?rev=1543916&r1=1543915&r2=1543916&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/udf_when.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/udf_when.q.out Wed Nov 20 19:58:00 2013
@@ -163,7 +163,7 @@ SELECT CASE
        CASE
         WHEN 1=1 THEN 123
         WHEN 1=2 THEN 1.0
-        ELSE 0.0BD
+        ELSE 222.02BD
        END,
        CASE
         WHEN 1=1 THEN 'abcd'
@@ -182,7 +182,7 @@ SELECT CASE
        CASE
         WHEN 1=1 THEN 123
         WHEN 1=2 THEN 1.0
-        ELSE 0.0BD
+        ELSE 222.02BD
        END,
        CASE
         WHEN 1=1 THEN 'abcd'

Modified: hive/trunk/ql/src/test/results/clientpositive/vectorization_short_regress.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/vectorization_short_regress.q.out?rev=1543916&r1=1543915&r2=1543916&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/vectorization_short_regress.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/vectorization_short_regress.q.out Wed Nov
20 19:58:00 2013
@@ -560,7 +560,7 @@ STAGE PLANS:
                   expr: _col7
                   type: double
                   expr: (- (_col0 / (- 3728)))
-                  type: decimal(65,30)
+                  type: decimal(38,18)
                   expr: ((- (_col0 * (- 3728))) % ((- 563) % (_col0 * (- 3728))))
                   type: int
                   expr: ((_col0 / (- 3728)) - _col4)
@@ -2740,7 +2740,7 @@ STAGE PLANS:
                       expr: (cbigint % 79.553)
                       type: double
                       expr: (- (cint / cbigint))
-                      type: decimal(65,30)
+                      type: decimal(38,18)
                       expr: (10.175 % cfloat)
                       type: double
                       expr: (- cfloat)
@@ -2855,8 +2855,8 @@ WHERE  (((197 > ctinyint)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@alltypesorc
 #### A masked pattern was here ####
--462839731	988888	ss	false	-51.0	NULL	NULL	NULL	Lml5J2QBU77	false	-468.04059812638033831941
44.210000000033915	468.04059812638033831941	10.175	51.0	-102.0	-102.0	NULL	NULL	-988888	417.04059812638036
NULL	3569	NULL	NULL
--635141101	-89010	ss	false	-51.0	NULL	NULL	NULL	rVWAj4N1MCg8Scyp7wj2C	true	7135.61511066172340186496
-69.74600000000305	-7135.61511066172340186496	10.175	51.0	-102.0	-102.0	NULL	NULL	89010	-7186.6151106617235
NULL	3569	NULL	NULL
+-462839731	988888	ss	false	-51.0	NULL	NULL	NULL	Lml5J2QBU77	false	-468.04059812638033831941
44.210000000033915	468.040598126380338319	10.175	51.0	-102.0	-102.0	NULL	NULL	-988888	417.04059812638036
NULL	3569	NULL	NULL
+-635141101	-89010	ss	false	-51.0	NULL	NULL	NULL	rVWAj4N1MCg8Scyp7wj2C	true	7135.61511066172340186496
-69.74600000000305	-7135.615110661723401865	10.175	51.0	-102.0	-102.0	NULL	NULL	89010	-7186.6151106617235
NULL	3569	NULL	NULL
 WARNING: Comparing a bigint and a double may result in a loss of precision.
 PREHOOK: query: -- TargetTypeClasses: String, Bool, Double, Long, Timestamp
 -- Functions: Sum, Max, Avg, Var, StDevP, VarP

Modified: hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/typeinfo/TypeInfoFactory.java
URL: http://svn.apache.org/viewvc/hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/typeinfo/TypeInfoFactory.java?rev=1543916&r1=1543915&r2=1543916&view=diff
==============================================================================
--- hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/typeinfo/TypeInfoFactory.java
(original)
+++ hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/typeinfo/TypeInfoFactory.java
Wed Nov 20 19:58:00 2013
@@ -64,8 +64,8 @@ public final class TypeInfoFactory {
   /**
    * A DecimalTypeInfo instance that has max precision and max scale.
    */
-  public static final DecimalTypeInfo decimalTypeInfo = new DecimalTypeInfo(HiveDecimal.MAX_PRECISION,
-      HiveDecimal.MAX_SCALE);
+  public static final DecimalTypeInfo decimalTypeInfo = new DecimalTypeInfo(HiveDecimal.SYSTEM_DEFAULT_PRECISION,
+      HiveDecimal.SYSTEM_DEFAULT_SCALE);
 
   public static final PrimitiveTypeInfo unknownTypeInfo = new PrimitiveTypeInfo("unknown");
 

Modified: hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/typeinfo/TypeInfoUtils.java
URL: http://svn.apache.org/viewvc/hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/typeinfo/TypeInfoUtils.java?rev=1543916&r1=1543915&r2=1543916&view=diff
==============================================================================
--- hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/typeinfo/TypeInfoUtils.java (original)
+++ hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/typeinfo/TypeInfoUtils.java Wed
Nov 20 19:58:00 2013
@@ -420,8 +420,8 @@ public final class TypeInfoUtils {
                 params.length + " is seen");
           }
         case DECIMAL:
-          int precision = HiveDecimal.DEFAULT_PRECISION;
-          int scale = HiveDecimal.DEFAULT_SCALE;
+          int precision = HiveDecimal.USER_DEFAULT_PRECISION;
+          int scale = HiveDecimal.USER_DEFAULT_SCALE;
           if (params == null || params.length == 0) {
             // It's possible that old metadata still refers to "decimal" as a column type
w/o
             // precision/scale. In this case, the default (10,0) is assumed. Thus, do nothing
here.



Mime
View raw message