http://git-wip-us.apache.org/repos/asf/hive/blob/55887646/ql/src/test/results/clientpositive/perf/spark/query26.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/spark/query26.q.out 
b/ql/src/test/results/clientpositive/perf/spark/query26.q.out
index b6ee41e..48c0e11 100644
--- a/ql/src/test/results/clientpositive/perf/spark/query26.q.out
+++ b/ql/src/test/results/clientpositive/perf/spark/query26.q.out
@@ -221,11 +221,11 @@ STAGE PLANS:
                 keys:
                   0 _col2 (type: int)
                   1 _col0 (type: int)
-                outputColumnNames: _col4, _col5, _col6, _col7, _col18
+                outputColumnNames: _col4, _col5, _col6, _col7, _col12
                 Statistics: Num rows: 421645953 Data size: 57099332415 Basic 
stats: COMPLETE Column stats: NONE
                 Group By Operator
                   aggregations: sum(_col4), count(_col4), sum(_col5), 
count(_col5), sum(_col7), count(_col7), sum(_col6), count(_col6)
-                  keys: _col18 (type: string)
+                  keys: _col12 (type: string)
                   mode: hash
                   outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, 
_col6, _col7, _col8
                   Statistics: Num rows: 421645953 Data size: 57099332415 Basic 
stats: COMPLETE Column stats: NONE

http://git-wip-us.apache.org/repos/asf/hive/blob/55887646/ql/src/test/results/clientpositive/perf/spark/query27.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/spark/query27.q.out 
b/ql/src/test/results/clientpositive/perf/spark/query27.q.out
index 4063c4f..6c64664 100644
--- a/ql/src/test/results/clientpositive/perf/spark/query27.q.out
+++ b/ql/src/test/results/clientpositive/perf/spark/query27.q.out
@@ -207,7 +207,7 @@ STAGE PLANS:
                   keys:
                     0 _col3 (type: int)
                     1 _col0 (type: int)
-                  outputColumnNames: _col1, _col4, _col5, _col6, _col7, _col15
+                  outputColumnNames: _col1, _col4, _col5, _col6, _col7, _col11
                   input vertices:
                     1 Map 9
                   Statistics: Num rows: 766650239 Data size: 67634106676 Basic 
stats: COMPLETE Column stats: NONE
@@ -216,7 +216,7 @@ STAGE PLANS:
                     sort order: +
                     Map-reduce partition columns: _col1 (type: int)
                     Statistics: Num rows: 766650239 Data size: 67634106676 
Basic stats: COMPLETE Column stats: NONE
-                    value expressions: _col4 (type: int), _col5 (type: 
decimal(7,2)), _col6 (type: decimal(7,2)), _col7 (type: decimal(7,2)), _col15 
(type: string)
+                    value expressions: _col4 (type: int), _col5 (type: 
decimal(7,2)), _col6 (type: decimal(7,2)), _col7 (type: decimal(7,2)), _col11 
(type: string)
         Reducer 4 
             Reduce Operator Tree:
               Join Operator
@@ -225,10 +225,10 @@ STAGE PLANS:
                 keys:
                   0 _col1 (type: int)
                   1 _col0 (type: int)
-                outputColumnNames: _col4, _col5, _col6, _col7, _col15, _col17
+                outputColumnNames: _col4, _col5, _col6, _col7, _col11, _col13
                 Statistics: Num rows: 843315281 Data size: 74397518956 Basic 
stats: COMPLETE Column stats: NONE
                 Select Operator
-                  expressions: _col17 (type: string), _col15 (type: string), 
_col4 (type: int), _col5 (type: decimal(7,2)), _col7 (type: decimal(7,2)), 
_col6 (type: decimal(7,2))
+                  expressions: _col13 (type: string), _col11 (type: string), 
_col4 (type: int), _col5 (type: decimal(7,2)), _col7 (type: decimal(7,2)), 
_col6 (type: decimal(7,2))
                   outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
                   Statistics: Num rows: 843315281 Data size: 74397518956 Basic 
stats: COMPLETE Column stats: NONE
                   Group By Operator

http://git-wip-us.apache.org/repos/asf/hive/blob/55887646/ql/src/test/results/clientpositive/perf/spark/query29.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/spark/query29.q.out 
b/ql/src/test/results/clientpositive/perf/spark/query29.q.out
index 2e5c0f3..f4a4524 100644
--- a/ql/src/test/results/clientpositive/perf/spark/query29.q.out
+++ b/ql/src/test/results/clientpositive/perf/spark/query29.q.out
@@ -295,7 +295,7 @@ STAGE PLANS:
                 keys:
                   0 _col1 (type: int)
                   1 _col0 (type: int)
-                outputColumnNames: _col3, _col5, _col10, _col11, _col13, 
_col18, _col19
+                outputColumnNames: _col3, _col5, _col8, _col9, _col11, _col14, 
_col15
                 Statistics: Num rows: 766650239 Data size: 67634106676 Basic 
stats: COMPLETE Column stats: NONE
                 Map Join Operator
                   condition map:
@@ -303,20 +303,20 @@ STAGE PLANS:
                   keys:
                     0 _col3 (type: int)
                     1 _col0 (type: int)
-                  outputColumnNames: _col5, _col10, _col11, _col13, _col18, 
_col19, _col21, _col22
+                  outputColumnNames: _col5, _col8, _col9, _col11, _col14, 
_col15, _col17, _col18
                   input vertices:
                     1 Map 16
                   Statistics: Num rows: 843315281 Data size: 74397518956 Basic 
stats: COMPLETE Column stats: NONE
                   Select Operator
-                    expressions: _col18 (type: string), _col19 (type: string), 
_col5 (type: int), _col10 (type: int), _col11 (type: int), _col13 (type: int), 
_col21 (type: string), _col22 (type: string)
-                    outputColumnNames: _col1, _col2, _col8, _col13, _col14, 
_col16, _col21, _col22
+                    expressions: _col14 (type: string), _col15 (type: string), 
_col5 (type: int), _col8 (type: int), _col9 (type: int), _col11 (type: int), 
_col17 (type: string), _col18 (type: string)
+                    outputColumnNames: _col1, _col2, _col8, _col11, _col12, 
_col14, _col17, _col18
                     Statistics: Num rows: 843315281 Data size: 74397518956 
Basic stats: COMPLETE Column stats: NONE
                     Reduce Output Operator
-                      key expressions: _col14 (type: int), _col13 (type: int)
+                      key expressions: _col11 (type: int), _col12 (type: int)
                       sort order: ++
-                      Map-reduce partition columns: _col14 (type: int), _col13 
(type: int)
+                      Map-reduce partition columns: _col11 (type: int), _col12 
(type: int)
                       Statistics: Num rows: 843315281 Data size: 74397518956 
Basic stats: COMPLETE Column stats: NONE
-                      value expressions: _col1 (type: string), _col2 (type: 
string), _col8 (type: int), _col16 (type: int), _col21 (type: string), _col22 
(type: string)
+                      value expressions: _col1 (type: string), _col2 (type: 
string), _col8 (type: int), _col14 (type: int), _col17 (type: string), _col18 
(type: string)
         Reducer 13 
             Reduce Operator Tree:
               Join Operator
@@ -344,9 +344,9 @@ STAGE PLANS:
                 outputColumnNames: _col1, _col2, _col3
                 Statistics: Num rows: 316788826 Data size: 42899570777 Basic 
stats: COMPLETE Column stats: NONE
                 Reduce Output Operator
-                  key expressions: _col1 (type: int), _col2 (type: int)
+                  key expressions: _col2 (type: int), _col1 (type: int)
                   sort order: ++
-                  Map-reduce partition columns: _col1 (type: int), _col2 
(type: int)
+                  Map-reduce partition columns: _col2 (type: int), _col1 
(type: int)
                   Statistics: Num rows: 316788826 Data size: 42899570777 Basic 
stats: COMPLETE Column stats: NONE
                   value expressions: _col3 (type: int)
         Reducer 3 
@@ -355,13 +355,13 @@ STAGE PLANS:
                 condition map:
                      Inner Join 0 to 1
                 keys:
-                  0 _col1 (type: int), _col2 (type: int)
-                  1 _col14 (type: int), _col13 (type: int)
-                outputColumnNames: _col3, _col7, _col8, _col14, _col22, 
_col27, _col28
+                  0 _col2 (type: int), _col1 (type: int)
+                  1 _col11 (type: int), _col12 (type: int)
+                outputColumnNames: _col3, _col6, _col7, _col13, _col19, 
_col22, _col23
                 Statistics: Num rows: 927646829 Data size: 81837272625 Basic 
stats: COMPLETE Column stats: NONE
                 Group By Operator
-                  aggregations: sum(_col14), sum(_col22), sum(_col3)
-                  keys: _col7 (type: string), _col8 (type: string), _col27 
(type: string), _col28 (type: string)
+                  aggregations: sum(_col13), sum(_col19), sum(_col3)
+                  keys: _col6 (type: string), _col7 (type: string), _col22 
(type: string), _col23 (type: string)
                   mode: hash
                   outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, 
_col6
                   Statistics: Num rows: 927646829 Data size: 81837272625 Basic 
stats: COMPLETE Column stats: NONE
@@ -428,14 +428,14 @@ STAGE PLANS:
                 keys:
                   0 _col1 (type: int), _col2 (type: int), _col4 (type: int)
                   1 _col1 (type: int), _col2 (type: int), _col3 (type: int)
-                outputColumnNames: _col1, _col3, _col5, _col10, _col11, _col13
+                outputColumnNames: _col1, _col3, _col5, _col8, _col9, _col11
                 Statistics: Num rows: 696954748 Data size: 61485550191 Basic 
