HIVE-19128 : Update golden files for spark perf tests

Signed-off-by: Ashutosh Chauhan <hashut...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/328d3f93
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/328d3f93
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/328d3f93

Branch: refs/heads/master
Commit: 328d3f93596c82ac79544f111200659e28f5f8fc
Parents: 2d3a410
Author: Ashutosh Chauhan <hashut...@apache.org>
Authored: Mon Apr 9 14:57:11 2018 -0700
Committer: Ashutosh Chauhan <hashut...@apache.org>
Committed: Mon Apr 9 14:57:11 2018 -0700

----------------------------------------------------------------------
 .../clientpositive/perf/spark/query11.q.out     |  48 +-
 .../clientpositive/perf/spark/query15.q.out     | 164 +++----
 .../clientpositive/perf/spark/query16.q.out     |  70 ++-
 .../clientpositive/perf/spark/query18.q.out     | 216 ++++----
 .../clientpositive/perf/spark/query19.q.out     | 218 ++++-----
 .../clientpositive/perf/spark/query21.q.out     | 114 ++---
 .../clientpositive/perf/spark/query24.q.out     | 282 +++++------
 .../clientpositive/perf/spark/query25.q.out     | 118 ++---
 .../clientpositive/perf/spark/query29.q.out     | 280 ++++++-----
 .../clientpositive/perf/spark/query30.q.out     | 262 +++++-----
 .../clientpositive/perf/spark/query32.q.out     | 132 ++---
 .../clientpositive/perf/spark/query34.q.out     |  34 +-
 .../clientpositive/perf/spark/query35.q.out     |  74 +--
 .../clientpositive/perf/spark/query37.q.out     |  16 +-
 .../clientpositive/perf/spark/query4.q.out      | 214 ++++----
 .../clientpositive/perf/spark/query40.q.out     | 116 ++---
 .../clientpositive/perf/spark/query44.q.out     | 246 +++++-----
 .../clientpositive/perf/spark/query45.q.out     | 204 ++++----
 .../clientpositive/perf/spark/query46.q.out     | 104 ++--
 .../clientpositive/perf/spark/query47.q.out     |  92 ++--
 .../clientpositive/perf/spark/query48.q.out     |  94 ++--
 .../clientpositive/perf/spark/query5.q.out      |  38 +-
 .../clientpositive/perf/spark/query50.q.out     | 196 ++++----
 .../clientpositive/perf/spark/query53.q.out     | 105 ++--
 .../clientpositive/perf/spark/query54.q.out     | 277 +++++------
 .../clientpositive/perf/spark/query57.q.out     |  92 ++--
 .../clientpositive/perf/spark/query58.q.out     | 490 +++++++++----------
 .../clientpositive/perf/spark/query6.q.out      | 350 ++++++-------
 .../clientpositive/perf/spark/query61.q.out     |  40 +-
 .../clientpositive/perf/spark/query63.q.out     | 105 ++--
 .../clientpositive/perf/spark/query65.q.out     | 100 ++--
 .../clientpositive/perf/spark/query66.q.out     |  20 +-
 .../clientpositive/perf/spark/query67.q.out     | 137 +++---
 .../clientpositive/perf/spark/query68.q.out     | 104 ++--
 .../clientpositive/perf/spark/query72.q.out     | 461 ++++++++---------
 .../clientpositive/perf/spark/query73.q.out     |  34 +-
 .../clientpositive/perf/spark/query75.q.out     | 248 +++++-----
 .../clientpositive/perf/spark/query76.q.out     | 130 ++---
 .../clientpositive/perf/spark/query77.q.out     |  66 +--
 .../clientpositive/perf/spark/query78.q.out     | 273 ++++++-----
 .../clientpositive/perf/spark/query79.q.out     |  10 +-
 .../clientpositive/perf/spark/query8.q.out      | 174 +++----
 .../clientpositive/perf/spark/query80.q.out     | 417 ++++++++--------
 .../clientpositive/perf/spark/query81.q.out     | 270 +++++-----
 .../clientpositive/perf/spark/query82.q.out     |  16 +-
 .../clientpositive/perf/spark/query83.q.out     | 354 +++++++-------
 .../clientpositive/perf/spark/query85.q.out     | 309 ++++++------
 .../clientpositive/perf/spark/query88.q.out     | 272 +++++-----
 .../clientpositive/perf/spark/query89.q.out     |  26 +-
 .../clientpositive/perf/spark/query90.q.out     |  68 +--
 .../clientpositive/perf/spark/query91.q.out     |  14 +-
 .../clientpositive/perf/spark/query92.q.out     | 106 ++--
 .../clientpositive/perf/spark/query94.q.out     |  70 ++-
 .../clientpositive/perf/spark/query95.q.out     | 100 ++--
 .../clientpositive/perf/spark/query97.q.out     |  54 +-
 .../clientpositive/perf/spark/query99.q.out     |  42 +-
 56 files changed, 4313 insertions(+), 4353 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/328d3f93/ql/src/test/results/clientpositive/perf/spark/query11.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/spark/query11.q.out 
b/ql/src/test/results/clientpositive/perf/spark/query11.q.out
index e46aa21..227068c 100644
--- a/ql/src/test/results/clientpositive/perf/spark/query11.q.out
+++ b/ql/src/test/results/clientpositive/perf/spark/query11.q.out
@@ -300,7 +300,7 @@ STAGE PLANS:
                   alias: date_dim
                   Statistics: Num rows: 73049 Data size: 81741831 Basic stats: 
COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: ((d_year = 2001) and d_date_sk is not null) 
(type: boolean)
+                    predicate: ((d_year = 2002) and d_date_sk is not null) 
(type: boolean)
                     Statistics: Num rows: 36524 Data size: 40870356 Basic 
stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: d_date_sk (type: int)
@@ -335,7 +335,7 @@ STAGE PLANS:
                   alias: date_dim
                   Statistics: Num rows: 73049 Data size: 81741831 Basic stats: 
COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: ((d_year = 2002) and d_date_sk is not null) 
(type: boolean)
+                    predicate: ((d_year = 2001) and d_date_sk is not null) 
(type: boolean)
                     Statistics: Num rows: 36524 Data size: 40870356 Basic 
stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: d_date_sk (type: int)
@@ -577,21 +577,14 @@ STAGE PLANS:
                 Statistics: Num rows: 87121617 Data size: 11846020363 Basic 
stats: COMPLETE Column stats: NONE
                 Select Operator
                   expressions: _col0 (type: string), _col7 (type: 
decimal(18,2))
-                  outputColumnNames: _col0, _col7
+                  outputColumnNames: _col0, _col1
                   Statistics: Num rows: 87121617 Data size: 11846020363 Basic 
stats: COMPLETE Column stats: NONE
-                  Filter Operator
-                    predicate: (_col7 > 0) (type: boolean)
-                    Statistics: Num rows: 29040539 Data size: 3948673454 Basic 
stats: COMPLETE Column stats: NONE
-                    Select Operator
-                      expressions: _col0 (type: string), _col7 (type: 
decimal(18,2))
-                      outputColumnNames: _col0, _col1
-                      Statistics: Num rows: 29040539 Data size: 3948673454 
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: 29040539 Data size: 3948673454 
Basic stats: COMPLETE Column stats: NONE
-                        value expressions: _col1 (type: decimal(18,2))
+                  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(18,2))
         Reducer 3 
             Reduce Operator Tree:
               Join Operator
@@ -628,14 +621,21 @@ STAGE PLANS:
                 Statistics: Num rows: 87121617 Data size: 11846020363 Basic 
stats: COMPLETE Column stats: NONE
                 Select Operator
                   expressions: _col0 (type: string), _col7 (type: 
decimal(18,2))
-                  outputColumnNames: _col0, _col1
+                  outputColumnNames: _col0, _col7
                   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(18,2))
+                  Filter Operator
+                    predicate: (_col7 > 0) (type: boolean)
+                    Statistics: Num rows: 29040539 Data size: 3948673454 Basic 
stats: COMPLETE Column stats: NONE
+                    Select Operator
+                      expressions: _col0 (type: string), _col7 (type: 
decimal(18,2))
+                      outputColumnNames: _col0, _col1
+                      Statistics: Num rows: 29040539 Data size: 3948673454 
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: 29040539 Data size: 3948673454 
Basic stats: COMPLETE Column stats: NONE
+                        value expressions: _col1 (type: decimal(18,2))
         Reducer 5 
             Reduce Operator Tree:
               Join Operator
@@ -651,7 +651,7 @@ STAGE PLANS:
                 outputColumnNames: _col1, _col3, _col5, _col6, _col8
                 Statistics: Num rows: 1149975359 Data size: 101451160012 Basic 
stats: COMPLETE Column stats: NONE
                 Filter Operator
-                  predicate: ((_col1 / _col8) > (_col6 / _col3)) (type: 
boolean)
+                  predicate: ((_col8 / _col1) > (_col6 / _col3)) (type: 
boolean)
                   Statistics: Num rows: 383325119 Data size: 33817053278 Basic 
stats: COMPLETE Column stats: NONE
                   Select Operator
                     expressions: _col5 (type: string)

http://git-wip-us.apache.org/repos/asf/hive/blob/328d3f93/ql/src/test/results/clientpositive/perf/spark/query15.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/spark/query15.q.out 
b/ql/src/test/results/clientpositive/perf/spark/query15.q.out
index c54b95a..e8ffcb1 100644
--- a/ql/src/test/results/clientpositive/perf/spark/query15.q.out
+++ b/ql/src/test/results/clientpositive/perf/spark/query15.q.out
@@ -44,52 +44,16 @@ STAGE PLANS:
   Stage: Stage-1
     Spark
       Edges:
-        Reducer 2 <- Map 1 (PARTITION-LEVEL SORT, 855), Map 6 (PARTITION-LEVEL 
SORT, 855)
-        Reducer 3 <- Reducer 2 (PARTITION-LEVEL SORT, 927), Reducer 8 
(PARTITION-LEVEL SORT, 927)
-        Reducer 4 <- Reducer 3 (GROUP, 369)
-        Reducer 5 <- Reducer 4 (SORT, 1)
-        Reducer 8 <- Map 7 (PARTITION-LEVEL SORT, 305), Map 9 (PARTITION-LEVEL 
SORT, 305)
+        Reducer 2 <- Map 1 (PARTITION-LEVEL SORT, 305), Map 7 (PARTITION-LEVEL 
SORT, 305)
+        Reducer 3 <- Map 8 (PARTITION-LEVEL SORT, 873), Reducer 2 
(PARTITION-LEVEL SORT, 873)
+        Reducer 4 <- Map 9 (PARTITION-LEVEL SORT, 686), Reducer 3 
(PARTITION-LEVEL SORT, 686)
+        Reducer 5 <- Reducer 4 (GROUP, 406)
+        Reducer 6 <- Reducer 5 (SORT, 1)
 #### A masked pattern was here ####
       Vertices:
         Map 1 
             Map Operator Tree:
                 TableScan
