You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by se...@apache.org on 2018/06/18 22:03:02 UTC

[11/67] [abbrv] hive git commit: HIVE-19629: Enable Decimal64 reader after orc version upgrade (Prasanth Jayachandran reviewed by Matt McCline)

http://git-wip-us.apache.org/repos/asf/hive/blob/dd512593/ql/src/test/results/clientpositive/orc_merge11.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/orc_merge11.q.out b/ql/src/test/results/clientpositive/orc_merge11.q.out
index 1b2ddd3..8e7840c 100644
--- a/ql/src/test/results/clientpositive/orc_merge11.q.out
+++ b/ql/src/test/results/clientpositive/orc_merge11.q.out
@@ -6,11 +6,11 @@ PREHOOK: query: DROP TABLE orc_split_elim_n0
 PREHOOK: type: DROPTABLE
 POSTHOOK: query: DROP TABLE orc_split_elim_n0
 POSTHOOK: type: DROPTABLE
-PREHOOK: query: create table orc_split_elim_n0 (userid bigint, string1 string, subtype double, decimal1 decimal, ts timestamp) stored as orc
+PREHOOK: query: create table orc_split_elim_n0 (userid bigint, string1 string, subtype double, decimal1 decimal(38,0), ts timestamp) stored as orc
 PREHOOK: type: CREATETABLE
 PREHOOK: Output: database:default
 PREHOOK: Output: default@orc_split_elim_n0
-POSTHOOK: query: create table orc_split_elim_n0 (userid bigint, string1 string, subtype double, decimal1 decimal, ts timestamp) stored as orc
+POSTHOOK: query: create table orc_split_elim_n0 (userid bigint, string1 string, subtype double, decimal1 decimal(38,0), ts timestamp) stored as orc
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@orc_split_elim_n0
@@ -30,36 +30,36 @@ POSTHOOK: query: load data local inpath '../../data/files/orc_split_elim.orc' in
 POSTHOOK: type: LOAD
 #### A masked pattern was here ####
 POSTHOOK: Output: default@orc_split_elim_n0
-PREHOOK: query: create table orcfile_merge1_n2 (userid bigint, string1 string, subtype double, decimal1 decimal, ts timestamp) stored as orc tblproperties("orc.compress.size"="4096")
+PREHOOK: query: create table orcfile_merge1_n2 (userid bigint, string1 string, subtype double, decimal1 decimal(38,0), ts timestamp) stored as orc tblproperties("orc.compress.size"="4096")
 PREHOOK: type: CREATETABLE
 PREHOOK: Output: database:default
 PREHOOK: Output: default@orcfile_merge1_n2
-POSTHOOK: query: create table orcfile_merge1_n2 (userid bigint, string1 string, subtype double, decimal1 decimal, ts timestamp) stored as orc tblproperties("orc.compress.size"="4096")
+POSTHOOK: query: create table orcfile_merge1_n2 (userid bigint, string1 string, subtype double, decimal1 decimal(38,0), ts timestamp) stored as orc tblproperties("orc.compress.size"="4096")
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@orcfile_merge1_n2
-PREHOOK: query: insert overwrite table orcfile_merge1_n2 select * from orc_split_elim_n0
+PREHOOK: query: insert overwrite table orcfile_merge1_n2 select * from orc_split_elim_n0 order by userid
 PREHOOK: type: QUERY
 PREHOOK: Input: default@orc_split_elim_n0
 PREHOOK: Output: default@orcfile_merge1_n2
-POSTHOOK: query: insert overwrite table orcfile_merge1_n2 select * from orc_split_elim_n0
+POSTHOOK: query: insert overwrite table orcfile_merge1_n2 select * from orc_split_elim_n0 order by userid
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@orc_split_elim_n0
 POSTHOOK: Output: default@orcfile_merge1_n2
-POSTHOOK: Lineage: orcfile_merge1_n2.decimal1 SIMPLE [(orc_split_elim_n0)orc_split_elim_n0.FieldSchema(name:decimal1, type:decimal(10,0), comment:null), ]
+POSTHOOK: Lineage: orcfile_merge1_n2.decimal1 SIMPLE [(orc_split_elim_n0)orc_split_elim_n0.FieldSchema(name:decimal1, type:decimal(38,0), comment:null), ]
 POSTHOOK: Lineage: orcfile_merge1_n2.string1 SIMPLE [(orc_split_elim_n0)orc_split_elim_n0.FieldSchema(name:string1, type:string, comment:null), ]
 POSTHOOK: Lineage: orcfile_merge1_n2.subtype SIMPLE [(orc_split_elim_n0)orc_split_elim_n0.FieldSchema(name:subtype, type:double, comment:null), ]
 POSTHOOK: Lineage: orcfile_merge1_n2.ts SIMPLE [(orc_split_elim_n0)orc_split_elim_n0.FieldSchema(name:ts, type:timestamp, comment:null), ]
 POSTHOOK: Lineage: orcfile_merge1_n2.userid SIMPLE [(orc_split_elim_n0)orc_split_elim_n0.FieldSchema(name:userid, type:bigint, comment:null), ]
-PREHOOK: query: insert into table orcfile_merge1_n2 select * from orc_split_elim_n0
+PREHOOK: query: insert into table orcfile_merge1_n2 select * from orc_split_elim_n0 order by userid
 PREHOOK: type: QUERY
 PREHOOK: Input: default@orc_split_elim_n0
 PREHOOK: Output: default@orcfile_merge1_n2
-POSTHOOK: query: insert into table orcfile_merge1_n2 select * from orc_split_elim_n0
+POSTHOOK: query: insert into table orcfile_merge1_n2 select * from orc_split_elim_n0 order by userid
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@orc_split_elim_n0
 POSTHOOK: Output: default@orcfile_merge1_n2
-POSTHOOK: Lineage: orcfile_merge1_n2.decimal1 SIMPLE [(orc_split_elim_n0)orc_split_elim_n0.FieldSchema(name:decimal1, type:decimal(10,0), comment:null), ]
+POSTHOOK: Lineage: orcfile_merge1_n2.decimal1 SIMPLE [(orc_split_elim_n0)orc_split_elim_n0.FieldSchema(name:decimal1, type:decimal(38,0), comment:null), ]
 POSTHOOK: Lineage: orcfile_merge1_n2.string1 SIMPLE [(orc_split_elim_n0)orc_split_elim_n0.FieldSchema(name:string1, type:string, comment:null), ]
 POSTHOOK: Lineage: orcfile_merge1_n2.subtype SIMPLE [(orc_split_elim_n0)orc_split_elim_n0.FieldSchema(name:subtype, type:double, comment:null), ]
 POSTHOOK: Lineage: orcfile_merge1_n2.ts SIMPLE [(orc_split_elim_n0)orc_split_elim_n0.FieldSchema(name:ts, type:timestamp, comment:null), ]
@@ -76,42 +76,42 @@ File Version: 0.12 with ORC_135
 Rows: 50000
 Compression: ZLIB
 Compression size: 4096
-Type: struct<userid:bigint,string1:string,subtype:double,decimal1:decimal(10,0),ts:timestamp>
+Type: struct<userid:bigint,string1:string,subtype:double,decimal1:decimal(38,0),ts:timestamp>
 
 Stripe Statistics:
   Stripe 1:
     Column 0: count: 50000 hasNull: false
-    Column 1: count: 50000 hasNull: false bytesOnDisk: 45 min: 2 max: 100 sum: 4999238
-    Column 2: count: 50000 hasNull: false bytesOnDisk: 72 min: bar max: zebra sum: 249980
-    Column 3: count: 50000 hasNull: false bytesOnDisk: 5167 min: 0.8 max: 80.0 sum: 400102.80000000005
-    Column 4: count: 50000 hasNull: false bytesOnDisk: 542 min: 0 max: 6 sum: 32
-    Column 5: count: 50000 hasNull: false bytesOnDisk: 71 min: 1969-12-31 16:00:00.0 max: 1969-12-31 16:04:10.0 min UTC: 1969-12-31 08:00:00.0 max UTC: 1969-12-31 08:04:10.0
+    Column 1: count: 50000 hasNull: false bytesOnDisk: 30 min: 2 max: 100 sum: 4999238
+    Column 2: count: 50000 hasNull: false bytesOnDisk: 55 min: bar max: zebra sum: 249980
+    Column 3: count: 50000 hasNull: false bytesOnDisk: 5114 min: 0.8 max: 80.0 sum: 400102.8
+    Column 4: count: 50000 hasNull: false bytesOnDisk: 498 min: 0 max: 6 sum: 32
+    Column 5: count: 50000 hasNull: false bytesOnDisk: 64 min: 1969-12-31 16:00:00.0 max: 1969-12-31 16:04:10.0 min UTC: 1969-12-31 08:00:00.0 max UTC: 1969-12-31 08:04:10.0
 
 File Statistics:
   Column 0: count: 50000 hasNull: false
-  Column 1: count: 50000 hasNull: false bytesOnDisk: 45 min: 2 max: 100 sum: 4999238
-  Column 2: count: 50000 hasNull: false bytesOnDisk: 72 min: bar max: zebra sum: 249980
-  Column 3: count: 50000 hasNull: false bytesOnDisk: 5167 min: 0.8 max: 80.0 sum: 400102.80000000005
-  Column 4: count: 50000 hasNull: false bytesOnDisk: 542 min: 0 max: 6 sum: 32
-  Column 5: count: 50000 hasNull: false bytesOnDisk: 71 min: 1969-12-31 16:00:00.0 max: 1969-12-31 16:04:10.0 min UTC: 1969-12-31 08:00:00.0 max UTC: 1969-12-31 08:04:10.0
+  Column 1: count: 50000 hasNull: false bytesOnDisk: 30 min: 2 max: 100 sum: 4999238
+  Column 2: count: 50000 hasNull: false bytesOnDisk: 55 min: bar max: zebra sum: 249980
+  Column 3: count: 50000 hasNull: false bytesOnDisk: 5114 min: 0.8 max: 80.0 sum: 400102.8
+  Column 4: count: 50000 hasNull: false bytesOnDisk: 498 min: 0 max: 6 sum: 32
+  Column 5: count: 50000 hasNull: false bytesOnDisk: 64 min: 1969-12-31 16:00:00.0 max: 1969-12-31 16:04:10.0 min UTC: 1969-12-31 08:00:00.0 max UTC: 1969-12-31 08:04:10.0
 
 Stripes:
-  Stripe: offset: 3 data: 5897 rows: 50000 tail: 113 index: 497
+  Stripe: offset: 3 data: 5761 rows: 50000 tail: 112 index: 433
     Stream: column 0 section ROW_INDEX start: 3 length 17
-    Stream: column 1 section ROW_INDEX start: 20 length 83
-    Stream: column 2 section ROW_INDEX start: 103 length 81
-    Stream: column 3 section ROW_INDEX start: 184 length 111
-    Stream: column 4 section ROW_INDEX start: 295 length 110
-    Stream: column 5 section ROW_INDEX start: 405 length 95
-    Stream: column 1 section DATA start: 500 length 45
-    Stream: column 2 section DATA start: 545 length 41
-    Stream: column 2 section LENGTH start: 586 length 8
-    Stream: column 2 section DICTIONARY_DATA start: 594 length 23
-    Stream: column 3 section DATA start: 617 length 5167
-    Stream: column 4 section DATA start: 5784 length 524
-    Stream: column 4 section SECONDARY start: 6308 length 18
-    Stream: column 5 section DATA start: 6326 length 53
-    Stream: column 5 section SECONDARY start: 6379 length 18
+    Stream: column 1 section ROW_INDEX start: 20 length 73
+    Stream: column 2 section ROW_INDEX start: 93 length 79
+    Stream: column 3 section ROW_INDEX start: 172 length 85
+    Stream: column 4 section ROW_INDEX start: 257 length 92
+    Stream: column 5 section ROW_INDEX start: 349 length 87
+    Stream: column 1 section DATA start: 436 length 30
+    Stream: column 2 section DATA start: 466 length 24
+    Stream: column 2 section LENGTH start: 490 length 8
+    Stream: column 2 section DICTIONARY_DATA start: 498 length 23
+    Stream: column 3 section DATA start: 521 length 5114
+    Stream: column 4 section DATA start: 5635 length 480
+    Stream: column 4 section SECONDARY start: 6115 length 18
+    Stream: column 5 section DATA start: 6133 length 46
+    Stream: column 5 section SECONDARY start: 6179 length 18
     Encoding column 0: DIRECT
     Encoding column 1: DIRECT_V2
     Encoding column 2: DICTIONARY_V2[6]
@@ -125,37 +125,37 @@ Stripes:
       Entry 3: count: 10000 hasNull: false positions: 
       Entry 4: count: 10000 hasNull: false positions: 
     Row group indices for column 1:
-      Entry 0: count: 10000 hasNull: false min: 2 max: 100 sum: 999815 positions: 0,0,0
-      Entry 1: count: 10000 hasNull: false min: 29 max: 100 sum: 999899 positions: 0,101,391
-      Entry 2: count: 10000 hasNull: false min: 2 max: 100 sum: 999807 positions: 0,207,391
-      Entry 3: count: 10000 hasNull: false min: 13 max: 100 sum: 999842 positions: 0,313,391
-      Entry 4: count: 10000 hasNull: false min: 5 max: 100 sum: 999875 positions: 0,419,391
+      Entry 0: count: 10000 hasNull: false min: 2 max: 100 sum: 999238 positions: 0,0,0
+      Entry 1: count: 10000 hasNull: false min: 100 max: 100 sum: 1000000 positions: 0,107,262
+      Entry 2: count: 10000 hasNull: false min: 100 max: 100 sum: 1000000 positions: 0,207,22
+      Entry 3: count: 10000 hasNull: false min: 100 max: 100 sum: 1000000 positions: 0,302,294
+      Entry 4: count: 10000 hasNull: false min: 100 max: 100 sum: 1000000 positions: 0,402,54
     Row group indices for column 2:
-      Entry 0: count: 10000 hasNull: false min: bar max: zebra sum: 49996 positions: 0,0,0
-      Entry 1: count: 10000 hasNull: false min: cat max: zebra sum: 49996 positions: 0,82,391
-      Entry 2: count: 10000 hasNull: false min: eat max: zebra sum: 49996 positions: 0,168,391
-      Entry 3: count: 10000 hasNull: false min: bar max: zebra sum: 49996 positions: 0,254,391
-      Entry 4: count: 10000 hasNull: false min: dog max: zebra sum: 49996 positions: 0,340,391
+      Entry 0: count: 10000 hasNull: false min: bar max: zebra sum: 49980 positions: 0,0,0
+      Entry 1: count: 10000 hasNull: false min: zebra max: zebra sum: 50000 positions: 0,83,262
+      Entry 2: count: 10000 hasNull: false min: zebra max: zebra sum: 50000 positions: 0,163,22
+      Entry 3: count: 10000 hasNull: false min: zebra max: zebra sum: 50000 positions: 0,239,294
+      Entry 4: count: 10000 hasNull: false min: zebra max: zebra sum: 50000 positions: 0,319,54
     Row group indices for column 3:
-      Entry 0: count: 10000 hasNull: false min: 0.8 max: 80.0 sum: 80064.8 positions: 0,0
-      Entry 1: count: 10000 hasNull: false min: 1.8 max: 8.0 sum: 79993.8 positions: 1002,2176
-      Entry 2: count: 10000 hasNull: false min: 0.8 max: 8.0 sum: 79985.6 positions: 2053,256
-      Entry 3: count: 10000 hasNull: false min: 8.0 max: 80.0 sum: 80072.0 positions: 3067,2432
-      Entry 4: count: 10000 hasNull: false min: 0.8 max: 8.0 sum: 79986.6 positions: 4117,512
+      Entry 0: count: 10000 hasNull: false min: 0.8 max: 80.0 sum: 80102.8 positions: 0,0
+      Entry 1: count: 10000 hasNull: false min: 8.0 max: 8.0 sum: 80000.0 positions: 1017,2176
+      Entry 2: count: 10000 hasNull: false min: 8.0 max: 8.0 sum: 80000.0 positions: 2057,256
+      Entry 3: count: 10000 hasNull: false min: 8.0 max: 8.0 sum: 80000.0 positions: 3045,2432
+      Entry 4: count: 10000 hasNull: false min: 8.0 max: 8.0 sum: 80000.0 positions: 4085,512
     Row group indices for column 4:
-      Entry 0: count: 10000 hasNull: false min: 0 max: 2 sum: 3 positions: 0,0,0,0,0
-      Entry 1: count: 10000 hasNull: false min: 0 max: 4 sum: 7 positions: 83,1808,0,76,272
-      Entry 2: count: 10000 hasNull: false min: 0 max: 6 sum: 7 positions: 167,3616,0,156,32
-      Entry 3: count: 10000 hasNull: false min: 0 max: 3 sum: 5 positions: 290,1328,0,232,304
-      Entry 4: count: 10000 hasNull: false min: 0 max: 6 sum: 10 positions: 380,3136,0,312,64
+      Entry 0: count: 10000 hasNull: false min: 0 max: 6 sum: 32 positions: 0,0,0,0,0
+      Entry 1: count: 10000 hasNull: false min: 0 max: 0 sum: 0 positions: 84,1808,0,76,272
+      Entry 2: count: 10000 hasNull: false min: 0 max: 0 sum: 0 positions: 160,3616,0,156,32
+      Entry 3: count: 10000 hasNull: false min: 0 max: 0 sum: 0 positions: 274,1328,0,232,304
+      Entry 4: count: 10000 hasNull: false min: 0 max: 0 sum: 0 positions: 350,3136,0,312,64
     Row group indices for column 5:
       Entry 0: count: 10000 hasNull: false min: 1969-12-31 16:00:00.0 max: 1969-12-31 16:04:10.0 min UTC: 1969-12-31 08:00:00.0 max UTC: 1969-12-31 08:04:10.0 positions: 0,0,0,0,0,0
-      Entry 1: count: 10000 hasNull: false min: 1969-12-31 16:00:10.0 max: 1969-12-31 16:04:10.0 min UTC: 1969-12-31 08:00:10.0 max UTC: 1969-12-31 08:04:10.0 positions: 0,164,391,0,76,272
-      Entry 2: count: 10000 hasNull: false min: 1969-12-31 16:00:00.0 max: 1969-12-31 16:04:10.0 min UTC: 1969-12-31 08:00:00.0 max UTC: 1969-12-31 08:04:10.0 positions: 0,336,391,0,156,32
-      Entry 3: count: 10000 hasNull: false min: 1969-12-31 16:00:05.0 max: 1969-12-31 16:04:10.0 min UTC: 1969-12-31 08:00:05.0 max UTC: 1969-12-31 08:04:10.0 positions: 0,508,391,0,232,304
-      Entry 4: count: 10000 hasNull: false min: 1969-12-31 16:00:15.0 max: 1969-12-31 16:04:10.0 min UTC: 1969-12-31 08:00:15.0 max UTC: 1969-12-31 08:04:10.0 positions: 0,680,391,0,312,64
+      Entry 1: count: 10000 hasNull: false min: 1969-12-31 16:04:10.0 max: 1969-12-31 16:04:10.0 min UTC: 1969-12-31 08:04:10.0 max UTC: 1969-12-31 08:04:10.0 positions: 0,194,262,0,76,272
+      Entry 2: count: 10000 hasNull: false min: 1969-12-31 16:04:10.0 max: 1969-12-31 16:04:10.0 min UTC: 1969-12-31 08:04:10.0 max UTC: 1969-12-31 08:04:10.0 positions: 0,354,22,0,156,32
+      Entry 3: count: 10000 hasNull: false min: 1969-12-31 16:04:10.0 max: 1969-12-31 16:04:10.0 min UTC: 1969-12-31 08:04:10.0 max UTC: 1969-12-31 08:04:10.0 positions: 0,506,294,0,232,304
+      Entry 4: count: 10000 hasNull: false min: 1969-12-31 16:04:10.0 max: 1969-12-31 16:04:10.0 min UTC: 1969-12-31 08:04:10.0 max UTC: 1969-12-31 08:04:10.0 positions: 0,666,54,0,312,64
 
-File length: 6890 bytes
+File length: 6685 bytes
 Padding length: 0 bytes
 Padding ratio: 0%
 ________________________________________________________________________________________________________________________
@@ -167,42 +167,42 @@ File Version: 0.12 with ORC_135
 Rows: 50000
 Compression: ZLIB
 Compression size: 4096
-Type: struct<userid:bigint,string1:string,subtype:double,decimal1:decimal(10,0),ts:timestamp>
+Type: struct<userid:bigint,string1:string,subtype:double,decimal1:decimal(38,0),ts:timestamp>
 
 Stripe Statistics:
   Stripe 1:
     Column 0: count: 50000 hasNull: false
-    Column 1: count: 50000 hasNull: false bytesOnDisk: 45 min: 2 max: 100 sum: 4999238
-    Column 2: count: 50000 hasNull: false bytesOnDisk: 72 min: bar max: zebra sum: 249980
-    Column 3: count: 50000 hasNull: false bytesOnDisk: 5167 min: 0.8 max: 80.0 sum: 400102.80000000005
-    Column 4: count: 50000 hasNull: false bytesOnDisk: 542 min: 0 max: 6 sum: 32
-    Column 5: count: 50000 hasNull: false bytesOnDisk: 71 min: 1969-12-31 16:00:00.0 max: 1969-12-31 16:04:10.0 min UTC: 1969-12-31 08:00:00.0 max UTC: 1969-12-31 08:04:10.0
+    Column 1: count: 50000 hasNull: false bytesOnDisk: 30 min: 2 max: 100 sum: 4999238
+    Column 2: count: 50000 hasNull: false bytesOnDisk: 55 min: bar max: zebra sum: 249980
+    Column 3: count: 50000 hasNull: false bytesOnDisk: 5114 min: 0.8 max: 80.0 sum: 400102.8
+    Column 4: count: 50000 hasNull: false bytesOnDisk: 498 min: 0 max: 6 sum: 32
+    Column 5: count: 50000 hasNull: false bytesOnDisk: 64 min: 1969-12-31 16:00:00.0 max: 1969-12-31 16:04:10.0 min UTC: 1969-12-31 08:00:00.0 max UTC: 1969-12-31 08:04:10.0
 
 File Statistics:
   Column 0: count: 50000 hasNull: false
-  Column 1: count: 50000 hasNull: false bytesOnDisk: 45 min: 2 max: 100 sum: 4999238
-  Column 2: count: 50000 hasNull: false bytesOnDisk: 72 min: bar max: zebra sum: 249980
-  Column 3: count: 50000 hasNull: false bytesOnDisk: 5167 min: 0.8 max: 80.0 sum: 400102.80000000005
-  Column 4: count: 50000 hasNull: false bytesOnDisk: 542 min: 0 max: 6 sum: 32
-  Column 5: count: 50000 hasNull: false bytesOnDisk: 71 min: 1969-12-31 16:00:00.0 max: 1969-12-31 16:04:10.0 min UTC: 1969-12-31 08:00:00.0 max UTC: 1969-12-31 08:04:10.0
+  Column 1: count: 50000 hasNull: false bytesOnDisk: 30 min: 2 max: 100 sum: 4999238
+  Column 2: count: 50000 hasNull: false bytesOnDisk: 55 min: bar max: zebra sum: 249980
+  Column 3: count: 50000 hasNull: false bytesOnDisk: 5114 min: 0.8 max: 80.0 sum: 400102.8
+  Column 4: count: 50000 hasNull: false bytesOnDisk: 498 min: 0 max: 6 sum: 32
+  Column 5: count: 50000 hasNull: false bytesOnDisk: 64 min: 1969-12-31 16:00:00.0 max: 1969-12-31 16:04:10.0 min UTC: 1969-12-31 08:00:00.0 max UTC: 1969-12-31 08:04:10.0
 
 Stripes:
-  Stripe: offset: 3 data: 5897 rows: 50000 tail: 113 index: 497
+  Stripe: offset: 3 data: 5761 rows: 50000 tail: 112 index: 433
     Stream: column 0 section ROW_INDEX start: 3 length 17
-    Stream: column 1 section ROW_INDEX start: 20 length 83
-    Stream: column 2 section ROW_INDEX start: 103 length 81
-    Stream: column 3 section ROW_INDEX start: 184 length 111
-    Stream: column 4 section ROW_INDEX start: 295 length 110
-    Stream: column 5 section ROW_INDEX start: 405 length 95
-    Stream: column 1 section DATA start: 500 length 45
-    Stream: column 2 section DATA start: 545 length 41
-    Stream: column 2 section LENGTH start: 586 length 8
-    Stream: column 2 section DICTIONARY_DATA start: 594 length 23
-    Stream: column 3 section DATA start: 617 length 5167
-    Stream: column 4 section DATA start: 5784 length 524
-    Stream: column 4 section SECONDARY start: 6308 length 18
-    Stream: column 5 section DATA start: 6326 length 53
-    Stream: column 5 section SECONDARY start: 6379 length 18
+    Stream: column 1 section ROW_INDEX start: 20 length 73
+    Stream: column 2 section ROW_INDEX start: 93 length 79
+    Stream: column 3 section ROW_INDEX start: 172 length 85
+    Stream: column 4 section ROW_INDEX start: 257 length 92
+    Stream: column 5 section ROW_INDEX start: 349 length 87
+    Stream: column 1 section DATA start: 436 length 30
+    Stream: column 2 section DATA start: 466 length 24
+    Stream: column 2 section LENGTH start: 490 length 8
+    Stream: column 2 section DICTIONARY_DATA start: 498 length 23
+    Stream: column 3 section DATA start: 521 length 5114
+    Stream: column 4 section DATA start: 5635 length 480
+    Stream: column 4 section SECONDARY start: 6115 length 18
+    Stream: column 5 section DATA start: 6133 length 46
+    Stream: column 5 section SECONDARY start: 6179 length 18
     Encoding column 0: DIRECT
     Encoding column 1: DIRECT_V2
     Encoding column 2: DICTIONARY_V2[6]
@@ -216,37 +216,37 @@ Stripes:
       Entry 3: count: 10000 hasNull: false positions: 
       Entry 4: count: 10000 hasNull: false positions: 
     Row group indices for column 1:
-      Entry 0: count: 10000 hasNull: false min: 2 max: 100 sum: 999815 positions: 0,0,0
-      Entry 1: count: 10000 hasNull: false min: 29 max: 100 sum: 999899 positions: 0,101,391
-      Entry 2: count: 10000 hasNull: false min: 2 max: 100 sum: 999807 positions: 0,207,391
-      Entry 3: count: 10000 hasNull: false min: 13 max: 100 sum: 999842 positions: 0,313,391
-      Entry 4: count: 10000 hasNull: false min: 5 max: 100 sum: 999875 positions: 0,419,391
+      Entry 0: count: 10000 hasNull: false min: 2 max: 100 sum: 999238 positions: 0,0,0
+      Entry 1: count: 10000 hasNull: false min: 100 max: 100 sum: 1000000 positions: 0,107,262
+      Entry 2: count: 10000 hasNull: false min: 100 max: 100 sum: 1000000 positions: 0,207,22
+      Entry 3: count: 10000 hasNull: false min: 100 max: 100 sum: 1000000 positions: 0,302,294
+      Entry 4: count: 10000 hasNull: false min: 100 max: 100 sum: 1000000 positions: 0,402,54
     Row group indices for column 2:
-      Entry 0: count: 10000 hasNull: false min: bar max: zebra sum: 49996 positions: 0,0,0
-      Entry 1: count: 10000 hasNull: false min: cat max: zebra sum: 49996 positions: 0,82,391
-      Entry 2: count: 10000 hasNull: false min: eat max: zebra sum: 49996 positions: 0,168,391
-      Entry 3: count: 10000 hasNull: false min: bar max: zebra sum: 49996 positions: 0,254,391
-      Entry 4: count: 10000 hasNull: false min: dog max: zebra sum: 49996 positions: 0,340,391
+      Entry 0: count: 10000 hasNull: false min: bar max: zebra sum: 49980 positions: 0,0,0
+      Entry 1: count: 10000 hasNull: false min: zebra max: zebra sum: 50000 positions: 0,83,262
+      Entry 2: count: 10000 hasNull: false min: zebra max: zebra sum: 50000 positions: 0,163,22
+      Entry 3: count: 10000 hasNull: false min: zebra max: zebra sum: 50000 positions: 0,239,294
+      Entry 4: count: 10000 hasNull: false min: zebra max: zebra sum: 50000 positions: 0,319,54
     Row group indices for column 3:
-      Entry 0: count: 10000 hasNull: false min: 0.8 max: 80.0 sum: 80064.8 positions: 0,0
-      Entry 1: count: 10000 hasNull: false min: 1.8 max: 8.0 sum: 79993.8 positions: 1002,2176
-      Entry 2: count: 10000 hasNull: false min: 0.8 max: 8.0 sum: 79985.6 positions: 2053,256
-      Entry 3: count: 10000 hasNull: false min: 8.0 max: 80.0 sum: 80072.0 positions: 3067,2432
-      Entry 4: count: 10000 hasNull: false min: 0.8 max: 8.0 sum: 79986.6 positions: 4117,512
+      Entry 0: count: 10000 hasNull: false min: 0.8 max: 80.0 sum: 80102.8 positions: 0,0
+      Entry 1: count: 10000 hasNull: false min: 8.0 max: 8.0 sum: 80000.0 positions: 1017,2176
+      Entry 2: count: 10000 hasNull: false min: 8.0 max: 8.0 sum: 80000.0 positions: 2057,256
+      Entry 3: count: 10000 hasNull: false min: 8.0 max: 8.0 sum: 80000.0 positions: 3045,2432
+      Entry 4: count: 10000 hasNull: false min: 8.0 max: 8.0 sum: 80000.0 positions: 4085,512
     Row group indices for column 4:
-      Entry 0: count: 10000 hasNull: false min: 0 max: 2 sum: 3 positions: 0,0,0,0,0
-      Entry 1: count: 10000 hasNull: false min: 0 max: 4 sum: 7 positions: 83,1808,0,76,272
-      Entry 2: count: 10000 hasNull: false min: 0 max: 6 sum: 7 positions: 167,3616,0,156,32
-      Entry 3: count: 10000 hasNull: false min: 0 max: 3 sum: 5 positions: 290,1328,0,232,304
-      Entry 4: count: 10000 hasNull: false min: 0 max: 6 sum: 10 positions: 380,3136,0,312,64
+      Entry 0: count: 10000 hasNull: false min: 0 max: 6 sum: 32 positions: 0,0,0,0,0
+      Entry 1: count: 10000 hasNull: false min: 0 max: 0 sum: 0 positions: 84,1808,0,76,272
+      Entry 2: count: 10000 hasNull: false min: 0 max: 0 sum: 0 positions: 160,3616,0,156,32
+      Entry 3: count: 10000 hasNull: false min: 0 max: 0 sum: 0 positions: 274,1328,0,232,304
+      Entry 4: count: 10000 hasNull: false min: 0 max: 0 sum: 0 positions: 350,3136,0,312,64
     Row group indices for column 5:
       Entry 0: count: 10000 hasNull: false min: 1969-12-31 16:00:00.0 max: 1969-12-31 16:04:10.0 min UTC: 1969-12-31 08:00:00.0 max UTC: 1969-12-31 08:04:10.0 positions: 0,0,0,0,0,0
-      Entry 1: count: 10000 hasNull: false min: 1969-12-31 16:00:10.0 max: 1969-12-31 16:04:10.0 min UTC: 1969-12-31 08:00:10.0 max UTC: 1969-12-31 08:04:10.0 positions: 0,164,391,0,76,272
-      Entry 2: count: 10000 hasNull: false min: 1969-12-31 16:00:00.0 max: 1969-12-31 16:04:10.0 min UTC: 1969-12-31 08:00:00.0 max UTC: 1969-12-31 08:04:10.0 positions: 0,336,391,0,156,32
-      Entry 3: count: 10000 hasNull: false min: 1969-12-31 16:00:05.0 max: 1969-12-31 16:04:10.0 min UTC: 1969-12-31 08:00:05.0 max UTC: 1969-12-31 08:04:10.0 positions: 0,508,391,0,232,304
-      Entry 4: count: 10000 hasNull: false min: 1969-12-31 16:00:15.0 max: 1969-12-31 16:04:10.0 min UTC: 1969-12-31 08:00:15.0 max UTC: 1969-12-31 08:04:10.0 positions: 0,680,391,0,312,64
+      Entry 1: count: 10000 hasNull: false min: 1969-12-31 16:04:10.0 max: 1969-12-31 16:04:10.0 min UTC: 1969-12-31 08:04:10.0 max UTC: 1969-12-31 08:04:10.0 positions: 0,194,262,0,76,272
+      Entry 2: count: 10000 hasNull: false min: 1969-12-31 16:04:10.0 max: 1969-12-31 16:04:10.0 min UTC: 1969-12-31 08:04:10.0 max UTC: 1969-12-31 08:04:10.0 positions: 0,354,22,0,156,32
+      Entry 3: count: 10000 hasNull: false min: 1969-12-31 16:04:10.0 max: 1969-12-31 16:04:10.0 min UTC: 1969-12-31 08:04:10.0 max UTC: 1969-12-31 08:04:10.0 positions: 0,506,294,0,232,304
+      Entry 4: count: 10000 hasNull: false min: 1969-12-31 16:04:10.0 max: 1969-12-31 16:04:10.0 min UTC: 1969-12-31 08:04:10.0 max UTC: 1969-12-31 08:04:10.0 positions: 0,666,54,0,312,64
 
-File length: 6890 bytes
+File length: 6685 bytes
 Padding length: 0 bytes
 Padding ratio: 0%
 ________________________________________________________________________________________________________________________
@@ -279,49 +279,49 @@ File Version: 0.12 with ORC_135
 Rows: 100000
 Compression: ZLIB
 Compression size: 4096
-Type: struct<userid:bigint,string1:string,subtype:double,decimal1:decimal(10,0),ts:timestamp>
+Type: struct<userid:bigint,string1:string,subtype:double,decimal1:decimal(38,0),ts:timestamp>
 
 Stripe Statistics:
   Stripe 1:
     Column 0: count: 50000 hasNull: false
-    Column 1: count: 50000 hasNull: false bytesOnDisk: 45 min: 2 max: 100 sum: 4999238
-    Column 2: count: 50000 hasNull: false bytesOnDisk: 72 min: bar max: zebra sum: 249980
-    Column 3: count: 50000 hasNull: false bytesOnDisk: 5167 min: 0.8 max: 80.0 sum: 400102.80000000005
-    Column 4: count: 50000 hasNull: false bytesOnDisk: 542 min: 0 max: 6 sum: 32
-    Column 5: count: 50000 hasNull: false bytesOnDisk: 71 min: 1969-12-31 16:00:00.0 max: 1969-12-31 16:04:10.0 min UTC: 1969-12-31 08:00:00.0 max UTC: 1969-12-31 08:04:10.0
+    Column 1: count: 50000 hasNull: false bytesOnDisk: 30 min: 2 max: 100 sum: 4999238
+    Column 2: count: 50000 hasNull: false bytesOnDisk: 55 min: bar max: zebra sum: 249980
+    Column 3: count: 50000 hasNull: false bytesOnDisk: 5114 min: 0.8 max: 80.0 sum: 400102.8
+    Column 4: count: 50000 hasNull: false bytesOnDisk: 498 min: 0 max: 6 sum: 32
+    Column 5: count: 50000 hasNull: false bytesOnDisk: 64 min: 1969-12-31 16:00:00.0 max: 1969-12-31 16:04:10.0 min UTC: 1969-12-31 08:00:00.0 max UTC: 1969-12-31 08:04:10.0
   Stripe 2:
     Column 0: count: 50000 hasNull: false
-    Column 1: count: 50000 hasNull: false bytesOnDisk: 45 min: 2 max: 100 sum: 4999238
-    Column 2: count: 50000 hasNull: false bytesOnDisk: 72 min: bar max: zebra sum: 249980
-    Column 3: count: 50000 hasNull: false bytesOnDisk: 5167 min: 0.8 max: 80.0 sum: 400102.80000000005
-    Column 4: count: 50000 hasNull: false bytesOnDisk: 542 min: 0 max: 6 sum: 32
-    Column 5: count: 50000 hasNull: false bytesOnDisk: 71 min: 1969-12-31 16:00:00.0 max: 1969-12-31 16:04:10.0 min UTC: 1969-12-31 08:00:00.0 max UTC: 1969-12-31 08:04:10.0
+    Column 1: count: 50000 hasNull: false bytesOnDisk: 30 min: 2 max: 100 sum: 4999238
+    Column 2: count: 50000 hasNull: false bytesOnDisk: 55 min: bar max: zebra sum: 249980
+    Column 3: count: 50000 hasNull: false bytesOnDisk: 5114 min: 0.8 max: 80.0 sum: 400102.8
+    Column 4: count: 50000 hasNull: false bytesOnDisk: 498 min: 0 max: 6 sum: 32
+    Column 5: count: 50000 hasNull: false bytesOnDisk: 64 min: 1969-12-31 16:00:00.0 max: 1969-12-31 16:04:10.0 min UTC: 1969-12-31 08:00:00.0 max UTC: 1969-12-31 08:04:10.0
 
 File Statistics:
   Column 0: count: 100000 hasNull: false
-  Column 1: count: 100000 hasNull: false bytesOnDisk: 90 min: 2 max: 100 sum: 9998476
-  Column 2: count: 100000 hasNull: false bytesOnDisk: 144 min: bar max: zebra sum: 499960
-  Column 3: count: 100000 hasNull: false bytesOnDisk: 10334 min: 0.8 max: 80.0 sum: 800205.6000000001
-  Column 4: count: 100000 hasNull: false bytesOnDisk: 1084 min: 0 max: 6 sum: 64
-  Column 5: count: 100000 hasNull: false bytesOnDisk: 142 min: 1969-12-31 16:00:00.0 max: 1969-12-31 16:04:10.0 min UTC: 1969-12-31 08:00:00.0 max UTC: 1969-12-31 08:04:10.0
+  Column 1: count: 100000 hasNull: false bytesOnDisk: 60 min: 2 max: 100 sum: 9998476
+  Column 2: count: 100000 hasNull: false bytesOnDisk: 110 min: bar max: zebra sum: 499960
+  Column 3: count: 100000 hasNull: false bytesOnDisk: 10228 min: 0.8 max: 80.0 sum: 800205.6
+  Column 4: count: 100000 hasNull: false bytesOnDisk: 996 min: 0 max: 6 sum: 64
+  Column 5: count: 100000 hasNull: false bytesOnDisk: 128 min: 1969-12-31 16:00:00.0 max: 1969-12-31 16:04:10.0 min UTC: 1969-12-31 08:00:00.0 max UTC: 1969-12-31 08:04:10.0
 
 Stripes:
-  Stripe: offset: 3 data: 5897 rows: 50000 tail: 113 index: 497
+  Stripe: offset: 3 data: 5761 rows: 50000 tail: 112 index: 433
     Stream: column 0 section ROW_INDEX start: 3 length 17