stats: COMPLETE Column stats: NONE
                 Reduce Output Operator
                   key expressions: _col1 (type: int)
                   sort order: +
                   Map-reduce partition columns: _col1 (type: int)
                   Statistics: Num rows: 696954748 Data size: 61485550191 Basic 
stats: COMPLETE Column stats: NONE
-                  value expressions: _col3 (type: int), _col5 (type: int), 
_col10 (type: int), _col11 (type: int), _col13 (type: int)
+                  value expressions: _col3 (type: int), _col5 (type: int), 
_col8 (type: int), _col9 (type: int), _col11 (type: int)
 
   Stage: Stage-0
     Fetch Operator

http://git-wip-us.apache.org/repos/asf/hive/blob/55887646/ql/src/test/results/clientpositive/perf/spark/query3.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/spark/query3.q.out 
b/ql/src/test/results/clientpositive/perf/spark/query3.q.out
index b2e4b9d..b2ddbf0 100644
--- a/ql/src/test/results/clientpositive/perf/spark/query3.q.out
+++ b/ql/src/test/results/clientpositive/perf/spark/query3.q.out
@@ -144,11 +144,11 @@ STAGE PLANS:
                 keys:
                   0 _col0 (type: int)
                   1 _col0 (type: int)
-                outputColumnNames: _col2, _col4, _col5, _col8
+                outputColumnNames: _col2, _col4, _col5, _col7
                 Statistics: Num rows: 696954748 Data size: 61485550191 Basic 
stats: COMPLETE Column stats: NONE
                 Group By Operator
                   aggregations: sum(_col2)
-                  keys: _col8 (type: int), _col4 (type: int), _col5 (type: 
string)
+                  keys: _col7 (type: int), _col4 (type: int), _col5 (type: 
string)
                   mode: hash
                   outputColumnNames: _col0, _col1, _col2, _col3
                   Statistics: Num rows: 696954748 Data size: 61485550191 Basic 
stats: COMPLETE Column stats: NONE

http://git-wip-us.apache.org/repos/asf/hive/blob/55887646/ql/src/test/results/clientpositive/perf/spark/query30.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/spark/query30.q.out 
b/ql/src/test/results/clientpositive/perf/spark/query30.q.out
index 7566e9a..ed8f97b 100644
--- a/ql/src/test/results/clientpositive/perf/spark/query30.q.out
+++ b/ql/src/test/results/clientpositive/perf/spark/query30.q.out
@@ -292,11 +292,11 @@ STAGE PLANS:
                 keys:
                   0 _col2 (type: int)
                   1 _col0 (type: int)
-                outputColumnNames: _col1, _col3, _col7
+                outputColumnNames: _col1, _col3, _col6
                 Statistics: Num rows: 44000000 Data size: 44654715780 Basic 
stats: COMPLETE Column stats: NONE
                 Group By Operator
                   aggregations: sum(_col3)
-                  keys: _col7 (type: string), _col1 (type: int)
+                  keys: _col6 (type: string), _col1 (type: int)
                   mode: hash
                   outputColumnNames: _col0, _col1, _col2
                   Statistics: Num rows: 44000000 Data size: 44654715780 Basic 
stats: COMPLETE Column stats: NONE
@@ -359,10 +359,10 @@ STAGE PLANS:
                 keys:
                   0 _col0 (type: int)
                   1 _col0 (type: int)
-                outputColumnNames: _col1, _col3, _col4, _col5, _col6, _col7, 
_col8, _col9, _col10, _col11, _col12, _col13, _col18
+                outputColumnNames: _col1, _col3, _col4, _col5, _col6, _col7, 
_col8, _col9, _col10, _col11, _col12, _col13, _col17
                 Statistics: Num rows: 96800003 Data size: 83249958789 Basic 
stats: COMPLETE Column stats: NONE
                 Select Operator
-                  expressions: _col1 (type: string), _col3 (type: string), 
_col4 (type: string), _col5 (type: string), _col6 (type: string), _col7 (type: 
int), _col8 (type: int), _col9 (type: int), _col10 (type: string), _col11 
(type: string), _col12 (type: string), _col13 (type: string), _col18 (type: 
decimal(17,2))
+                  expressions: _col1 (type: string), _col3 (type: string), 
_col4 (type: string), _col5 (type: string), _col6 (type: string), _col7 (type: 
int), _col8 (type: int), _col9 (type: int), _col10 (type: string), _col11 
(type: string), _col12 (type: string), _col13 (type: string), _col17 (type: 
decimal(17,2))
                   outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, 
_col6, _col7, _col8, _col9, _col10, _col11, _col12
                   Statistics: Num rows: 96800003 Data size: 83249958789 Basic 
stats: COMPLETE Column stats: NONE
                   Reduce Output Operator
@@ -411,11 +411,11 @@ STAGE PLANS:
                 keys:
                   0 _col2 (type: int)
                   1 _col0 (type: int)
-                outputColumnNames: _col1, _col3, _col7
+                outputColumnNames: _col1, _col3, _col6
                 Statistics: Num rows: 44000000 Data size: 44654715780 Basic 
stats: COMPLETE Column stats: NONE
                 Group By Operator
                   aggregations: sum(_col3)
-                  keys: _col7 (type: string), _col1 (type: int)
+                  keys: _col6 (type: string), _col1 (type: int)
                   mode: hash
                   outputColumnNames: _col0, _col1, _col2
                   Statistics: Num rows: 44000000 Data size: 44654715780 Basic 
stats: COMPLETE Column stats: NONE

http://git-wip-us.apache.org/repos/asf/hive/blob/55887646/ql/src/test/results/clientpositive/perf/spark/query31.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/spark/query31.q.out 
b/ql/src/test/results/clientpositive/perf/spark/query31.q.out
index d14e8c8..27cfadc 100644
--- a/ql/src/test/results/clientpositive/perf/spark/query31.q.out
+++ b/ql/src/test/results/clientpositive/perf/spark/query31.q.out
@@ -118,56 +118,56 @@ STAGE PLANS:
   Stage: Stage-1
     Spark
       Edges:
-        Reducer 10 <- Map 13 (PARTITION-LEVEL SORT, 754), Reducer 9 
(PARTITION-LEVEL SORT, 754)
-        Reducer 11 <- Reducer 10 (GROUP, 481)
-        Reducer 15 <- Map 14 (PARTITION-LEVEL SORT, 398), Map 18 
(PARTITION-LEVEL SORT, 398)
-        Reducer 16 <- Map 19 (PARTITION-LEVEL SORT, 754), Reducer 15 
(PARTITION-LEVEL SORT, 754)
-        Reducer 17 <- Reducer 16 (GROUP, 481)
-        Reducer 2 <- Map 1 (PARTITION-LEVEL SORT, 398), Map 6 (PARTITION-LEVEL 
SORT, 398)
-        Reducer 21 <- Map 20 (PARTITION-LEVEL SORT, 154), Map 25 
(PARTITION-LEVEL SORT, 154)
-        Reducer 22 <- Map 26 (PARTITION-LEVEL SORT, 486), Reducer 21 
(PARTITION-LEVEL SORT, 486)
-        Reducer 23 <- Reducer 22 (GROUP, 186)
-        Reducer 24 <- Reducer 23 (PARTITION-LEVEL SORT, 278), Reducer 30 
(PARTITION-LEVEL SORT, 278), Reducer 36 (PARTITION-LEVEL SORT, 278)
-        Reducer 28 <- Map 27 (PARTITION-LEVEL SORT, 154), Map 31 
(PARTITION-LEVEL SORT, 154)
-        Reducer 29 <- Map 32 (PARTITION-LEVEL SORT, 486), Reducer 28 
(PARTITION-LEVEL SORT, 486)
-        Reducer 3 <- Map 7 (PARTITION-LEVEL SORT, 754), Reducer 2 
(PARTITION-LEVEL SORT, 754)
-        Reducer 30 <- Reducer 29 (GROUP, 186)
-        Reducer 34 <- Map 33 (PARTITION-LEVEL SORT, 154), Map 37 
(PARTITION-LEVEL SORT, 154)
-        Reducer 35 <- Map 38 (PARTITION-LEVEL SORT, 486), Reducer 34 
(PARTITION-LEVEL SORT, 486)
-        Reducer 36 <- Reducer 35 (GROUP, 186)
-        Reducer 4 <- Reducer 3 (GROUP, 481)
-        Reducer 5 <- Reducer 11 (PARTITION-LEVEL SORT, 925), Reducer 17 
(PARTITION-LEVEL SORT, 925), Reducer 24 (PARTITION-LEVEL SORT, 925), Reducer 4 
(PARTITION-LEVEL SORT, 925)
-        Reducer 9 <- Map 12 (PARTITION-LEVEL SORT, 398), Map 8 
(PARTITION-LEVEL SORT, 398)
+        Reducer 10 <- Map 13 (PARTITION-LEVEL SORT, 486), Reducer 9 
(PARTITION-LEVEL SORT, 486)
+        Reducer 11 <- Reducer 10 (GROUP, 186)
+        Reducer 15 <- Map 14 (PARTITION-LEVEL SORT, 154), Map 18 
(PARTITION-LEVEL SORT, 154)
+        Reducer 16 <- Map 19 (PARTITION-LEVEL SORT, 486), Reducer 15 
(PARTITION-LEVEL SORT, 486)
+        Reducer 17 <- Reducer 16 (GROUP, 186)
+        Reducer 2 <- Map 1 (PARTITION-LEVEL SORT, 154), Map 6 (PARTITION-LEVEL 
SORT, 154)
+        Reducer 21 <- Map 20 (PARTITION-LEVEL SORT, 398), Map 25 
(PARTITION-LEVEL SORT, 398)
+        Reducer 22 <- Map 26 (PARTITION-LEVEL SORT, 754), Reducer 21 
(PARTITION-LEVEL SORT, 754)
+        Reducer 23 <- Reducer 22 (GROUP, 481)
+        Reducer 24 <- Reducer 23 (PARTITION-LEVEL SORT, 721), Reducer 30 
(PARTITION-LEVEL SORT, 721), Reducer 36 (PARTITION-LEVEL SORT, 721)
+        Reducer 28 <- Map 27 (PARTITION-LEVEL SORT, 398), Map 31 
(PARTITION-LEVEL SORT, 398)
+        Reducer 29 <- Map 32 (PARTITION-LEVEL SORT, 754), Reducer 28 
(PARTITION-LEVEL SORT, 754)
+        Reducer 3 <- Map 7 (PARTITION-LEVEL SORT, 486), Reducer 2 
(PARTITION-LEVEL SORT, 486)
+        Reducer 30 <- Reducer 29 (GROUP, 481)
+        Reducer 34 <- Map 33 (PARTITION-LEVEL SORT, 398), Map 37 
(PARTITION-LEVEL SORT, 398)
+        Reducer 35 <- Map 38 (PARTITION-LEVEL SORT, 754), Reducer 34 
(PARTITION-LEVEL SORT, 754)
+        Reducer 36 <- Reducer 35 (GROUP, 481)
+        Reducer 4 <- Reducer 3 (GROUP, 186)
+        Reducer 5 <- Reducer 11 (PARTITION-LEVEL SORT, 807), Reducer 17 
(PARTITION-LEVEL SORT, 807), Reducer 24 (PARTITION-LEVEL SORT, 807), Reducer 4 
(PARTITION-LEVEL SORT, 807)
+        Reducer 9 <- Map 12 (PARTITION-LEVEL SORT, 154), Map 8 
(PARTITION-LEVEL SORT, 154)
 #### A masked pattern was here ####
       Vertices:
         Map 1 
             Map Operator Tree:
                 TableScan
