You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by ai...@apache.org on 2017/01/12 14:25:46 UTC

[02/13] hive git commit: HIVE-15520: Improve the sum performance for Range based window (Aihua Xu, reviewed by Yongzhi Chen)

http://git-wip-us.apache.org/repos/asf/hive/blob/a28b28f3/ql/src/test/results/clientpositive/vectorized_ptf.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/vectorized_ptf.q.out b/ql/src/test/results/clientpositive/vectorized_ptf.q.out
index dd6c62c..77b5075 100644
--- a/ql/src/test/results/clientpositive/vectorized_ptf.q.out
+++ b/ql/src/test/results/clientpositive/vectorized_ptf.q.out
@@ -124,7 +124,7 @@ explain extended
 select p_mfgr, p_name, p_size,
 rank() over (partition by p_mfgr order by p_name) as r,
 dense_rank() over (partition by p_mfgr order by p_name) as dr,
-sum(p_retailprice) over (partition by p_mfgr order by p_name rows between unbounded preceding and current row) as s1
+round(sum(p_retailprice) over (partition by p_mfgr order by p_name rows between unbounded preceding and current row),2) as s1
 from noop(on part_orc 
   partition by p_mfgr
   order by p_name
@@ -136,7 +136,7 @@ explain extended
 select p_mfgr, p_name, p_size,
 rank() over (partition by p_mfgr order by p_name) as r,
 dense_rank() over (partition by p_mfgr order by p_name) as dr,
-sum(p_retailprice) over (partition by p_mfgr order by p_name rows between unbounded preceding and current row) as s1
+round(sum(p_retailprice) over (partition by p_mfgr order by p_name rows between unbounded preceding and current row),2) as s1
 from noop(on part_orc 
   partition by p_mfgr
   order by p_name
@@ -332,7 +332,7 @@ STAGE PLANS:
                         window frame: PRECEDING(MAX)~CURRENT
             Statistics: Num rows: 26 Data size: 16042 Basic stats: COMPLETE Column stats: NONE
             Select Operator
-              expressions: _col2 (type: string), _col1 (type: string), _col5 (type: int), rank_window_0 (type: int), dense_rank_window_1 (type: int), sum_window_2 (type: double)
+              expressions: _col2 (type: string), _col1 (type: string), _col5 (type: int), rank_window_0 (type: int), dense_rank_window_1 (type: int), round(sum_window_2, 2) (type: double)
               outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
               Statistics: Num rows: 26 Data size: 16042 Basic stats: COMPLETE Column stats: NONE
               File Output Operator
@@ -956,7 +956,7 @@ explain extended
 select p_mfgr, p_name, p_size,
 rank() over (partition by p_mfgr order by p_name) as r,
 dense_rank() over (partition by p_mfgr order by p_name) as dr,
-sum(p_retailprice) over (partition by p_mfgr order by p_name rows between unbounded preceding and current row) as s1
+round(sum(p_retailprice) over (partition by p_mfgr order by p_name rows between unbounded preceding and current row),2) as s1
 from noop(on part_orc 
   partition by p_mfgr
   order by p_name
@@ -968,7 +968,7 @@ explain extended
 select p_mfgr, p_name, p_size,
 rank() over (partition by p_mfgr order by p_name) as r,
 dense_rank() over (partition by p_mfgr order by p_name) as dr,
-sum(p_retailprice) over (partition by p_mfgr order by p_name rows between unbounded preceding and current row) as s1
+round(sum(p_retailprice) over (partition by p_mfgr order by p_name rows between unbounded preceding and current row),2) as s1
 from noop(on part_orc 
   partition by p_mfgr
   order by p_name
@@ -1164,7 +1164,7 @@ STAGE PLANS:
                         window frame: PRECEDING(MAX)~CURRENT
             Statistics: Num rows: 26 Data size: 16042 Basic stats: COMPLETE Column stats: NONE
             Select Operator
-              expressions: _col2 (type: string), _col1 (type: string), _col5 (type: int), rank_window_0 (type: int), dense_rank_window_1 (type: int), sum_window_2 (type: double)
+              expressions: _col2 (type: string), _col1 (type: string), _col5 (type: int), rank_window_0 (type: int), dense_rank_window_1 (type: int), round(sum_window_2, 2) (type: double)
               outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
               Statistics: Num rows: 26 Data size: 16042 Basic stats: COMPLETE Column stats: NONE
               File Output Operator
@@ -1199,7 +1199,7 @@ STAGE PLANS:
 PREHOOK: query: select p_mfgr, p_name, p_size,
 rank() over (partition by p_mfgr order by p_name) as r,
 dense_rank() over (partition by p_mfgr order by p_name) as dr,
-sum(p_retailprice) over (partition by p_mfgr order by p_name rows between unbounded preceding and current row) as s1
+round(sum(p_retailprice) over (partition by p_mfgr order by p_name rows between unbounded preceding and current row),2) as s1
 from noop(on part_orc 
   partition by p_mfgr
   order by p_name
@@ -1210,7 +1210,7 @@ PREHOOK: Input: default@part_orc
 POSTHOOK: query: select p_mfgr, p_name, p_size,
 rank() over (partition by p_mfgr order by p_name) as r,
 dense_rank() over (partition by p_mfgr order by p_name) as dr,
-sum(p_retailprice) over (partition by p_mfgr order by p_name rows between unbounded preceding and current row) as s1
+round(sum(p_retailprice) over (partition by p_mfgr order by p_name rows between unbounded preceding and current row),2) as s1
 from noop(on part_orc 
   partition by p_mfgr
   order by p_name
@@ -1221,12 +1221,12 @@ POSTHOOK: Input: default@part_orc
 Manufacturer#1	almond antique burnished rose metallic	2	1	1	1173.15
 Manufacturer#1	almond antique burnished rose metallic	2	1	1	2346.3
 Manufacturer#1	almond antique chartreuse lavender yellow	34	3	2	4100.06
-Manufacturer#1	almond antique salmon chartreuse burlywood	6	4	3	5702.650000000001
-Manufacturer#1	almond aquamarine burnished black steel	28	5	4	7117.070000000001
-Manufacturer#1	almond aquamarine pink moccasin thistle	42	6	5	8749.730000000001
+Manufacturer#1	almond antique salmon chartreuse burlywood	6	4	3	5702.65
+Manufacturer#1	almond aquamarine burnished black steel	28	5	4	7117.07
+Manufacturer#1	almond aquamarine pink moccasin thistle	42	6	5	8749.73
 Manufacturer#2	almond antique violet chocolate turquoise	14	1	1	1690.68
 Manufacturer#2	almond antique violet turquoise frosted	40	2	2	3491.38
-Manufacturer#2	almond aquamarine midnight light salmon	2	3	3	5523.360000000001
+Manufacturer#2	almond aquamarine midnight light salmon	2	3	3	5523.36
 Manufacturer#2	almond aquamarine rose maroon antique	25	4	4	7222.02
 Manufacturer#2	almond aquamarine sandy cyan gainsboro	18	5	5	8923.62
 Manufacturer#3	almond antique chartreuse khaki white	17	1	1	1671.68
@@ -1238,9 +1238,9 @@ Manufacturer#4	almond antique gainsboro frosted violet	10	1	1	1620.67
 Manufacturer#4	almond antique violet mint lemon	39	2	2	2996.09
 Manufacturer#4	almond aquamarine floral ivory bisque	27	3	3	4202.35
 Manufacturer#4	almond aquamarine yellow dodger mint	7	4	4	6047.27
-Manufacturer#4	almond azure aquamarine papaya violet	12	5	5	7337.620000000001
+Manufacturer#4	almond azure aquamarine papaya violet	12	5	5	7337.62
 Manufacturer#5	almond antique blue firebrick mint	31	1	1	1789.69
-Manufacturer#5	almond antique medium spring khaki	6	2	2	3401.3500000000004
+Manufacturer#5	almond antique medium spring khaki	6	2	2	3401.35
 Manufacturer#5	almond antique sky peru orange	2	3	3	5190.08
 Manufacturer#5	almond aquamarine dodger light gainsboro	46	4	4	6208.18
 Manufacturer#5	almond azure blanched chiffon midnight	23	5	5	7672.66
@@ -2769,7 +2769,7 @@ explain extended
 select p_mfgr, p_name, p_size,
 rank() over (partition by p_mfgr order by p_name) as r,
 dense_rank() over (partition by p_mfgr order by p_name) as dr,
-sum(p_retailprice) over (partition by p_mfgr order by p_name rows between unbounded preceding and current row) as s1
+round(sum(p_retailprice) over (partition by p_mfgr order by p_name rows between unbounded preceding and current row),2) as s1
 from noopwithmap(on part_orc 
   partition by p_mfgr
   order by p_name)
@@ -2780,7 +2780,7 @@ explain extended
 select p_mfgr, p_name, p_size,
 rank() over (partition by p_mfgr order by p_name) as r,
 dense_rank() over (partition by p_mfgr order by p_name) as dr,
-sum(p_retailprice) over (partition by p_mfgr order by p_name rows between unbounded preceding and current row) as s1
+round(sum(p_retailprice) over (partition by p_mfgr order by p_name rows between unbounded preceding and current row),2) as s1
 from noopwithmap(on part_orc 
   partition by p_mfgr
   order by p_name)
@@ -2991,7 +2991,7 @@ STAGE PLANS:
                         window frame: PRECEDING(MAX)~CURRENT
             Statistics: Num rows: 26 Data size: 16042 Basic stats: COMPLETE Column stats: NONE
             Select Operator
-              expressions: _col2 (type: string), _col1 (type: string), _col5 (type: int), rank_window_0 (type: int), dense_rank_window_1 (type: int), sum_window_2 (type: double)
+              expressions: _col2 (type: string), _col1 (type: string), _col5 (type: int), rank_window_0 (type: int), dense_rank_window_1 (type: int), round(sum_window_2, 2) (type: double)
               outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
               Statistics: Num rows: 26 Data size: 16042 Basic stats: COMPLETE Column stats: NONE
               File Output Operator
@@ -3026,7 +3026,7 @@ STAGE PLANS:
 PREHOOK: query: select p_mfgr, p_name, p_size,
 rank() over (partition by p_mfgr order by p_name) as r,
 dense_rank() over (partition by p_mfgr order by p_name) as dr,
-sum(p_retailprice) over (partition by p_mfgr order by p_name rows between unbounded preceding and current row) as s1
+round(sum(p_retailprice) over (partition by p_mfgr order by p_name rows between unbounded preceding and current row),2) as s1
 from noopwithmap(on part_orc 
   partition by p_mfgr
   order by p_name)
@@ -3036,7 +3036,7 @@ PREHOOK: Input: default@part_orc
 POSTHOOK: query: select p_mfgr, p_name, p_size,
 rank() over (partition by p_mfgr order by p_name) as r,
 dense_rank() over (partition by p_mfgr order by p_name) as dr,
-sum(p_retailprice) over (partition by p_mfgr order by p_name rows between unbounded preceding and current row) as s1
+round(sum(p_retailprice) over (partition by p_mfgr order by p_name rows between unbounded preceding and current row),2) as s1
 from noopwithmap(on part_orc 
   partition by p_mfgr
   order by p_name)
@@ -3046,12 +3046,12 @@ POSTHOOK: Input: default@part_orc
 Manufacturer#1	almond antique burnished rose metallic	2	1	1	1173.15
 Manufacturer#1	almond antique burnished rose metallic	2	1	1	2346.3
 Manufacturer#1	almond antique chartreuse lavender yellow	34	3	2	4100.06
-Manufacturer#1	almond antique salmon chartreuse burlywood	6	4	3	5702.650000000001
-Manufacturer#1	almond aquamarine burnished black steel	28	5	4	7117.070000000001
-Manufacturer#1	almond aquamarine pink moccasin thistle	42	6	5	8749.730000000001
+Manufacturer#1	almond antique salmon chartreuse burlywood	6	4	3	5702.65
+Manufacturer#1	almond aquamarine burnished black steel	28	5	4	7117.07
+Manufacturer#1	almond aquamarine pink moccasin thistle	42	6	5	8749.73
 Manufacturer#2	almond antique violet chocolate turquoise	14	1	1	1690.68
 Manufacturer#2	almond antique violet turquoise frosted	40	2	2	3491.38
-Manufacturer#2	almond aquamarine midnight light salmon	2	3	3	5523.360000000001
+Manufacturer#2	almond aquamarine midnight light salmon	2	3	3	5523.36
 Manufacturer#2	almond aquamarine rose maroon antique	25	4	4	7222.02
 Manufacturer#2	almond aquamarine sandy cyan gainsboro	18	5	5	8923.62
 Manufacturer#3	almond antique chartreuse khaki white	17	1	1	1671.68
@@ -3063,9 +3063,9 @@ Manufacturer#4	almond antique gainsboro frosted violet	10	1	1	1620.67
 Manufacturer#4	almond antique violet mint lemon	39	2	2	2996.09
 Manufacturer#4	almond aquamarine floral ivory bisque	27	3	3	4202.35
 Manufacturer#4	almond aquamarine yellow dodger mint	7	4	4	6047.27
-Manufacturer#4	almond azure aquamarine papaya violet	12	5	5	7337.620000000001
+Manufacturer#4	almond azure aquamarine papaya violet	12	5	5	7337.62
 Manufacturer#5	almond antique blue firebrick mint	31	1	1	1789.69
-Manufacturer#5	almond antique medium spring khaki	6	2	2	3401.3500000000004
+Manufacturer#5	almond antique medium spring khaki	6	2	2	3401.35
 Manufacturer#5	almond antique sky peru orange	2	3	3	5190.08
 Manufacturer#5	almond aquamarine dodger light gainsboro	46	4	4	6208.18
 Manufacturer#5	almond azure blanched chiffon midnight	23	5	5	7672.66
@@ -3075,7 +3075,7 @@ explain extended
 select p_mfgr, p_name, p_size,
 rank() over (partition by p_mfgr order by p_name) as r,
 dense_rank() over (partition by p_mfgr order by p_name) as dr,
-sum(p_retailprice) over (partition by p_mfgr order by p_name rows between unbounded preceding and current row) as s1
+round(sum(p_retailprice) over (partition by p_mfgr order by p_name rows between unbounded preceding and current row),2) as s1
 from noop(on part_orc
 partition by p_mfgr
 order by p_name)
@@ -3086,7 +3086,7 @@ explain extended
 select p_mfgr, p_name, p_size,
 rank() over (partition by p_mfgr order by p_name) as r,
 dense_rank() over (partition by p_mfgr order by p_name) as dr,
-sum(p_retailprice) over (partition by p_mfgr order by p_name rows between unbounded preceding and current row) as s1
+round(sum(p_retailprice) over (partition by p_mfgr order by p_name rows between unbounded preceding and current row),2) as s1
 from noop(on part_orc
 partition by p_mfgr
 order by p_name)
@@ -3281,7 +3281,7 @@ STAGE PLANS:
                         window frame: PRECEDING(MAX)~CURRENT
             Statistics: Num rows: 26 Data size: 16042 Basic stats: COMPLETE Column stats: NONE
             Select Operator
-              expressions: _col2 (type: string), _col1 (type: string), _col5 (type: int), rank_window_0 (type: int), dense_rank_window_1 (type: int), sum_window_2 (type: double)
+              expressions: _col2 (type: string), _col1 (type: string), _col5 (type: int), rank_window_0 (type: int), dense_rank_window_1 (type: int), round(sum_window_2, 2) (type: double)
               outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
               Statistics: Num rows: 26 Data size: 16042 Basic stats: COMPLETE Column stats: NONE
               File Output Operator
@@ -3316,7 +3316,7 @@ STAGE PLANS:
 PREHOOK: query: select p_mfgr, p_name, p_size,
 rank() over (partition by p_mfgr order by p_name) as r,
 dense_rank() over (partition by p_mfgr order by p_name) as dr,
-sum(p_retailprice) over (partition by p_mfgr order by p_name rows between unbounded preceding and current row) as s1
+round(sum(p_retailprice) over (partition by p_mfgr order by p_name rows between unbounded preceding and current row),2) as s1
 from noop(on part_orc
 partition by p_mfgr
 order by p_name)
@@ -3326,7 +3326,7 @@ PREHOOK: Input: default@part_orc
 POSTHOOK: query: select p_mfgr, p_name, p_size,
 rank() over (partition by p_mfgr order by p_name) as r,
 dense_rank() over (partition by p_mfgr order by p_name) as dr,
-sum(p_retailprice) over (partition by p_mfgr order by p_name rows between unbounded preceding and current row) as s1
+round(sum(p_retailprice) over (partition by p_mfgr order by p_name rows between unbounded preceding and current row),2) as s1
 from noop(on part_orc
 partition by p_mfgr
 order by p_name)
@@ -3336,12 +3336,12 @@ POSTHOOK: Input: default@part_orc
 Manufacturer#1	almond antique burnished rose metallic	2	1	1	1173.15
 Manufacturer#1	almond antique burnished rose metallic	2	1	1	2346.3
 Manufacturer#1	almond antique chartreuse lavender yellow	34	3	2	4100.06
-Manufacturer#1	almond antique salmon chartreuse burlywood	6	4	3	5702.650000000001
-Manufacturer#1	almond aquamarine burnished black steel	28	5	4	7117.070000000001
-Manufacturer#1	almond aquamarine pink moccasin thistle	42	6	5	8749.730000000001
+Manufacturer#1	almond antique salmon chartreuse burlywood	6	4	3	5702.65
+Manufacturer#1	almond aquamarine burnished black steel	28	5	4	7117.07
+Manufacturer#1	almond aquamarine pink moccasin thistle	42	6	5	8749.73
 Manufacturer#2	almond antique violet chocolate turquoise	14	1	1	1690.68
 Manufacturer#2	almond antique violet turquoise frosted	40	2	2	3491.38
-Manufacturer#2	almond aquamarine midnight light salmon	2	3	3	5523.360000000001
+Manufacturer#2	almond aquamarine midnight light salmon	2	3	3	5523.36
 Manufacturer#2	almond aquamarine rose maroon antique	25	4	4	7222.02
 Manufacturer#2	almond aquamarine sandy cyan gainsboro	18	5	5	8923.62
 Manufacturer#3	almond antique chartreuse khaki white	17	1	1	1671.68
@@ -3353,9 +3353,9 @@ Manufacturer#4	almond antique gainsboro frosted violet	10	1	1	1620.67
 Manufacturer#4	almond antique violet mint lemon	39	2	2	2996.09
 Manufacturer#4	almond aquamarine floral ivory bisque	27	3	3	4202.35
 Manufacturer#4	almond aquamarine yellow dodger mint	7	4	4	6047.27
-Manufacturer#4	almond azure aquamarine papaya violet	12	5	5	7337.620000000001
+Manufacturer#4	almond azure aquamarine papaya violet	12	5	5	7337.62
 Manufacturer#5	almond antique blue firebrick mint	31	1	1	1789.69
-Manufacturer#5	almond antique medium spring khaki	6	2	2	3401.3500000000004
+Manufacturer#5	almond antique medium spring khaki	6	2	2	3401.35
 Manufacturer#5	almond antique sky peru orange	2	3	3	5190.08
 Manufacturer#5	almond aquamarine dodger light gainsboro	46	4	4	6208.18
 Manufacturer#5	almond azure blanched chiffon midnight	23	5	5	7672.66
@@ -3365,7 +3365,7 @@ explain extended
 select p_mfgr, p_name, p_size, 
 rank() over (partition by p_mfgr order by p_name) as r, 
 dense_rank() over (partition by p_mfgr order by p_name) as dr, 
-sum(p_retailprice) over (partition by p_mfgr order by p_name rows between unbounded preceding and current row)  as s1
+round(sum(p_retailprice) over (partition by p_mfgr order by p_name rows between unbounded preceding and current row),2) as s1
 from noop(on noopwithmap(on noop(on part_orc 
 partition by p_mfgr 
 order by p_mfgr, p_name
@@ -3377,7 +3377,7 @@ explain extended
 select p_mfgr, p_name, p_size, 
 rank() over (partition by p_mfgr order by p_name) as r, 
 dense_rank() over (partition by p_mfgr order by p_name) as dr, 
-sum(p_retailprice) over (partition by p_mfgr order by p_name rows between unbounded preceding and current row)  as s1
+round(sum(p_retailprice) over (partition by p_mfgr order by p_name rows between unbounded preceding and current row),2) as s1
 from noop(on noopwithmap(on noop(on part_orc 
 partition by p_mfgr 
 order by p_mfgr, p_name
@@ -3682,7 +3682,7 @@ STAGE PLANS:
                         window frame: PRECEDING(MAX)~CURRENT
             Statistics: Num rows: 26 Data size: 16042 Basic stats: COMPLETE Column stats: NONE
             Select Operator
-              expressions: _col2 (type: string), _col1 (type: string), _col5 (type: int), rank_window_0 (type: int), dense_rank_window_1 (type: int), sum_window_2 (type: double)
+              expressions: _col2 (type: string), _col1 (type: string), _col5 (type: int), rank_window_0 (type: int), dense_rank_window_1 (type: int), round(sum_window_2, 2) (type: double)
               outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
               Statistics: Num rows: 26 Data size: 16042 Basic stats: COMPLETE Column stats: NONE
               File Output Operator
@@ -3717,7 +3717,7 @@ STAGE PLANS:
 PREHOOK: query: select p_mfgr, p_name, p_size, 
 rank() over (partition by p_mfgr order by p_name) as r, 
 dense_rank() over (partition by p_mfgr order by p_name) as dr, 
-sum(p_retailprice) over (partition by p_mfgr order by p_name rows between unbounded preceding and current row)  as s1
+round(sum(p_retailprice) over (partition by p_mfgr order by p_name rows between unbounded preceding and current row),2) as s1
 from noop(on noopwithmap(on noop(on part_orc 
 partition by p_mfgr 
 order by p_mfgr, p_name
@@ -3728,7 +3728,7 @@ PREHOOK: Input: default@part_orc
 POSTHOOK: query: select p_mfgr, p_name, p_size, 
 rank() over (partition by p_mfgr order by p_name) as r, 
 dense_rank() over (partition by p_mfgr order by p_name) as dr, 
-sum(p_retailprice) over (partition by p_mfgr order by p_name rows between unbounded preceding and current row)  as s1
+round(sum(p_retailprice) over (partition by p_mfgr order by p_name rows between unbounded preceding and current row),2) as s1
 from noop(on noopwithmap(on noop(on part_orc 
 partition by p_mfgr 
 order by p_mfgr, p_name
@@ -3739,12 +3739,12 @@ POSTHOOK: Input: default@part_orc
 Manufacturer#1	almond antique burnished rose metallic	2	1	1	1173.15
 Manufacturer#1	almond antique burnished rose metallic	2	1	1	2346.3
 Manufacturer#1	almond antique chartreuse lavender yellow	34	3	2	4100.06
-Manufacturer#1	almond antique salmon chartreuse burlywood	6	4	3	5702.650000000001
-Manufacturer#1	almond aquamarine burnished black steel	28	5	4	7117.070000000001
-Manufacturer#1	almond aquamarine pink moccasin thistle	42	6	5	8749.730000000001
+Manufacturer#1	almond antique salmon chartreuse burlywood	6	4	3	5702.65
+Manufacturer#1	almond aquamarine burnished black steel	28	5	4	7117.07
+Manufacturer#1	almond aquamarine pink moccasin thistle	42	6	5	8749.73
 Manufacturer#2	almond antique violet chocolate turquoise	14	1	1	1690.68
 Manufacturer#2	almond antique violet turquoise frosted	40	2	2	3491.38
-Manufacturer#2	almond aquamarine midnight light salmon	2	3	3	5523.360000000001
+Manufacturer#2	almond aquamarine midnight light salmon	2	3	3	5523.36
 Manufacturer#2	almond aquamarine rose maroon antique	25	4	4	7222.02
 Manufacturer#2	almond aquamarine sandy cyan gainsboro	18	5	5	8923.62
 Manufacturer#3	almond antique chartreuse khaki white	17	1	1	1671.68
@@ -3756,9 +3756,9 @@ Manufacturer#4	almond antique gainsboro frosted violet	10	1	1	1620.67
 Manufacturer#4	almond antique violet mint lemon	39	2	2	2996.09
 Manufacturer#4	almond aquamarine floral ivory bisque	27	3	3	4202.35
 Manufacturer#4	almond aquamarine yellow dodger mint	7	4	4	6047.27
-Manufacturer#4	almond azure aquamarine papaya violet	12	5	5	7337.620000000001
+Manufacturer#4	almond azure aquamarine papaya violet	12	5	5	7337.62
 Manufacturer#5	almond antique blue firebrick mint	31	1	1	1789.69
-Manufacturer#5	almond antique medium spring khaki	6	2	2	3401.3500000000004
+Manufacturer#5	almond antique medium spring khaki	6	2	2	3401.35
 Manufacturer#5	almond antique sky peru orange	2	3	3	5190.08
 Manufacturer#5	almond aquamarine dodger light gainsboro	46	4	4	6208.18
 Manufacturer#5	almond azure blanched chiffon midnight	23	5	5	7672.66
@@ -3770,7 +3770,7 @@ sub1.cd, sub1.s1
 from (select p_mfgr, p_name, 
 count(p_size) over (partition by p_mfgr order by p_name) as cd, 
 p_retailprice, 
-sum(p_retailprice) over w1  as s1
+round(sum(p_retailprice) over w1,2) as s1
 from noop(on part_orc 
 partition by p_mfgr 
 order by p_name) 
@@ -3785,7 +3785,7 @@ sub1.cd, sub1.s1
 from (select p_mfgr, p_name, 
 count(p_size) over (partition by p_mfgr order by p_name) as cd, 
 p_retailprice, 
-sum(p_retailprice) over w1  as s1
+round(sum(p_retailprice) over w1,2) as s1
 from noop(on part_orc 
 partition by p_mfgr 
 order by p_name) 
@@ -3974,7 +3974,7 @@ STAGE PLANS:
                         window frame: PRECEDING(2)~FOLLOWING(2)
             Statistics: Num rows: 26 Data size: 16042 Basic stats: COMPLETE Column stats: NONE
             Select Operator
-              expressions: _col2 (type: string), _col1 (type: string), count_window_0 (type: bigint), sum_window_1 (type: double)
+              expressions: _col2 (type: string), _col1 (type: string), count_window_0 (type: bigint), round(sum_window_1, 2) (type: double)
               outputColumnNames: _col0, _col1, _col2, _col3
               Statistics: Num rows: 26 Data size: 16042 Basic stats: COMPLETE Column stats: NONE
               File Output Operator
@@ -4011,7 +4011,7 @@ sub1.cd, sub1.s1
 from (select p_mfgr, p_name, 
 count(p_size) over (partition by p_mfgr order by p_name) as cd, 
 p_retailprice, 
-sum(p_retailprice) over w1  as s1
+round(sum(p_retailprice) over w1,2) as s1
 from noop(on part_orc 
 partition by p_mfgr 
 order by p_name) 
@@ -4025,7 +4025,7 @@ sub1.cd, sub1.s1
 from (select p_mfgr, p_name, 
 count(p_size) over (partition by p_mfgr order by p_name) as cd, 
 p_retailprice, 
-sum(p_retailprice) over w1  as s1
+round(sum(p_retailprice) over w1,2) as s1
 from noop(on part_orc 
 partition by p_mfgr 
 order by p_name) 
@@ -4035,31 +4035,31 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@part_orc
 #### A masked pattern was here ####
 Manufacturer#1	almond antique burnished rose metallic	2	4100.06
-Manufacturer#1	almond antique burnished rose metallic	2	5702.650000000001
-Manufacturer#1	almond antique chartreuse lavender yellow	3	7117.070000000001
+Manufacturer#1	almond antique burnished rose metallic	2	5702.65
+Manufacturer#1	almond antique chartreuse lavender yellow	3	7117.07
 Manufacturer#1	almond antique salmon chartreuse burlywood	4	7576.58
 Manufacturer#1	almond aquamarine burnished black steel	5	6403.43
 Manufacturer#1	almond aquamarine pink moccasin thistle	6	4649.67
-Manufacturer#2	almond antique violet chocolate turquoise	1	5523.360000000001
+Manufacturer#2	almond antique violet chocolate turquoise	1	5523.36
 Manufacturer#2	almond antique violet turquoise frosted	2	7222.02
 Manufacturer#2	almond aquamarine midnight light salmon	3	8923.62
-Manufacturer#2	almond aquamarine rose maroon antique	4	7232.9400000000005
+Manufacturer#2	almond aquamarine rose maroon antique	4	7232.94
 Manufacturer#2	almond aquamarine sandy cyan gainsboro	5	5432.24
 Manufacturer#3	almond antique chartreuse khaki white	1	4272.34
 Manufacturer#3	almond antique forest lavender goldenrod	2	6195.32
 Manufacturer#3	almond antique metallic orange dim	3	7532.61
-Manufacturer#3	almond antique misty red olive	4	5860.929999999999
+Manufacturer#3	almond antique misty red olive	4	5860.93
 Manufacturer#3	almond antique olive coral navajo	5	4670.66
 Manufacturer#4	almond antique gainsboro frosted violet	1	4202.35
 Manufacturer#4	almond antique violet mint lemon	2	6047.27
-Manufacturer#4	almond aquamarine floral ivory bisque	3	7337.620000000001
-Manufacturer#4	almond aquamarine yellow dodger mint	4	5716.950000000001
-Manufacturer#4	almond azure aquamarine papaya violet	5	4341.530000000001
+Manufacturer#4	almond aquamarine floral ivory bisque	3	7337.62
+Manufacturer#4	almond aquamarine yellow dodger mint	4	5716.95
+Manufacturer#4	almond azure aquamarine papaya violet	5	4341.53
 Manufacturer#5	almond antique blue firebrick mint	1	5190.08
 Manufacturer#5	almond antique medium spring khaki	2	6208.18
 Manufacturer#5	almond antique sky peru orange	3	7672.66
-Manufacturer#5	almond aquamarine dodger light gainsboro	4	5882.970000000001
-Manufacturer#5	almond azure blanched chiffon midnight	5	4271.3099999999995
+Manufacturer#5	almond aquamarine dodger light gainsboro	4	5882.97
+Manufacturer#5	almond azure blanched chiffon midnight	5	4271.31
 PREHOOK: query: -- 14. testPTFJoinWithWindowingWithCount
 
 explain extended
@@ -4067,7 +4067,7 @@ select abc.p_mfgr, abc.p_name,
 rank() over (distribute by abc.p_mfgr sort by abc.p_name) as r, 
 dense_rank() over (distribute by abc.p_mfgr sort by abc.p_name) as dr, 
 count(abc.p_name) over (distribute by abc.p_mfgr sort by abc.p_name) as cd, 
-abc.p_retailprice, sum(abc.p_retailprice) over (distribute by abc.p_mfgr sort by abc.p_name rows between unbounded preceding and current row) as s1, 
+abc.p_retailprice, round(sum(abc.p_retailprice) over (distribute by abc.p_mfgr sort by abc.p_name rows between unbounded preceding and current row),2) as s1,
 abc.p_size, abc.p_size - lag(abc.p_size,1,abc.p_size) over (distribute by abc.p_mfgr sort by abc.p_name) as deltaSz 
 from noop(on part_orc 
 partition by p_mfgr 
@@ -4081,7 +4081,7 @@ select abc.p_mfgr, abc.p_name,
 rank() over (distribute by abc.p_mfgr sort by abc.p_name) as r, 
 dense_rank() over (distribute by abc.p_mfgr sort by abc.p_name) as dr, 
 count(abc.p_name) over (distribute by abc.p_mfgr sort by abc.p_name) as cd, 
-abc.p_retailprice, sum(abc.p_retailprice) over (distribute by abc.p_mfgr sort by abc.p_name rows between unbounded preceding and current row) as s1, 
+abc.p_retailprice, round(sum(abc.p_retailprice) over (distribute by abc.p_mfgr sort by abc.p_name rows between unbounded preceding and current row),2) as s1,
 abc.p_size, abc.p_size - lag(abc.p_size,1,abc.p_size) over (distribute by abc.p_mfgr sort by abc.p_name) as deltaSz 
 from noop(on part_orc 
 partition by p_mfgr 
@@ -4424,7 +4424,7 @@ STAGE PLANS:
                         isPivotResult: true
             Statistics: Num rows: 28 Data size: 17646 Basic stats: COMPLETE Column stats: NONE
             Select Operator
-              expressions: _col2 (type: string), _col1 (type: string), rank_window_0 (type: int), dense_rank_window_1 (type: int), count_window_2 (type: bigint), _col7 (type: double), sum_window_3 (type: double), _col5 (type: int), (_col5 - lag_window_4) (type: int)
+              expressions: _col2 (type: string), _col1 (type: string), rank_window_0 (type: int), dense_rank_window_1 (type: int), count_window_2 (type: bigint), _col7 (type: double), round(sum_window_3, 2) (type: double), _col5 (type: int), (_col5 - lag_window_4) (type: int)
               outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8
               Statistics: Num rows: 28 Data size: 17646 Basic stats: COMPLETE Column stats: NONE
               File Output Operator
@@ -4460,7 +4460,7 @@ PREHOOK: query: select abc.p_mfgr, abc.p_name,
 rank() over (distribute by abc.p_mfgr sort by abc.p_name) as r, 
 dense_rank() over (distribute by abc.p_mfgr sort by abc.p_name) as dr, 
 count(abc.p_name) over (distribute by abc.p_mfgr sort by abc.p_name) as cd, 
-abc.p_retailprice, sum(abc.p_retailprice) over (distribute by abc.p_mfgr sort by abc.p_name rows between unbounded preceding and current row) as s1, 
+abc.p_retailprice, round(sum(abc.p_retailprice) over (distribute by abc.p_mfgr sort by abc.p_name rows between unbounded preceding and current row),2) as s1,
 abc.p_size, abc.p_size - lag(abc.p_size,1,abc.p_size) over (distribute by abc.p_mfgr sort by abc.p_name) as deltaSz 
 from noop(on part_orc 
 partition by p_mfgr 
@@ -4473,7 +4473,7 @@ POSTHOOK: query: select abc.p_mfgr, abc.p_name,
 rank() over (distribute by abc.p_mfgr sort by abc.p_name) as r, 
 dense_rank() over (distribute by abc.p_mfgr sort by abc.p_name) as dr, 
 count(abc.p_name) over (distribute by abc.p_mfgr sort by abc.p_name) as cd, 
-abc.p_retailprice, sum(abc.p_retailprice) over (distribute by abc.p_mfgr sort by abc.p_name rows between unbounded preceding and current row) as s1, 
+abc.p_retailprice, round(sum(abc.p_retailprice) over (distribute by abc.p_mfgr sort by abc.p_name rows between unbounded preceding and current row),2) as s1,
 abc.p_size, abc.p_size - lag(abc.p_size,1,abc.p_size) over (distribute by abc.p_mfgr sort by abc.p_name) as deltaSz 
 from noop(on part_orc 
 partition by p_mfgr 
@@ -4484,15 +4484,15 @@ POSTHOOK: Input: default@part_orc
 #### A masked pattern was here ####
 Manufacturer#1	almond antique burnished rose metallic	1	1	4	1173.15	1173.15	2	0
 Manufacturer#1	almond antique burnished rose metallic	1	1	4	1173.15	2346.3	2	0
-Manufacturer#1	almond antique burnished rose metallic	1	1	4	1173.15	3519.4500000000003	2	0
+Manufacturer#1	almond antique burnished rose metallic	1	1	4	1173.15	3519.45	2	0
 Manufacturer#1	almond antique burnished rose metallic	1	1	4	1173.15	4692.6	2	0
-Manufacturer#1	almond antique chartreuse lavender yellow	5	2	5	1753.76	6446.360000000001	34	32
-Manufacturer#1	almond antique salmon chartreuse burlywood	6	3	6	1602.59	8048.950000000001	6	-28
+Manufacturer#1	almond antique chartreuse lavender yellow	5	2	5	1753.76	6446.36	34	32
+Manufacturer#1	almond antique salmon chartreuse burlywood	6	3	6	1602.59	8048.95	6	-28
 Manufacturer#1	almond aquamarine burnished black steel	7	4	7	1414.42	9463.37	28	22
 Manufacturer#1	almond aquamarine pink moccasin thistle	8	5	8	1632.66	11096.03	42	14
 Manufacturer#2	almond antique violet chocolate turquoise	1	1	1	1690.68	1690.68	14	0
 Manufacturer#2	almond antique violet turquoise frosted	2	2	2	1800.7	3491.38	40	26
-Manufacturer#2	almond aquamarine midnight light salmon	3	3	3	2031.98	5523.360000000001	2	-38
+Manufacturer#2	almond aquamarine midnight light salmon	3	3	3	2031.98	5523.36	2	-38
 Manufacturer#2	almond aquamarine rose maroon antique	4	4	4	1698.66	7222.02	25	23
 Manufacturer#2	almond aquamarine sandy cyan gainsboro	5	5	5	1701.6	8923.62	18	-7
 Manufacturer#3	almond antique chartreuse khaki white	1	1	1	1671.68	1671.68	17	0
@@ -4504,9 +4504,9 @@ Manufacturer#4	almond antique gainsboro frosted violet	1	1	1	1620.67	1620.67	10
 Manufacturer#4	almond antique violet mint lemon	2	2	2	1375.42	2996.09	39	29
 Manufacturer#4	almond aquamarine floral ivory bisque	3	3	3	1206.26	4202.35	27	-12
 Manufacturer#4	almond aquamarine yellow dodger mint	4	4	4	1844.92	6047.27	7	-20
-Manufacturer#4	almond azure aquamarine papaya violet	5	5	5	1290.35	7337.620000000001	12	5
+Manufacturer#4	almond azure aquamarine papaya violet	5	5	5	1290.35	7337.62	12	5
 Manufacturer#5	almond antique blue firebrick mint	1	1	1	1789.69	1789.69	31	0
-Manufacturer#5	almond antique medium spring khaki	2	2	2	1611.66	3401.3500000000004	6	-25
+Manufacturer#5	almond antique medium spring khaki	2	2	2	1611.66	3401.35	6	-25
 Manufacturer#5	almond antique sky peru orange	3	3	3	1788.73	5190.08	2	-4
 Manufacturer#5	almond aquamarine dodger light gainsboro	4	4	4	1018.1	6208.18	46	44
 Manufacturer#5	almond azure blanched chiffon midnight	5	5	5	1464.48	7672.66	23	-23
@@ -4761,7 +4761,7 @@ Manufacturer#5	almond azure blanched chiffon midnight	23
 PREHOOK: query: -- 16. testViewAsTableInputToPTF
 create view IF NOT EXISTS mfgr_price_view as 
 select p_mfgr, p_brand, 
-sum(p_retailprice) as s 
+round(sum(p_retailprice),2) as s
 from part_orc 
 group by p_mfgr, p_brand
 PREHOOK: type: CREATEVIEW
@@ -4771,7 +4771,7 @@ PREHOOK: Output: default@mfgr_price_view
 POSTHOOK: query: -- 16. testViewAsTableInputToPTF
 create view IF NOT EXISTS mfgr_price_view as 
 select p_mfgr, p_brand, 
-sum(p_retailprice) as s 
+round(sum(p_retailprice),2) as s
 from part_orc 
 group by p_mfgr, p_brand
 POSTHOOK: type: CREATEVIEW
@@ -4780,7 +4780,7 @@ POSTHOOK: Output: database:default
 POSTHOOK: Output: default@mfgr_price_view
 PREHOOK: query: explain extended
 select p_mfgr, p_brand, s, 
-sum(s) over w1  as s1
+round(sum(s) over w1,2) as s1
 from noop(on mfgr_price_view 
 partition by p_mfgr 
 order by p_mfgr)  
@@ -4788,7 +4788,7 @@ window w1 as ( partition by p_mfgr order by p_brand rows between 2 preceding and
 PREHOOK: type: QUERY
 POSTHOOK: query: explain extended
 select p_mfgr, p_brand, s, 
-sum(s) over w1  as s1
+round(sum(s) over w1,2) as s1
 from noop(on mfgr_price_view 
 partition by p_mfgr 
 order by p_mfgr)  
@@ -4884,37 +4884,41 @@ STAGE PLANS:
           mode: mergepartial
           outputColumnNames: _col0, _col1, _col2
           Statistics: Num rows: 13 Data size: 8021 Basic stats: COMPLETE Column stats: NONE
-          PTF Operator
-            Function definitions:
-                Input definition
-                  input alias: mfgr_price_view
-                  output shape: _col0: string, _col1: string, _col2: double
-                  type: TABLE
-                Partition table definition
-                  input alias: ptf_1
-                  name: noop
-                  order by: _col0 ASC NULLS FIRST
-                  output shape: _col0: string, _col1: string, _col2: double
-                  partition by: _col0
-                  raw input shape:
+          Select Operator
+            expressions: _col0 (type: string), _col1 (type: string), round(_col2, 2) (type: double)
+            outputColumnNames: _col0, _col1, _col2
             Statistics: Num rows: 13 Data size: 8021 Basic stats: COMPLETE Column stats: NONE
-            File Output Operator
-              compressed: false
-              GlobalTableId: 0
+            PTF Operator
+              Function definitions:
+                  Input definition
+                    input alias: mfgr_price_view
+                    output shape: _col0: string, _col1: string, _col2: double
+                    type: TABLE
+                  Partition table definition
+                    input alias: ptf_1
+                    name: noop
+                    order by: _col0 ASC NULLS FIRST
+                    output shape: _col0: string, _col1: string, _col2: double
+                    partition by: _col0
+                    raw input shape:
+              Statistics: Num rows: 13 Data size: 8021 Basic stats: COMPLETE Column stats: NONE
+              File Output Operator
+                compressed: false
+                GlobalTableId: 0
 #### A masked pattern was here ####
-              NumFilesPerFileSink: 1
-              table:
-                  input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                  output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                  properties:
-                    columns _col0,_col1,_col2
-                    columns.types string,string,double
-                    escape.delim \
-                    serialization.lib org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe
-                  serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe
-              TotalFiles: 1
-              GatherStats: false
-              MultiFileSpray: false
+                NumFilesPerFileSink: 1
+                table:
+                    input format: org.apache.hadoop.mapred.SequenceFileInputFormat
+                    output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                    properties:
+                      columns _col0,_col1,_col2
+                      columns.types string,string,double
+                      escape.delim \
+                      serialization.lib org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe
+                    serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe
+                TotalFiles: 1
+                GatherStats: false
+                MultiFileSpray: false
 
   Stage: Stage-2
     Map Reduce
@@ -4982,7 +4986,7 @@ STAGE PLANS:
                         window frame: PRECEDING(2)~CURRENT
             Statistics: Num rows: 13 Data size: 8021 Basic stats: COMPLETE Column stats: NONE
             Select Operator
-              expressions: _col0 (type: string), _col1 (type: string), _col2 (type: double), sum_window_0 (type: double)
+              expressions: _col0 (type: string), _col1 (type: string), _col2 (type: double), round(sum_window_0, 2) (type: double)
               outputColumnNames: _col0, _col1, _col2, _col3
               Statistics: Num rows: 13 Data size: 8021 Basic stats: COMPLETE Column stats: NONE
               File Output Operator
@@ -5015,7 +5019,7 @@ STAGE PLANS:
         ListSink
 
 PREHOOK: query: select p_mfgr, p_brand, s, 
-sum(s) over w1  as s1
+round(sum(s) over w1,2) as s1
 from noop(on mfgr_price_view 
 partition by p_mfgr 
 order by p_mfgr)  
@@ -5025,7 +5029,7 @@ PREHOOK: Input: default@mfgr_price_view
 PREHOOK: Input: default@part_orc
 #### A masked pattern was here ####
 POSTHOOK: query: select p_mfgr, p_brand, s, 
-sum(s) over w1  as s1
+round(sum(s) over w1,2) as s1
 from noop(on mfgr_price_view 
 partition by p_mfgr 
 order by p_mfgr)  
@@ -5038,15 +5042,15 @@ Manufacturer#1	Brand#12	4800.84	4800.84
 Manufacturer#1	Brand#14	2346.3	7147.14
 Manufacturer#1	Brand#15	1602.59	8749.73
 Manufacturer#2	Brand#22	3491.38	3491.38
-Manufacturer#2	Brand#23	2031.98	5523.360000000001
+Manufacturer#2	Brand#23	2031.98	5523.36
 Manufacturer#2	Brand#24	1698.66	7222.02
-Manufacturer#2	Brand#25	1701.6	5432.240000000001
+Manufacturer#2	Brand#25	1701.6	5432.24
 Manufacturer#3	Brand#31	1671.68	1671.68
 Manufacturer#3	Brand#32	3333.37	5005.05
 Manufacturer#3	Brand#34	1337.29	6342.34
 Manufacturer#3	Brand#35	1190.27	5860.93
-Manufacturer#4	Brand#41	4755.9400000000005	4755.9400000000005
-Manufacturer#4	Brand#42	2581.6800000000003	7337.620000000001
+Manufacturer#4	Brand#41	4755.94	4755.94
+Manufacturer#4	Brand#42	2581.68	7337.62
 Manufacturer#5	Brand#51	1611.66	1611.66
 Manufacturer#5	Brand#52	3254.17	4865.83
 Manufacturer#5	Brand#53	2806.83	7672.66
@@ -5103,7 +5107,7 @@ order by p_name)
 INSERT OVERWRITE TABLE part_4 select p_mfgr, p_name, p_size, 
 rank() over (distribute by p_mfgr sort by p_name) as r, 
 dense_rank() over (distribute by p_mfgr sort by p_name) as dr, 
-sum(p_retailprice) over (distribute by p_mfgr sort by p_name rows between unbounded preceding and current row)  as s  
+round(sum(p_retailprice) over (distribute by p_mfgr sort by p_name rows between unbounded preceding and current row),2) as s
 INSERT OVERWRITE TABLE part_5 select  p_mfgr,p_name, p_size,  
 round(sum(p_size) over (distribute by p_mfgr sort by p_size range between 5 preceding and current row),1) as s2,
 rank() over (distribute by p_mfgr sort by p_mfgr, p_name) as r, 
@@ -5119,7 +5123,7 @@ order by p_name)
 INSERT OVERWRITE TABLE part_4 select p_mfgr, p_name, p_size, 
 rank() over (distribute by p_mfgr sort by p_name) as r, 
 dense_rank() over (distribute by p_mfgr sort by p_name) as dr, 
-sum(p_retailprice) over (distribute by p_mfgr sort by p_name rows between unbounded preceding and current row)  as s  
+round(sum(p_retailprice) over (distribute by p_mfgr sort by p_name rows between unbounded preceding and current row),2) as s
 INSERT OVERWRITE TABLE part_5 select  p_mfgr,p_name, p_size,  
 round(sum(p_size) over (distribute by p_mfgr sort by p_size range between 5 preceding and current row),1) as s2,
 rank() over (distribute by p_mfgr sort by p_mfgr, p_name) as r, 
@@ -5340,7 +5344,7 @@ STAGE PLANS:
                         window frame: PRECEDING(MAX)~CURRENT
             Statistics: Num rows: 26 Data size: 16042 Basic stats: COMPLETE Column stats: NONE
             Select Operator
-              expressions: _col2 (type: string), _col1 (type: string), _col5 (type: int), rank_window_0 (type: int), dense_rank_window_1 (type: int), sum_window_2 (type: double)
+              expressions: _col2 (type: string), _col1 (type: string), _col5 (type: int), rank_window_0 (type: int), dense_rank_window_1 (type: int), round(sum_window_2, 2) (type: double)
               outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
               Statistics: Num rows: 26 Data size: 16042 Basic stats: COMPLETE Column stats: NONE
               File Output Operator
@@ -5652,7 +5656,7 @@ order by p_name)
 INSERT OVERWRITE TABLE part_4 select p_mfgr, p_name, p_size, 
 rank() over (distribute by p_mfgr sort by p_name) as r, 
 dense_rank() over (distribute by p_mfgr sort by p_name) as dr, 
-sum(p_retailprice) over (distribute by p_mfgr sort by p_name rows between unbounded preceding and current row)  as s  
+round(sum(p_retailprice) over (distribute by p_mfgr sort by p_name rows between unbounded preceding and current row),2) as s
 INSERT OVERWRITE TABLE part_5 select  p_mfgr,p_name, p_size,  
 round(sum(p_size) over (distribute by p_mfgr sort by p_size range between 5 preceding and current row),1) as s2,
 rank() over (distribute by p_mfgr sort by p_mfgr, p_name) as r, 
@@ -5670,7 +5674,7 @@ order by p_name)
 INSERT OVERWRITE TABLE part_4 select p_mfgr, p_name, p_size, 
 rank() over (distribute by p_mfgr sort by p_name) as r, 
 dense_rank() over (distribute by p_mfgr sort by p_name) as dr, 
-sum(p_retailprice) over (distribute by p_mfgr sort by p_name rows between unbounded preceding and current row)  as s  
+round(sum(p_retailprice) over (distribute by p_mfgr sort by p_name rows between unbounded preceding and current row),2) as s
 INSERT OVERWRITE TABLE part_5 select  p_mfgr,p_name, p_size,  
 round(sum(p_size) over (distribute by p_mfgr sort by p_size range between 5 preceding and current row),1) as s2,
 rank() over (distribute by p_mfgr sort by p_mfgr, p_name) as r, 
@@ -5707,12 +5711,12 @@ POSTHOOK: Input: default@part_4
 Manufacturer#1	almond antique burnished rose metallic	2	1	1	1173.15
 Manufacturer#1	almond antique burnished rose metallic	2	1	1	2346.3
 Manufacturer#1	almond antique chartreuse lavender yellow	34	3	2	4100.06
-Manufacturer#1	almond antique salmon chartreuse burlywood	6	4	3	5702.650000000001
-Manufacturer#1	almond aquamarine burnished black steel	28	5	4	7117.070000000001
-Manufacturer#1	almond aquamarine pink moccasin thistle	42	6	5	8749.730000000001
+Manufacturer#1	almond antique salmon chartreuse burlywood	6	4	3	5702.65
+Manufacturer#1	almond aquamarine burnished black steel	28	5	4	7117.07
+Manufacturer#1	almond aquamarine pink moccasin thistle	42	6	5	8749.73
 Manufacturer#2	almond antique violet chocolate turquoise	14	1	1	1690.68
 Manufacturer#2	almond antique violet turquoise frosted	40	2	2	3491.38
-Manufacturer#2	almond aquamarine midnight light salmon	2	3	3	5523.360000000001
+Manufacturer#2	almond aquamarine midnight light salmon	2	3	3	5523.36
 Manufacturer#2	almond aquamarine rose maroon antique	25	4	4	7222.02
 Manufacturer#2	almond aquamarine sandy cyan gainsboro	18	5	5	8923.62
 Manufacturer#3	almond antique chartreuse khaki white	17	1	1	1671.68
@@ -5724,9 +5728,9 @@ Manufacturer#4	almond antique gainsboro frosted violet	10	1	1	1620.67
 Manufacturer#4	almond antique violet mint lemon	39	2	2	2996.09
 Manufacturer#4	almond aquamarine floral ivory bisque	27	3	3	4202.35
 Manufacturer#4	almond aquamarine yellow dodger mint	7	4	4	6047.27
-Manufacturer#4	almond azure aquamarine papaya violet	12	5	5	7337.620000000001
+Manufacturer#4	almond azure aquamarine papaya violet	12	5	5	7337.62
 Manufacturer#5	almond antique blue firebrick mint	31	1	1	1789.69
-Manufacturer#5	almond antique medium spring khaki	6	2	2	3401.3500000000004
+Manufacturer#5	almond antique medium spring khaki	6	2	2	3401.35
 Manufacturer#5	almond antique sky peru orange	2	3	3	5190.08
 Manufacturer#5	almond aquamarine dodger light gainsboro	46	4	4	6208.18
 Manufacturer#5	almond azure blanched chiffon midnight	23	5	5	7672.66