-    Stream: column 1 section ROW_INDEX start: 20 length 83
-    Stream: column 2 section ROW_INDEX start: 103 length 81
-    Stream: column 3 section ROW_INDEX start: 184 length 111
-    Stream: column 4 section ROW_INDEX start: 295 length 110
-    Stream: column 5 section ROW_INDEX start: 405 length 95
-    Stream: column 1 section DATA start: 500 length 45
-    Stream: column 2 section DATA start: 545 length 41
-    Stream: column 2 section LENGTH start: 586 length 8
-    Stream: column 2 section DICTIONARY_DATA start: 594 length 23
-    Stream: column 3 section DATA start: 617 length 5167
-    Stream: column 4 section DATA start: 5784 length 524
-    Stream: column 4 section SECONDARY start: 6308 length 18
-    Stream: column 5 section DATA start: 6326 length 53
-    Stream: column 5 section SECONDARY start: 6379 length 18
+    Stream: column 1 section ROW_INDEX start: 20 length 73
+    Stream: column 2 section ROW_INDEX start: 93 length 79
+    Stream: column 3 section ROW_INDEX start: 172 length 85
+    Stream: column 4 section ROW_INDEX start: 257 length 92
+    Stream: column 5 section ROW_INDEX start: 349 length 87
+    Stream: column 1 section DATA start: 436 length 30
+    Stream: column 2 section DATA start: 466 length 24
+    Stream: column 2 section LENGTH start: 490 length 8
+    Stream: column 2 section DICTIONARY_DATA start: 498 length 23
+    Stream: column 3 section DATA start: 521 length 5114
+    Stream: column 4 section DATA start: 5635 length 480
+    Stream: column 4 section SECONDARY start: 6115 length 18
+    Stream: column 5 section DATA start: 6133 length 46
+    Stream: column 5 section SECONDARY start: 6179 length 18
     Encoding column 0: DIRECT
     Encoding column 1: DIRECT_V2
     Encoding column 2: DICTIONARY_V2[6]
@@ -335,51 +335,51 @@ Stripes:
       Entry 3: count: 10000 hasNull: false positions: 
       Entry 4: count: 10000 hasNull: false positions: 
     Row group indices for column 1:
-      Entry 0: count: 10000 hasNull: false min: 2 max: 100 sum: 999815 positions: 0,0,0
-      Entry 1: count: 10000 hasNull: false min: 29 max: 100 sum: 999899 positions: 0,101,391
-      Entry 2: count: 10000 hasNull: false min: 2 max: 100 sum: 999807 positions: 0,207,391
-      Entry 3: count: 10000 hasNull: false min: 13 max: 100 sum: 999842 positions: 0,313,391
-      Entry 4: count: 10000 hasNull: false min: 5 max: 100 sum: 999875 positions: 0,419,391
+      Entry 0: count: 10000 hasNull: false min: 2 max: 100 sum: 999238 positions: 0,0,0
+      Entry 1: count: 10000 hasNull: false min: 100 max: 100 sum: 1000000 positions: 0,107,262
+      Entry 2: count: 10000 hasNull: false min: 100 max: 100 sum: 1000000 positions: 0,207,22
+      Entry 3: count: 10000 hasNull: false min: 100 max: 100 sum: 1000000 positions: 0,302,294
+      Entry 4: count: 10000 hasNull: false min: 100 max: 100 sum: 1000000 positions: 0,402,54
     Row group indices for column 2:
-      Entry 0: count: 10000 hasNull: false min: bar max: zebra sum: 49996 positions: 0,0,0
-      Entry 1: count: 10000 hasNull: false min: cat max: zebra sum: 49996 positions: 0,82,391
-      Entry 2: count: 10000 hasNull: false min: eat max: zebra sum: 49996 positions: 0,168,391
-      Entry 3: count: 10000 hasNull: false min: bar max: zebra sum: 49996 positions: 0,254,391
-      Entry 4: count: 10000 hasNull: false min: dog max: zebra sum: 49996 positions: 0,340,391
+      Entry 0: count: 10000 hasNull: false min: bar max: zebra sum: 49980 positions: 0,0,0
+      Entry 1: count: 10000 hasNull: false min: zebra max: zebra sum: 50000 positions: 0,83,262
+      Entry 2: count: 10000 hasNull: false min: zebra max: zebra sum: 50000 positions: 0,163,22
+      Entry 3: count: 10000 hasNull: false min: zebra max: zebra sum: 50000 positions: 0,239,294
+      Entry 4: count: 10000 hasNull: false min: zebra max: zebra sum: 50000 positions: 0,319,54
     Row group indices for column 3:
-      Entry 0: count: 10000 hasNull: false min: 0.8 max: 80.0 sum: 80064.8 positions: 0,0
-      Entry 1: count: 10000 hasNull: false min: 1.8 max: 8.0 sum: 79993.8 positions: 1002,2176
-      Entry 2: count: 10000 hasNull: false min: 0.8 max: 8.0 sum: 79985.6 positions: 2053,256
-      Entry 3: count: 10000 hasNull: false min: 8.0 max: 80.0 sum: 80072.0 positions: 3067,2432
-      Entry 4: count: 10000 hasNull: false min: 0.8 max: 8.0 sum: 79986.6 positions: 4117,512
+      Entry 0: count: 10000 hasNull: false min: 0.8 max: 80.0 sum: 80102.8 positions: 0,0
+      Entry 1: count: 10000 hasNull: false min: 8.0 max: 8.0 sum: 80000.0 positions: 1017,2176
+      Entry 2: count: 10000 hasNull: false min: 8.0 max: 8.0 sum: 80000.0 positions: 2057,256
+      Entry 3: count: 10000 hasNull: false min: 8.0 max: 8.0 sum: 80000.0 positions: 3045,2432
+      Entry 4: count: 10000 hasNull: false min: 8.0 max: 8.0 sum: 80000.0 positions: 4085,512
     Row group indices for column 4:
-      Entry 0: count: 10000 hasNull: false min: 0 max: 2 sum: 3 positions: 0,0,0,0,0
-      Entry 1: count: 10000 hasNull: false min: 0 max: 4 sum: 7 positions: 83,1808,0,76,272
-      Entry 2: count: 10000 hasNull: false min: 0 max: 6 sum: 7 positions: 167,3616,0,156,32
-      Entry 3: count: 10000 hasNull: false min: 0 max: 3 sum: 5 positions: 290,1328,0,232,304
-      Entry 4: count: 10000 hasNull: false min: 0 max: 6 sum: 10 positions: 380,3136,0,312,64
+      Entry 0: count: 10000 hasNull: false min: 0 max: 6 sum: 32 positions: 0,0,0,0,0
+      Entry 1: count: 10000 hasNull: false min: 0 max: 0 sum: 0 positions: 84,1808,0,76,272
+      Entry 2: count: 10000 hasNull: false min: 0 max: 0 sum: 0 positions: 160,3616,0,156,32
+      Entry 3: count: 10000 hasNull: false min: 0 max: 0 sum: 0 positions: 274,1328,0,232,304
+      Entry 4: count: 10000 hasNull: false min: 0 max: 0 sum: 0 positions: 350,3136,0,312,64
     Row group indices for column 5:
       Entry 0: count: 10000 hasNull: false min: 1969-12-31 16:00:00.0 max: 1969-12-31 16:04:10.0 min UTC: 1969-12-31 08:00:00.0 max UTC: 1969-12-31 08:04:10.0 positions: 0,0,0,0,0,0
-      Entry 1: count: 10000 hasNull: false min: 1969-12-31 16:00:10.0 max: 1969-12-31 16:04:10.0 min UTC: 1969-12-31 08:00:10.0 max UTC: 1969-12-31 08:04:10.0 positions: 0,164,391,0,76,272
-      Entry 2: count: 10000 hasNull: false min: 1969-12-31 16:00:00.0 max: 1969-12-31 16:04:10.0 min UTC: 1969-12-31 08:00:00.0 max UTC: 1969-12-31 08:04:10.0 positions: 0,336,391,0,156,32
-      Entry 3: count: 10000 hasNull: false min: 1969-12-31 16:00:05.0 max: 1969-12-31 16:04:10.0 min UTC: 1969-12-31 08:00:05.0 max UTC: 1969-12-31 08:04:10.0 positions: 0,508,391,0,232,304
-      Entry 4: count: 10000 hasNull: false min: 1969-12-31 16:00:15.0 max: 1969-12-31 16:04:10.0 min UTC: 1969-12-31 08:00:15.0 max UTC: 1969-12-31 08:04:10.0 positions: 0,680,391,0,312,64
-  Stripe: offset: 6510 data: 5897 rows: 50000 tail: 113 index: 497
-    Stream: column 0 section ROW_INDEX start: 6510 length 17
-    Stream: column 1 section ROW_INDEX start: 6527 length 83
-    Stream: column 2 section ROW_INDEX start: 6610 length 81
-    Stream: column 3 section ROW_INDEX start: 6691 length 111
-    Stream: column 4 section ROW_INDEX start: 6802 length 110
-    Stream: column 5 section ROW_INDEX start: 6912 length 95
-    Stream: column 1 section DATA start: 7007 length 45
-    Stream: column 2 section DATA start: 7052 length 41
-    Stream: column 2 section LENGTH start: 7093 length 8
-    Stream: column 2 section DICTIONARY_DATA start: 7101 length 23
-    Stream: column 3 section DATA start: 7124 length 5167
-    Stream: column 4 section DATA start: 12291 length 524
-    Stream: column 4 section SECONDARY start: 12815 length 18
-    Stream: column 5 section DATA start: 12833 length 53
-    Stream: column 5 section SECONDARY start: 12886 length 18
+      Entry 1: count: 10000 hasNull: false min: 1969-12-31 16:04:10.0 max: 1969-12-31 16:04:10.0 min UTC: 1969-12-31 08:04:10.0 max UTC: 1969-12-31 08:04:10.0 positions: 0,194,262,0,76,272
+      Entry 2: count: 10000 hasNull: false min: 1969-12-31 16:04:10.0 max: 1969-12-31 16:04:10.0 min UTC: 1969-12-31 08:04:10.0 max UTC: 1969-12-31 08:04:10.0 positions: 0,354,22,0,156,32
+      Entry 3: count: 10000 hasNull: false min: 1969-12-31 16:04:10.0 max: 1969-12-31 16:04:10.0 min UTC: 1969-12-31 08:04:10.0 max UTC: 1969-12-31 08:04:10.0 positions: 0,506,294,0,232,304
+      Entry 4: count: 10000 hasNull: false min: 1969-12-31 16:04:10.0 max: 1969-12-31 16:04:10.0 min UTC: 1969-12-31 08:04:10.0 max UTC: 1969-12-31 08:04:10.0 positions: 0,666,54,0,312,64
+  Stripe: offset: 6309 data: 5761 rows: 50000 tail: 112 index: 433
+    Stream: column 0 section ROW_INDEX start: 6309 length 17
+    Stream: column 1 section ROW_INDEX start: 6326 length 73
+    Stream: column 2 section ROW_INDEX start: 6399 length 79
+    Stream: column 3 section ROW_INDEX start: 6478 length 85
+    Stream: column 4 section ROW_INDEX start: 6563 length 92
+    Stream: column 5 section ROW_INDEX start: 6655 length 87
+    Stream: column 1 section DATA start: 6742 length 30
+    Stream: column 2 section DATA start: 6772 length 24
+    Stream: column 2 section LENGTH start: 6796 length 8
+    Stream: column 2 section DICTIONARY_DATA start: 6804 length 23
+    Stream: column 3 section DATA start: 6827 length 5114
+    Stream: column 4 section DATA start: 11941 length 480
+    Stream: column 4 section SECONDARY start: 12421 length 18
+    Stream: column 5 section DATA start: 12439 length 46
+    Stream: column 5 section SECONDARY start: 12485 length 18
     Encoding column 0: DIRECT
     Encoding column 1: DIRECT_V2
     Encoding column 2: DICTIONARY_V2[6]
@@ -393,37 +393,37 @@ Stripes:
       Entry 3: count: 10000 hasNull: false positions: 
       Entry 4: count: 10000 hasNull: false positions: 
     Row group indices for column 1:
-      Entry 0: count: 10000 hasNull: false min: 2 max: 100 sum: 999815 positions: 0,0,0
-      Entry 1: count: 10000 hasNull: false min: 29 max: 100 sum: 999899 positions: 0,101,391
-      Entry 2: count: 10000 hasNull: false min: 2 max: 100 sum: 999807 positions: 0,207,391
-      Entry 3: count: 10000 hasNull: false min: 13 max: 100 sum: 999842 positions: 0,313,391
-      Entry 4: count: 10000 hasNull: false min: 5 max: 100 sum: 999875 positions: 0,419,391
+      Entry 0: count: 10000 hasNull: false min: 2 max: 100 sum: 999238 positions: 0,0,0
+      Entry 1: count: 10000 hasNull: false min: 100 max: 100 sum: 1000000 positions: 0,107,262
+      Entry 2: count: 10000 hasNull: false min: 100 max: 100 sum: 1000000 positions: 0,207,22
+      Entry 3: count: 10000 hasNull: false min: 100 max: 100 sum: 1000000 positions: 0,302,294
+      Entry 4: count: 10000 hasNull: false min: 100 max: 100 sum: 1000000 positions: 0,402,54
     Row group indices for column 2:
-      Entry 0: count: 10000 hasNull: false min: bar max: zebra sum: 49996 positions: 0,0,0
-      Entry 1: count: 10000 hasNull: false min: cat max: zebra sum: 49996 positions: 0,82,391
-      Entry 2: count: 10000 hasNull: false min: eat max: zebra sum: 49996 positions: 0,168,391
-      Entry 3: count: 10000 hasNull: false min: bar max: zebra sum: 49996 positions: 0,254,391
-      Entry 4: count: 10000 hasNull: false min: dog max: zebra sum: 49996 positions: 0,340,391
+      Entry 0: count: 10000 hasNull: false min: bar max: zebra sum: 49980 positions: 0,0,0
+      Entry 1: count: 10000 hasNull: false min: zebra max: zebra sum: 50000 positions: 0,83,262
+      Entry 2: count: 10000 hasNull: false min: zebra max: zebra sum: 50000 positions: 0,163,22
+      Entry 3: count: 10000 hasNull: false min: zebra max: zebra sum: 50000 positions: 0,239,294
+      Entry 4: count: 10000 hasNull: false min: zebra max: zebra sum: 50000 positions: 0,319,54
     Row group indices for column 3:
-      Entry 0: count: 10000 hasNull: false min: 0.8 max: 80.0 sum: 80064.8 positions: 0,0
-      Entry 1: count: 10000 hasNull: false min: 1.8 max: 8.0 sum: 79993.8 positions: 1002,2176
-      Entry 2: count: 10000 hasNull: false min: 0.8 max: 8.0 sum: 79985.6 positions: 2053,256
-      Entry 3: count: 10000 hasNull: false min: 8.0 max: 80.0 sum: 80072.0 positions: 3067,2432
-      Entry 4: count: 10000 hasNull: false min: 0.8 max: 8.0 sum: 79986.6 positions: 4117,512
+      Entry 0: count: 10000 hasNull: false min: 0.8 max: 80.0 sum: 80102.8 positions: 0,0
+      Entry 1: count: 10000 hasNull: false min: 8.0 max: 8.0 sum: 80000.0 positions: 1017,2176
+      Entry 2: count: 10000 hasNull: false min: 8.0 max: 8.0 sum: 80000.0 positions: 2057,256
+      Entry 3: count: 10000 hasNull: false min: 8.0 max: 8.0 sum: 80000.0 positions: 3045,2432
+      Entry 4: count: 10000 hasNull: false min: 8.0 max: 8.0 sum: 80000.0 positions: 4085,512
     Row group indices for column 4:
-      Entry 0: count: 10000 hasNull: false min: 0 max: 2 sum: 3 positions: 0,0,0,0,0
-      Entry 1: count: 10000 hasNull: false min: 0 max: 4 sum: 7 positions: 83,1808,0,76,272
-      Entry 2: count: 10000 hasNull: false min: 0 max: 6 sum: 7 positions: 167,3616,0,156,32
-      Entry 3: count: 10000 hasNull: false min: 0 max: 3 sum: 5 positions: 290,1328,0,232,304
-      Entry 4: count: 10000 hasNull: false min: 0 max: 6 sum: 10 positions: 380,3136,0,312,64
+      Entry 0: count: 10000 hasNull: false min: 0 max: 6 sum: 32 positions: 0,0,0,0,0
+      Entry 1: count: 10000 hasNull: false min: 0 max: 0 sum: 0 positions: 84,1808,0,76,272
+      Entry 2: count: 10000 hasNull: false min: 0 max: 0 sum: 0 positions: 160,3616,0,156,32
+      Entry 3: count: 10000 hasNull: false min: 0 max: 0 sum: 0 positions: 274,1328,0,232,304
+      Entry 4: count: 10000 hasNull: false min: 0 max: 0 sum: 0 positions: 350,3136,0,312,64
     Row group indices for column 5:
       Entry 0: count: 10000 hasNull: false min: 1969-12-31 16:00:00.0 max: 1969-12-31 16:04:10.0 min UTC: 1969-12-31 08:00:00.0 max UTC: 1969-12-31 08:04:10.0 positions: 0,0,0,0,0,0
-      Entry 1: count: 10000 hasNull: false min: 1969-12-31 16:00:10.0 max: 1969-12-31 16:04:10.0 min UTC: 1969-12-31 08:00:10.0 max UTC: 1969-12-31 08:04:10.0 positions: 0,164,391,0,76,272
-      Entry 2: count: 10000 hasNull: false min: 1969-12-31 16:00:00.0 max: 1969-12-31 16:04:10.0 min UTC: 1969-12-31 08:00:00.0 max UTC: 1969-12-31 08:04:10.0 positions: 0,336,391,0,156,32
-      Entry 3: count: 10000 hasNull: false min: 1969-12-31 16:00:05.0 max: 1969-12-31 16:04:10.0 min UTC: 1969-12-31 08:00:05.0 max UTC: 1969-12-31 08:04:10.0 positions: 0,508,391,0,232,304
-      Entry 4: count: 10000 hasNull: false min: 1969-12-31 16:00:15.0 max: 1969-12-31 16:04:10.0 min UTC: 1969-12-31 08:00:15.0 max UTC: 1969-12-31 08:04:10.0 positions: 0,680,391,0,312,64
+      Entry 1: count: 10000 hasNull: false min: 1969-12-31 16:04:10.0 max: 1969-12-31 16:04:10.0 min UTC: 1969-12-31 08:04:10.0 max UTC: 1969-12-31 08:04:10.0 positions: 0,194,262,0,76,272
+      Entry 2: count: 10000 hasNull: false min: 1969-12-31 16:04:10.0 max: 1969-12-31 16:04:10.0 min UTC: 1969-12-31 08:04:10.0 max UTC: 1969-12-31 08:04:10.0 positions: 0,354,22,0,156,32
+      Entry 3: count: 10000 hasNull: false min: 1969-12-31 16:04:10.0 max: 1969-12-31 16:04:10.0 min UTC: 1969-12-31 08:04:10.0 max UTC: 1969-12-31 08:04:10.0 positions: 0,506,294,0,232,304
+      Entry 4: count: 10000 hasNull: false min: 1969-12-31 16:04:10.0 max: 1969-12-31 16:04:10.0 min UTC: 1969-12-31 08:04:10.0 max UTC: 1969-12-31 08:04:10.0 positions: 0,666,54,0,312,64
 
-File length: 13411 bytes
+File length: 13004 bytes
 Padding length: 0 bytes
 Padding ratio: 0%
 ________________________________________________________________________________________________________________________

http://git-wip-us.apache.org/repos/asf/hive/blob/dd512593/ql/src/test/results/clientpositive/orc_merge5.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/orc_merge5.q.out b/ql/src/test/results/clientpositive/orc_merge5.q.out
index 0e87ce6..768132c 100644
--- a/ql/src/test/results/clientpositive/orc_merge5.q.out
+++ b/ql/src/test/results/clientpositive/orc_merge5.q.out
@@ -1,16 +1,16 @@
-PREHOOK: query: create table orc_merge5_n5 (userid bigint, string1 string, subtype double, decimal1 decimal, ts timestamp) stored as orc
+PREHOOK: query: create table orc_merge5_n5 (userid bigint, string1 string, subtype double, decimal1 decimal(38,0), ts timestamp) stored as orc
 PREHOOK: type: CREATETABLE
 PREHOOK: Output: database:default
 PREHOOK: Output: default@orc_merge5_n5
-POSTHOOK: query: create table orc_merge5_n5 (userid bigint, string1 string, subtype double, decimal1 decimal, ts timestamp) stored as orc
+POSTHOOK: query: create table orc_merge5_n5 (userid bigint, string1 string, subtype double, decimal1 decimal(38,0), ts timestamp) stored as orc
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@orc_merge5_n5
-PREHOOK: query: create table orc_merge5b_n0 (userid bigint, string1 string, subtype double, decimal1 decimal, ts timestamp) stored as orc
+PREHOOK: query: create table orc_merge5b_n0 (userid bigint, string1 string, subtype double, decimal1 decimal(38,0), ts timestamp) stored as orc
 PREHOOK: type: CREATETABLE
 PREHOOK: Output: database:default
 PREHOOK: Output: default@orc_merge5b_n0
-POSTHOOK: query: create table orc_merge5b_n0 (userid bigint, string1 string, subtype double, decimal1 decimal, ts timestamp) stored as orc
+POSTHOOK: query: create table orc_merge5b_n0 (userid bigint, string1 string, subtype double, decimal1 decimal(38,0), ts timestamp) stored as orc
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@orc_merge5b_n0
@@ -43,7 +43,7 @@ STAGE PLANS:
               predicate: (userid <= 13L) (type: boolean)
               Statistics: Num rows: 1 Data size: 2464020 Basic stats: COMPLETE Column stats: NONE
               Select Operator
-                expressions: userid (type: bigint), string1 (type: string), subtype (type: double), decimal1 (type: decimal(10,0)), ts (type: timestamp)
+                expressions: userid (type: bigint), string1 (type: string), subtype (type: double), decimal1 (type: decimal(38,0)), ts (type: timestamp)
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4
                 Statistics: Num rows: 1 Data size: 2464020 Basic stats: COMPLETE Column stats: NONE
                 File Output Operator
@@ -55,7 +55,7 @@ STAGE PLANS:
                       serde: org.apache.hadoop.hive.ql.io.orc.OrcSerde
                       name: default.orc_merge5b_n0
                 Select Operator
-                  expressions: _col0 (type: bigint), _col1 (type: string), _col2 (type: double), _col3 (type: decimal(10,0)), _col4 (type: timestamp)
+                  expressions: _col0 (type: bigint), _col1 (type: string), _col2 (type: double), _col3 (type: decimal(38,0)), _col4 (type: timestamp)
                   outputColumnNames: userid, string1, subtype, decimal1, ts
                   Statistics: Num rows: 1 Data size: 2464020 Basic stats: COMPLETE Column stats: NONE
                   Group By Operator
@@ -66,7 +66,7 @@ STAGE PLANS:
                     Reduce Output Operator
                       sort order: 
                       Statistics: Num rows: 1 Data size: 2344 Basic stats: COMPLETE Column stats: NONE
-                      value expressions: _col0 (type: struct<columntype:string,min:bigint,max:bigint,countnulls:bigint,bitvector:binary>), _col1 (type: struct<columntype:string,maxlength:bigint,sumlength:bigint,count:bigint,countnulls:bigint,bitvector:binary>), _col2 (type: struct<columntype:string,min:double,max:double,countnulls:bigint,bitvector:binary>), _col3 (type: struct<columntype:string,min:decimal(10,0),max:decimal(10,0),countnulls:bigint,bitvector:binary>), _col4 (type: struct<columntype:string,min:bigint,max:bigint,countnulls:bigint,bitvector:binary>)
+                      value expressions: _col0 (type: struct<columntype:string,min:bigint,max:bigint,countnulls:bigint,bitvector:binary>), _col1 (type: struct<columntype:string,maxlength:bigint,sumlength:bigint,count:bigint,countnulls:bigint,bitvector:binary>), _col2 (type: struct<columntype:string,min:double,max:double,countnulls:bigint,bitvector:binary>), _col3 (type: struct<columntype:string,min:decimal(38,0),max:decimal(38,0),countnulls:bigint,bitvector:binary>), _col4 (type: struct<columntype:string,min:bigint,max:bigint,countnulls:bigint,bitvector:binary>)
       Reduce Operator Tree:
         Group By Operator
           aggregations: compute_stats(VALUE._col0), compute_stats(VALUE._col1), compute_stats(VALUE._col2), compute_stats(VALUE._col3), compute_stats(VALUE._col4)
@@ -96,7 +96,7 @@ STAGE PLANS:
       Basic Stats Work:
       Column Stats Desc:
           Columns: userid, string1, subtype, decimal1, ts
-          Column Types: bigint, string, double, decimal(10,0), timestamp
+          Column Types: bigint, string, double, decimal(38,0), timestamp
           Table: default.orc_merge5b_n0
 
 PREHOOK: query: insert overwrite table orc_merge5b_n0 select userid,string1,subtype,decimal1,ts from orc_merge5_n5 where userid<=13
@@ -107,7 +107,7 @@ POSTHOOK: query: insert overwrite table orc_merge5b_n0 select userid,string1,sub
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@orc_merge5_n5
 POSTHOOK: Output: default@orc_merge5b_n0
-POSTHOOK: Lineage: orc_merge5b_n0.decimal1 SIMPLE [(orc_merge5_n5)orc_merge5_n5.FieldSchema(name:decimal1, type:decimal(10,0), comment:null), ]
+POSTHOOK: Lineage: orc_merge5b_n0.decimal1 SIMPLE [(orc_merge5_n5)orc_merge5_n5.FieldSchema(name:decimal1, type:decimal(38,0), comment:null), ]
 POSTHOOK: Lineage: orc_merge5b_n0.string1 SIMPLE [(orc_merge5_n5)orc_merge5_n5.FieldSchema(name:string1, type:string, comment:null), ]
 POSTHOOK: Lineage: orc_merge5b_n0.subtype SIMPLE [(orc_merge5_n5)orc_merge5_n5.FieldSchema(name:subtype, type:double, comment:null), ]
 POSTHOOK: Lineage: orc_merge5b_n0.ts SIMPLE [(orc_merge5_n5)orc_merge5_n5.FieldSchema(name:ts, type:timestamp, comment:null), ]
@@ -159,7 +159,7 @@ STAGE PLANS:
               predicate: (userid <= 13L) (type: boolean)
               Statistics: Num rows: 1 Data size: 2464020 Basic stats: COMPLETE Column stats: NONE
               Select Operator
-                expressions: userid (type: bigint), string1 (type: string), subtype (type: double), decimal1 (type: decimal(10,0)), ts (type: timestamp)
+                expressions: userid (type: bigint), string1 (type: string), subtype (type: double), decimal1 (type: decimal(38,0)), ts (type: timestamp)
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4
                 Statistics: Num rows: 1 Data size: 2464020 Basic stats: COMPLETE Column stats: NONE
                 File Output Operator
@@ -171,7 +171,7 @@ STAGE PLANS:
                       serde: org.apache.hadoop.hive.ql.io.orc.OrcSerde
                       name: default.orc_merge5b_n0
                 Select Operator
-                  expressions: _col0 (type: bigint), _col1 (type: string), _col2 (type: double), _col3 (type: decimal(10,0)), _col4 (type: timestamp)
+                  expressions: _col0 (type: bigint), _col1 (type: string), _col2 (type: double), _col3 (type: decimal(38,0)), _col4 (type: timestamp)
                   outputColumnNames: userid, string1, subtype, decimal1, ts
                   Statistics: Num rows: 1 Data size: 2464020 Basic stats: COMPLETE Column stats: NONE
                   Group By Operator