-                  alias: store_sales
-                  filterExpr: (ss_sold_date_sk is not null and ss_addr_sk is 
not null) (type: boolean)
-                  Statistics: Num rows: 575995635 Data size: 50814502088 Basic 
stats: COMPLETE Column stats: NONE
+                  alias: web_sales
+                  filterExpr: (ws_sold_date_sk is not null and ws_bill_addr_sk 
is not null) (type: boolean)
+                  Statistics: Num rows: 144002668 Data size: 19580198212 Basic 
stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (ss_addr_sk is not null and ss_sold_date_sk is 
not null) (type: boolean)
-                    Statistics: Num rows: 575995635 Data size: 50814502088 
Basic stats: COMPLETE Column stats: NONE
+                    predicate: (ws_bill_addr_sk is not null and 
ws_sold_date_sk is not null) (type: boolean)
+                    Statistics: Num rows: 144002668 Data size: 19580198212 
Basic stats: COMPLETE Column stats: NONE
                     Select Operator
-                      expressions: ss_sold_date_sk (type: int), ss_addr_sk 
(type: int), ss_ext_sales_price (type: decimal(7,2))
+                      expressions: ws_sold_date_sk (type: int), 
ws_bill_addr_sk (type: int), ws_ext_sales_price (type: decimal(7,2))
                       outputColumnNames: _col0, _col1, _col2
-                      Statistics: Num rows: 575995635 Data size: 50814502088 
Basic stats: COMPLETE Column stats: NONE
+                      Statistics: Num rows: 144002668 Data size: 19580198212 
Basic stats: COMPLETE Column stats: NONE
                       Reduce Output Operator
                         key expressions: _col0 (type: int)
                         sort order: +
                         Map-reduce partition columns: _col0 (type: int)
-                        Statistics: Num rows: 575995635 Data size: 50814502088 
Basic stats: COMPLETE Column stats: NONE
+                        Statistics: Num rows: 144002668 Data size: 19580198212 
Basic stats: COMPLETE Column stats: NONE
                         value expressions: _col1 (type: int), _col2 (type: 
decimal(7,2))
             Execution mode: vectorized
         Map 12 
             Map Operator Tree:
                 TableScan
                   alias: date_dim
-                  filterExpr: ((d_qoy = 1) and (d_year = 2000) and d_date_sk 
is not null) (type: boolean)
+                  filterExpr: ((d_qoy = 3) and (d_year = 2000) and d_date_sk 
is not null) (type: boolean)
                   Statistics: Num rows: 73049 Data size: 81741831 Basic stats: 
COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: ((d_qoy = 1) and (d_year = 2000) and d_date_sk 
is not null) (type: boolean)
+                    predicate: ((d_qoy = 3) and (d_year = 2000) and d_date_sk 
is not null) (type: boolean)
                     Statistics: Num rows: 18262 Data size: 20435178 Basic 
stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: d_date_sk (type: int)
@@ -202,31 +202,31 @@ STAGE PLANS:
         Map 14 
             Map Operator Tree:
                 TableScan
-                  alias: store_sales
-                  filterExpr: (ss_sold_date_sk is not null and ss_addr_sk is 
not null) (type: boolean)
-                  Statistics: Num rows: 575995635 Data size: 50814502088 Basic 
stats: COMPLETE Column stats: NONE
+                  alias: web_sales
+                  filterExpr: (ws_sold_date_sk is not null and ws_bill_addr_sk 
is not null) (type: boolean)
+                  Statistics: Num rows: 144002668 Data size: 19580198212 Basic 
stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (ss_addr_sk is not null and ss_sold_date_sk is 
not null) (type: boolean)
-                    Statistics: Num rows: 575995635 Data size: 50814502088 
Basic stats: COMPLETE Column stats: NONE
+                    predicate: (ws_bill_addr_sk is not null and 
ws_sold_date_sk is not null) (type: boolean)
+                    Statistics: Num rows: 144002668 Data size: 19580198212 
Basic stats: COMPLETE Column stats: NONE
                     Select Operator
-                      expressions: ss_sold_date_sk (type: int), ss_addr_sk 
(type: int), ss_ext_sales_price (type: decimal(7,2))
+                      expressions: ws_sold_date_sk (type: int), 
ws_bill_addr_sk (type: int), ws_ext_sales_price (type: decimal(7,2))
                       outputColumnNames: _col0, _col1, _col2
-                      Statistics: Num rows: 575995635 Data size: 50814502088 
Basic stats: COMPLETE Column stats: NONE
+                      Statistics: Num rows: 144002668 Data size: 19580198212 
Basic stats: COMPLETE Column stats: NONE
                       Reduce Output Operator
                         key expressions: _col0 (type: int)
                         sort order: +
                         Map-reduce partition columns: _col0 (type: int)
-                        Statistics: Num rows: 575995635 Data size: 50814502088 
Basic stats: COMPLETE Column stats: NONE
+                        Statistics: Num rows: 144002668 Data size: 19580198212 
Basic stats: COMPLETE Column stats: NONE
                         value expressions: _col1 (type: int), _col2 (type: 
decimal(7,2))
             Execution mode: vectorized
         Map 18 
             Map Operator Tree:
                 TableScan
                   alias: date_dim
-                  filterExpr: ((d_qoy = 3) and (d_year = 2000) and d_date_sk 
is not null) (type: boolean)
+                  filterExpr: ((d_qoy = 2) and (d_year = 2000) and d_date_sk 
is not null) (type: boolean)
                   Statistics: Num rows: 73049 Data size: 81741831 Basic stats: 
COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: ((d_qoy = 3) and (d_year = 2000) and d_date_sk 
is not null) (type: boolean)
+                    predicate: ((d_qoy = 2) and (d_year = 2000) and d_date_sk 
is not null) (type: boolean)
                     Statistics: Num rows: 18262 Data size: 20435178 Basic 
stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: d_date_sk (type: int)
@@ -261,31 +261,31 @@ STAGE PLANS:
         Map 20 
             Map Operator Tree:
                 TableScan
-                  alias: web_sales
-                  filterExpr: (ws_sold_date_sk is not null and ws_bill_addr_sk 
is not null) (type: boolean)
-                  Statistics: Num rows: 144002668 Data size: 19580198212 Basic 
stats: COMPLETE Column stats: NONE
+                  alias: store_sales
+                  filterExpr: (ss_sold_date_sk is not null and ss_addr_sk is 
not null) (type: boolean)
+                  Statistics: Num rows: 575995635 Data size: 50814502088 Basic 
stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (ws_bill_addr_sk is not null and 
ws_sold_date_sk is not null) (type: boolean)
-                    Statistics: Num rows: 144002668 Data size: 19580198212 
Basic stats: COMPLETE Column stats: NONE
+                    predicate: (ss_addr_sk is not null and ss_sold_date_sk is 
not null) (type: boolean)
+                    Statistics: Num rows: 575995635 Data size: 50814502088 
Basic stats: COMPLETE Column stats: NONE
                     Select Operator
-                      expressions: ws_sold_date_sk (type: int), 
ws_bill_addr_sk (type: int), ws_ext_sales_price (type: decimal(7,2))
+                      expressions: ss_sold_date_sk (type: int), ss_addr_sk 
(type: int), ss_ext_sales_price (type: decimal(7,2))
                       outputColumnNames: _col0, _col1, _col2
-                      Statistics: Num rows: 144002668 Data size: 19580198212 
Basic stats: COMPLETE Column stats: NONE
+                      Statistics: Num rows: 575995635 Data size: 50814502088 
Basic stats: COMPLETE Column stats: NONE
                       Reduce Output Operator
                         key expressions: _col0 (type: int)
                         sort order: +
                         Map-reduce partition columns: _col0 (type: int)
-                        Statistics: Num rows: 144002668 Data size: 19580198212 
Basic stats: COMPLETE Column stats: NONE
+                        Statistics: Num rows: 575995635 Data size: 50814502088 
Basic stats: COMPLETE Column stats: NONE
                         value expressions: _col1 (type: int), _col2 (type: 
decimal(7,2))
             Execution mode: vectorized
         Map 25 
             Map Operator Tree:
                 TableScan
                   alias: date_dim