-                  alias: customer
-                  Statistics: Num rows: 80000000 Data size: 68801615852 Basic 
stats: COMPLETE Column stats: NONE
-                  Filter Operator
-                    predicate: (c_current_addr_sk is not null and 
c_customer_sk is not null) (type: boolean)
-                    Statistics: Num rows: 80000000 Data size: 68801615852 
Basic stats: COMPLETE Column stats: NONE
-                    Select Operator
-                      expressions: c_customer_sk (type: int), 
c_current_addr_sk (type: int)
-                      outputColumnNames: _col0, _col1
-                      Statistics: Num rows: 80000000 Data size: 68801615852 
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: 80000000 Data size: 68801615852 
Basic stats: COMPLETE Column stats: NONE
-                        value expressions: _col0 (type: int)
-        Map 6 
-            Map Operator Tree:
-                TableScan
-                  alias: customer_address
-                  Statistics: Num rows: 40000000 Data size: 40595195284 Basic 
stats: COMPLETE Column stats: NONE
-                  Filter Operator
-                    predicate: ca_address_sk is not null (type: boolean)
-                    Statistics: Num rows: 40000000 Data size: 40595195284 
Basic stats: COMPLETE Column stats: NONE
-                    Select Operator
-                      expressions: ca_address_sk (type: int), ca_state (type: 
string), ca_zip (type: string)
-                      outputColumnNames: _col0, _col1, _col2
-                      Statistics: Num rows: 40000000 Data size: 40595195284 
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: 40000000 Data size: 40595195284 
Basic stats: COMPLETE Column stats: NONE
-                        value expressions: _col1 (type: string), _col2 (type: 
string)
-        Map 7 
-            Map Operator Tree:
-                TableScan
                   alias: catalog_sales
                   Statistics: Num rows: 287989836 Data size: 38999608952 Basic 
stats: COMPLETE Column stats: NONE
                   Filter Operator
@@ -105,7 +69,7 @@ STAGE PLANS:
                         Map-reduce partition columns: _col0 (type: int)
                         Statistics: Num rows: 287989836 Data size: 38999608952 
Basic stats: COMPLETE Column stats: NONE
                         value expressions: _col1 (type: int), _col2 (type: 
decimal(7,2))
-        Map 9 
+        Map 7 
             Map Operator Tree:
                 TableScan
                   alias: date_dim
@@ -122,72 +86,124 @@ STAGE PLANS:
                         sort order: +
                         Map-reduce partition columns: _col0 (type: int)
                         Statistics: Num rows: 18262 Data size: 20435178 Basic 
stats: COMPLETE Column stats: NONE
+        Map 8 
+            Map Operator Tree:
+                TableScan
+                  alias: customer
+                  Statistics: Num rows: 80000000 Data size: 68801615852 Basic 
stats: COMPLETE Column stats: NONE
+                  Filter Operator
+                    predicate: (c_current_addr_sk is not null and 
c_customer_sk is not null) (type: boolean)
+                    Statistics: Num rows: 80000000 Data size: 68801615852 
Basic stats: COMPLETE Column stats: NONE
+                    Select Operator
+                      expressions: c_customer_sk (type: int), 
c_current_addr_sk (type: int)
+                      outputColumnNames: _col0, _col1
+                      Statistics: Num rows: 80000000 Data size: 68801615852 
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: 80000000 Data size: 68801615852 
Basic stats: COMPLETE Column stats: NONE
+                        value expressions: _col1 (type: int)
+        Map 9 
+            Map Operator Tree:
+                TableScan
+                  alias: customer_address
+                  Statistics: Num rows: 40000000 Data size: 40595195284 Basic 
stats: COMPLETE Column stats: NONE
+                  Filter Operator
+                    predicate: ca_address_sk is not null (type: boolean)
+                    Statistics: Num rows: 40000000 Data size: 40595195284 
Basic stats: COMPLETE Column stats: NONE
+                    Select Operator
+                      expressions: ca_address_sk (type: int), ca_state (type: 
string), ca_zip (type: string)
+                      outputColumnNames: _col0, _col1, _col2
+                      Statistics: Num rows: 40000000 Data size: 40595195284 
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: 40000000 Data size: 40595195284 
Basic stats: COMPLETE Column stats: NONE
+                        value expressions: _col1 (type: string), _col2 (type: 
string)
         Reducer 2 
             Reduce Operator Tree:
               Join Operator
                 condition map:
                      Inner Join 0 to 1
                 keys:
-                  0 _col1 (type: int)
+                  0 _col0 (type: int)
                   1 _col0 (type: int)
-                outputColumnNames: _col0, _col3, _col4
-                Statistics: Num rows: 88000001 Data size: 75681779077 Basic 
stats: COMPLETE Column stats: NONE
+                outputColumnNames: _col1, _col2
+                Statistics: Num rows: 316788826 Data size: 42899570777 Basic 
stats: COMPLETE Column stats: NONE
                 Reduce Output Operator
-                  key expressions: _col0 (type: int)
+                  key expressions: _col1 (type: int)
                   sort order: +
-                  Map-reduce partition columns: _col0 (type: int)
-                  Statistics: Num rows: 88000001 Data size: 75681779077 Basic 
stats: COMPLETE Column stats: NONE
-                  value expressions: _col3 (type: string), _col4 (type: string)
+                  Map-reduce partition columns: _col1 (type: int)
+                  Statistics: Num rows: 316788826 Data size: 42899570777 Basic 
stats: COMPLETE Column stats: NONE
+                  value expressions: _col2 (type: decimal(7,2))
         Reducer 3 
             Reduce Operator Tree:
               Join Operator
                 condition map:
                      Inner Join 0 to 1
                 keys:
-                  0 _col0 (type: int)
-                  1 _col1 (type: int)
-                outputColumnNames: _col3, _col4, _col7
+                  0 _col1 (type: int)
+                  1 _col0 (type: int)
+                outputColumnNames: _col2, _col7
                 Statistics: Num rows: 348467716 Data size: 47189528877 Basic 
stats: COMPLETE Column stats: NONE
-                Filter Operator
-                  predicate: ((_col3) IN ('CA', 'WA', 'GA') or (_col7 > 500) 
or (substr(_col4, 1, 5)) IN ('85669', '86197', '88274', '83405', '86475', 
'85392', '85460', '80348', '81792')) (type: boolean)
+                Reduce Output Operator
+                  key expressions: _col7 (type: int)
+                  sort order: +
+                  Map-reduce partition columns: _col7 (type: int)
                   Statistics: Num rows: 348467716 Data size: 47189528877 Basic 
stats: COMPLETE Column stats: NONE
+                  value expressions: _col2 (type: decimal(7,2))
+        Reducer 4 
+            Reduce Operator Tree:
+              Join Operator
+                condition map:
+                     Inner Join 0 to 1
+                keys:
+                  0 _col7 (type: int)
+                  1 _col0 (type: int)
+                outputColumnNames: _col2, _col9, _col10
+                Statistics: Num rows: 383314495 Data size: 51908482889 Basic 
stats: COMPLETE Column stats: NONE
+                Filter Operator
+                  predicate: ((_col2 > 500) or (_col9) IN ('CA', 'WA', 'GA') 
or (substr(_col10, 1, 5)) IN ('85669', '86197', '88274', '83405', '86475', 
'85392', '85460', '80348', '81792')) (type: boolean)
+                  Statistics: Num rows: 383314495 Data size: 51908482889 Basic 
stats: COMPLETE Column stats: NONE
                   Select Operator
-                    expressions: _col4 (type: string), _col7 (type: 
decimal(7,2))
-                    outputColumnNames: _col4, _col7
-                    Statistics: Num rows: 348467716 Data size: 47189528877 
Basic stats: COMPLETE Column stats: NONE
+                    expressions: _col2 (type: decimal(7,2)), _col10 (type: 
string)
+                    outputColumnNames: _col2, _col10
+                    Statistics: Num rows: 383314495 Data size: 51908482889 
Basic stats: COMPLETE Column stats: NONE
                     Group By Operator
-                      aggregations: sum(_col7)
-                      keys: _col4 (type: string)
+                      aggregations: sum(_col2)
+                      keys: _col10 (type: string)
                       mode: hash
                       outputColumnNames: _col0, _col1
-                      Statistics: Num rows: 348467716 Data size: 47189528877 
Basic stats: COMPLETE Column stats: NONE
+                      Statistics: Num rows: 383314495 Data size: 51908482889 
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: 348467716 Data size: 47189528877 
Basic stats: COMPLETE Column stats: NONE
+                        Statistics: Num rows: 383314495 Data size: 51908482889 
Basic stats: COMPLETE Column stats: NONE
                         TopN Hash Memory Usage: 0.1
                         value expressions: _col1 (type: decimal(17,2))
-        Reducer 4 
+        Reducer 5 
             Reduce Operator Tree:
               Group By Operator
                 aggregations: sum(VALUE._col0)
                 keys: KEY._col0 (type: string)
                 mode: mergepartial
                 outputColumnNames: _col0, _col1
-                Statistics: Num rows: 174233858 Data size: 23594764438 Basic 
stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 191657247 Data size: 25954241376 Basic 
stats: COMPLETE Column stats: NONE
                 Reduce Output Operator
                   key expressions: _col0 (type: string)
                   sort order: +
-                  Statistics: Num rows: 174233858 Data size: 23594764438 Basic 
stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 191657247 Data size: 25954241376 Basic 
stats: COMPLETE Column stats: NONE
                   TopN Hash Memory Usage: 0.1
                   value expressions: _col1 (type: decimal(17,2))
-        Reducer 5 
+        Reducer 6 
             Reduce Operator Tree:
               Select Operator
                 expressions: KEY.reducesinkkey0 (type: string), VALUE._col0 
(type: decimal(17,2))
                 outputColumnNames: _col0, _col1
-                Statistics: Num rows: 174233858 Data size: 23594764438 Basic 
stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 191657247 Data size: 25954241376 Basic 
stats: COMPLETE Column stats: NONE
                 Limit
                   Number of rows: 100
                   Statistics: Num rows: 100 Data size: 13500 Basic stats: 