@@ -182,7 +182,7 @@ STAGE PLANS:
                     Reduce Output Operator
                       sort order: 
                       Statistics: Num rows: 1 Data size: 2344 Basic stats: COMPLETE Column stats: NONE
-                      value expressions: _col0 (type: struct<columntype:string,min:bigint,max:bigint,countnulls:bigint,bitvector:binary>), _col1 (type: struct<columntype:string,maxlength:bigint,sumlength:bigint,count:bigint,countnulls:bigint,bitvector:binary>), _col2 (type: struct<columntype:string,min:double,max:double,countnulls:bigint,bitvector:binary>), _col3 (type: struct<columntype:string,min:decimal(10,0),max:decimal(10,0),countnulls:bigint,bitvector:binary>), _col4 (type: struct<columntype:string,min:bigint,max:bigint,countnulls:bigint,bitvector:binary>)
+                      value expressions: _col0 (type: struct<columntype:string,min:bigint,max:bigint,countnulls:bigint,bitvector:binary>), _col1 (type: struct<columntype:string,maxlength:bigint,sumlength:bigint,count:bigint,countnulls:bigint,bitvector:binary>), _col2 (type: struct<columntype:string,min:double,max:double,countnulls:bigint,bitvector:binary>), _col3 (type: struct<columntype:string,min:decimal(38,0),max:decimal(38,0),countnulls:bigint,bitvector:binary>), _col4 (type: struct<columntype:string,min:bigint,max:bigint,countnulls:bigint,bitvector:binary>)
       Reduce Operator Tree:
         Group By Operator
           aggregations: compute_stats(VALUE._col0), compute_stats(VALUE._col1), compute_stats(VALUE._col2), compute_stats(VALUE._col3), compute_stats(VALUE._col4)
@@ -221,7 +221,7 @@ STAGE PLANS:
       Basic Stats Work:
       Column Stats Desc:
           Columns: userid, string1, subtype, decimal1, ts
-          Column Types: bigint, string, double, decimal(10,0), timestamp
+          Column Types: bigint, string, double, decimal(38,0), timestamp
           Table: default.orc_merge5b_n0
 
   Stage: Stage-3
@@ -252,7 +252,7 @@ POSTHOOK: query: insert overwrite table orc_merge5b_n0 select userid,string1,sub
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@orc_merge5_n5
 POSTHOOK: Output: default@orc_merge5b_n0
-POSTHOOK: Lineage: orc_merge5b_n0.decimal1 SIMPLE [(orc_merge5_n5)orc_merge5_n5.FieldSchema(name:decimal1, type:decimal(10,0), comment:null), ]
+POSTHOOK: Lineage: orc_merge5b_n0.decimal1 SIMPLE [(orc_merge5_n5)orc_merge5_n5.FieldSchema(name:decimal1, type:decimal(38,0), comment:null), ]
 POSTHOOK: Lineage: orc_merge5b_n0.string1 SIMPLE [(orc_merge5_n5)orc_merge5_n5.FieldSchema(name:string1, type:string, comment:null), ]
 POSTHOOK: Lineage: orc_merge5b_n0.subtype SIMPLE [(orc_merge5_n5)orc_merge5_n5.FieldSchema(name:subtype, type:double, comment:null), ]
 POSTHOOK: Lineage: orc_merge5b_n0.ts SIMPLE [(orc_merge5_n5)orc_merge5_n5.FieldSchema(name:ts, type:timestamp, comment:null), ]
@@ -286,7 +286,7 @@ POSTHOOK: query: insert overwrite table orc_merge5b_n0 select userid,string1,sub
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@orc_merge5_n5
 POSTHOOK: Output: default@orc_merge5b_n0
-POSTHOOK: Lineage: orc_merge5b_n0.decimal1 SIMPLE [(orc_merge5_n5)orc_merge5_n5.FieldSchema(name:decimal1, type:decimal(10,0), comment:null), ]
+POSTHOOK: Lineage: orc_merge5b_n0.decimal1 SIMPLE [(orc_merge5_n5)orc_merge5_n5.FieldSchema(name:decimal1, type:decimal(38,0), comment:null), ]
 POSTHOOK: Lineage: orc_merge5b_n0.string1 SIMPLE [(orc_merge5_n5)orc_merge5_n5.FieldSchema(name:string1, type:string, comment:null), ]
 POSTHOOK: Lineage: orc_merge5b_n0.subtype SIMPLE [(orc_merge5_n5)orc_merge5_n5.FieldSchema(name:subtype, type:double, comment:null), ]
 POSTHOOK: Lineage: orc_merge5b_n0.ts SIMPLE [(orc_merge5_n5)orc_merge5_n5.FieldSchema(name:ts, type:timestamp, comment:null), ]

http://git-wip-us.apache.org/repos/asf/hive/blob/dd512593/ql/src/test/results/clientpositive/orc_merge6.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/orc_merge6.q.out b/ql/src/test/results/clientpositive/orc_merge6.q.out
index 39813b7..7c429d6 100644
--- a/ql/src/test/results/clientpositive/orc_merge6.q.out
+++ b/ql/src/test/results/clientpositive/orc_merge6.q.out
@@ -1,16 +1,16 @@
-PREHOOK: query: create table orc_merge5_n4 (userid bigint, string1 string, subtype double, decimal1 decimal, ts timestamp) stored as orc
+PREHOOK: query: create table orc_merge5_n4 (userid bigint, string1 string, subtype double, decimal1 decimal(38,0), ts timestamp) stored as orc
 PREHOOK: type: CREATETABLE
 PREHOOK: Output: database:default
 PREHOOK: Output: default@orc_merge5_n4
-POSTHOOK: query: create table orc_merge5_n4 (userid bigint, string1 string, subtype double, decimal1 decimal, ts timestamp) stored as orc
+POSTHOOK: query: create table orc_merge5_n4 (userid bigint, string1 string, subtype double, decimal1 decimal(38,0), ts timestamp) stored as orc
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@orc_merge5_n4
-PREHOOK: query: create table orc_merge5a_n1 (userid bigint, string1 string, subtype double, decimal1 decimal, ts timestamp) partitioned by (year string, hour int) stored as orc
+PREHOOK: query: create table orc_merge5a_n1 (userid bigint, string1 string, subtype double, decimal1 decimal(38,0), ts timestamp) partitioned by (year string, hour int) stored as orc
 PREHOOK: type: CREATETABLE
 PREHOOK: Output: database:default
 PREHOOK: Output: default@orc_merge5a_n1
-POSTHOOK: query: create table orc_merge5a_n1 (userid bigint, string1 string, subtype double, decimal1 decimal, ts timestamp) partitioned by (year string, hour int) stored as orc
+POSTHOOK: query: create table orc_merge5a_n1 (userid bigint, string1 string, subtype double, decimal1 decimal(38,0), ts timestamp) partitioned by (year string, hour int) stored as orc
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@orc_merge5a_n1
@@ -43,7 +43,7 @@ STAGE PLANS:
               predicate: (userid <= 13L) (type: boolean)
               Statistics: Num rows: 1 Data size: 2464020 Basic stats: COMPLETE Column stats: NONE
               Select Operator
-                expressions: userid (type: bigint), string1 (type: string), subtype (type: double), decimal1 (type: decimal(10,0)), ts (type: timestamp)
+                expressions: userid (type: bigint), string1 (type: string), subtype (type: double), decimal1 (type: decimal(38,0)), ts (type: timestamp)
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4
                 Statistics: Num rows: 1 Data size: 2464020 Basic stats: COMPLETE Column stats: NONE
                 File Output Operator
@@ -55,7 +55,7 @@ STAGE PLANS:
                       serde: org.apache.hadoop.hive.ql.io.orc.OrcSerde
                       name: default.orc_merge5a_n1
                 Select Operator
-                  expressions: _col0 (type: bigint), _col1 (type: string), _col2 (type: double), _col3 (type: decimal(10,0)), _col4 (type: timestamp), '2000' (type: string), UDFToInteger('24') (type: int)
+                  expressions: _col0 (type: bigint), _col1 (type: string), _col2 (type: double), _col3 (type: decimal(38,0)), _col4 (type: timestamp), '2000' (type: string), UDFToInteger('24') (type: int)
                   outputColumnNames: userid, string1, subtype, decimal1, ts, year, hour
                   Statistics: Num rows: 1 Data size: 2464020 Basic stats: COMPLETE Column stats: NONE
                   Group By Operator
@@ -69,7 +69,7 @@ STAGE PLANS:
                       sort order: ++
                       Map-reduce partition columns: _col0 (type: string), _col1 (type: int)
                       Statistics: Num rows: 1 Data size: 2464020 Basic stats: COMPLETE Column stats: NONE
-                      value expressions: _col2 (type: struct<columntype:string,min:bigint,max:bigint,countnulls:bigint,bitvector:binary>), _col3 (type: struct<columntype:string,maxlength:bigint,sumlength:bigint,count:bigint,countnulls:bigint,bitvector:binary>), _col4 (type: struct<columntype:string,min:double,max:double,countnulls:bigint,bitvector:binary>), _col5 (type: struct<columntype:string,min:decimal(10,0),max:decimal(10,0),countnulls:bigint,bitvector:binary>), _col6 (type: struct<columntype:string,min:bigint,max:bigint,countnulls:bigint,bitvector:binary>)
+                      value expressions: _col2 (type: struct<columntype:string,min:bigint,max:bigint,countnulls:bigint,bitvector:binary>), _col3 (type: struct<columntype:string,maxlength:bigint,sumlength:bigint,count:bigint,countnulls:bigint,bitvector:binary>), _col4 (type: struct<columntype:string,min:double,max:double,countnulls:bigint,bitvector:binary>), _col5 (type: struct<columntype:string,min:decimal(38,0),max:decimal(38,0),countnulls:bigint,bitvector:binary>), _col6 (type: struct<columntype:string,min:bigint,max:bigint,countnulls:bigint,bitvector:binary>)
       Reduce Operator Tree:
         Group By Operator
           aggregations: compute_stats(VALUE._col0), compute_stats(VALUE._col1), compute_stats(VALUE._col2), compute_stats(VALUE._col3), compute_stats(VALUE._col4)
@@ -78,7 +78,7 @@ STAGE PLANS:
           outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6
           Statistics: Num rows: 1 Data size: 2464020 Basic stats: COMPLETE Column stats: NONE
           Select Operator
-            expressions: _col2 (type: struct<columntype:string,min:bigint,max:bigint,countnulls:bigint,numdistinctvalues:bigint,ndvbitvector:binary>), _col3 (type: struct<columntype:string,maxlength:bigint,avglength:double,countnulls:bigint,numdistinctvalues:bigint,ndvbitvector:binary>), _col4 (type: struct<columntype:string,min:double,max:double,countnulls:bigint,numdistinctvalues:bigint,ndvbitvector:binary>), _col5 (type: struct<columntype:string,min:decimal(10,0),max:decimal(10,0),countnulls:bigint,numdistinctvalues:bigint,ndvbitvector:binary>), _col6 (type: struct<columntype:string,min:bigint,max:bigint,countnulls:bigint,numdistinctvalues:bigint,ndvbitvector:binary>), _col0 (type: string), _col1 (type: int)
+            expressions: _col2 (type: struct<columntype:string,min:bigint,max:bigint,countnulls:bigint,numdistinctvalues:bigint,ndvbitvector:binary>), _col3 (type: struct<columntype:string,maxlength:bigint,avglength:double,countnulls:bigint,numdistinctvalues:bigint,ndvbitvector:binary>), _col4 (type: struct<columntype:string,min:double,max:double,countnulls:bigint,numdistinctvalues:bigint,ndvbitvector:binary>), _col5 (type: struct<columntype:string,min:decimal(38,0),max:decimal(38,0),countnulls:bigint,numdistinctvalues:bigint,ndvbitvector:binary>), _col6 (type: struct<columntype:string,min:bigint,max:bigint,countnulls:bigint,numdistinctvalues:bigint,ndvbitvector:binary>), _col0 (type: string), _col1 (type: int)
             outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6
             Statistics: Num rows: 1 Data size: 2464020 Basic stats: COMPLETE Column stats: NONE
             File Output Operator
@@ -107,7 +107,7 @@ STAGE PLANS:
       Basic Stats Work:
       Column Stats Desc:
           Columns: userid, string1, subtype, decimal1, ts
-          Column Types: bigint, string, double, decimal(10,0), timestamp
+          Column Types: bigint, string, double, decimal(38,0), timestamp
           Table: default.orc_merge5a_n1
 
 PREHOOK: query: insert overwrite table orc_merge5a_n1 partition (year="2000",hour=24) select userid,string1,subtype,decimal1,ts from orc_merge5_n4 where userid<=13