-                  filterExpr: ((d_qoy = 1) and (d_year = 2000) and d_date_sk 
is not null) (type: boolean)
+                  filterExpr: ((d_qoy = 2) and (d_year = 2000) and d_date_sk 
is not null) (type: boolean)
                   Statistics: Num rows: 73049 Data size: 81741831 Basic stats: 
COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: ((d_qoy = 1) and (d_year = 2000) and d_date_sk 
is not null) (type: boolean)
+                    predicate: ((d_qoy = 2) and (d_year = 2000) and d_date_sk 
is not null) (type: boolean)
                     Statistics: Num rows: 18262 Data size: 20435178 Basic 
stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: d_date_sk (type: int)
@@ -320,31 +320,31 @@ STAGE PLANS:
         Map 27 
             Map Operator Tree:
                 TableScan
-                  alias: web_sales
-                  filterExpr: (ws_sold_date_sk is not null and ws_bill_addr_sk 
is not null) (type: boolean)
-                  Statistics: Num rows: 144002668 Data size: 19580198212 Basic 
stats: COMPLETE Column stats: NONE
+                  alias: store_sales
+                  filterExpr: (ss_sold_date_sk is not null and ss_addr_sk is 
not null) (type: boolean)
+                  Statistics: Num rows: 575995635 Data size: 50814502088 Basic 
stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (ws_bill_addr_sk is not null and 
ws_sold_date_sk is not null) (type: boolean)
-                    Statistics: Num rows: 144002668 Data size: 19580198212 
Basic stats: COMPLETE Column stats: NONE
+                    predicate: (ss_addr_sk is not null and ss_sold_date_sk is 
not null) (type: boolean)
+                    Statistics: Num rows: 575995635 Data size: 50814502088 
Basic stats: COMPLETE Column stats: NONE
                     Select Operator
-                      expressions: ws_sold_date_sk (type: int), 
ws_bill_addr_sk (type: int), ws_ext_sales_price (type: decimal(7,2))
+                      expressions: ss_sold_date_sk (type: int), ss_addr_sk 
(type: int), ss_ext_sales_price (type: decimal(7,2))
                       outputColumnNames: _col0, _col1, _col2
-                      Statistics: Num rows: 144002668 Data size: 19580198212 
Basic stats: COMPLETE Column stats: NONE
+                      Statistics: Num rows: 575995635 Data size: 50814502088 
Basic stats: COMPLETE Column stats: NONE
                       Reduce Output Operator
                         key expressions: _col0 (type: int)
                         sort order: +
                         Map-reduce partition columns: _col0 (type: int)
-                        Statistics: Num rows: 144002668 Data size: 19580198212 
Basic stats: COMPLETE Column stats: NONE
+                        Statistics: Num rows: 575995635 Data size: 50814502088 
Basic stats: COMPLETE Column stats: NONE
                         value expressions: _col1 (type: int), _col2 (type: 
decimal(7,2))
             Execution mode: vectorized
         Map 31 
             Map Operator Tree:
                 TableScan
                   alias: date_dim
-                  filterExpr: ((d_qoy = 2) and (d_year = 2000) and d_date_sk 
is not null) (type: boolean)
+                  filterExpr: ((d_qoy = 1) and (d_year = 2000) and d_date_sk 
is not null) (type: boolean)
                   Statistics: Num rows: 73049 Data size: 81741831 Basic stats: 
COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: ((d_qoy = 2) and (d_year = 2000) and d_date_sk 
is not null) (type: boolean)
+                    predicate: ((d_qoy = 1) and (d_year = 2000) and d_date_sk 
is not null) (type: boolean)
                     Statistics: Num rows: 18262 Data size: 20435178 Basic 
stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: d_date_sk (type: int)
@@ -379,21 +379,21 @@ STAGE PLANS:
         Map 33 
             Map Operator Tree:
                 TableScan
-                  alias: web_sales
-                  filterExpr: (ws_sold_date_sk is not null and ws_bill_addr_sk 
is not null) (type: boolean)
-                  Statistics: Num rows: 144002668 Data size: 19580198212 Basic 
stats: COMPLETE Column stats: NONE
+                  alias: store_sales
+                  filterExpr: (ss_sold_date_sk is not null and ss_addr_sk is 
not null) (type: boolean)
+                  Statistics: Num rows: 575995635 Data size: 50814502088 Basic 
stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (ws_bill_addr_sk is not null and 
ws_sold_date_sk is not null) (type: boolean)
-                    Statistics: Num rows: 144002668 Data size: 19580198212 
Basic stats: COMPLETE Column stats: NONE
+                    predicate: (ss_addr_sk is not null and ss_sold_date_sk is 
not null) (type: boolean)
+                    Statistics: Num rows: 575995635 Data size: 50814502088 
Basic stats: COMPLETE Column stats: NONE
                     Select Operator
-                      expressions: ws_sold_date_sk (type: int), 
ws_bill_addr_sk (type: int), ws_ext_sales_price (type: decimal(7,2))
+                      expressions: ss_sold_date_sk (type: int), ss_addr_sk 
(type: int), ss_ext_sales_price (type: decimal(7,2))
                       outputColumnNames: _col0, _col1, _col2
-                      Statistics: Num rows: 144002668 Data size: 19580198212 
Basic stats: COMPLETE Column stats: NONE
+                      Statistics: Num rows: 575995635 Data size: 50814502088 
Basic stats: COMPLETE Column stats: NONE
                       Reduce Output Operator
                         key expressions: _col0 (type: int)
                         sort order: +
                         Map-reduce partition columns: _col0 (type: int)
-                        Statistics: Num rows: 144002668 Data size: 19580198212 
Basic stats: COMPLETE Column stats: NONE
+                        Statistics: Num rows: 575995635 Data size: 50814502088 
Basic stats: COMPLETE Column stats: NONE
                         value expressions: _col1 (type: int), _col2 (type: 
decimal(7,2))
             Execution mode: vectorized
         Map 37 
@@ -439,10 +439,10 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: date_dim
-                  filterExpr: ((d_qoy = 2) and (d_year = 2000) and d_date_sk 
is not null) (type: boolean)
+                  filterExpr: ((d_qoy = 1) and (d_year = 2000) and d_date_sk 
is not null) (type: boolean)
                   Statistics: Num rows: 73049 Data size: 81741831 Basic stats: 
COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: ((d_qoy = 2) and (d_year = 2000) and d_date_sk 
is not null) (type: boolean)
+                    predicate: ((d_qoy = 1) and (d_year = 2000) and d_date_sk 
is not null) (type: boolean)
                     Statistics: Num rows: 18262 Data size: 20435178 Basic 
stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: d_date_sk (type: int)
@@ -477,21 +477,21 @@ STAGE PLANS:
         Map 8 
             Map Operator Tree:
                 TableScan
-                  alias: store_sales
-                  filterExpr: (ss_sold_date_sk is not null and ss_addr_sk is 
not null) (type: boolean)
-                  Statistics: Num rows: 575995635 Data size: 50814502088 Basic 
stats: COMPLETE Column stats: NONE
+                  alias: web_sales
+                  filterExpr: (ws_sold_date_sk is not null and ws_bill_addr_sk 
is not null) (type: boolean)
+                  Statistics: Num rows: 144002668 Data size: 19580198212 Basic 
stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (ss_addr_sk is not null and ss_sold_date_sk is 
not null) (type: boolean)
-                    Statistics: Num rows: 575995635 Data size: 50814502088 
Basic stats: COMPLETE Column stats: NONE
+                    predicate: (ws_bill_addr_sk is not null and 
ws_sold_date_sk is not null) (type: boolean)
+                    Statistics: Num rows: 144002668 Data size: 19580198212 
Basic stats: COMPLETE Column stats: NONE
                     Select Operator
-                      expressions: ss_sold_date_sk (type: int), ss_addr_sk 
(type: int), ss_ext_sales_price (type: decimal(7,2))
+                      expressions: ws_sold_date_sk (type: int), 
ws_bill_addr_sk (type: int), ws_ext_sales_price (type: decimal(7,2))
                       outputColumnNames: _col0, _col1, _col2
-                      Statistics: Num rows: 575995635 Data size: 50814502088 
Basic stats: COMPLETE Column stats: NONE
+                      Statistics: Num rows: 144002668 Data size: 19580198212 
Basic stats: COMPLETE Column stats: NONE
                       Reduce Output Operator
                         key expressions: _col0 (type: int)
                         sort order: +
                         Map-reduce partition columns: _col0 (type: int)
-                        Statistics: Num rows: 575995635 Data size: 50814502088 
Basic stats: COMPLETE Column stats: NONE
+                        Statistics: Num rows: 144002668 Data size: 19580198212 
Basic stats: COMPLETE Column stats: NONE
                         value expressions: _col1 (type: int), _col2 (type: 
decimal(7,2))
             Execution mode: vectorized
         Reducer 10 
@@ -502,19 +502,19 @@ STAGE PLANS:
                 keys:
                   0 _col1 (type: int)
                   1 _col0 (type: int)
-                outputColumnNames: _col2, _col7
-                Statistics: Num rows: 696954748 Data size: 61485550191 Basic 
stats: COMPLETE Column stats: NONE
+                outputColumnNames: _col2, _col5
+                Statistics: Num rows: 174243235 Data size: 23692040863 Basic 
stats: COMPLETE Column stats: NONE
                 Group By Operator
                   aggregations: sum(_col2)
-                  keys: _col7 (type: string)
+                  keys: _col5 (type: string)
                   mode: hash
                   outputColumnNames: _col0, _col1