COMPLETE Column stats: NONE
@@ -198,22 +214,6 @@ STAGE PLANS:
                         input format: 
org.apache.hadoop.mapred.SequenceFileInputFormat
                         output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
                         serde: 
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-        Reducer 8 
-            Reduce Operator Tree:
-              Join Operator
-                condition map:
-                     Inner Join 0 to 1
-                keys:
-                  0 _col0 (type: int)
-                  1 _col0 (type: int)
-                outputColumnNames: _col1, _col2
-                Statistics: Num rows: 316788826 Data size: 42899570777 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: 316788826 Data size: 42899570777 Basic 
stats: COMPLETE Column stats: NONE
-                  value expressions: _col2 (type: decimal(7,2))
 
   Stage: Stage-0
     Fetch Operator

http://git-wip-us.apache.org/repos/asf/hive/blob/328d3f93/ql/src/test/results/clientpositive/perf/spark/query16.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/spark/query16.q.out 
b/ql/src/test/results/clientpositive/perf/spark/query16.q.out
index 743f27d..625faff 100644
--- a/ql/src/test/results/clientpositive/perf/spark/query16.q.out
+++ b/ql/src/test/results/clientpositive/perf/spark/query16.q.out
@@ -60,8 +60,7 @@ limit 100
 POSTHOOK: type: QUERY
 STAGE DEPENDENCIES:
   Stage-2 is a root stage
-  Stage-3 depends on stages: Stage-2
-  Stage-1 depends on stages: Stage-3
+  Stage-1 depends on stages: Stage-2
   Stage-0 depends on stages: Stage-1
 
 STAGE PLANS:
@@ -87,12 +86,7 @@ STAGE PLANS:
                           1 _col0 (type: int)
             Local Work:
               Map Reduce Local Work
-
-  Stage: Stage-3
-    Spark
-#### A masked pattern was here ####
-      Vertices:
-        Map 8 
+        Map 9 
             Map Operator Tree:
                 TableScan
                   alias: date_dim
@@ -115,7 +109,7 @@ STAGE PLANS:
     Spark
       Edges:
         Reducer 13 <- Map 12 (GROUP, 24)
-        Reducer 2 <- Map 1 (PARTITION-LEVEL SORT, 494), Map 9 (PARTITION-LEVEL 
SORT, 494)
+        Reducer 2 <- Map 1 (PARTITION-LEVEL SORT, 464), Map 8 (PARTITION-LEVEL 
SORT, 464)
         Reducer 3 <- Map 11 (PARTITION-LEVEL SORT, 711), Reducer 2 
(PARTITION-LEVEL SORT, 711)
         Reducer 4 <- Reducer 13 (PARTITION-LEVEL SORT, 459), Reducer 3 
(PARTITION-LEVEL SORT, 459)
         Reducer 5 <- Reducer 4 (GROUP, 246)
@@ -135,24 +129,12 @@ STAGE PLANS:
                       expressions: cs_ship_date_sk (type: int), 
cs_ship_addr_sk (type: int), cs_call_center_sk (type: int), cs_warehouse_sk 
(type: int), cs_order_number (type: int), cs_ext_ship_cost (type: 
decimal(7,2)), cs_net_profit (type: decimal(7,2))
                       outputColumnNames: _col0, _col1, _col2, _col3, _col4, 
_col5, _col6
                       Statistics: Num rows: 287989836 Data size: 38999608952 
Basic stats: COMPLETE Column stats: NONE
-                      Map Join Operator
-                        condition map:
-                             Inner Join 0 to 1
-                        keys:
-                          0 _col0 (type: int)
-                          1 _col0 (type: int)
-                        outputColumnNames: _col1, _col2, _col3, _col4, _col5, 
_col6
-                        input vertices:
-                          1 Map 8
-                        Statistics: Num rows: 316788826 Data size: 42899570777 
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: 316788826 Data size: 
42899570777 Basic stats: COMPLETE Column stats: NONE
-                          value expressions: _col2 (type: int), _col3 (type: 
int), _col4 (type: int), _col5 (type: decimal(7,2)), _col6 (type: decimal(7,2))
-            Local Work:
-              Map Reduce Local Work
+                      Reduce Output Operator
+                        key expressions: _col1 (type: int)
+                        sort order: +
+                        Map-reduce partition columns: _col1 (type: int)
+                        Statistics: Num rows: 287989836 Data size: 38999608952 
Basic stats: COMPLETE Column stats: NONE
+                        value expressions: _col0 (type: int), _col2 (type: 
int), _col3 (type: int), _col4 (type: int), _col5 (type: decimal(7,2)), _col6 
(type: decimal(7,2))
         Map 11 
             Map Operator Tree:
                 TableScan
@@ -194,7 +176,7 @@ STAGE PLANS:
                         sort order: +
                         Map-reduce partition columns: _col0 (type: int)
                         Statistics: Num rows: 28798881 Data size: 3057234680 
Basic stats: COMPLETE Column stats: NONE
-        Map 9 
+        Map 8 
             Map Operator Tree:
                 TableScan
                   alias: customer_address
@@ -238,24 +220,34 @@ STAGE PLANS:
                 keys:
                   0 _col1 (type: int)
                   1 _col0 (type: int)
-                outputColumnNames: _col2, _col3, _col4, _col5, _col6
-                Statistics: Num rows: 348467716 Data size: 47189528877 Basic 
stats: COMPLETE Column stats: NONE
+                outputColumnNames: _col0, _col2, _col3, _col4, _col5, _col6
+                Statistics: Num rows: 316788826 Data size: 42899570777 Basic 
stats: COMPLETE Column stats: NONE
                 Map Join Operator
                   condition map:
                        Inner Join 0 to 1
                   keys:
-                    0 _col2 (type: int)
+                    0 _col0 (type: int)
                     1 _col0 (type: int)
-                  outputColumnNames: _col3, _col4, _col5, _col6
+                  outputColumnNames: _col2, _col3, _col4, _col5, _col6
                   input vertices:
-                    1 Map 10
-                  Statistics: Num rows: 383314495 Data size: 51908482889 Basic 
stats: COMPLETE Column stats: NONE
-                  Reduce Output Operator
-                    key expressions: _col4 (type: int)
-                    sort order: +
-                    Map-reduce partition columns: _col4 (type: int)
+                    1 Map 9
+                  Statistics: Num rows: 348467716 Data size: 47189528877 Basic 
stats: COMPLETE Column stats: NONE
+                  Map Join Operator
+                    condition map:
+                         Inner Join 0 to 1
+                    keys:
+                      0 _col2 (type: int)
+                      1 _col0 (type: int)
+                    outputColumnNames: _col3, _col4, _col5, _col6
+                    input vertices:
+                      1 Map 10
                     Statistics: Num rows: 383314495 Data size: 51908482889 
Basic stats: COMPLETE Column stats: NONE
-                    value expressions: _col3 (type: int), _col5 (type: 
decimal(7,2)), _col6 (type: decimal(7,2))
+                    Reduce Output Operator
+                      key expressions: _col4 (type: int)
+                      sort order: +
+                      Map-reduce partition columns: _col4 (type: int)
+                      Statistics: Num rows: 383314495 Data size: 51908482889 
Basic stats: COMPLETE Column stats: NONE
+                      value expressions: _col3 (type: int), _col5 (type: 
decimal(7,2)), _col6 (type: decimal(7,2))
         Reducer 3 
             Reduce Operator Tree:
               Join Operator

http://git-wip-us.apache.org/repos/asf/hive/blob/328d3f93/ql/src/test/results/clientpositive/perf/spark/query18.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/spark/query18.q.out 
b/ql/src/test/results/clientpositive/perf/spark/query18.q.out
index cb3c114..c7dee3d 100644
--- a/ql/src/test/results/clientpositive/perf/spark/query18.q.out
+++ b/ql/src/test/results/clientpositive/perf/spark/query18.q.out
@@ -72,52 +72,53 @@ STAGE PLANS:
   Stage: Stage-1
     Spark
       Edges:
-        Reducer 10 <- Map 13 (PARTITION-LEVEL SORT, 306), Map 9 
(PARTITION-LEVEL SORT, 306)
-        Reducer 11 <- Map 14 (PARTITION-LEVEL SORT, 337), Reducer 10 
(PARTITION-LEVEL SORT, 337)
-        Reducer 12 <- Map 15 (PARTITION-LEVEL SORT, 374), Reducer 11 
(PARTITION-LEVEL SORT, 374)
-        Reducer 2 <- Map 1 (PARTITION-LEVEL SORT, 428), Map 7 (PARTITION-LEVEL 
SORT, 428)
-        Reducer 3 <- Map 8 (PARTITION-LEVEL SORT, 302), Reducer 2 
(PARTITION-LEVEL SORT, 302)
-        Reducer 4 <- Reducer 12 (PARTITION-LEVEL SORT, 731), Reducer 3 
(PARTITION-LEVEL SORT, 731)
-        Reducer 5 <- Reducer 4 (GROUP, 1009)
-        Reducer 6 <- Reducer 5 (SORT, 1)
+        Reducer 11 <- Map 10 (PARTITION-LEVEL SORT, 307), Map 13 
(PARTITION-LEVEL SORT, 307)
+        Reducer 12 <- Map 14 (PARTITION-LEVEL SORT, 336), Reducer 11 
(PARTITION-LEVEL SORT, 336)
+        Reducer 2 <- Map 1 (PARTITION-LEVEL SORT, 428), Map 8 (PARTITION-LEVEL 
SORT, 428)
+        Reducer 3 <- Map 9 (PARTITION-LEVEL SORT, 302), Reducer 2 
(PARTITION-LEVEL SORT, 302)
+        Reducer 4 <- Reducer 12 (PARTITION-LEVEL SORT, 694), Reducer 3 
(PARTITION-LEVEL SORT, 694)
+        Reducer 5 <- Map 15 (PARTITION-LEVEL SORT, 411), Reducer 4 
(PARTITION-LEVEL SORT, 411)
+        Reducer 6 <- Reducer 5 (GROUP, 1009)
+        Reducer 7 <- Reducer 6 (SORT, 1)
 #### A masked pattern was here ####
       Vertices:
         Map 1 
             Map Operator Tree:
                 TableScan