@@ -118,7 +118,7 @@ POSTHOOK: query: insert overwrite table orc_merge5a_n1 partition (year="2000",ho
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@orc_merge5_n4
 POSTHOOK: Output: default@orc_merge5a_n1@year=2000/hour=24
-POSTHOOK: Lineage: orc_merge5a_n1 PARTITION(year=2000,hour=24).decimal1 SIMPLE [(orc_merge5_n4)orc_merge5_n4.FieldSchema(name:decimal1, type:decimal(10,0), comment:null), ]
+POSTHOOK: Lineage: orc_merge5a_n1 PARTITION(year=2000,hour=24).decimal1 SIMPLE [(orc_merge5_n4)orc_merge5_n4.FieldSchema(name:decimal1, type:decimal(38,0), comment:null), ]
 POSTHOOK: Lineage: orc_merge5a_n1 PARTITION(year=2000,hour=24).string1 SIMPLE [(orc_merge5_n4)orc_merge5_n4.FieldSchema(name:string1, type:string, comment:null), ]
 POSTHOOK: Lineage: orc_merge5a_n1 PARTITION(year=2000,hour=24).subtype SIMPLE [(orc_merge5_n4)orc_merge5_n4.FieldSchema(name:subtype, type:double, comment:null), ]
 POSTHOOK: Lineage: orc_merge5a_n1 PARTITION(year=2000,hour=24).ts SIMPLE [(orc_merge5_n4)orc_merge5_n4.FieldSchema(name:ts, type:timestamp, comment:null), ]
@@ -131,7 +131,7 @@ POSTHOOK: query: insert overwrite table orc_merge5a_n1 partition (year="2001",ho
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@orc_merge5_n4
 POSTHOOK: Output: default@orc_merge5a_n1@year=2001/hour=24
-POSTHOOK: Lineage: orc_merge5a_n1 PARTITION(year=2001,hour=24).decimal1 SIMPLE [(orc_merge5_n4)orc_merge5_n4.FieldSchema(name:decimal1, type:decimal(10,0), comment:null), ]
+POSTHOOK: Lineage: orc_merge5a_n1 PARTITION(year=2001,hour=24).decimal1 SIMPLE [(orc_merge5_n4)orc_merge5_n4.FieldSchema(name:decimal1, type:decimal(38,0), comment:null), ]
 POSTHOOK: Lineage: orc_merge5a_n1 PARTITION(year=2001,hour=24).string1 SIMPLE [(orc_merge5_n4)orc_merge5_n4.FieldSchema(name:string1, type:string, comment:null), ]
 POSTHOOK: Lineage: orc_merge5a_n1 PARTITION(year=2001,hour=24).subtype SIMPLE [(orc_merge5_n4)orc_merge5_n4.FieldSchema(name:subtype, type:double, comment:null), ]
 POSTHOOK: Lineage: orc_merge5a_n1 PARTITION(year=2001,hour=24).ts SIMPLE [(orc_merge5_n4)orc_merge5_n4.FieldSchema(name:ts, type:timestamp, comment:null), ]
@@ -212,7 +212,7 @@ STAGE PLANS:
               predicate: (userid <= 13L) (type: boolean)
               Statistics: Num rows: 1 Data size: 2464020 Basic stats: COMPLETE Column stats: NONE
               Select Operator
-                expressions: userid (type: bigint), string1 (type: string), subtype (type: double), decimal1 (type: decimal(10,0)), ts (type: timestamp)
+                expressions: userid (type: bigint), string1 (type: string), subtype (type: double), decimal1 (type: decimal(38,0)), ts (type: timestamp)
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4
                 Statistics: Num rows: 1 Data size: 2464020 Basic stats: COMPLETE Column stats: NONE
                 File Output Operator
@@ -224,7 +224,7 @@ STAGE PLANS:
                       serde: org.apache.hadoop.hive.ql.io.orc.OrcSerde
                       name: default.orc_merge5a_n1
                 Select Operator
-                  expressions: _col0 (type: bigint), _col1 (type: string), _col2 (type: double), _col3 (type: decimal(10,0)), _col4 (type: timestamp), '2000' (type: string), UDFToInteger('24') (type: int)
+                  expressions: _col0 (type: bigint), _col1 (type: string), _col2 (type: double), _col3 (type: decimal(38,0)), _col4 (type: timestamp), '2000' (type: string), UDFToInteger('24') (type: int)
                   outputColumnNames: userid, string1, subtype, decimal1, ts, year, hour
                   Statistics: Num rows: 1 Data size: 2464020 Basic stats: COMPLETE Column stats: NONE
                   Group By Operator
@@ -238,7 +238,7 @@ STAGE PLANS:
                       sort order: ++
                       Map-reduce partition columns: _col0 (type: string), _col1 (type: int)
                       Statistics: Num rows: 1 Data size: 2464020 Basic stats: COMPLETE Column stats: NONE
-                      value expressions: _col2 (type: struct<columntype:string,min:bigint,max:bigint,countnulls:bigint,bitvector:binary>), _col3 (type: struct<columntype:string,maxlength:bigint,sumlength:bigint,count:bigint,countnulls:bigint,bitvector:binary>), _col4 (type: struct<columntype:string,min:double,max:double,countnulls:bigint,bitvector:binary>), _col5 (type: struct<columntype:string,min:decimal(10,0),max:decimal(10,0),countnulls:bigint,bitvector:binary>), _col6 (type: struct<columntype:string,min:bigint,max:bigint,countnulls:bigint,bitvector:binary>)
+                      value expressions: _col2 (type: struct<columntype:string,min:bigint,max:bigint,countnulls:bigint,bitvector:binary>), _col3 (type: struct<columntype:string,maxlength:bigint,sumlength:bigint,count:bigint,countnulls:bigint,bitvector:binary>), _col4 (type: struct<columntype:string,min:double,max:double,countnulls:bigint,bitvector:binary>), _col5 (type: struct<columntype:string,min:decimal(38,0),max:decimal(38,0),countnulls:bigint,bitvector:binary>), _col6 (type: struct<columntype:string,min:bigint,max:bigint,countnulls:bigint,bitvector:binary>)
       Reduce Operator Tree:
         Group By Operator
           aggregations: compute_stats(VALUE._col0), compute_stats(VALUE._col1), compute_stats(VALUE._col2), compute_stats(VALUE._col3), compute_stats(VALUE._col4)
@@ -247,7 +247,7 @@ STAGE PLANS:
           outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6
           Statistics: Num rows: 1 Data size: 2464020 Basic stats: COMPLETE Column stats: NONE
           Select Operator
-            expressions: _col2 (type: struct<columntype:string,min:bigint,max:bigint,countnulls:bigint,numdistinctvalues:bigint,ndvbitvector:binary>), _col3 (type: struct<columntype:string,maxlength:bigint,avglength:double,countnulls:bigint,numdistinctvalues:bigint,ndvbitvector:binary>), _col4 (type: struct<columntype:string,min:double,max:double,countnulls:bigint,numdistinctvalues:bigint,ndvbitvector:binary>), _col5 (type: struct<columntype:string,min:decimal(10,0),max:decimal(10,0),countnulls:bigint,numdistinctvalues:bigint,ndvbitvector:binary>), _col6 (type: struct<columntype:string,min:bigint,max:bigint,countnulls:bigint,numdistinctvalues:bigint,ndvbitvector:binary>), _col0 (type: string), _col1 (type: int)
+            expressions: _col2 (type: struct<columntype:string,min:bigint,max:bigint,countnulls:bigint,numdistinctvalues:bigint,ndvbitvector:binary>), _col3 (type: struct<columntype:string,maxlength:bigint,avglength:double,countnulls:bigint,numdistinctvalues:bigint,ndvbitvector:binary>), _col4 (type: struct<columntype:string,min:double,max:double,countnulls:bigint,numdistinctvalues:bigint,ndvbitvector:binary>), _col5 (type: struct<columntype:string,min:decimal(38,0),max:decimal(38,0),countnulls:bigint,numdistinctvalues:bigint,ndvbitvector:binary>), _col6 (type: struct<columntype:string,min:bigint,max:bigint,countnulls:bigint,numdistinctvalues:bigint,ndvbitvector:binary>), _col0 (type: string), _col1 (type: int)
             outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6
             Statistics: Num rows: 1 Data size: 2464020 Basic stats: COMPLETE Column stats: NONE
             File Output Operator
@@ -285,7 +285,7 @@ STAGE PLANS:
       Basic Stats Work:
       Column Stats Desc:
           Columns: userid, string1, subtype, decimal1, ts
-          Column Types: bigint, string, double, decimal(10,0), timestamp
+          Column Types: bigint, string, double, decimal(38,0), timestamp
           Table: default.orc_merge5a_n1
 
   Stage: Stage-3
@@ -316,7 +316,7 @@ POSTHOOK: query: insert overwrite table orc_merge5a_n1 partition (year="2000",ho
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@orc_merge5_n4
 POSTHOOK: Output: default@orc_merge5a_n1@year=2000/hour=24
-POSTHOOK: Lineage: orc_merge5a_n1 PARTITION(year=2000,hour=24).decimal1 SIMPLE [(orc_merge5_n4)orc_merge5_n4.FieldSchema(name:decimal1, type:decimal(10,0), comment:null), ]
+POSTHOOK: Lineage: orc_merge5a_n1 PARTITION(year=2000,hour=24).decimal1 SIMPLE [(orc_merge5_n4)orc_merge5_n4.FieldSchema(name:decimal1, type:decimal(38,0), comment:null), ]
 POSTHOOK: Lineage: orc_merge5a_n1 PARTITION(year=2000,hour=24).string1 SIMPLE [(orc_merge5_n4)orc_merge5_n4.FieldSchema(name:string1, type:string, comment:null), ]
 POSTHOOK: Lineage: orc_merge5a_n1 PARTITION(year=2000,hour=24).subtype SIMPLE [(orc_merge5_n4)orc_merge5_n4.FieldSchema(name:subtype, type:double, comment:null), ]
 POSTHOOK: Lineage: orc_merge5a_n1 PARTITION(year=2000,hour=24).ts SIMPLE [(orc_merge5_n4)orc_merge5_n4.FieldSchema(name:ts, type:timestamp, comment:null), ]
@@ -329,7 +329,7 @@ POSTHOOK: query: insert overwrite table orc_merge5a_n1 partition (year="2001",ho
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@orc_merge5_n4
 POSTHOOK: Output: default@orc_merge5a_n1@year=2001/hour=24
-POSTHOOK: Lineage: orc_merge5a_n1 PARTITION(year=2001,hour=24).decimal1 SIMPLE [(orc_merge5_n4)orc_merge5_n4.FieldSchema(name:decimal1, type:decimal(10,0), comment:null), ]
+POSTHOOK: Lineage: orc_merge5a_n1 PARTITION(year=2001,hour=24).decimal1 SIMPLE [(orc_merge5_n4)orc_merge5_n4.FieldSchema(name:decimal1, type:decimal(38,0), comment:null), ]
 POSTHOOK: Lineage: orc_merge5a_n1 PARTITION(year=2001,hour=24).string1 SIMPLE [(orc_merge5_n4)orc_merge5_n4.FieldSchema(name:string1, type:string, comment:null), ]
 POSTHOOK: Lineage: orc_merge5a_n1 PARTITION(year=2001,hour=24).subtype SIMPLE [(orc_merge5_n4)orc_merge5_n4.FieldSchema(name:subtype, type:double, comment:null), ]
 POSTHOOK: Lineage: orc_merge5a_n1 PARTITION(year=2001,hour=24).ts SIMPLE [(orc_merge5_n4)orc_merge5_n4.FieldSchema(name:ts, type:timestamp, comment:null), ]
@@ -392,7 +392,7 @@ POSTHOOK: query: insert overwrite table orc_merge5a_n1 partition (year="2000",ho
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@orc_merge5_n4
 POSTHOOK: Output: default@orc_merge5a_n1@year=2000/hour=24
-POSTHOOK: Lineage: orc_merge5a_n1 PARTITION(year=2000,hour=24).decimal1 SIMPLE [(orc_merge5_n4)orc_merge5_n4.FieldSchema(name:decimal1, type:decimal(10,0), comment:null), ]
+POSTHOOK: Lineage: orc_merge5a_n1 PARTITION(year=2000,hour=24).decimal1 SIMPLE [(orc_merge5_n4)orc_merge5_n4.FieldSchema(name:decimal1, type:decimal(38,0), comment:null), ]
 POSTHOOK: Lineage: orc_merge5a_n1 PARTITION(year=2000,hour=24).string1 SIMPLE [(orc_merge5_n4)orc_merge5_n4.FieldSchema(name:string1, type:string, comment:null), ]
 POSTHOOK: Lineage: orc_merge5a_n1 PARTITION(year=2000,hour=24).subtype SIMPLE [(orc_merge5_n4)orc_merge5_n4.FieldSchema(name:subtype, type:double, comment:null), ]
 POSTHOOK: Lineage: orc_merge5a_n1 PARTITION(year=2000,hour=24).ts SIMPLE [(orc_merge5_n4)orc_merge5_n4.FieldSchema(name:ts, type:timestamp, comment:null), ]
@@ -405,7 +405,7 @@ POSTHOOK: query: insert overwrite table orc_merge5a_n1 partition (year="2001",ho
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@orc_merge5_n4
 POSTHOOK: Output: default@orc_merge5a_n1@year=2001/hour=24
-POSTHOOK: Lineage: orc_merge5a_n1 PARTITION(year=2001,hour=24).decimal1 SIMPLE [(orc_merge5_n4)orc_merge5_n4.FieldSchema(name:decimal1, type:decimal(10,0), comment:null), ]
+POSTHOOK: Lineage: orc_merge5a_n1 PARTITION(year=2001,hour=24).decimal1 SIMPLE [(orc_merge5_n4)orc_merge5_n4.FieldSchema(name:decimal1, type:decimal(38,0), comment:null), ]
 POSTHOOK: Lineage: orc_merge5a_n1 PARTITION(year=2001,hour=24).string1 SIMPLE [(orc_merge5_n4)orc_merge5_n4.FieldSchema(name:string1, type:string, comment:null), ]
 POSTHOOK: Lineage: orc_merge5a_n1 PARTITION(year=2001,hour=24).subtype SIMPLE [(orc_merge5_n4)orc_merge5_n4.FieldSchema(name:subtype, type:double, comment:null), ]
 POSTHOOK: Lineage: orc_merge5a_n1 PARTITION(year=2001,hour=24).ts SIMPLE [(orc_merge5_n4)orc_merge5_n4.FieldSchema(name:ts, type:timestamp, comment:null), ]

http://git-wip-us.apache.org/repos/asf/hive/blob/dd512593/ql/src/test/results/clientpositive/orc_merge_incompat1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/orc_merge_incompat1.q.out b/ql/src/test/results/clientpositive/orc_merge_incompat1.q.out
index 5a1b00b..6295714 100644
--- a/ql/src/test/results/clientpositive/orc_merge_incompat1.q.out
+++ b/ql/src/test/results/clientpositive/orc_merge_incompat1.q.out
@@ -1,16 +1,16 @@
-PREHOOK: query: create table orc_merge5_n3 (userid bigint, string1 string, subtype double, decimal1 decimal, ts timestamp) stored as orc
+PREHOOK: query: create table orc_merge5_n3 (userid bigint, string1 string, subtype double, decimal1 decimal(38,0), ts timestamp) stored as orc
 PREHOOK: type: CREATETABLE
 PREHOOK: Output: database:default
 PREHOOK: Output: default@orc_merge5_n3
-POSTHOOK: query: create table orc_merge5_n3 (userid bigint, string1 string, subtype double, decimal1 decimal, ts timestamp) stored as orc
+POSTHOOK: query: create table orc_merge5_n3 (userid bigint, string1 string, subtype double, decimal1 decimal(38,0), ts timestamp) stored as orc
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@orc_merge5_n3
-PREHOOK: query: create table orc_merge5b (userid bigint, string1 string, subtype double, decimal1 decimal, ts timestamp) stored as orc
+PREHOOK: query: create table orc_merge5b (userid bigint, string1 string, subtype double, decimal1 decimal(38,0), ts timestamp) stored as orc
 PREHOOK: type: CREATETABLE
 PREHOOK: Output: database:default
 PREHOOK: Output: default@orc_merge5b
-POSTHOOK: query: create table orc_merge5b (userid bigint, string1 string, subtype double, decimal1 decimal, ts timestamp) stored as orc
+POSTHOOK: query: create table orc_merge5b (userid bigint, string1 string, subtype double, decimal1 decimal(38,0), ts timestamp) stored as orc
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@orc_merge5b
@@ -42,7 +42,7 @@ STAGE PLANS:
               predicate: (userid <= 13L) (type: boolean)
               Statistics: Num rows: 1 Data size: 2464020 Basic stats: COMPLETE Column stats: NONE
               Select Operator
-                expressions: userid (type: bigint), string1 (type: string), subtype (type: double), decimal1 (type: decimal(10,0)), ts (type: timestamp)
+                expressions: userid (type: bigint), string1 (type: string), subtype (type: double), decimal1 (type: decimal(38,0)), ts (type: timestamp)
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4
                 Statistics: Num rows: 1 Data size: 2464020 Basic stats: COMPLETE Column stats: NONE
                 File Output Operator
@@ -54,7 +54,7 @@ STAGE PLANS:
                       serde: org.apache.hadoop.hive.ql.io.orc.OrcSerde
                       name: default.orc_merge5b
                 Select Operator
-                  expressions: _col0 (type: bigint), _col1 (type: string), _col2 (type: double), _col3 (type: decimal(10,0)), _col4 (type: timestamp)
+                  expressions: _col0 (type: bigint), _col1 (type: string), _col2 (type: double), _col3 (type: decimal(38,0)), _col4 (type: timestamp)
                   outputColumnNames: userid, string1, subtype, decimal1, ts
                   Statistics: Num rows: 1 Data size: 2464020 Basic stats: COMPLETE Column stats: NONE
                   Group By Operator
@@ -65,7 +65,7 @@ STAGE PLANS:
                     Reduce Output Operator
                       sort order: 
                       Statistics: Num rows: 1 Data size: 2344 Basic stats: COMPLETE Column stats: NONE
-                      value expressions: _col0 (type: struct<columntype:string,min:bigint,max:bigint,countnulls:bigint,bitvector:binary>), _col1 (type: struct<columntype:string,maxlength:bigint,sumlength:bigint,count:bigint,countnulls:bigint,bitvector:binary>), _col2 (type: struct<columntype:string,min:double,max:double,countnulls:bigint,bitvector:binary>), _col3 (type: struct<columntype:string,min:decimal(10,0),max:decimal(10,0),countnulls:bigint,bitvector:binary>), _col4 (type: struct<columntype:string,min:bigint,max:bigint,countnulls:bigint,bitvector:binary>)
+                      value expressions: _col0 (type: struct<columntype:string,min:bigint,max:bigint,countnulls:bigint,bitvector:binary>), _col1 (type: struct<columntype:string,maxlength:bigint,sumlength:bigint,count:bigint,countnulls:bigint,bitvector:binary>), _col2 (type: struct<columntype:string,min:double,max:double,countnulls:bigint,bitvector:binary>), _col3 (type: struct<columntype:string,min:decimal(38,0),max:decimal(38,0),countnulls:bigint,bitvector:binary>), _col4 (type: struct<columntype:string,min:bigint,max:bigint,countnulls:bigint,bitvector:binary>)
       Reduce Operator Tree:
         Group By Operator
           aggregations: compute_stats(VALUE._col0), compute_stats(VALUE._col1), compute_stats(VALUE._col2), compute_stats(VALUE._col3), compute_stats(VALUE._col4)
@@ -95,7 +95,7 @@ STAGE PLANS:
       Basic Stats Work:
       Column Stats Desc:
           Columns: userid, string1, subtype, decimal1, ts
-          Column Types: bigint, string, double, decimal(10,0), timestamp
+          Column Types: bigint, string, double, decimal(38,0), timestamp
           Table: default.orc_merge5b
 
 PREHOOK: query: insert overwrite table orc_merge5b select userid,string1,subtype,decimal1,ts from orc_merge5_n3 where userid<=13
@@ -106,7 +106,7 @@ POSTHOOK: query: insert overwrite table orc_merge5b select userid,string1,subtyp
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@orc_merge5_n3
 POSTHOOK: Output: default@orc_merge5b
-POSTHOOK: Lineage: orc_merge5b.decimal1 SIMPLE [(orc_merge5_n3)orc_merge5_n3.FieldSchema(name:decimal1, type:decimal(10,0), comment:null), ]
+POSTHOOK: Lineage: orc_merge5b.decimal1 SIMPLE [(orc_merge5_n3)orc_merge5_n3.FieldSchema(name:decimal1, type:decimal(38,0), comment:null), ]
 POSTHOOK: Lineage: orc_merge5b.string1 SIMPLE [(orc_merge5_n3)orc_merge5_n3.FieldSchema(name:string1, type:string, comment:null), ]
 POSTHOOK: Lineage: orc_merge5b.subtype SIMPLE [(orc_merge5_n3)orc_merge5_n3.FieldSchema(name:subtype, type:double, comment:null), ]
 POSTHOOK: Lineage: orc_merge5b.ts SIMPLE [(orc_merge5_n3)orc_merge5_n3.FieldSchema(name:ts, type:timestamp, comment:null), ]
@@ -119,7 +119,7 @@ POSTHOOK: query: insert into table orc_merge5b select userid,string1,subtype,dec
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@orc_merge5_n3
 POSTHOOK: Output: default@orc_merge5b
-POSTHOOK: Lineage: orc_merge5b.decimal1 SIMPLE [(orc_merge5_n3)orc_merge5_n3.FieldSchema(name:decimal1, type:decimal(10,0), comment:null), ]
+POSTHOOK: Lineage: orc_merge5b.decimal1 SIMPLE [(orc_merge5_n3)orc_merge5_n3.FieldSchema(name:decimal1, type:decimal(38,0), comment:null), ]
 POSTHOOK: Lineage: orc_merge5b.string1 SIMPLE [(orc_merge5_n3)orc_merge5_n3.FieldSchema(name:string1, type:string, comment:null), ]
 POSTHOOK: Lineage: orc_merge5b.subtype SIMPLE [(orc_merge5_n3)orc_merge5_n3.FieldSchema(name:subtype, type:double, comment:null), ]
 POSTHOOK: Lineage: orc_merge5b.ts SIMPLE [(orc_merge5_n3)orc_merge5_n3.FieldSchema(name:ts, type:timestamp, comment:null), ]
@@ -132,7 +132,7 @@ POSTHOOK: query: insert into table orc_merge5b select userid,string1,subtype,dec
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@orc_merge5_n3
 POSTHOOK: Output: default@orc_merge5b
-POSTHOOK: Lineage: orc_merge5b.decimal1 SIMPLE [(orc_merge5_n3)orc_merge5_n3.FieldSchema(name:decimal1, type:decimal(10,0), comment:null), ]
+POSTHOOK: Lineage: orc_merge5b.decimal1 SIMPLE [(orc_merge5_n3)orc_merge5_n3.FieldSchema(name:decimal1, type:decimal(38,0), comment:null), ]
 POSTHOOK: Lineage: orc_merge5b.string1 SIMPLE [(orc_merge5_n3)orc_merge5_n3.FieldSchema(name:string1, type:string, comment:null), ]
 POSTHOOK: Lineage: orc_merge5b.subtype SIMPLE [(orc_merge5_n3)orc_merge5_n3.FieldSchema(name:subtype, type:double, comment:null), ]
 POSTHOOK: Lineage: orc_merge5b.ts SIMPLE [(orc_merge5_n3)orc_merge5_n3.FieldSchema(name:ts, type:timestamp, comment:null), ]
@@ -145,7 +145,7 @@ POSTHOOK: query: insert into table orc_merge5b select userid,string1,subtype,dec
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@orc_merge5_n3
 POSTHOOK: Output: default@orc_merge5b
-POSTHOOK: Lineage: orc_merge5b.decimal1 SIMPLE [(orc_merge5_n3)orc_merge5_n3.FieldSchema(name:decimal1, type:decimal(10,0), comment:null), ]
+POSTHOOK: Lineage: orc_merge5b.decimal1 SIMPLE [(orc_merge5_n3)orc_merge5_n3.FieldSchema(name:decimal1, type:decimal(38,0), comment:null), ]
 POSTHOOK: Lineage: orc_merge5b.string1 SIMPLE [(orc_merge5_n3)orc_merge5_n3.FieldSchema(name:string1, type:string, comment:null), ]
 POSTHOOK: Lineage: orc_merge5b.subtype SIMPLE [(orc_merge5_n3)orc_merge5_n3.FieldSchema(name:subtype, type:double, comment:null), ]
 POSTHOOK: Lineage: orc_merge5b.ts SIMPLE [(orc_merge5_n3)orc_merge5_n3.FieldSchema(name:ts, type:timestamp, comment:null), ]
@@ -158,7 +158,7 @@ POSTHOOK: query: insert into table orc_merge5b select userid,string1,subtype,dec
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@orc_merge5_n3
 POSTHOOK: Output: default@orc_merge5b
-POSTHOOK: Lineage: orc_merge5b.decimal1 SIMPLE [(orc_merge5_n3)orc_merge5_n3.FieldSchema(name:decimal1, type:decimal(10,0), comment:null), ]
+POSTHOOK: Lineage: orc_merge5b.decimal1 SIMPLE [(orc_merge5_n3)orc_merge5_n3.FieldSchema(name:decimal1, type:decimal(38,0), comment:null), ]
 POSTHOOK: Lineage: orc_merge5b.string1 SIMPLE [(orc_merge5_n3)orc_merge5_n3.FieldSchema(name:string1, type:string, comment:null), ]
 POSTHOOK: Lineage: orc_merge5b.subtype SIMPLE [(orc_merge5_n3)orc_merge5_n3.FieldSchema(name:subtype, type:double, comment:null), ]
 POSTHOOK: Lineage: orc_merge5b.ts SIMPLE [(orc_merge5_n3)orc_merge5_n3.FieldSchema(name:ts, type:timestamp, comment:null), ]
@@ -171,7 +171,7 @@ POSTHOOK: query: insert into table orc_merge5b select userid,string1,subtype,dec
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@orc_merge5_n3
 POSTHOOK: Output: default@orc_merge5b
-POSTHOOK: Lineage: orc_merge5b.decimal1 SIMPLE [(orc_merge5_n3)orc_merge5_n3.FieldSchema(name:decimal1, type:decimal(10,0), comment:null), ]
+POSTHOOK: Lineage: orc_merge5b.decimal1 SIMPLE [(orc_merge5_n3)orc_merge5_n3.FieldSchema(name:decimal1, type:decimal(38,0), comment:null), ]
 POSTHOOK: Lineage: orc_merge5b.string1 SIMPLE [(orc_merge5_n3)orc_merge5_n3.FieldSchema(name:string1, type:string, comment:null), ]
 POSTHOOK: Lineage: orc_merge5b.subtype SIMPLE [(orc_merge5_n3)orc_merge5_n3.FieldSchema(name:subtype, type:double, comment:null), ]
 POSTHOOK: Lineage: orc_merge5b.ts SIMPLE [(orc_merge5_n3)orc_merge5_n3.FieldSchema(name:ts, type:timestamp, comment:null), ]