-                  Statistics: Num rows: 696954748 Data size: 61485550191 Basic 
stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 174243235 Data size: 23692040863 Basic 
stats: COMPLETE Column stats: NONE
                   Reduce Output Operator
                     key expressions: _col0 (type: string)
                     sort order: +
                     Map-reduce partition columns: _col0 (type: string)
-                    Statistics: Num rows: 696954748 Data size: 61485550191 
Basic stats: COMPLETE Column stats: NONE
+                    Statistics: Num rows: 174243235 Data size: 23692040863 
Basic stats: COMPLETE Column stats: NONE
                     value expressions: _col1 (type: decimal(17,2))
         Reducer 11 
             Execution mode: vectorized
@@ -524,12 +524,12 @@ STAGE PLANS:
                 keys: KEY._col0 (type: string)
                 mode: mergepartial
                 outputColumnNames: _col0, _col1
-                Statistics: Num rows: 348477374 Data size: 30742775095 Basic 
stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 87121617 Data size: 11846020363 Basic 
stats: COMPLETE Column stats: NONE
                 Reduce Output Operator
                   key expressions: _col0 (type: string)
                   sort order: +
                   Map-reduce partition columns: _col0 (type: string)
-                  Statistics: Num rows: 348477374 Data size: 30742775095 Basic 
stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 87121617 Data size: 11846020363 Basic 
stats: COMPLETE Column stats: NONE
                   value expressions: _col1 (type: decimal(17,2))
         Reducer 15 
             Reduce Operator Tree:
@@ -540,12 +540,12 @@ STAGE PLANS:
                   0 _col0 (type: int)
                   1 _col0 (type: int)
                 outputColumnNames: _col1, _col2
-                Statistics: Num rows: 633595212 Data size: 55895953508 Basic 
stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 158402938 Data size: 21538218500 Basic 
stats: COMPLETE Column stats: NONE
                 Reduce Output Operator
                   key expressions: _col1 (type: int)
                   sort order: +
                   Map-reduce partition columns: _col1 (type: int)
-                  Statistics: Num rows: 633595212 Data size: 55895953508 Basic 
stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 158402938 Data size: 21538218500 Basic 
stats: COMPLETE Column stats: NONE
                   value expressions: _col2 (type: decimal(7,2))
         Reducer 16 
             Reduce Operator Tree:
@@ -555,19 +555,19 @@ STAGE PLANS:
                 keys:
                   0 _col1 (type: int)
                   1 _col0 (type: int)
-                outputColumnNames: _col2, _col7
-                Statistics: Num rows: 696954748 Data size: 61485550191 Basic 
stats: COMPLETE Column stats: NONE
+                outputColumnNames: _col2, _col5
+                Statistics: Num rows: 174243235 Data size: 23692040863 Basic 
stats: COMPLETE Column stats: NONE
                 Group By Operator
                   aggregations: sum(_col2)
-                  keys: _col7 (type: string)
+                  keys: _col5 (type: string)
                   mode: hash
                   outputColumnNames: _col0, _col1
-                  Statistics: Num rows: 696954748 Data size: 61485550191 Basic 
stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 174243235 Data size: 23692040863 Basic 
stats: COMPLETE Column stats: NONE
                   Reduce Output Operator
                     key expressions: _col0 (type: string)
                     sort order: +
                     Map-reduce partition columns: _col0 (type: string)
-                    Statistics: Num rows: 696954748 Data size: 61485550191 
Basic stats: COMPLETE Column stats: NONE
+                    Statistics: Num rows: 174243235 Data size: 23692040863 
Basic stats: COMPLETE Column stats: NONE
                     value expressions: _col1 (type: decimal(17,2))
         Reducer 17 
             Execution mode: vectorized
@@ -577,13 +577,17 @@ STAGE PLANS:
                 keys: KEY._col0 (type: string)
                 mode: mergepartial
                 outputColumnNames: _col0, _col1
-                Statistics: Num rows: 348477374 Data size: 30742775095 Basic 
stats: COMPLETE Column stats: NONE
-                Reduce Output Operator
-                  key expressions: _col0 (type: string)
-                  sort order: +
-                  Map-reduce partition columns: _col0 (type: string)
-                  Statistics: Num rows: 348477374 Data size: 30742775095 Basic 
stats: COMPLETE Column stats: NONE
-                  value expressions: _col1 (type: decimal(17,2))
+                Statistics: Num rows: 87121617 Data size: 11846020363 Basic 
stats: COMPLETE Column stats: NONE
+                Select Operator
+                  expressions: _col0 (type: string), _col1 (type: 
decimal(17,2)), (_col1 > 0) (type: boolean)
+                  outputColumnNames: _col0, _col1, _col2
+                  Statistics: Num rows: 87121617 Data size: 11846020363 Basic 
stats: COMPLETE Column stats: NONE
+                  Reduce Output Operator
+                    key expressions: _col0 (type: string)
+                    sort order: +
+                    Map-reduce partition columns: _col0 (type: string)
+                    Statistics: Num rows: 87121617 Data size: 11846020363 
Basic stats: COMPLETE Column stats: NONE
+                    value expressions: _col1 (type: decimal(17,2)), _col2 
(type: boolean)
         Reducer 2 
             Reduce Operator Tree:
               Join Operator
@@ -593,12 +597,12 @@ STAGE PLANS:
                   0 _col0 (type: int)
                   1 _col0 (type: int)
                 outputColumnNames: _col1, _col2
-                Statistics: Num rows: 633595212 Data size: 55895953508 Basic 
stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 158402938 Data size: 21538218500 Basic 
stats: COMPLETE Column stats: NONE
                 Reduce Output Operator
                   key expressions: _col1 (type: int)
                   sort order: +
                   Map-reduce partition columns: _col1 (type: int)
-                  Statistics: Num rows: 633595212 Data size: 55895953508 Basic 
stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 158402938 Data size: 21538218500 Basic 
stats: COMPLETE Column stats: NONE
                   value expressions: _col2 (type: decimal(7,2))
         Reducer 21 
             Reduce Operator Tree:
@@ -609,12 +613,12 @@ STAGE PLANS:
                   0 _col0 (type: int)
                   1 _col0 (type: int)
                 outputColumnNames: _col1, _col2
-                Statistics: Num rows: 158402938 Data size: 21538218500 Basic 
stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 633595212 Data size: 55895953508 Basic 
stats: COMPLETE Column stats: NONE
                 Reduce Output Operator
                   key expressions: _col1 (type: int)
                   sort order: +
                   Map-reduce partition columns: _col1 (type: int)
-                  Statistics: Num rows: 158402938 Data size: 21538218500 Basic 
stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 633595212 Data size: 55895953508 Basic 
stats: COMPLETE Column stats: NONE
                   value expressions: _col2 (type: decimal(7,2))
         Reducer 22 
             Reduce Operator Tree:
@@ -624,19 +628,19 @@ STAGE PLANS:
                 keys:
                   0 _col1 (type: int)
                   1 _col0 (type: int)
-                outputColumnNames: _col2, _col7
-                Statistics: Num rows: 174243235 Data size: 23692040863 Basic 
stats: COMPLETE Column stats: NONE
+                outputColumnNames: _col2, _col5
+                Statistics: Num rows: 696954748 Data size: 61485550191 Basic 
stats: COMPLETE Column stats: NONE
                 Group By Operator
                   aggregations: sum(_col2)
-                  keys: _col7 (type: string)
+                  keys: _col5 (type: string)
                   mode: hash
                   outputColumnNames: _col0, _col1
-                  Statistics: Num rows: 174243235 Data size: 23692040863 Basic 
stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 696954748 Data size: 61485550191 Basic 
stats: COMPLETE Column stats: NONE
                   Reduce Output Operator
                     key expressions: _col0 (type: string)
                     sort order: +
                     Map-reduce partition columns: _col0 (type: string)
-                    Statistics: Num rows: 174243235 Data size: 23692040863 
Basic stats: COMPLETE Column stats: NONE
+                    Statistics: Num rows: 696954748 Data size: 61485550191 
Basic stats: COMPLETE Column stats: NONE
                     value expressions: _col1 (type: decimal(17,2))
         Reducer 23 
             Execution mode: vectorized
@@ -646,12 +650,12 @@ STAGE PLANS:
                 keys: KEY._col0 (type: string)
                 mode: mergepartial
                 outputColumnNames: _col0, _col1
-                Statistics: Num rows: 87121617 Data size: 11846020363 Basic 
stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 348477374 Data size: 30742775095 Basic 
stats: COMPLETE Column stats: NONE
                 Reduce Output Operator
                   key expressions: _col0 (type: string)
                   sort order: +
                   Map-reduce partition columns: _col0 (type: string)
-                  Statistics: Num rows: 87121617 Data size: 11846020363 Basic 
stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 348477374 Data size: 30742775095 Basic 
stats: COMPLETE Column stats: NONE
                   value expressions: _col1 (type: decimal(17,2))
         Reducer 24 
             Reduce Operator Tree:
@@ -664,12 +668,12 @@ STAGE PLANS:
                   1 _col0 (type: string)
                   2 _col0 (type: string)
                 outputColumnNames: _col0, _col1, _col3, _col5
-                Statistics: Num rows: 191667561 Data size: 26061245363 Basic 
stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 766650239 Data size: 67634106674 Basic 
stats: COMPLETE Column stats: NONE
                 Reduce Output Operator
                   key expressions: _col0 (type: string)
                   sort order: +
                   Map-reduce partition columns: _col0 (type: string)
-                  Statistics: Num rows: 191667561 Data size: 26061245363 Basic 
stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 766650239 Data size: 67634106674 Basic 
stats: COMPLETE Column stats: NONE
                   value expressions: _col1 (type: decimal(17,2)), _col3 (type: 
decimal(17,2)), _col5 (type: decimal(17,2))
         Reducer 28 
             Reduce Operator Tree:
@@ -680,12 +684,12 @@ STAGE PLANS:
                   0 _col0 (type: int)
                   1 _col0 (type: int)
                 outputColumnNames: _col1, _col2
-                Statistics: Num rows: 158402938 Data size: 21538218500 Basic 
stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 633595212 Data size: 55895953508 Basic 
stats: COMPLETE Column stats: NONE
                 Reduce Output Operator
                   key expressions: _col1 (type: int)
                   sort order: +
                   Map-reduce partition columns: _col1 (type: int)
-                  Statistics: Num rows: 158402938 Data size: 21538218500 Basic 
stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 633595212 Data size: 55895953508 Basic 
stats: COMPLETE Column stats: NONE
                   value expressions: _col2 (type: decimal(7,2))
         Reducer 29 
             Reduce Operator Tree:
@@ -695,19 +699,19 @@ STAGE PLANS:
                 keys:
                   0 _col1 (type: int)
                   1 _col0 (type: int)
-                outputColumnNames: _col2, _col7
-                Statistics: Num rows: 174243235 Data size: 23692040863 Basic 
stats: COMPLETE Column stats: NONE
+                outputColumnNames: _col2, _col5
+                Statistics: Num rows: 696954748 Data size: 61485550191 Basic 
stats: COMPLETE Column stats: NONE
                 Group By Operator
                   aggregations: sum(_col2)
-                  keys: _col7 (type: string)
+                  keys: _col5 (type: string)
                   mode: hash
                   outputColumnNames: _col0, _col1
-                  Statistics: Num rows: 174243235 Data size: 23692040863 Basic 
stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 696954748 Data size: 61485550191 Basic 
stats: COMPLETE Column stats: NONE
                   Reduce Output Operator
                     key expressions: _col0 (type: string)
                     sort order: +
                     Map-reduce partition columns: _col0 (type: string)
-                    Statistics: Num rows: 174243235 Data size: 23692040863 
Basic stats: COMPLETE Column stats: NONE
+                    Statistics: Num rows: 696954748 Data size: 61485550191 
Basic stats: COMPLETE Column stats: NONE
                     value expressions: _col1 (type: decimal(17,2))
         Reducer 3 
             Reduce Operator Tree:
@@ -717,19 +721,19 @@ STAGE PLANS:
                 keys:
                   0 _col1 (type: int)
                   1 _col0 (type: int)
-                outputColumnNames: _col2, _col7
-                Statistics: Num rows: 696954748 Data size: 61485550191 Basic 
stats: COMPLETE Column stats: NONE
+                outputColumnNames: _col2, _col5
+                Statistics: Num rows: 174243235 Data size: 23692040863 Basic 
stats: COMPLETE Column stats: NONE
                 Group By Operator
                   aggregations: sum(_col2)
-                  keys: _col7 (type: string)
+                  keys: _col5 (type: string)
                   mode: hash
                   outputColumnNames: _col0, _col1
-                  Statistics: Num rows: 696954748 Data size: 61485550191 Basic 
stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 174243235 Data size: 23692040863 Basic 
stats: COMPLETE Column stats: NONE
                   Reduce Output Operator
                     key expressions: _col0 (type: string)
                     sort order: +
                     Map-reduce partition columns: _col0 (type: string)
-                    Statistics: Num rows: 696954748 Data size: 61485550191 
Basic stats: COMPLETE Column stats: NONE
+                    Statistics: Num rows: 174243235 Data size: 23692040863 
Basic stats: COMPLETE Column stats: NONE
                     value expressions: _col1 (type: decimal(17,2))
         Reducer 30 
             Execution mode: vectorized
@@ -739,12 +743,12 @@ STAGE PLANS:
                 keys: KEY._col0 (type: string)
                 mode: mergepartial
                 outputColumnNames: _col0, _col1
-                Statistics: Num rows: 87121617 Data size: 11846020363 Basic 
stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 348477374 Data size: 30742775095 Basic 
stats: COMPLETE Column stats: NONE
                 Reduce Output Operator
                   key expressions: _col0 (type: string)
                   sort order: +
                   Map-reduce partition columns: _col0 (type: string)
-                  Statistics: Num rows: 87121617 Data size: 11846020363 Basic 
stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 348477374 Data size: 30742775095 Basic 
stats: COMPLETE Column stats: NONE
                   value expressions: _col1 (type: decimal(17,2))
         Reducer 34 
             Reduce Operator Tree:
@@ -755,12 +759,12 @@ STAGE PLANS:
                   0 _col0 (type: int)
                   1 _col0 (type: int)
                 outputColumnNames: _col1, _col2
-                Statistics: Num rows: 158402938 Data size: 21538218500 Basic 
stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 633595212 Data size: 55895953508 Basic 
stats: COMPLETE Column stats: NONE
                 Reduce Output Operator
                   key expressions: _col1 (type: int)
                   sort order: +
                   Map-reduce partition columns: _col1 (type: int)
-                  Statistics: Num rows: 158402938 Data size: 21538218500 Basic 
stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 633595212 Data size: 55895953508 Basic 
stats: COMPLETE Column stats: NONE
                   value expressions: _col2 (type: decimal(7,2))
         Reducer 35 
             Reduce Operator Tree:
@@ -770,19 +774,19 @@ STAGE PLANS:
                 keys:
                   0 _col1 (type: int)
                   1 _col0 (type: int)
-                outputColumnNames: _col2, _col7
-                Statistics: Num rows: 174243235 Data size: 23692040863 Basic 
stats: COMPLETE Column stats: NONE
+                outputColumnNames: _col2, _col5
+                Statistics: Num rows: 696954748 Data size: 61485550191 Basic 
stats: COMPLETE Column stats: NONE
                 Group By Operator
                   aggregations: sum(_col2)
-                  keys: _col7 (type: string)
+                  keys: _col5 (type: string)
                   mode: hash
                   outputColumnNames: _col0, _col1
-                  Statistics: Num rows: 174243235 Data size: 23692040863 Basic 
stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 696954748 Data size: 61485550191 Basic 
stats: COMPLETE Column stats: NONE
                   Reduce Output Operator
                     key expressions: _col0 (type: string)
                     sort order: +
                     Map-reduce partition columns: _col0 (type: string)
-                    Statistics: Num rows: 174243235 Data size: 23692040863 
Basic stats: COMPLETE Column stats: NONE
+                    Statistics: Num rows: 696954748 Data size: 61485550191 
Basic stats: COMPLETE Column stats: NONE
                     value expressions: _col1 (type: decimal(17,2))
         Reducer 36 
             Execution mode: vectorized
@@ -792,12 +796,12 @@ STAGE PLANS:
                 keys: KEY._col0 (type: string)
                 mode: mergepartial
                 outputColumnNames: _col0, _col1
-                Statistics: Num rows: 87121617 Data size: 11846020363 Basic 
stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 348477374 Data size: 30742775095 Basic 
stats: COMPLETE Column stats: NONE
                 Reduce Output Operator
                   key expressions: _col0 (type: string)
                   sort order: +
                   Map-reduce partition columns: _col0 (type: string)
-                  Statistics: Num rows: 87121617 Data size: 11846020363 Basic 
stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 348477374 Data size: 30742775095 Basic 
stats: COMPLETE Column stats: NONE
                   value expressions: _col1 (type: decimal(17,2))
         Reducer 4 
             Execution mode: vectorized
@@ -807,13 +811,17 @@ STAGE PLANS:
                 keys: KEY._col0 (type: string)
                 mode: mergepartial
                 outputColumnNames: _col0, _col1
-                Statistics: Num rows: 348477374 Data size: 30742775095 Basic 
stats: COMPLETE Column stats: NONE
-                Reduce Output Operator
-                  key expressions: _col0 (type: string)
-                  sort order: +
-                  Map-reduce partition columns: _col0 (type: string)
-                  Statistics: Num rows: 348477374 Data size: 30742775095 Basic 
stats: COMPLETE Column stats: NONE
-                  value expressions: _col1 (type: decimal(17,2))
+                Statistics: Num rows: 87121617 Data size: 11846020363 Basic 
stats: COMPLETE Column stats: NONE
+                Select Operator
+                  expressions: _col0 (type: string), _col1 (type: 
decimal(17,2)), (_col1 > 0) (type: boolean)
+                  outputColumnNames: _col0, _col1, _col2
+                  Statistics: Num rows: 87121617 Data size: 11846020363 Basic 
stats: COMPLETE Column stats: NONE
+                  Reduce Output Operator
+                    key expressions: _col0 (type: string)
+                    sort order: +
+                    Map-reduce partition columns: _col0 (type: string)
+                    Statistics: Num rows: 87121617 Data size: 11846020363 
Basic stats: COMPLETE Column stats: NONE
+                    value expressions: _col1 (type: decimal(17,2)), _col2 
(type: boolean)
         Reducer 5 
             Reduce Operator Tree:
               Join Operator
@@ -826,18 +834,18 @@ STAGE PLANS:
                   1 _col0 (type: string)
                   2 _col0 (type: string)
                   3 _col0 (type: string)
-                outputColumnNames: _col0, _col1, _col3, _col5, _col7, _col9, 
_col11
-                Statistics: Num rows: 1149975359 Data size: 101451160012 Basic 
stats: COMPLETE Column stats: NONE
+                outputColumnNames: _col1, _col2, _col4, _col6, _col7, _col8, 
_col9, _col11, _col13
+                Statistics: Num rows: 2529945843 Data size: 223192556861 Basic 
stats: COMPLETE Column stats: NONE
                 Filter Operator