-                  alias: customer
-                  Statistics: Num rows: 80000000 Data size: 68801615852 Basic 
stats: COMPLETE Column stats: NONE
+                  alias: customer_address
+                  Statistics: Num rows: 40000000 Data size: 40595195284 Basic 
stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: ((c_birth_month) IN (9, 5, 12, 4, 1, 10) and 
c_current_addr_sk is not null and c_current_cdemo_sk is not null and 
c_customer_sk is not null) (type: boolean)
-                    Statistics: Num rows: 40000000 Data size: 34400807926 
Basic stats: COMPLETE Column stats: NONE
+                    predicate: ((ca_state) IN ('ND', 'WI', 'AL', 'NC', 'OK', 
'MS', 'TN') and ca_address_sk is not null) (type: boolean)
+                    Statistics: Num rows: 20000000 Data size: 20297597642 
Basic stats: COMPLETE Column stats: NONE
                     Select Operator
-                      expressions: c_customer_sk (type: int), 
c_current_cdemo_sk (type: int), c_current_addr_sk (type: int), c_birth_year 
(type: int)
-                      outputColumnNames: _col0, _col1, _col2, _col4
-                      Statistics: Num rows: 40000000 Data size: 34400807926 
Basic stats: COMPLETE Column stats: NONE
+                      expressions: ca_address_sk (type: int), ca_county (type: 
string), ca_state (type: string), ca_country (type: string)
+                      outputColumnNames: _col0, _col1, _col2, _col3
+                      Statistics: Num rows: 20000000 Data size: 20297597642 
Basic stats: COMPLETE Column stats: NONE
                       Reduce Output Operator
-                        key expressions: _col2 (type: int)
+                        key expressions: _col0 (type: int)
                         sort order: +
-                        Map-reduce partition columns: _col2 (type: int)
-                        Statistics: Num rows: 40000000 Data size: 34400807926 
Basic stats: COMPLETE Column stats: NONE
-                        value expressions: _col0 (type: int), _col1 (type: 
int), _col4 (type: int)
-        Map 13 
+                        Map-reduce partition columns: _col0 (type: int)
+                        Statistics: Num rows: 20000000 Data size: 20297597642 
Basic stats: COMPLETE Column stats: NONE
+                        value expressions: _col1 (type: string), _col2 (type: 
string), _col3 (type: string)
+        Map 10 
             Map Operator Tree:
                 TableScan
-                  alias: date_dim
-                  Statistics: Num rows: 73049 Data size: 81741831 Basic stats: 
COMPLETE Column stats: NONE
+                  alias: catalog_sales
+                  Statistics: Num rows: 287989836 Data size: 38999608952 Basic 
stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: ((d_year = 2001) and d_date_sk is not null) 
(type: boolean)
-                    Statistics: Num rows: 36524 Data size: 40870356 Basic 
stats: COMPLETE Column stats: NONE
+                    predicate: (cs_bill_cdemo_sk is not null and 
cs_bill_customer_sk is not null and cs_item_sk is not null and cs_sold_date_sk 
is not null) (type: boolean)
+                    Statistics: Num rows: 287989836 Data size: 38999608952 
Basic stats: COMPLETE Column stats: NONE
                     Select Operator
-                      expressions: d_date_sk (type: int)
-                      outputColumnNames: _col0
-                      Statistics: Num rows: 36524 Data size: 40870356 Basic 
stats: COMPLETE Column stats: NONE
+                      expressions: cs_sold_date_sk (type: int), 
cs_bill_customer_sk (type: int), cs_bill_cdemo_sk (type: int), cs_item_sk 
(type: int), cs_quantity (type: int), cs_list_price (type: decimal(7,2)), 
cs_sales_price (type: decimal(7,2)), cs_coupon_amt (type: decimal(7,2)), 
cs_net_profit (type: decimal(7,2))
+                      outputColumnNames: _col0, _col1, _col2, _col3, _col4, 
_col5, _col6, _col7, _col8
+                      Statistics: Num rows: 287989836 Data size: 38999608952 
Basic stats: COMPLETE Column stats: NONE
                       Reduce Output Operator
-                        key expressions: _col0 (type: int)
+                        key expressions: _col2 (type: int)
                         sort order: +
-                        Map-reduce partition columns: _col0 (type: int)
-                        Statistics: Num rows: 36524 Data size: 40870356 Basic 
stats: COMPLETE Column stats: NONE
-        Map 14 
+                        Map-reduce partition columns: _col2 (type: int)
+                        Statistics: Num rows: 287989836 Data size: 38999608952 
Basic stats: COMPLETE Column stats: NONE
+                        value expressions: _col0 (type: int), _col1 (type: 
int), _col3 (type: int), _col4 (type: int), _col5 (type: decimal(7,2)), _col6 
(type: decimal(7,2)), _col7 (type: decimal(7,2)), _col8 (type: decimal(7,2))
+        Map 13 
             Map Operator Tree:
                 TableScan
                   alias: cd1
@@ -135,6 +136,23 @@ STAGE PLANS:
                         Map-reduce partition columns: _col0 (type: int)
                         Statistics: Num rows: 465450 Data size: 179296539 
Basic stats: COMPLETE Column stats: NONE
                         value expressions: _col3 (type: int)
+        Map 14 
+            Map Operator Tree:
+                TableScan
+                  alias: date_dim
+                  Statistics: Num rows: 73049 Data size: 81741831 Basic stats: 
COMPLETE Column stats: NONE
+                  Filter Operator
+                    predicate: ((d_year = 2001) and d_date_sk is not null) 
(type: boolean)
+                    Statistics: Num rows: 36524 Data size: 40870356 Basic 
stats: COMPLETE Column stats: NONE
+                    Select Operator
+                      expressions: d_date_sk (type: int)
+                      outputColumnNames: _col0
+                      Statistics: Num rows: 36524 Data size: 40870356 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: 36524 Data size: 40870356 Basic 
stats: COMPLETE Column stats: NONE
         Map 15 
             Map Operator Tree:
                 TableScan
@@ -153,25 +171,25 @@ STAGE PLANS:
                         Map-reduce partition columns: _col0 (type: int)
                         Statistics: Num rows: 462000 Data size: 663560457 
Basic stats: COMPLETE Column stats: NONE
                         value expressions: _col1 (type: string)
-        Map 7 
+        Map 8 
             Map Operator Tree:
                 TableScan
-                  alias: customer_address
-                  Statistics: Num rows: 40000000 Data size: 40595195284 Basic 
stats: COMPLETE Column stats: NONE
+                  alias: customer
+                  Statistics: Num rows: 80000000 Data size: 68801615852 Basic 
stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: ((ca_state) IN ('ND', 'WI', 'AL', 'NC', 'OK', 
'MS', 'TN') and ca_address_sk is not null) (type: boolean)
-                    Statistics: Num rows: 20000000 Data size: 20297597642 
Basic stats: COMPLETE Column stats: NONE
+                    predicate: ((c_birth_month) IN (9, 5, 12, 4, 1, 10) and 
c_current_addr_sk is not null and c_current_cdemo_sk is not null and 
c_customer_sk is not null) (type: boolean)
+                    Statistics: Num rows: 40000000 Data size: 34400807926 
Basic stats: COMPLETE Column stats: NONE
                     Select Operator
-                      expressions: ca_address_sk (type: int), ca_county (type: 
string), ca_state (type: string), ca_country (type: string)
-                      outputColumnNames: _col0, _col1, _col2, _col3
-                      Statistics: Num rows: 20000000 Data size: 20297597642 
Basic stats: COMPLETE Column stats: NONE
+                      expressions: c_customer_sk (type: int), 
c_current_cdemo_sk (type: int), c_current_addr_sk (type: int), c_birth_year 
(type: int)
+                      outputColumnNames: _col0, _col1, _col2, _col4
+                      Statistics: Num rows: 40000000 Data size: 34400807926 
Basic stats: COMPLETE Column stats: NONE
                       Reduce Output Operator
-                        key expressions: _col0 (type: int)
+                        key expressions: _col2 (type: int)
                         sort order: +
-                        Map-reduce partition columns: _col0 (type: int)
-                        Statistics: Num rows: 20000000 Data size: 20297597642 
Basic stats: COMPLETE Column stats: NONE
-                        value expressions: _col1 (type: string), _col2 (type: 
string), _col3 (type: string)
-        Map 8 
+                        Map-reduce partition columns: _col2 (type: int)
+                        Statistics: Num rows: 40000000 Data size: 34400807926 
Basic stats: COMPLETE Column stats: NONE
+                        value expressions: _col0 (type: int), _col1 (type: 
int), _col4 (type: int)
+        Map 9 
             Map Operator Tree:
                 TableScan
                   alias: cd2
@@ -188,40 +206,6 @@ STAGE PLANS:
                         sort order: +
                         Map-reduce partition columns: _col0 (type: int)
                         Statistics: Num rows: 1861800 Data size: 717186159 
Basic stats: COMPLETE Column stats: NONE
-        Map 9 
-            Map Operator Tree:
-                TableScan
-                  alias: catalog_sales
-                  Statistics: Num rows: 287989836 Data size: 38999608952 Basic 
stats: COMPLETE Column stats: NONE
-                  Filter Operator
-                    predicate: (cs_bill_cdemo_sk is not null and 
cs_bill_customer_sk is not null and cs_item_sk is not null and cs_sold_date_sk 
is not null) (type: boolean)
-                    Statistics: Num rows: 287989836 Data size: 38999608952 
Basic stats: COMPLETE Column stats: NONE
-                    Select Operator
-                      expressions: cs_sold_date_sk (type: int), 
cs_bill_customer_sk (type: int), cs_bill_cdemo_sk (type: int), cs_item_sk 
(type: int), cs_quantity (type: int), cs_list_price (type: decimal(7,2)), 
cs_sales_price (type: decimal(7,2)), cs_coupon_amt (type: decimal(7,2)), 
cs_net_profit (type: decimal(7,2))
-                      outputColumnNames: _col0, _col1, _col2, _col3, _col4, 
_col5, _col6, _col7, _col8
-                      Statistics: Num rows: 287989836 Data size: 38999608952 
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: 287989836 Data size: 38999608952 
Basic stats: COMPLETE Column stats: NONE
-                        value expressions: _col1 (type: int), _col2 (type: 
int), _col3 (type: int), _col4 (type: int), _col5 (type: decimal(7,2)), _col6 
(type: decimal(7,2)), _col7 (type: decimal(7,2)), _col8 (type: decimal(7,2))
-        Reducer 10 
-            Reduce Operator Tree:
-              Join Operator
-                condition map:
-                     Inner Join 0 to 1
-                keys:
-                  0 _col0 (type: int)
-                  1 _col0 (type: int)
-                outputColumnNames: _col1, _col2, _col3, _col4, _col5, _col6, 
_col7, _col8
-                Statistics: Num rows: 316788826 Data size: 42899570777 Basic 
stats: COMPLETE Column stats: NONE
-                Reduce Output Operator
-                  key expressions: _col2 (type: int)
-                  sort order: +
-                  Map-reduce partition columns: _col2 (type: int)
-                  Statistics: Num rows: 316788826 Data size: 42899570777 Basic 
stats: COMPLETE Column stats: NONE
-                  value expressions: _col1 (type: int), _col3 (type: int), 
_col4 (type: int), _col5 (type: decimal(7,2)), _col6 (type: decimal(7,2)), 
_col7 (type: decimal(7,2)), _col8 (type: decimal(7,2))
         Reducer 11 
             Reduce Operator Tree:
               Join Operator
@@ -230,78 +214,94 @@ STAGE PLANS:
                 keys:
                   0 _col2 (type: int)
                   1 _col0 (type: int)
-                outputColumnNames: _col1, _col3, _col4, _col5, _col6, _col7, 
_col8, _col14
-                Statistics: Num rows: 348467716 Data size: 47189528877 Basic 
stats: COMPLETE Column stats: NONE
+                outputColumnNames: _col0, _col1, _col3, _col4, _col5, _col6, 
_col7, _col8, _col12
+                Statistics: Num rows: 316788826 Data size: 42899570777 Basic 
stats: COMPLETE Column stats: NONE
                 Reduce Output Operator
-                  key expressions: _col3 (type: int)
+                  key expressions: _col0 (type: int)
                   sort order: +
-                  Map-reduce partition columns: _col3 (type: int)
-                  Statistics: Num rows: 348467716 Data size: 47189528877 Basic 
stats: COMPLETE Column stats: NONE
-                  value expressions: _col1 (type: int), _col4 (type: int), 
_col5 (type: decimal(7,2)), _col6 (type: decimal(7,2)), _col7 (type: 
decimal(7,2)), _col8 (type: decimal(7,2)), _col14 (type: int)
+                  Map-reduce partition columns: _col0 (type: int)
+                  Statistics: Num rows: 316788826 Data size: 42899570777 Basic 
stats: COMPLETE Column stats: NONE
+                  value expressions: _col1 (type: int), _col3 (type: int), 
_col4 (type: int), _col5 (type: decimal(7,2)), _col6 (type: decimal(7,2)), 
_col7 (type: decimal(7,2)), _col8 (type: decimal(7,2)), _col12 (type: int)
         Reducer 12 
             Reduce Operator Tree:
               Join Operator
                 condition map:
                      Inner Join 0 to 1
                 keys:
-                  0 _col3 (type: int)
+                  0 _col0 (type: int)
                   1 _col0 (type: int)
-                outputColumnNames: _col1, _col4, _col5, _col6, _col7, _col8, 
_col14, _col16
-                Statistics: Num rows: 383314495 Data size: 51908482889 Basic 
stats: COMPLETE Column stats: NONE
+                outputColumnNames: _col1, _col3, _col4, _col5, _col6, _col7, 
_col8, _col12
+                Statistics: Num rows: 348467716 Data size: 47189528877 Basic 
stats: COMPLETE Column stats: NONE
                 Select Operator
-                  expressions: _col16 (type: string), _col1 (type: int), _col4 
(type: int), _col5 (type: decimal(7,2)), _col6 (type: decimal(7,2)), _col7 
(type: decimal(7,2)), _col8 (type: decimal(7,2)), _col14 (type: int)
-                  outputColumnNames: _col1, _col3, _col6, _col7, _col8, _col9, 
_col10, _col16
-                  Statistics: Num rows: 383314495 Data size: 51908482889 Basic 
stats: COMPLETE Column stats: NONE
+                  expressions: _col1 (type: int), _col3 (type: int), _col4 
(type: int), _col5 (type: decimal(7,2)), _col6 (type: decimal(7,2)), _col7 
(type: decimal(7,2)), _col8 (type: decimal(7,2)), _col12 (type: int)
+                  outputColumnNames: _col3, _col5, _col6, _col7, _col8, _col9, 
_col10, _col14
+                  Statistics: Num rows: 348467716 Data size: 47189528877 Basic 
stats: COMPLETE Column stats: NONE
                   Reduce Output Operator
                     key expressions: _col3 (type: int)
                     sort order: +
                     Map-reduce partition columns: _col3 (type: int)
-                    Statistics: Num rows: 383314495 Data size: 51908482889 
Basic stats: COMPLETE Column stats: NONE
-                    value expressions: _col1 (type: string), _col6 (type: 
int), _col7 (type: decimal(7,2)), _col8 (type: decimal(7,2)), _col9 (type: 
decimal(7,2)), _col10 (type: decimal(7,2)), _col16 (type: int)
+                    Statistics: Num rows: 348467716 Data size: 47189528877 
Basic stats: COMPLETE Column stats: NONE
+                    value expressions: _col5 (type: int), _col6 (type: int), 
_col7 (type: decimal(7,2)), _col8 (type: decimal(7,2)), _col9 (type: 
decimal(7,2)), _col10 (type: decimal(7,2)), _col14 (type: int)
         Reducer 2 
             Reduce Operator Tree:
               Join Operator
                 condition map:
                      Inner Join 0 to 1
                 keys:
-                  0 _col2 (type: int)
-                  1 _col0 (type: int)
-                outputColumnNames: _col0, _col1, _col4, _col6, _col7, _col8
+                  0 _col0 (type: int)
+                  1 _col2 (type: int)
+                outputColumnNames: _col1, _col2, _col3, _col4, _col5, _col8
                 Statistics: Num rows: 44000000 Data size: 37840889538 Basic 
stats: COMPLETE Column stats: NONE
                 Reduce Output Operator
-                  key expressions: _col1 (type: int)
+                  key expressions: _col5 (type: int)
                   sort order: +
-                  Map-reduce partition columns: _col1 (type: int)
+                  Map-reduce partition columns: _col5 (type: int)
                   Statistics: Num rows: 44000000 Data size: 37840889538 Basic 
stats: COMPLETE Column stats: NONE
-                  value expressions: _col0 (type: int), _col4 (type: int), 
_col6 (type: string), _col7 (type: string), _col8 (type: string)
+                  value expressions: _col1 (type: string), _col2 (type: 
string), _col3 (type: string), _col4 (type: int), _col8 (type: int)
         Reducer 3 
             Reduce Operator Tree:
               Join Operator
                 condition map:
                      Inner Join 0 to 1
                 keys:
-                  0 _col1 (type: int)
+                  0 _col5 (type: int)
                   1 _col0 (type: int)
-                outputColumnNames: _col0, _col4, _col6, _col7, _col8
+                outputColumnNames: _col1, _col2, _col3, _col4, _col8
                 Statistics: Num rows: 48400001 Data size: 41624979393 Basic 
stats: COMPLETE Column stats: NONE
                 Reduce Output Operator
-                  key expressions: _col0 (type: int)
+                  key expressions: _col4 (type: int)
                   sort order: +
-                  Map-reduce partition columns: _col0 (type: int)
+                  Map-reduce partition columns: _col4 (type: int)
                   Statistics: Num rows: 48400001 Data size: 41624979393 Basic 
stats: COMPLETE Column stats: NONE
-                  value expressions: _col4 (type: int), _col6 (type: string), 
_col7 (type: string), _col8 (type: string)
+                  value expressions: _col1 (type: string), _col2 (type: 
string), _col3 (type: string), _col8 (type: int)
         Reducer 4 
             Reduce Operator Tree:
               Join Operator
                 condition map:
                      Inner Join 0 to 1
                 keys:
-                  0 _col0 (type: int)
+                  0 _col4 (type: int)
                   1 _col3 (type: int)
-                outputColumnNames: _col4, _col6, _col7, _col8, _col11, _col16, 
_col17, _col18, _col19, _col20, _col26
+                outputColumnNames: _col1, _col2, _col3, _col8, _col15, _col16, 
_col17, _col18, _col19, _col20, _col24
+                Statistics: Num rows: 383314495 Data size: 51908482889 Basic 
stats: COMPLETE Column stats: NONE
+                Reduce Output Operator
+                  key expressions: _col15 (type: int)
+                  sort order: +
+                  Map-reduce partition columns: _col15 (type: int)
+                  Statistics: Num rows: 383314495 Data size: 51908482889 Basic 
stats: COMPLETE Column stats: NONE
+                  value expressions: _col1 (type: string), _col2 (type: 
string), _col3 (type: string), _col8 (type: int), _col16 (type: int), _col17 
(type: decimal(7,2)), _col18 (type: decimal(7,2)), _col19 (type: decimal(7,2)), 
_col20 (type: decimal(7,2)), _col24 (type: int)
+        Reducer 5 
+            Reduce Operator Tree:
+              Join Operator
+                condition map:
+                     Inner Join 0 to 1
+                keys:
+                  0 _col15 (type: int)
+                  1 _col0 (type: int)
+                outputColumnNames: _col1, _col2, _col3, _col8, _col16, _col17, 
_col18, _col19, _col20, _col24, _col26
                 Statistics: Num rows: 421645953 Data size: 57099332415 Basic 
stats: COMPLETE Column stats: NONE
                 Select Operator
-                  expressions: _col11 (type: string), _col8 (type: string), 
_col7 (type: string), _col6 (type: string), CAST( _col16 AS decimal(12,2)) 
(type: decimal(12,2)), CAST( _col17 AS decimal(12,2)) (type: decimal(12,2)), 
CAST( _col19 AS decimal(12,2)) (type: decimal(12,2)), CAST( _col18 AS 
decimal(12,2)) (type: decimal(12,2)), CAST( _col20 AS decimal(12,2)) (type: 
decimal(12,2)), CAST( _col4 AS decimal(12,2)) (type: decimal(12,2)), CAST( 
_col26 AS decimal(12,2)) (type: decimal(12,2))
+                  expressions: _col26 (type: string), _col3 (type: string), 
_col2 (type: string), _col1 (type: string), CAST( _col16 AS decimal(12,2)) 
(type: decimal(12,2)), CAST( _col17 AS decimal(12,2)) (type: decimal(12,2)), 
CAST( _col19 AS decimal(12,2)) (type: decimal(12,2)), CAST( _col18 AS 
decimal(12,2)) (type: decimal(12,2)), CAST( _col20 AS decimal(12,2)) (type: 
decimal(12,2)), CAST( _col8 AS decimal(12,2)) (type: decimal(12,2)), CAST( 
_col24 AS decimal(12,2)) (type: decimal(12,2))
                   outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, 