-                  predicate: (CASE WHEN ((_col1 > 0)) THEN (CASE WHEN ((_col9 
> 0)) THEN (((_col11 / _col9) > (_col5 / _col1))) ELSE ((null > (_col5 / 
_col1))) END) ELSE (CASE WHEN ((_col9 > 0)) THEN (((_col11 / _col9) > null)) 
ELSE (null) END) END and CASE WHEN ((_col3 > 0)) THEN (CASE WHEN ((_col7 > 0)) 
THEN (((_col9 / _col7) > (_col1 / _col3))) ELSE ((null > (_col1 / _col3))) END) 
ELSE (CASE WHEN ((_col7 > 0)) THEN (((_col9 / _col7) > null)) ELSE (null) END) 
END) (type: boolean)
-                  Statistics: Num rows: 287493839 Data size: 25362789936 Basic 
stats: COMPLETE Column stats: NONE
+                  predicate: (CASE WHEN ((_col11 > 0)) THEN (CASE WHEN (_col2) 
THEN (((_col6 / _col1) > (_col9 / _col11))) ELSE ((null > (_col9 / _col11))) 
END) ELSE (CASE WHEN (_col2) THEN (((_col6 / _col1) > null)) ELSE (null) END) 
END and CASE WHEN ((_col9 > 0)) THEN (CASE WHEN (_col7) THEN (((_col4 / _col6) 
> (_col13 / _col9))) ELSE ((null > (_col13 / _col9))) END) ELSE (CASE WHEN 
(_col7) THEN (((_col4 / _col6) > null)) ELSE (null) END) END) (type: boolean)
+                  Statistics: Num rows: 632486460 Data size: 55798139149 Basic 
stats: COMPLETE Column stats: NONE
                   Select Operator
-                    expressions: _col0 (type: string), 2000 (type: int), 
(_col9 / _col7) (type: decimal(37,20)), (_col1 / _col3) (type: decimal(37,20)), 
(_col11 / _col9) (type: decimal(37,20)), (_col5 / _col1) (type: decimal(37,20))
+                    expressions: _col8 (type: string), 2000 (type: int), 
(_col6 / _col1) (type: decimal(37,20)), (_col9 / _col11) (type: 
decimal(37,20)), (_col4 / _col6) (type: decimal(37,20)), (_col13 / _col9) 
(type: decimal(37,20))
                     outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
-                    Statistics: Num rows: 287493839 Data size: 25362789936 
Basic stats: COMPLETE Column stats: NONE
+                    Statistics: Num rows: 632486460 Data size: 55798139149 
Basic stats: COMPLETE Column stats: NONE
                     File Output Operator
                       compressed: false
-                      Statistics: Num rows: 287493839 Data size: 25362789936 
Basic stats: COMPLETE Column stats: NONE
+                      Statistics: Num rows: 632486460 Data size: 55798139149 
Basic stats: COMPLETE Column stats: NONE
                       table:
                           input format: 
org.apache.hadoop.mapred.SequenceFileInputFormat
                           output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
@@ -851,12 +859,12 @@ STAGE PLANS:
                   0 _col0 (type: int)
                   1 _col0 (type: int)
                 outputColumnNames: _col1, _col2
-                Statistics: Num rows: 633595212 Data size: 55895953508 Basic 
stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 158402938 Data size: 21538218500 Basic 
stats: COMPLETE Column stats: NONE
                 Reduce Output Operator
                   key expressions: _col1 (type: int)
                   sort order: +
                   Map-reduce partition columns: _col1 (type: int)
-                  Statistics: Num rows: 633595212 Data size: 55895953508 Basic 
stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 158402938 Data size: 21538218500 Basic 
stats: COMPLETE Column stats: NONE
                   value expressions: _col2 (type: decimal(7,2))
 
   Stage: Stage-0

http://git-wip-us.apache.org/repos/asf/hive/blob/55887646/ql/src/test/results/clientpositive/perf/spark/query32.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/spark/query32.q.out 
b/ql/src/test/results/clientpositive/perf/spark/query32.q.out
index e03048f..7b8b362 100644
--- a/ql/src/test/results/clientpositive/perf/spark/query32.q.out
+++ b/ql/src/test/results/clientpositive/perf/spark/query32.q.out
@@ -223,10 +223,10 @@ STAGE PLANS:
                 keys:
                   0 _col1 (type: int)
                   1 _col2 (type: int)
-                outputColumnNames: _col2, _col6
+                outputColumnNames: _col2, _col5
                 Statistics: Num rows: 348467716 Data size: 47189528877 Basic 
stats: COMPLETE Column stats: NONE
                 Filter Operator
-                  predicate: (_col2 > CAST( (1.3 * _col6) AS decimal(14,7))) 
(type: boolean)
+                  predicate: (_col2 > _col5) (type: boolean)
                   Statistics: Num rows: 116155905 Data size: 15729842913 Basic 
stats: COMPLETE Column stats: NONE
                   Select Operator
                     expressions: _col2 (type: decimal(7,2))
@@ -270,7 +270,7 @@ STAGE PLANS:
                 outputColumnNames: _col0, _col1, _col2
                 Statistics: Num rows: 158394413 Data size: 21449785388 Basic 
stats: COMPLETE Column stats: NONE
                 Select Operator
-                  expressions: _col0 (type: int), (_col1 / _col2) (type: 
decimal(37,22))
+                  expressions: _col0 (type: int), CAST( (1.3 * (_col1 / 
_col2)) AS decimal(14,7)) (type: decimal(14,7))
                   outputColumnNames: _col0, _col1
                   Statistics: Num rows: 158394413 Data size: 21449785388 Basic 
stats: COMPLETE Column stats: NONE
                   Reduce Output Operator
@@ -278,7 +278,7 @@ STAGE PLANS:
                     sort order: +
                     Map-reduce partition columns: _col0 (type: int)
                     Statistics: Num rows: 158394413 Data size: 21449785388 
Basic stats: COMPLETE Column stats: NONE
-                    value expressions: _col1 (type: decimal(37,22))
+                    value expressions: _col1 (type: decimal(14,7))
         Reducer 7 
             Reduce Operator Tree:
               Join Operator
@@ -294,7 +294,7 @@ STAGE PLANS:
                   sort order: +
                   Map-reduce partition columns: _col2 (type: int)
                   Statistics: Num rows: 174233858 Data size: 23594764438 Basic 
stats: COMPLETE Column stats: NONE
-                  value expressions: _col1 (type: decimal(37,22))
+                  value expressions: _col1 (type: decimal(14,7))
 
   Stage: Stage-0
     Fetch Operator

http://git-wip-us.apache.org/repos/asf/hive/blob/55887646/ql/src/test/results/clientpositive/perf/spark/query33.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/spark/query33.q.out 
b/ql/src/test/results/clientpositive/perf/spark/query33.q.out
index 15a5301..c98db90 100644
--- a/ql/src/test/results/clientpositive/perf/spark/query33.q.out
+++ b/ql/src/test/results/clientpositive/perf/spark/query33.q.out
@@ -416,14 +416,14 @@ STAGE PLANS:
                 Statistics: Num rows: 696954748 Data size: 61485550191 Basic 
stats: COMPLETE Column stats: NONE
                 Select Operator
                   expressions: _col1 (type: int), _col3 (type: decimal(7,2))
-                  outputColumnNames: _col3, _col5
+                  outputColumnNames: _col2, _col4
                   Statistics: Num rows: 696954748 Data size: 61485550191 Basic 
stats: COMPLETE Column stats: NONE
                   Reduce Output Operator
-                    key expressions: _col3 (type: int)
+                    key expressions: _col2 (type: int)
                     sort order: +
-                    Map-reduce partition columns: _col3 (type: int)
+                    Map-reduce partition columns: _col2 (type: int)
                     Statistics: Num rows: 696954748 Data size: 61485550191 
Basic stats: COMPLETE Column stats: NONE
-                    value expressions: _col5 (type: decimal(7,2))
+                    value expressions: _col4 (type: decimal(7,2))
         Reducer 15 
             Reduce Operator Tree:
               Join Operator
@@ -447,11 +447,11 @@ STAGE PLANS:
                      Inner Join 0 to 1
                 keys:
                   0 _col0 (type: int)
-                  1 _col4 (type: int)
-                outputColumnNames: _col1, _col8
+                  1 _col3 (type: int)
+                outputColumnNames: _col1, _col7
                 Statistics: Num rows: 383314495 Data size: 51908482889 Basic 
stats: COMPLETE Column stats: NONE
                 Group By Operator
-                  aggregations: sum(_col8)
+                  aggregations: sum(_col7)
                   keys: _col1 (type: int)
                   mode: hash
                   outputColumnNames: _col0, _col1
@@ -524,14 +524,14 @@ STAGE PLANS:
                 Statistics: Num rows: 348467716 Data size: 47189528877 Basic 
stats: COMPLETE Column stats: NONE
                 Select Operator
                   expressions: _col2 (type: int), _col3 (type: decimal(7,2))
-                  outputColumnNames: _col4, _col5
+                  outputColumnNames: _col3, _col4
                   Statistics: Num rows: 348467716 Data size: 47189528877 Basic 
stats: COMPLETE Column stats: NONE
                   Reduce Output Operator
-                    key expressions: _col4 (type: int)
+                    key expressions: _col3 (type: int)
                     sort order: +
-                    Map-reduce partition columns: _col4 (type: int)
+                    Map-reduce partition columns: _col3 (type: int)
                     Statistics: Num rows: 348467716 Data size: 47189528877 
Basic stats: COMPLETE Column stats: NONE
-                    value expressions: _col5 (type: decimal(7,2))
+                    value expressions: _col4 (type: decimal(7,2))
         Reducer 26 
             Reduce Operator Tree:
               Join Operator
@@ -555,11 +555,11 @@ STAGE PLANS:
                      Inner Join 0 to 1
                 keys:
                   0 _col0 (type: int)