_col6, _col7, _col8, _col9, _col10
                   Statistics: Num rows: 421645953 Data size: 57099332415 Basic 
stats: COMPLETE Column stats: NONE
                   Group By Operator
@@ -316,7 +316,7 @@ STAGE PLANS:
                       Map-reduce partition columns: _col0 (type: string), 
_col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: 
bigint)
                       Statistics: Num rows: 2108229765 Data size: 285496662075 
Basic stats: COMPLETE Column stats: NONE
                       value expressions: _col5 (type: decimal(22,2)), _col6 
(type: bigint), _col7 (type: decimal(22,2)), _col8 (type: bigint), _col9 (type: 
decimal(22,2)), _col10 (type: bigint), _col11 (type: decimal(22,2)), _col12 
(type: bigint), _col13 (type: decimal(22,2)), _col14 (type: bigint), _col15 
(type: decimal(22,2)), _col16 (type: bigint), _col17 (type: decimal(22,2)), 
_col18 (type: bigint)
-        Reducer 5 
+        Reducer 6 
             Reduce Operator Tree:
               Group By Operator
                 aggregations: sum(VALUE._col0), count(VALUE._col1), 
sum(VALUE._col2), count(VALUE._col3), sum(VALUE._col4), count(VALUE._col5), 
sum(VALUE._col6), count(VALUE._col7), sum(VALUE._col8), count(VALUE._col9), 
sum(VALUE._col10), count(VALUE._col11), sum(VALUE._col12), count(VALUE._col13)
@@ -335,7 +335,7 @@ STAGE PLANS:
                     Statistics: Num rows: 1054114882 Data size: 142748330969 
Basic stats: COMPLETE Column stats: NONE
                     TopN Hash Memory Usage: 0.1
                     value expressions: _col4 (type: decimal(38,18)), _col5 
(type: decimal(38,18)), _col6 (type: decimal(38,18)), _col7 (type: 
decimal(38,18)), _col8 (type: decimal(38,18)), _col9 (type: decimal(38,18)), 
_col10 (type: decimal(38,18))
-        Reducer 6 
+        Reducer 7 
             Reduce Operator Tree:
               Select Operator
                 expressions: KEY.reducesinkkey3 (type: string), 
KEY.reducesinkkey0 (type: string), KEY.reducesinkkey1 (type: string), 
KEY.reducesinkkey2 (type: string), VALUE._col0 (type: decimal(38,18)), 
VALUE._col1 (type: decimal(38,18)), VALUE._col2 (type: decimal(38,18)), 
VALUE._col3 (type: decimal(38,18)), VALUE._col4 (type: decimal(38,18)), 
VALUE._col5 (type: decimal(38,18)), VALUE._col6 (type: decimal(38,18))

http://git-wip-us.apache.org/repos/asf/hive/blob/328d3f93/ql/src/test/results/clientpositive/perf/spark/query19.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/spark/query19.q.out 
b/ql/src/test/results/clientpositive/perf/spark/query19.q.out
index 281445c..453bc56 100644
--- a/ql/src/test/results/clientpositive/perf/spark/query19.q.out
+++ b/ql/src/test/results/clientpositive/perf/spark/query19.q.out
@@ -70,7 +70,7 @@ STAGE PLANS:
                       Statistics: Num rows: 1704 Data size: 3256276 Basic 
stats: COMPLETE Column stats: NONE
                       Spark HashTable Sink Operator
                         keys:
-                          0 _col7 (type: int)
+                          0 _col3 (type: int)
                           1 _col0 (type: int)
             Local Work:
               Map Reduce Local Work
@@ -78,17 +78,35 @@ STAGE PLANS:
   Stage: Stage-1
     Spark
       Edges:
-        Reducer 2 <- Map 1 (PARTITION-LEVEL SORT, 855), Map 6 (PARTITION-LEVEL 
SORT, 855)
-        Reducer 3 <- Reducer 2 (PARTITION-LEVEL SORT, 1009), Reducer 9 
(PARTITION-LEVEL SORT, 1009)
-        Reducer 4 <- Reducer 3 (GROUP, 582)
-        Reducer 5 <- Reducer 4 (SORT, 1)
-        Reducer 8 <- Map 10 (PARTITION-LEVEL SORT, 398), Map 7 
(PARTITION-LEVEL SORT, 398)
-        Reducer 9 <- Map 11 (PARTITION-LEVEL SORT, 440), Reducer 8 
(PARTITION-LEVEL SORT, 440)
+        Reducer 2 <- Map 1 (PARTITION-LEVEL SORT, 398), Map 8 (PARTITION-LEVEL 
SORT, 398)
+        Reducer 3 <- Map 9 (PARTITION-LEVEL SORT, 440), Reducer 2 
(PARTITION-LEVEL SORT, 440)
+        Reducer 4 <- Map 10 (PARTITION-LEVEL SORT, 1009), Reducer 3 
(PARTITION-LEVEL SORT, 1009)
+        Reducer 5 <- Map 11 (PARTITION-LEVEL SORT, 846), Reducer 4 
(PARTITION-LEVEL SORT, 846)
+        Reducer 6 <- Reducer 5 (GROUP, 640)
+        Reducer 7 <- Reducer 6 (SORT, 1)
 #### A masked pattern was here ####
       Vertices:
         Map 1 
             Map Operator Tree:
                 TableScan
+                  alias: store_sales
+                  Statistics: Num rows: 575995635 Data size: 50814502088 Basic 
stats: COMPLETE Column stats: NONE
+                  Filter Operator
+                    predicate: (ss_customer_sk is not null and ss_item_sk is 
not null and ss_sold_date_sk is not null and ss_store_sk is not null) (type: 
boolean)
+                    Statistics: Num rows: 575995635 Data size: 50814502088 
Basic stats: COMPLETE Column stats: NONE
+                    Select Operator
+                      expressions: ss_sold_date_sk (type: int), ss_item_sk 
(type: int), ss_customer_sk (type: int), ss_store_sk (type: int), 
ss_ext_sales_price (type: decimal(7,2))
+                      outputColumnNames: _col0, _col1, _col2, _col3, _col4
+                      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: 575995635 Data size: 50814502088 
Basic stats: COMPLETE Column stats: NONE
+                        value expressions: _col1 (type: int), _col2 (type: 
int), _col3 (type: int), _col4 (type: decimal(7,2))
+        Map 10 
+            Map Operator Tree:
+                TableScan
                   alias: customer
                   Statistics: Num rows: 80000000 Data size: 68801615852 Basic 
stats: COMPLETE Column stats: NONE
                   Filter Operator
@@ -99,12 +117,30 @@ STAGE PLANS:
                       outputColumnNames: _col0, _col1
                       Statistics: Num rows: 80000000 Data size: 68801615852 
Basic stats: COMPLETE Column stats: NONE
                       Reduce Output Operator
-                        key expressions: _col1 (type: int)
+                        key expressions: _col0 (type: int)
                         sort order: +
-                        Map-reduce partition columns: _col1 (type: int)
+                        Map-reduce partition columns: _col0 (type: int)
                         Statistics: Num rows: 80000000 Data size: 68801615852 
Basic stats: COMPLETE Column stats: NONE
-                        value expressions: _col0 (type: int)
-        Map 10 
+                        value expressions: _col1 (type: int)
+        Map 11 
+            Map Operator Tree:
+                TableScan
+                  alias: customer_address
+                  Statistics: Num rows: 40000000 Data size: 40595195284 Basic 
stats: COMPLETE Column stats: NONE
+                  Filter Operator
+                    predicate: ca_address_sk is not null (type: boolean)
+                    Statistics: Num rows: 40000000 Data size: 40595195284 
Basic stats: COMPLETE Column stats: NONE
+                    Select Operator
+                      expressions: ca_address_sk (type: int), ca_zip (type: 
string)
+                      outputColumnNames: _col0, _col1
+                      Statistics: Num rows: 40000000 Data size: 40595195284 
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: 40000000 Data size: 40595195284 
Basic stats: COMPLETE Column stats: NONE
+                        value expressions: _col1 (type: string)
+        Map 8 
             Map Operator Tree:
                 TableScan
                   alias: date_dim
@@ -121,7 +157,7 @@ STAGE PLANS:
                         sort order: +
                         Map-reduce partition columns: _col0 (type: int)
                         Statistics: Num rows: 18262 Data size: 20435178 Basic 
stats: COMPLETE Column stats: NONE
-        Map 11 
+        Map 9 
             Map Operator Tree:
                 TableScan
                   alias: item
@@ -139,59 +175,55 @@ STAGE PLANS:
                         Map-reduce partition columns: _col0 (type: int)
                         Statistics: Num rows: 231000 Data size: 331780228 
Basic stats: COMPLETE Column stats: NONE
                         value expressions: _col1 (type: int), _col2 (type: 
string), _col3 (type: int), _col4 (type: string)
-        Map 6 
-            Map Operator Tree:
-                TableScan
-                  alias: customer_address
-                  Statistics: Num rows: 40000000 Data size: 40595195284 Basic 
stats: COMPLETE Column stats: NONE
-                  Filter Operator
-                    predicate: ca_address_sk is not null (type: boolean)
-                    Statistics: Num rows: 40000000 Data size: 40595195284 
Basic stats: COMPLETE Column stats: NONE
-                    Select Operator
-                      expressions: ca_address_sk (type: int), ca_zip (type: 
string)
-                      outputColumnNames: _col0, _col1
-                      Statistics: Num rows: 40000000 Data size: 40595195284 
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: 40000000 Data size: 40595195284 
Basic stats: COMPLETE Column stats: NONE
-                        value expressions: _col1 (type: string)
-        Map 7 
-            Map Operator Tree:
-                TableScan
-                  alias: store_sales
-                  Statistics: Num rows: 575995635 Data size: 50814502088 Basic 
stats: COMPLETE Column stats: NONE
-                  Filter Operator
-                    predicate: (ss_customer_sk is not null and ss_item_sk is 
not null and ss_sold_date_sk is not null and ss_store_sk is not null) (type: 
boolean)
-                    Statistics: Num rows: 575995635 Data size: 50814502088 
Basic stats: COMPLETE Column stats: NONE
-                    Select Operator
-                      expressions: ss_sold_date_sk (type: int), ss_item_sk 
(type: int), ss_customer_sk (type: int), ss_store_sk (type: int), 
ss_ext_sales_price (type: decimal(7,2))
-                      outputColumnNames: _col0, _col1, _col2, _col3, _col4
-                      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: 575995635 Data size: 50814502088 
Basic stats: COMPLETE Column stats: NONE
-                        value expressions: _col1 (type: int), _col2 (type: 
int), _col3 (type: int), _col4 (type: decimal(7,2))
         Reducer 2 
             Reduce Operator Tree:
               Join Operator
                 condition map:
                      Inner Join 0 to 1
                 keys:
-                  0 _col1 (type: int)
+                  0 _col0 (type: int)
                   1 _col0 (type: int)
-                outputColumnNames: _col0, _col3
-                Statistics: Num rows: 88000001 Data size: 75681779077 Basic 
stats: COMPLETE Column stats: NONE
+                outputColumnNames: _col1, _col2, _col3, _col4
+                Statistics: Num rows: 633595212 Data size: 55895953508 Basic 
stats: COMPLETE Column stats: NONE
                 Reduce Output Operator
-                  key expressions: _col0 (type: int)
+                  key expressions: _col1 (type: int)
                   sort order: +
-                  Map-reduce partition columns: _col0 (type: int)
-                  Statistics: Num rows: 88000001 Data size: 75681779077 Basic 
stats: COMPLETE Column stats: NONE
-                  value expressions: _col3 (type: string)
+                  Map-reduce partition columns: _col1 (type: int)
+                  Statistics: Num rows: 633595212 Data size: 55895953508 Basic 
stats: COMPLETE Column stats: NONE
+                  value expressions: _col2 (type: int), _col3 (type: int), 
_col4 (type: decimal(7,2))
         Reducer 3 
+            Reduce Operator Tree:
+              Join Operator
+                condition map:
+                     Inner Join 0 to 1
+                keys:
+                  0 _col1 (type: int)
+                  1 _col0 (type: int)
+                outputColumnNames: _col2, _col3, _col4, _col9, _col10, _col11, 
_col12
+                Statistics: Num rows: 696954748 Data size: 61485550191 Basic 
stats: COMPLETE Column stats: NONE
+                Reduce Output Operator
+                  key expressions: _col2 (type: int)
+                  sort order: +
+                  Map-reduce partition columns: _col2 (type: int)
+                  Statistics: Num rows: 696954748 Data size: 61485550191 Basic 
stats: COMPLETE Column stats: NONE
+                  value expressions: _col3 (type: int), _col4 (type: 
decimal(7,2)), _col9 (type: int), _col10 (type: string), _col11 (type: int), 
_col12 (type: string)
+        Reducer 4 
+            Reduce Operator Tree:
+              Join Operator
+                condition map:
+                     Inner Join 0 to 1
+                keys:
+                  0 _col2 (type: int)
+                  1 _col0 (type: int)
+                outputColumnNames: _col3, _col4, _col9, _col10, _col11, 
_col12, _col15
+                Statistics: Num rows: 766650239 Data size: 67634106676 Basic 
stats: COMPLETE Column stats: NONE
+                Reduce Output Operator
+                  key expressions: _col15 (type: int)
+                  sort order: +
+                  Map-reduce partition columns: _col15 (type: int)
+                  Statistics: Num rows: 766650239 Data size: 67634106676 Basic 
stats: COMPLETE Column stats: NONE
+                  value expressions: _col3 (type: int), _col4 (type: 
decimal(7,2)), _col9 (type: int), _col10 (type: string), _col11 (type: int), 
_col12 (type: string)
+        Reducer 5 
             Local Work:
               Map Reduce Local Work
             Reduce Operator Tree:
@@ -199,62 +231,62 @@ STAGE PLANS:
                 condition map:
                      Inner Join 0 to 1
                 keys:
-                  0 _col0 (type: int)
-                  1 _col2 (type: int)
-                outputColumnNames: _col3, _col7, _col8, _col13, _col14, 
_col15, _col16
-                Statistics: Num rows: 766650239 Data size: 67634106676 Basic 
stats: COMPLETE Column stats: NONE
+                  0 _col15 (type: int)
+                  1 _col0 (type: int)
+                outputColumnNames: _col3, _col4, _col9, _col10, _col11, 
_col12, _col17
+                Statistics: Num rows: 843315281 Data size: 74397518956 Basic 
stats: COMPLETE Column stats: NONE
                 Map Join Operator
                   condition map:
                        Inner Join 0 to 1
                   keys:
-                    0 _col7 (type: int)
+                    0 _col3 (type: int)
                     1 _col0 (type: int)
-                  outputColumnNames: _col3, _col8, _col13, _col14, _col15, 
_col16, _col19
+                  outputColumnNames: _col4, _col9, _col10, _col11, _col12, 
_col17, _col19
                   input vertices:
                     1 Map 12
-                  Statistics: Num rows: 843315281 Data size: 74397518956 Basic 
stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 927646829 Data size: 81837272625 Basic 
stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (substr(_col3, 1, 5) <> substr(_col19, 1, 5)) 
(type: boolean)
-                    Statistics: Num rows: 843315281 Data size: 74397518956 
Basic stats: COMPLETE Column stats: NONE
+                    predicate: (substr(_col17, 1, 5) <> substr(_col19, 1, 5)) 
(type: boolean)
+                    Statistics: Num rows: 927646829 Data size: 81837272625 
Basic stats: COMPLETE Column stats: NONE
                     Select Operator
-                      expressions: _col8 (type: decimal(7,2)), _col13 (type: 
int), _col14 (type: string), _col15 (type: int), _col16 (type: string)
-                      outputColumnNames: _col8, _col13, _col14, _col15, _col16
-                      Statistics: Num rows: 843315281 Data size: 74397518956 
Basic stats: COMPLETE Column stats: NONE
+                      expressions: _col4 (type: decimal(7,2)), _col9 (type: 
int), _col10 (type: string), _col11 (type: int), _col12 (type: string)
+                      outputColumnNames: _col4, _col9, _col10, _col11, _col12
+                      Statistics: Num rows: 927646829 Data size: 81837272625 
Basic stats: COMPLETE Column stats: NONE
                       Group By Operator
-                        aggregations: sum(_col8)
-                        keys: _col14 (type: string), _col13 (type: int), 
_col15 (type: int), _col16 (type: string)
+                        aggregations: sum(_col4)
+                        keys: _col10 (type: string), _col9 (type: int), _col11 
(type: int), _col12 (type: string)
                         mode: hash
                         outputColumnNames: _col0, _col1, _col2, _col3, _col4
-                        Statistics: Num rows: 843315281 Data size: 74397518956 
Basic stats: COMPLETE Column stats: NONE
+                        Statistics: Num rows: 927646829 Data size: 81837272625 
Basic stats: COMPLETE Column stats: NONE
                         Reduce Output Operator
                           key expressions: _col0 (type: string), _col1 (type: 
int), _col2 (type: int), _col3 (type: string)
                           sort order: ++++
                           Map-reduce partition columns: _col0 (type: string), 
_col1 (type: int), _col2 (type: int), _col3 (type: string)
-                          Statistics: Num rows: 843315281 Data size: 
74397518956 Basic stats: COMPLETE Column stats: NONE
+                          Statistics: Num rows: 927646829 Data size: 
81837272625 Basic stats: COMPLETE Column stats: NONE
                           value expressions: _col4 (type: decimal(17,2))
-        Reducer 4 
+        Reducer 6 
             Reduce Operator Tree:
               Group By Operator
                 aggregations: sum(VALUE._col0)
                 keys: KEY._col0 (type: string), KEY._col1 (type: int), 
KEY._col2 (type: int), KEY._col3 (type: string)
                 mode: mergepartial
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4
-                Statistics: Num rows: 421657640 Data size: 37198759433 Basic 
stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 463823414 Data size: 40918636268 Basic 
stats: COMPLETE Column stats: NONE
                 Select Operator
                   expressions: _col2 (type: int), _col3 (type: string), _col4 
(type: decimal(17,2)), _col0 (type: string), _col1 (type: int)
                   outputColumnNames: _col2, _col3, _col4, _col5, _col6
-                  Statistics: Num rows: 421657640 Data size: 37198759433 Basic 
stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 463823414 Data size: 40918636268 Basic 
stats: COMPLETE Column stats: NONE
                   Reduce Output Operator
                     key expressions: _col4 (type: decimal(17,2)), _col5 (type: 
string), _col6 (type: int), _col2 (type: int), _col3 (type: string)
                     sort order: -++++
-                    Statistics: Num rows: 421657640 Data size: 37198759433 
Basic stats: COMPLETE Column stats: NONE
+                    Statistics: Num rows: 463823414 Data size: 40918636268 
Basic stats: COMPLETE Column stats: NONE
                     TopN Hash Memory Usage: 0.1
-        Reducer 5 
+        Reducer 7 
             Reduce Operator Tree:
               Select Operator
                 expressions: KEY.reducesinkkey2 (type: int), 
KEY.reducesinkkey1 (type: string), KEY.reducesinkkey3 (type: int), 
KEY.reducesinkkey4 (type: string), KEY.reducesinkkey0 (type: decimal(17,2))
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4
-                Statistics: Num rows: 421657640 Data size: 37198759433 Basic 
stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 463823414 Data size: 40918636268 Basic 
stats: COMPLETE Column stats: NONE
                 Limit
                   Number of rows: 100
                   Statistics: Num rows: 100 Data size: 8800 Basic stats: 
COMPLETE Column stats: NONE
@@ -265,38 +297,6 @@ STAGE PLANS:
                         input format: 
org.apache.hadoop.mapred.SequenceFileInputFormat
                         output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
                         serde: 
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-        Reducer 8 
-            Reduce Operator Tree:
-              Join Operator
-                condition map:
-                     Inner Join 0 to 1
-                keys:
-                  0 _col0 (type: int)
-                  1 _col0 (type: int)
-                outputColumnNames: _col1, _col2, _col3, _col4
-                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: 633595212 Data size: 55895953508 Basic 
stats: COMPLETE Column stats: NONE
-                  value expressions: _col2 (type: int), _col3 (type: int), 
_col4 (type: decimal(7,2))
-        Reducer 9 
-            Reduce Operator Tree:
-              Join Operator
-                condition map:
-                     Inner Join 0 to 1
-                keys:
-                  0 _col1 (type: int)
-                  1 _col0 (type: int)
-                outputColumnNames: _col2, _col3, _col4, _col9, _col10, _col11, 
_col12
-                Statistics: Num rows: 696954748 Data size: 61485550191 Basic 
stats: COMPLETE Column stats: NONE
-                Reduce Output Operator
-                  key expressions: _col2 (type: int)
-                  sort order: +
-                  Map-reduce partition columns: _col2 (type: int)
-                  Statistics: Num rows: 696954748 Data size: 61485550191 Basic 
stats: COMPLETE Column stats: NONE
-                  value expressions: _col3 (type: int), _col4 (type: 
decimal(7,2)), _col9 (type: int), _col10 (type: string), _col11 (type: int), 
_col12 (type: string)
 
   Stage: Stage-0
     Fetch Operator

http://git-wip-us.apache.org/repos/asf/hive/blob/328d3f93/ql/src/test/results/clientpositive/perf/spark/query21.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/spark/query21.q.out 
b/ql/src/test/results/clientpositive/perf/spark/query21.q.out
index 5c3d2fb..fc9055a 100644
--- a/ql/src/test/results/clientpositive/perf/spark/query21.q.out
+++ b/ql/src/test/results/clientpositive/perf/spark/query21.q.out
@@ -58,8 +58,7 @@ select  *
 POSTHOOK: type: QUERY
 STAGE DEPENDENCIES:
   Stage-2 is a root stage
-  Stage-3 depends on stages: Stage-2
-  Stage-1 depends on stages: Stage-3
+  Stage-1 depends on stages: Stage-2
   Stage-0 depends on stages: Stage-1
 
 STAGE PLANS:
@@ -67,44 +66,39 @@ STAGE PLANS:
     Spark
 #### A masked pattern was here ####
       Vertices:
-        Map 7 
+        Map 6 
             Map Operator Tree:
                 TableScan
-                  alias: warehouse
-                  Statistics: Num rows: 27 Data size: 27802 Basic stats: 
COMPLETE Column stats: NONE
+                  alias: date_dim
+                  Statistics: Num rows: 73049 Data size: 81741831 Basic stats: 
COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: w_warehouse_sk is not null (type: boolean)
-                    Statistics: Num rows: 27 Data size: 27802 Basic stats: 
COMPLETE Column stats: NONE
+                    predicate: (CAST( d_date AS TIMESTAMP) BETWEEN 
TIMESTAMP'1998-03-08 23:00:00.0' AND TIMESTAMP'1998-05-08 00:00:00.0' and 
d_date_sk is not null) (type: boolean)
+                    Statistics: Num rows: 8116 Data size: 9081804 Basic stats: 
COMPLETE Column stats: NONE
                     Select Operator
-                      expressions: w_warehouse_sk (type: int), 
w_warehouse_name (type: string)
+                      expressions: d_date_sk (type: int), d_date (type: string)
                       outputColumnNames: _col0, _col1
-                      Statistics: Num rows: 27 Data size: 27802 Basic stats: 
COMPLETE Column stats: NONE
+                      Statistics: Num rows: 8116 Data size: 9081804 Basic 
stats: COMPLETE Column stats: NONE
                       Spark HashTable Sink Operator
                         keys:
-                          0 _col2 (type: int)
+                          0 _col0 (type: int)
                           1 _col0 (type: int)
             Local Work:
               Map Reduce Local Work
-
-  Stage: Stage-3
-    Spark
-#### A masked pattern was here ####
-      Vertices:
-        Map 5 
+        Map 7 
             Map Operator Tree:
                 TableScan
-                  alias: date_dim
-                  Statistics: Num rows: 73049 Data size: 81741831 Basic stats: 
COMPLETE Column stats: NONE
+                  alias: warehouse
+                  Statistics: Num rows: 27 Data size: 27802 Basic stats: 
COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (CAST( d_date AS TIMESTAMP) BETWEEN 
TIMESTAMP'1998-03-08 23:00:00.0' AND TIMESTAMP'1998-05-08 00:00:00.0' and 
d_date_sk is not null) (type: boolean)
-                    Statistics: Num rows: 8116 Data size: 9081804 Basic stats: 
COMPLETE Column stats: NONE
+                    predicate: w_warehouse_sk is not null (type: boolean)
+                    Statistics: Num rows: 27 Data size: 27802 Basic stats: 
COMPLETE Column stats: NONE
                     Select Operator
-                      expressions: d_date_sk (type: int), d_date (type: string)
+                      expressions: w_warehouse_sk (type: int), 
w_warehouse_name (type: string)
                       outputColumnNames: _col0, _col1
-                      Statistics: Num rows: 8116 Data size: 9081804 Basic 
stats: COMPLETE Column stats: NONE
+                      Statistics: Num rows: 27 Data size: 27802 Basic stats: 
COMPLETE Column stats: NONE
                       Spark HashTable Sink Operator
                         keys:
-                          0 _col0 (type: int)
+                          0 _col2 (type: int)
                           1 _col0 (type: int)
             Local Work:
               Map Reduce Local Work
@@ -112,7 +106,7 @@ STAGE PLANS:
   Stage: Stage-1
     Spark
       Edges:
-        Reducer 2 <- Map 1 (PARTITION-LEVEL SORT, 6), Map 6 (PARTITION-LEVEL 
SORT, 6)
+        Reducer 2 <- Map 1 (PARTITION-LEVEL SORT, 6), Map 5 (PARTITION-LEVEL 
SORT, 6)
         Reducer 3 <- Reducer 2 (GROUP, 7)
         Reducer 4 <- Reducer 3 (SORT, 1)
 #### A masked pattern was here ####
@@ -129,25 +123,13 @@ STAGE PLANS:
                       expressions: inv_date_sk (type: int), inv_item_sk (type: 
int), inv_warehouse_sk (type: int), inv_quantity_on_hand (type: int)
                       outputColumnNames: _col0, _col1, _col2, _col3
                       Statistics: Num rows: 37584000 Data size: 593821104 
Basic stats: COMPLETE Column stats: NONE
-                      Map Join Operator
-                        condition map:
-                             Inner Join 0 to 1
-                        keys:
-                          0 _col0 (type: int)
-                          1 _col0 (type: int)
-                        outputColumnNames: _col1, _col2, _col3, _col5
-                        input vertices:
-                          1 Map 5
-                        Statistics: Num rows: 41342400 Data size: 653203228 
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: 41342400 Data size: 653203228 
Basic stats: COMPLETE Column stats: NONE
-                          value expressions: _col2 (type: int), _col3 (type: 
int), _col5 (type: string)
-            Local Work:
-              Map Reduce Local Work
-        Map 6 
+                      Reduce Output Operator
+                        key expressions: _col1 (type: int)
+                        sort order: +
+                        Map-reduce partition columns: _col1 (type: int)
+                        Statistics: Num rows: 37584000 Data size: 593821104 
Basic stats: COMPLETE Column stats: NONE
+                        value expressions: _col0 (type: int), _col2 (type: 
int), _col3 (type: int)
+        Map 5 
             Map Operator Tree:
                 TableScan
                   alias: item
@@ -175,34 +157,44 @@ STAGE PLANS:
                 keys:
                   0 _col1 (type: int)
                   1 _col0 (type: int)
-                outputColumnNames: _col2, _col3, _col5, _col7
-                Statistics: Num rows: 45476640 Data size: 718523566 Basic 
stats: COMPLETE Column stats: NONE
+                outputColumnNames: _col0, _col2, _col3, _col5
+                Statistics: Num rows: 41342400 Data size: 653203228 Basic 
stats: COMPLETE Column stats: NONE
                 Map Join Operator
                   condition map:
                        Inner Join 0 to 1
                   keys:
-                    0 _col2 (type: int)
+                    0 _col0 (type: int)
                     1 _col0 (type: int)
-                  outputColumnNames: _col3, _col5, _col7, _col10
+                  outputColumnNames: _col2, _col3, _col5, _col8
                   input vertices:
-                    1 Map 7
-                  Statistics: Num rows: 50024305 Data size: 790375939 Basic 
stats: COMPLETE Column stats: NONE
-                  Select Operator
-                    expressions: _col10 (type: string), _col7 (type: string), 
CASE WHEN ((CAST( _col5 AS DATE) < DATE'1998-04-08')) THEN (_col3) ELSE (0) END 
(type: int), CASE WHEN ((CAST( _col5 AS DATE) >= DATE'1998-04-08')) THEN 
(_col3) ELSE (0) END (type: int)
-                    outputColumnNames: _col0, _col1, _col2, _col3
+                    1 Map 6
+                  Statistics: Num rows: 45476640 Data size: 718523566 Basic 
stats: COMPLETE Column stats: NONE
+                  Map Join Operator
+                    condition map:
+                         Inner Join 0 to 1
+                    keys:
+                      0 _col2 (type: int)
+                      1 _col0 (type: int)
+                    outputColumnNames: _col3, _col5, _col8, _col10
+                    input vertices:
+                      1 Map 7
                     Statistics: Num rows: 50024305 Data size: 790375939 Basic 
stats: COMPLETE Column stats: NONE
-                    Group By Operator
-                      aggregations: sum(_col2), sum(_col3)
-                      keys: _col0 (type: string), _col1 (type: string)
-                      mode: hash
+                    Select Operator
+                      expressions: _col10 (type: string), _col5 (type: 
string), CASE WHEN ((CAST( _col8 AS DATE) < DATE'1998-04-08')) THEN (_col3) 
ELSE (0) END (type: int), CASE WHEN ((CAST( _col8 AS DATE) >= 
DATE'1998-04-08')) THEN (_col3) ELSE (0) END (type: int)
                       outputColumnNames: _col0, _col1, _col2, _col3
                       Statistics: Num rows: 50024305 Data size: 790375939 
Basic stats: COMPLETE Column stats: NONE
-                      Reduce Output Operator
-                        key expressions: _col0 (type: string), _col1 (type: 
string)
-                        sort order: ++
-                        Map-reduce partition columns: _col0 (type: string), 
_col1 (type: string)
+                      Group By Operator
+                        aggregations: sum(_col2), sum(_col3)
+                        keys: _col0 (type: string), _col1 (type: string)
+                        mode: hash
+                        outputColumnNames: _col0, _col1, _col2, _col3
                         Statistics: Num rows: 50024305 Data size: 790375939 
Basic stats: COMPLETE Column stats: NONE
-                        value expressions: _col2 (type: bigint), _col3 (type: 
bigint)
+                        Reduce Output Operator
+                          key expressions: _col0 (type: string), _col1 (type: 
string)
+                          sort order: ++
+                          Map-reduce partition columns: _col0 (type: string), 
_col1 (type: string)
+                          Statistics: Num rows: 50024305 Data size: 790375939 
Basic stats: COMPLETE Column stats: NONE
+                          value expressions: _col2 (type: bigint), _col3 
(type: bigint)
         Reducer 3 
             Reduce Operator Tree:
               Group By Operator

Reply via email to