-                  1 _col3 (type: int)
-                outputColumnNames: _col1, _col8
+                  1 _col2 (type: int)
+                outputColumnNames: _col1, _col7
                 Statistics: Num rows: 191667562 Data size: 26061245514 Basic 
stats: COMPLETE Column stats: NONE
                 Group By Operator
-                  aggregations: sum(_col8)
+                  aggregations: sum(_col7)
                   keys: _col1 (type: int)
                   mode: hash
                   outputColumnNames: _col0, _col1
@@ -598,11 +598,11 @@ STAGE PLANS:
                      Inner Join 0 to 1
                 keys:
                   0 _col0 (type: int)
-                  1 _col3 (type: int)
-                outputColumnNames: _col1, _col8
+                  1 _col2 (type: int)
+                outputColumnNames: _col1, _col7
                 Statistics: Num rows: 766650239 Data size: 67634106676 Basic 
stats: COMPLETE Column stats: NONE
                 Group By Operator
-                  aggregations: sum(_col8)
+                  aggregations: sum(_col7)
                   keys: _col1 (type: int)
                   mode: hash
                   outputColumnNames: _col0, _col1
@@ -654,14 +654,14 @@ STAGE PLANS:
                 Statistics: Num rows: 174243235 Data size: 23692040863 Basic 
stats: COMPLETE Column stats: NONE
                 Select Operator
                   expressions: _col1 (type: int), _col3 (type: decimal(7,2))
-                  outputColumnNames: _col3, _col5
+                  outputColumnNames: _col2, _col4
                   Statistics: Num rows: 174243235 Data size: 23692040863 Basic 
stats: COMPLETE Column stats: NONE
                   Reduce Output Operator
-                    key expressions: _col3 (type: int)
+                    key expressions: _col2 (type: int)
                     sort order: +
-                    Map-reduce partition columns: _col3 (type: int)
+                    Map-reduce partition columns: _col2 (type: int)
                     Statistics: Num rows: 174243235 Data size: 23692040863 
Basic stats: COMPLETE Column stats: NONE
-                    value expressions: _col5 (type: decimal(7,2))
+                    value expressions: _col4 (type: decimal(7,2))
         Reducer 4 
             Execution mode: vectorized
             Reduce Operator Tree:

http://git-wip-us.apache.org/repos/asf/hive/blob/55887646/ql/src/test/results/clientpositive/perf/spark/query36.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/spark/query36.q.out 
b/ql/src/test/results/clientpositive/perf/spark/query36.q.out
index b8654b8..c6088be 100644
--- a/ql/src/test/results/clientpositive/perf/spark/query36.q.out
+++ b/ql/src/test/results/clientpositive/perf/spark/query36.q.out
@@ -202,10 +202,10 @@ STAGE PLANS:
                 keys:
                   0 _col1 (type: int)
                   1 _col0 (type: int)
-                outputColumnNames: _col3, _col4, _col10, _col11
+                outputColumnNames: _col3, _col4, _col8, _col9
                 Statistics: Num rows: 766650239 Data size: 67634106676 Basic 
stats: COMPLETE Column stats: NONE
                 Select Operator
-                  expressions: _col11 (type: string), _col10 (type: string), 
_col4 (type: decimal(7,2)), _col3 (type: decimal(7,2))
+                  expressions: _col9 (type: string), _col8 (type: string), 
_col4 (type: decimal(7,2)), _col3 (type: decimal(7,2))
                   outputColumnNames: _col0, _col1, _col2, _col3
                   Statistics: Num rows: 766650239 Data size: 67634106676 Basic 
stats: COMPLETE Column stats: NONE
                   Group By Operator

http://git-wip-us.apache.org/repos/asf/hive/blob/55887646/ql/src/test/results/clientpositive/perf/spark/query38.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/spark/query38.q.out 
b/ql/src/test/results/clientpositive/perf/spark/query38.q.out
index 73fbf85..98558ae 100644
--- a/ql/src/test/results/clientpositive/perf/spark/query38.q.out
+++ b/ql/src/test/results/clientpositive/perf/spark/query38.q.out
@@ -239,10 +239,10 @@ STAGE PLANS:
                 keys:
                   0 _col1 (type: int)
                   1 _col0 (type: int)
-                outputColumnNames: _col3, _col6, _col7
+                outputColumnNames: _col3, _col5, _col6
                 Statistics: Num rows: 348467716 Data size: 47189528877 Basic 
stats: COMPLETE Column stats: NONE
                 Group By Operator
-                  keys: _col7 (type: string), _col6 (type: string), _col3 
(type: string)
+                  keys: _col6 (type: string), _col5 (type: string), _col3 
(type: string)
                   mode: hash
                   outputColumnNames: _col0, _col1, _col2
                   Statistics: Num rows: 348467716 Data size: 47189528877 Basic 
stats: COMPLETE Column stats: NONE
@@ -305,10 +305,10 @@ STAGE PLANS:
                 keys:
                   0 _col1 (type: int)
                   1 _col0 (type: int)
-                outputColumnNames: _col3, _col6, _col7
+                outputColumnNames: _col3, _col5, _col6
                 Statistics: Num rows: 174243235 Data size: 23692040863 Basic 
stats: COMPLETE Column stats: NONE
                 Group By Operator
-                  keys: _col7 (type: string), _col6 (type: string), _col3 
(type: string)
+                  keys: _col6 (type: string), _col5 (type: string), _col3 
(type: string)
                   mode: hash
                   outputColumnNames: _col0, _col1, _col2
                   Statistics: Num rows: 174243235 Data size: 23692040863 Basic 
stats: COMPLETE Column stats: NONE
@@ -371,10 +371,10 @@ STAGE PLANS:
                 keys:
                   0 _col1 (type: int)
                   1 _col0 (type: int)
-                outputColumnNames: _col3, _col6, _col7
+                outputColumnNames: _col3, _col5, _col6
                 Statistics: Num rows: 696954748 Data size: 61485550191 Basic 
stats: COMPLETE Column stats: NONE
                 Group By Operator
-                  keys: _col7 (type: string), _col6 (type: string), _col3 
(type: string)
+                  keys: _col6 (type: string), _col5 (type: string), _col3 
(type: string)
                   mode: hash
                   outputColumnNames: _col0, _col1, _col2
                   Statistics: Num rows: 696954748 Data size: 61485550191 Basic 
stats: COMPLETE Column stats: NONE

http://git-wip-us.apache.org/repos/asf/hive/blob/55887646/ql/src/test/results/clientpositive/perf/spark/query39.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/spark/query39.q.out 
b/ql/src/test/results/clientpositive/perf/spark/query39.q.out
index f1cce16..d83395f 100644
--- a/ql/src/test/results/clientpositive/perf/spark/query39.q.out
+++ b/ql/src/test/results/clientpositive/perf/spark/query39.q.out
@@ -272,7 +272,7 @@ STAGE PLANS:
                 keys:
                   0 _col1 (type: int)
                   1 _col0 (type: int)
-                outputColumnNames: _col2, _col3, _col7
+                outputColumnNames: _col2, _col3, _col5
                 Statistics: Num rows: 45476640 Data size: 718523566 Basic 
stats: COMPLETE Column stats: NONE
                 Map Join Operator
                   condition map:
@@ -280,12 +280,12 @@ STAGE PLANS:
                   keys:
                     0 _col2 (type: int)
                     1 _col0 (type: int)
-                  outputColumnNames: _col3, _col7, _col8, _col9
+                  outputColumnNames: _col3, _col5, _col6, _col7
                   input vertices:
                     1 Map 16
                   Statistics: Num rows: 50024305 Data size: 790375939 Basic 
stats: COMPLETE Column stats: NONE
                   Select Operator
-                    expressions: _col9 (type: string), _col8 (type: int), 
_col7 (type: int), _col3 (type: int), UDFToDouble(_col3) (type: double), 
(UDFToDouble(_col3) * UDFToDouble(_col3)) (type: double)
+                    expressions: _col7 (type: string), _col6 (type: int), 
_col5 (type: int), _col3 (type: int), UDFToDouble(_col3) (type: double), 
(UDFToDouble(_col3) * UDFToDouble(_col3)) (type: double)
                     outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
                     Statistics: Num rows: 50024305 Data size: 790375939 Basic 
stats: COMPLETE Column stats: NONE
                     Group By Operator
@@ -352,7 +352,7 @@ STAGE PLANS:
                 keys:
                   0 _col1 (type: int)
                   1 _col0 (type: int)
-                outputColumnNames: _col2, _col3, _col7
+                outputColumnNames: _col2, _col3, _col5
                 Statistics: Num rows: 45476640 Data size: 718523566 Basic 
stats: COMPLETE Column stats: NONE
                 Map Join Operator
                   condition map:
@@ -360,12 +360,12 @@ STAGE PLANS:
                   keys:
                     0 _col2 (type: int)
                     1 _col0 (type: int)
-                  outputColumnNames: _col3, _col7, _col8, _col9
+                  outputColumnNames: _col3, _col5, _col6, _col7
                   input vertices:
                     1 Map 9
                   Statistics: Num rows: 50024305 Data size: 790375939 Basic 
stats: COMPLETE Column stats: NONE
                   Select Operator
-                    expressions: _col9 (type: string), _col8 (type: int), 
_col7 (type: int), _col3 (type: int), UDFToDouble(_col3) (type: double), 
(UDFToDouble(_col3) * UDFToDouble(_col3)) (type: double)
+                    expressions: _col7 (type: string), _col6 (type: int), 
_col5 (type: int), _col3 (type: int), UDFToDouble(_col3) (type: double), 
(UDFToDouble(_col3) * UDFToDouble(_col3)) (type: double)
                     outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
                     Statistics: Num rows: 50024305 Data size: 790375939 Basic 
stats: COMPLETE Column stats: NONE
                     Group By Operator

Reply via email to