http://git-wip-us.apache.org/repos/asf/hive/blob/55887646/ql/src/test/results/clientpositive/perf/spark/query85.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/spark/query85.q.out 
b/ql/src/test/results/clientpositive/perf/spark/query85.q.out
index 6bdbf7e..a7bf288 100644
--- a/ql/src/test/results/clientpositive/perf/spark/query85.q.out
+++ b/ql/src/test/results/clientpositive/perf/spark/query85.q.out
@@ -182,8 +182,7 @@ POSTHOOK: Input: default@web_sales
 #### A masked pattern was here ####
 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:
@@ -191,47 +190,42 @@ STAGE PLANS:
     Spark
 #### A masked pattern was here ####
       Vertices:
-        Map 13 
+        Map 12 
             Map Operator Tree:
                 TableScan
-                  alias: reason
-                  filterExpr: r_reason_sk is not null (type: boolean)
-                  Statistics: Num rows: 72 Data size: 14400 Basic stats: 
COMPLETE Column stats: NONE
+                  alias: web_page
+                  filterExpr: wp_web_page_sk is not null (type: boolean)
+                  Statistics: Num rows: 4602 Data size: 2696178 Basic stats: 
COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: r_reason_sk is not null (type: boolean)
-                    Statistics: Num rows: 72 Data size: 14400 Basic stats: 
COMPLETE Column stats: NONE
+                    predicate: wp_web_page_sk is not null (type: boolean)
+                    Statistics: Num rows: 4602 Data size: 2696178 Basic stats: 
COMPLETE Column stats: NONE
                     Select Operator
-                      expressions: r_reason_sk (type: int), r_reason_desc 
(type: string)
-                      outputColumnNames: _col0, _col1
-                      Statistics: Num rows: 72 Data size: 14400 Basic stats: 
COMPLETE Column stats: NONE
+                      expressions: wp_web_page_sk (type: int)
+                      outputColumnNames: _col0
+                      Statistics: Num rows: 4602 Data size: 2696178 Basic 
stats: COMPLETE Column stats: NONE
                       Spark HashTable Sink Operator
                         keys:
-                          0 _col4 (type: int)
+                          0 _col10 (type: int)
                           1 _col0 (type: int)
             Execution mode: vectorized
             Local Work:
               Map Reduce Local Work
-
-  Stage: Stage-3
-    Spark
-#### A masked pattern was here ####
-      Vertices:
-        Map 11 
+        Map 13 
             Map Operator Tree:
                 TableScan
-                  alias: web_page
-                  filterExpr: wp_web_page_sk is not null (type: boolean)
-                  Statistics: Num rows: 4602 Data size: 2696178 Basic stats: 
COMPLETE Column stats: NONE
+                  alias: reason
+                  filterExpr: r_reason_sk is not null (type: boolean)
+                  Statistics: Num rows: 72 Data size: 14400 Basic stats: 
COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: wp_web_page_sk is not null (type: boolean)
-                    Statistics: Num rows: 4602 Data size: 2696178 Basic stats: 
COMPLETE Column stats: NONE
+                    predicate: r_reason_sk is not null (type: boolean)
+                    Statistics: Num rows: 72 Data size: 14400 Basic stats: 
COMPLETE Column stats: NONE
                     Select Operator
-                      expressions: wp_web_page_sk (type: int)
-                      outputColumnNames: _col0
-                      Statistics: Num rows: 4602 Data size: 2696178 Basic 
stats: COMPLETE Column stats: NONE
+                      expressions: r_reason_sk (type: int), r_reason_desc 
(type: string)
+                      outputColumnNames: _col0, _col1
+                      Statistics: Num rows: 72 Data size: 14400 Basic stats: 
COMPLETE Column stats: NONE
                       Spark HashTable Sink Operator
                         keys:
-                          0 _col10 (type: int)
+                          0 _col4 (type: int)
                           1 _col0 (type: int)
             Execution mode: vectorized
             Local Work:
@@ -241,11 +235,11 @@ STAGE PLANS:
     Spark
       Edges:
         Reducer 2 <- Map 1 (PARTITION-LEVEL SORT, 28), Map 9 (PARTITION-LEVEL 
SORT, 28)
-        Reducer 3 <- Map 10 (PARTITION-LEVEL SORT, 178), Reducer 2 
(PARTITION-LEVEL SORT, 178)
-        Reducer 4 <- Map 12 (PARTITION-LEVEL SORT, 65), Reducer 3 
(PARTITION-LEVEL SORT, 65)
-        Reducer 5 <- Map 14 (PARTITION-LEVEL SORT, 83), Reducer 4 
(PARTITION-LEVEL SORT, 83)
-        Reducer 6 <- Map 15 (PARTITION-LEVEL SORT, 13), Reducer 5 
(PARTITION-LEVEL SORT, 13)
-        Reducer 7 <- Reducer 6 (GROUP, 7)
+        Reducer 3 <- Map 10 (PARTITION-LEVEL SORT, 25), Reducer 2 
(PARTITION-LEVEL SORT, 25)
+        Reducer 4 <- Map 11 (PARTITION-LEVEL SORT, 21), Reducer 3 
(PARTITION-LEVEL SORT, 21)
+        Reducer 5 <- Map 14 (PARTITION-LEVEL SORT, 186), Reducer 4 
(PARTITION-LEVEL SORT, 186)
+        Reducer 6 <- Map 15 (PARTITION-LEVEL SORT, 29), Reducer 5 
(PARTITION-LEVEL SORT, 29)
+        Reducer 7 <- Reducer 6 (GROUP, 10)
         Reducer 8 <- Reducer 7 (SORT, 1)
 #### A masked pattern was here ####
       Vertices:
@@ -272,24 +266,24 @@ STAGE PLANS:
         Map 10 
             Map Operator Tree:
                 TableScan
-                  alias: customer_address
-                  filterExpr: ((ca_state) IN ('KY', 'GA', 'NM', 'MT', 'OR', 
'IN', 'WI', 'MO', 'WV') and (ca_country = 'United States') and ca_address_sk is 
not null) (type: boolean)
-                  Statistics: Num rows: 40000000 Data size: 40595195284 Basic 
stats: COMPLETE Column stats: NONE
+                  alias: cd2
+                  filterExpr: ((cd_education_status) IN ('4 yr Degree', 
'Primary', 'Advanced Degree') and (cd_marital_status) IN ('M', 'D', 'U') and 
cd_demo_sk is not null) (type: boolean)
+                  Statistics: Num rows: 1861800 Data size: 717186159 Basic 
stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: ((ca_country = 'United States') and (ca_state) 
IN ('KY', 'GA', 'NM', 'MT', 'OR', 'IN', 'WI', 'MO', 'WV') and ca_address_sk is 
not null) (type: boolean)
-                    Statistics: Num rows: 20000000 Data size: 20297597642 
Basic stats: COMPLETE Column stats: NONE
+                    predicate: ((cd_education_status) IN ('4 yr Degree', 
'Primary', 'Advanced Degree') and (cd_marital_status) IN ('M', 'D', 'U') and 
cd_demo_sk is not null) (type: boolean)
+                    Statistics: Num rows: 1861800 Data size: 717186159 Basic 
stats: COMPLETE Column stats: NONE
                     Select Operator
-                      expressions: ca_address_sk (type: int), ca_state (type: 
string)
-                      outputColumnNames: _col0, _col1
-                      Statistics: Num rows: 20000000 Data size: 20297597642 
Basic stats: COMPLETE Column stats: NONE
+                      expressions: cd_demo_sk (type: int), cd_marital_status 
(type: string), cd_education_status (type: string)
+                      outputColumnNames: _col0, _col1, _col2
+                      Statistics: Num rows: 1861800 Data size: 717186159 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: 20000000 Data size: 20297597642 
Basic stats: COMPLETE Column stats: NONE
-                        value expressions: _col1 (type: string)
+                        Statistics: Num rows: 1861800 Data size: 717186159 
Basic stats: COMPLETE Column stats: NONE
+                        value expressions: _col1 (type: string), _col2 (type: 
string)
             Execution mode: vectorized
-        Map 12 
+        Map 11 
             Map Operator Tree:
                 TableScan
                   alias: date_dim
@@ -311,41 +305,42 @@ STAGE PLANS:
         Map 14 
             Map Operator Tree:
                 TableScan
-                  alias: cd1
-                  filterExpr: ((cd_education_status) IN ('4 yr Degree', 
'Primary', 'Advanced Degree') and (cd_marital_status) IN ('M', 'D', 'U') and 
cd_demo_sk is not null) (type: boolean)
-                  Statistics: Num rows: 1861800 Data size: 717186159 Basic 
stats: COMPLETE Column stats: NONE
+                  alias: customer_address
+                  filterExpr: ((ca_state) IN ('KY', 'GA', 'NM', 'MT', 'OR', 
'IN', 'WI', 'MO', 'WV') and (ca_country = 'United States') and ca_address_sk is 
not null) (type: boolean)
+                  Statistics: Num rows: 40000000 Data size: 40595195284 Basic 
stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: ((cd_education_status) IN ('4 yr Degree', 
'Primary', 'Advanced Degree') and (cd_marital_status) IN ('M', 'D', 'U') and 
cd_demo_sk is not null) (type: boolean)
-                    Statistics: Num rows: 1861800 Data size: 717186159 Basic 
stats: COMPLETE Column stats: NONE
+                    predicate: ((ca_country = 'United States') and (ca_state) 
IN ('KY', 'GA', 'NM', 'MT', 'OR', 'IN', 'WI', 'MO', 'WV') 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: cd_demo_sk (type: int), cd_marital_status 
(type: string), cd_education_status (type: string)
-                      outputColumnNames: _col0, _col1, _col2
-                      Statistics: Num rows: 1861800 Data size: 717186159 Basic 
stats: COMPLETE Column stats: NONE
+                      expressions: ca_address_sk (type: int), (ca_state) IN 
('KY', 'GA', 'NM') (type: boolean), (ca_state) IN ('MT', 'OR', 'IN') (type: 
boolean), (ca_state) IN ('WI', 'MO', 'WV') (type: boolean)
+                      outputColumnNames: _col0, _col1, _col2, _col3
+                      Statistics: Num rows: 20000000 Data size: 20297597642 
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: 1861800 Data size: 717186159 
Basic stats: COMPLETE Column stats: NONE
-                        value expressions: _col1 (type: string), _col2 (type: 
string)
+                        Statistics: Num rows: 20000000 Data size: 20297597642 
Basic stats: COMPLETE Column stats: NONE
+                        value expressions: _col1 (type: boolean), _col2 (type: 
boolean), _col3 (type: boolean)
             Execution mode: vectorized
         Map 15 
             Map Operator Tree:
                 TableScan
-                  alias: cd2
+                  alias: cd1
                   filterExpr: ((cd_education_status) IN ('4 yr Degree', 
'Primary', 'Advanced Degree') and (cd_marital_status) IN ('M', 'D', 'U') and 
cd_demo_sk is not null) (type: boolean)
                   Statistics: Num rows: 1861800 Data size: 717186159 Basic 
stats: COMPLETE Column stats: NONE
                   Filter Operator
                     predicate: ((cd_education_status) IN ('4 yr Degree', 
'Primary', 'Advanced Degree') and (cd_marital_status) IN ('M', 'D', 'U') and 
cd_demo_sk is not null) (type: boolean)
                     Statistics: Num rows: 1861800 Data size: 717186159 Basic 
stats: COMPLETE Column stats: NONE
                     Select Operator
-                      expressions: cd_demo_sk (type: int), cd_marital_status 
(type: string), cd_education_status (type: string)
-                      outputColumnNames: _col0, _col1, _col2
+                      expressions: cd_demo_sk (type: int), cd_marital_status 
(type: string), cd_education_status (type: string), (cd_marital_status = 'M') 
(type: boolean), (cd_education_status = '4 yr Degree') (type: boolean), 
(cd_marital_status = 'D') (type: boolean), (cd_education_status = 'Primary') 
(type: boolean), (cd_marital_status = 'U') (type: boolean), 
(cd_education_status = 'Advanced Degree') (type: boolean)
+                      outputColumnNames: _col0, _col1, _col2, _col3, _col4, 
_col5, _col6, _col7, _col8
                       Statistics: Num rows: 1861800 Data size: 717186159 Basic 
stats: COMPLETE Column stats: NONE
                       Reduce Output Operator
                         key expressions: _col0 (type: int), _col1 (type: 
string), _col2 (type: string)
                         sort order: +++
                         Map-reduce partition columns: _col0 (type: int), _col1 
(type: string), _col2 (type: string)
                         Statistics: Num rows: 1861800 Data size: 717186159 
Basic stats: COMPLETE Column stats: NONE
+                        value expressions: _col3 (type: boolean), _col4 (type: 
boolean), _col5 (type: boolean), _col6 (type: boolean), _col7 (type: boolean), 
_col8 (type: boolean)
             Execution mode: vectorized
         Map 9 
             Map Operator Tree:
@@ -357,15 +352,15 @@ STAGE PLANS:
                     predicate: ((ws_net_profit BETWEEN 100 AND 200 or 
ws_net_profit BETWEEN 150 AND 300 or ws_net_profit BETWEEN 50 AND 250) and 
(ws_sales_price BETWEEN 100 AND 150 or ws_sales_price BETWEEN 50 AND 100 or 
ws_sales_price BETWEEN 150 AND 200) and ws_item_sk is not null and 
ws_order_number is not null and ws_sold_date_sk is not null and ws_web_page_sk 
is not null) (type: boolean)
                     Statistics: Num rows: 16000296 Data size: 2175577518 Basic 
stats: COMPLETE Column stats: NONE
                     Select Operator
-                      expressions: ws_sold_date_sk (type: int), ws_item_sk 
(type: int), ws_web_page_sk (type: int), ws_order_number (type: int), 
ws_quantity (type: int), ws_sales_price (type: decimal(7,2)), ws_net_profit 
(type: decimal(7,2))
-                      outputColumnNames: _col0, _col1, _col2, _col3, _col4, 
_col5, _col6
+                      expressions: ws_sold_date_sk (type: int), ws_item_sk 
(type: int), ws_web_page_sk (type: int), ws_order_number (type: int), 
ws_quantity (type: int), ws_net_profit BETWEEN 100 AND 200 (type: boolean), 
ws_net_profit BETWEEN 150 AND 300 (type: boolean), ws_net_profit BETWEEN 50 AND 
250 (type: boolean), ws_sales_price BETWEEN 100 AND 150 (type: boolean), 
ws_sales_price BETWEEN 50 AND 100 (type: boolean), ws_sales_price BETWEEN 150 
AND 200 (type: boolean)
+                      outputColumnNames: _col0, _col1, _col2, _col3, _col4, 
_col5, _col6, _col7, _col8, _col9, _col10
                       Statistics: Num rows: 16000296 Data size: 2175577518 
Basic stats: COMPLETE Column stats: NONE
                       Reduce Output Operator
                         key expressions: _col1 (type: int), _col3 (type: int)
                         sort order: ++
                         Map-reduce partition columns: _col1 (type: int), _col3 
(type: int)
                         Statistics: Num rows: 16000296 Data size: 2175577518 
Basic stats: COMPLETE Column stats: NONE
-                        value expressions: _col0 (type: int), _col2 (type: 
int), _col4 (type: int), _col5 (type: decimal(7,2)), _col6 (type: decimal(7,2))
+                        value expressions: _col0 (type: int), _col2 (type: 
int), _col4 (type: int), _col5 (type: boolean), _col6 (type: boolean), _col7 
(type: boolean), _col8 (type: boolean), _col9 (type: boolean), _col10 (type: 
boolean)
             Execution mode: vectorized
         Reducer 2 
             Reduce Operator Tree:
@@ -375,45 +370,30 @@ STAGE PLANS:
                 keys:
                   0 _col0 (type: int), _col5 (type: int)
                   1 _col1 (type: int), _col3 (type: int)
-                outputColumnNames: _col1, _col2, _col3, _col4, _col6, _col7, 
_col8, _col10, _col12, _col13, _col14
+                outputColumnNames: _col1, _col2, _col3, _col4, _col6, _col7, 
_col8, _col10, _col12, _col13, _col14, _col15, _col16, _col17, _col18
                 Statistics: Num rows: 17600325 Data size: 2393135321 Basic 
stats: COMPLETE Column stats: NONE
                 Reduce Output Operator
-                  key expressions: _col2 (type: int)
+                  key expressions: _col3 (type: int)
                   sort order: +
-                  Map-reduce partition columns: _col2 (type: int)
+                  Map-reduce partition columns: _col3 (type: int)
                   Statistics: Num rows: 17600325 Data size: 2393135321 Basic 
stats: COMPLETE Column stats: NONE
-                  value expressions: _col1 (type: int), _col3 (type: int), 
_col4 (type: int), _col6 (type: decimal(7,2)), _col7 (type: decimal(7,2)), 
_col8 (type: int), _col10 (type: int), _col12 (type: int), _col13 (type: 
decimal(7,2)), _col14 (type: decimal(7,2))
+                  value expressions: _col1 (type: int), _col2 (type: int), 
_col4 (type: int), _col6 (type: decimal(7,2)), _col7 (type: decimal(7,2)), 
_col8 (type: int), _col10 (type: int), _col12 (type: int), _col13 (type: 
boolean), _col14 (type: boolean), _col15 (type: boolean), _col16 (type: 
boolean), _col17 (type: boolean), _col18 (type: boolean)
         Reducer 3 
-            Local Work:
-              Map Reduce Local Work
             Reduce Operator Tree:
               Join Operator
                 condition map:
                      Inner Join 0 to 1
                 keys:
-                  0 _col2 (type: int)
+                  0 _col3 (type: int)
                   1 _col0 (type: int)
-                outputColumnNames: _col1, _col3, _col4, _col6, _col7, _col8, 
_col10, _col12, _col13, _col14, _col16
-                Statistics: Num rows: 22000000 Data size: 22327357890 Basic 
stats: COMPLETE Column stats: NONE
-                Filter Operator
-                  predicate: (((_col16) IN ('KY', 'GA', 'NM') and _col14 
BETWEEN 100 AND 200) or ((_col16) IN ('MT', 'OR', 'IN') and _col14 BETWEEN 150 
AND 300) or ((_col16) IN ('WI', 'MO', 'WV') and _col14 BETWEEN 50 AND 250)) 
(type: boolean)
-                  Statistics: Num rows: 7333332 Data size: 7442451276 Basic 
stats: COMPLETE Column stats: NONE
-                  Map Join Operator
-                    condition map:
-                         Inner Join 0 to 1
-                    keys:
-                      0 _col10 (type: int)
-                      1 _col0 (type: int)
-                    outputColumnNames: _col1, _col3, _col4, _col6, _col7, 
_col8, _col12, _col13
-                    input vertices:
-                      1 Map 11
-                    Statistics: Num rows: 8066665 Data size: 8186696581 Basic 
stats: COMPLETE Column stats: NONE
-                    Reduce Output Operator
-                      key expressions: _col8 (type: int)
-                      sort order: +
-                      Map-reduce partition columns: _col8 (type: int)
-                      Statistics: Num rows: 8066665 Data size: 8186696581 
Basic stats: COMPLETE Column stats: NONE
-                      value expressions: _col1 (type: int), _col3 (type: int), 
_col4 (type: int), _col6 (type: decimal(7,2)), _col7 (type: decimal(7,2)), 
_col12 (type: int), _col13 (type: decimal(7,2))
+                outputColumnNames: _col1, _col2, _col4, _col6, _col7, _col8, 
_col10, _col12, _col13, _col14, _col15, _col16, _col17, _col18, _col20, _col21
+                Statistics: Num rows: 19360357 Data size: 2632448910 Basic 
stats: COMPLETE Column stats: NONE
+                Reduce Output Operator
+                  key expressions: _col8 (type: int)
+                  sort order: +
+                  Map-reduce partition columns: _col8 (type: int)
+                  Statistics: Num rows: 19360357 Data size: 2632448910 Basic 
stats: COMPLETE Column stats: NONE
+                  value expressions: _col1 (type: int), _col2 (type: int), 
_col4 (type: int), _col6 (type: decimal(7,2)), _col7 (type: decimal(7,2)), 
_col10 (type: int), _col12 (type: int), _col13 (type: boolean), _col14 (type: 
boolean), _col15 (type: boolean), _col16 (type: boolean), _col17 (type: 
boolean), _col18 (type: boolean), _col20 (type: string), _col21 (type: string)
         Reducer 4 
             Local Work:
               Map Reduce Local Work
@@ -424,65 +404,82 @@ STAGE PLANS:
                 keys:
                   0 _col8 (type: int)
                   1 _col0 (type: int)
-                outputColumnNames: _col1, _col3, _col4, _col6, _col7, _col12, 
_col13
-                Statistics: Num rows: 8873331 Data size: 9005366434 Basic 
stats: COMPLETE Column stats: NONE
+                outputColumnNames: _col1, _col2, _col4, _col6, _col7, _col10, 
_col12, _col13, _col14, _col15, _col16, _col17, _col18, _col20, _col21
+                Statistics: Num rows: 21296393 Data size: 2895693863 Basic 
stats: COMPLETE Column stats: NONE
                 Map Join Operator
                   condition map:
                        Inner Join 0 to 1
                   keys:
-                    0 _col4 (type: int)
+                    0 _col10 (type: int)
                     1 _col0 (type: int)
-                  outputColumnNames: _col1, _col3, _col6, _col7, _col12, 
_col13, _col22
+                  outputColumnNames: _col1, _col2, _col4, _col6, _col7, 
_col12, _col13, _col14, _col15, _col16, _col17, _col18, _col20, _col21
                   input vertices:
-                    1 Map 13
-                  Statistics: Num rows: 9760664 Data size: 9905903292 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: 9760664 Data size: 9905903292 Basic 
stats: COMPLETE Column stats: NONE
-                    value expressions: _col3 (type: int), _col6 (type: 
decimal(7,2)), _col7 (type: decimal(7,2)), _col12 (type: int), _col13 (type: 
decimal(7,2)), _col22 (type: string)
+                    1 Map 12
+                  Statistics: Num rows: 23426032 Data size: 3185263318 Basic 
stats: COMPLETE Column stats: NONE
+                  Map Join Operator
+                    condition map:
+                         Inner Join 0 to 1
+                    keys:
+                      0 _col4 (type: int)
+                      1 _col0 (type: int)
+                    outputColumnNames: _col1, _col2, _col6, _col7, _col12, 
_col13, _col14, _col15, _col16, _col17, _col18, _col20, _col21, _col25
+                    input vertices:
+                      1 Map 13
+                    Statistics: Num rows: 25768635 Data size: 3503789725 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: 25768635 Data size: 3503789725 
Basic stats: COMPLETE Column stats: NONE
+                      value expressions: _col1 (type: int), _col6 (type: 
decimal(7,2)), _col7 (type: decimal(7,2)), _col12 (type: int), _col13 (type: 
boolean), _col14 (type: boolean), _col15 (type: boolean), _col16 (type: 
boolean), _col17 (type: boolean), _col18 (type: boolean), _col20 (type: 
string), _col21 (type: string), _col25 (type: string)
         Reducer 5 
             Reduce Operator Tree:
               Join Operator
                 condition map:
                      Inner Join 0 to 1
                 keys:
-                  0 _col1 (type: int)
+                  0 _col2 (type: int)
                   1 _col0 (type: int)
-                outputColumnNames: _col3, _col6, _col7, _col12, _col13, 
_col22, _col24, _col25
-                Statistics: Num rows: 10736730 Data size: 10896493857 Basic 
stats: COMPLETE Column stats: NONE
+                outputColumnNames: _col1, _col6, _col7, _col12, _col13, 
_col14, _col15, _col16, _col17, _col18, _col20, _col21, _col25, _col27, _col28, 
_col29
+                Statistics: Num rows: 28345499 Data size: 3854168781 Basic 
stats: COMPLETE Column stats: NONE
                 Filter Operator
-                  predicate: (((_col24 = 'D') and (_col25 = 'Primary') and 
_col13 BETWEEN 50 AND 100) or ((_col24 = 'M') and (_col25 = '4 yr Degree') and 
_col13 BETWEEN 100 AND 150) or ((_col24 = 'U') and (_col25 = 'Advanced Degree') 
and _col13 BETWEEN 150 AND 200)) (type: boolean)
-                  Statistics: Num rows: 894726 Data size: 908039632 Basic 
stats: COMPLETE Column stats: NONE
+                  predicate: ((_col27 and _col13) or (_col28 and _col14) or 
(_col29 and _col15)) (type: boolean)
+                  Statistics: Num rows: 21259122 Data size: 2890626279 Basic 
stats: COMPLETE Column stats: NONE
                   Reduce Output Operator
-                    key expressions: _col3 (type: int), _col24 (type: string), 
_col25 (type: string)
+                    key expressions: _col1 (type: int), _col20 (type: string), 
_col21 (type: string)
                     sort order: +++
-                    Map-reduce partition columns: _col3 (type: int), _col24 
(type: string), _col25 (type: string)
-                    Statistics: Num rows: 894726 Data size: 908039632 Basic 
stats: COMPLETE Column stats: NONE
-                    value expressions: _col6 (type: decimal(7,2)), _col7 
(type: decimal(7,2)), _col12 (type: int), _col22 (type: string)
+                    Map-reduce partition columns: _col1 (type: int), _col20 
(type: string), _col21 (type: string)
+                    Statistics: Num rows: 21259122 Data size: 2890626279 Basic 
stats: COMPLETE Column stats: NONE
+                    value expressions: _col6 (type: decimal(7,2)), _col7 
(type: decimal(7,2)), _col12 (type: int), _col16 (type: boolean), _col17 (type: 
boolean), _col18 (type: boolean), _col25 (type: string)
         Reducer 6 
             Reduce Operator Tree:
               Join Operator
                 condition map:
                      Inner Join 0 to 1
                 keys:
-                  0 _col3 (type: int), _col24 (type: string), _col25 (type: 
string)
+                  0 _col1 (type: int), _col20 (type: string), _col21 (type: 
string)
                   1 _col0 (type: int), _col1 (type: string), _col2 (type: 
string)
-                outputColumnNames: _col6, _col7, _col12, _col22
-                Statistics: Num rows: 2047980 Data size: 788904791 Basic 
stats: COMPLETE Column stats: NONE
-                Group By Operator
-                  aggregations: sum(_col12), count(_col12), sum(_col7), 
count(_col7), sum(_col6), count(_col6)
-                  keys: _col22 (type: string)
-                  mode: hash
-                  outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, 
_col6
-                  Statistics: Num rows: 2047980 Data size: 788904791 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: 2047980 Data size: 788904791 Basic 
stats: COMPLETE Column stats: NONE
-                    value expressions: _col1 (type: bigint), _col2 (type: 
bigint), _col3 (type: decimal(17,2)), _col4 (type: bigint), _col5 (type: 
decimal(17,2)), _col6 (type: bigint)
+                outputColumnNames: _col6, _col7, _col12, _col16, _col17, 
_col18, _col25, _col33, _col34, _col35, _col36, _col37, _col38
+                Statistics: Num rows: 23385034 Data size: 3179688975 Basic 
stats: COMPLETE Column stats: NONE
+                Filter Operator
+                  predicate: ((_col33 and _col34 and _col16) or (_col35 and 
_col36 and _col17) or (_col37 and _col38 and _col18)) (type: boolean)
+                  Statistics: Num rows: 8769387 Data size: 1192383263 Basic 
stats: COMPLETE Column stats: NONE
+                  Select Operator
+                    expressions: _col6 (type: decimal(7,2)), _col7 (type: 
decimal(7,2)), _col12 (type: int), _col25 (type: string)
+                    outputColumnNames: _col6, _col7, _col12, _col25
+                    Statistics: Num rows: 8769387 Data size: 1192383263 Basic 
stats: COMPLETE Column stats: NONE
+                    Group By Operator
+                      aggregations: sum(_col12), count(_col12), sum(_col7), 
count(_col7), sum(_col6), count(_col6)
+                      keys: _col25 (type: string)
+                      mode: hash
+                      outputColumnNames: _col0, _col1, _col2, _col3, _col4, 
_col5, _col6
+                      Statistics: Num rows: 8769387 Data size: 1192383263 
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: 8769387 Data size: 1192383263 
Basic stats: COMPLETE Column stats: NONE
+                        value expressions: _col1 (type: bigint), _col2 (type: 
bigint), _col3 (type: decimal(17,2)), _col4 (type: bigint), _col5 (type: 
decimal(17,2)), _col6 (type: bigint)
         Reducer 7 
             Execution mode: vectorized
             Reduce Operator Tree:
@@ -491,15 +488,15 @@ STAGE PLANS:
                 keys: KEY._col0 (type: string)
                 mode: mergepartial
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, 
_col6
-                Statistics: Num rows: 1023990 Data size: 394452395 Basic 
stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 4384693 Data size: 596191563 Basic 
stats: COMPLETE Column stats: NONE
                 Select Operator
                   expressions: (UDFToDouble(_col1) / _col2) (type: double), 
(_col3 / _col4) (type: decimal(37,22)), (_col5 / _col6) (type: decimal(37,22)), 
substr(_col0, 1, 20) (type: string)
                   outputColumnNames: _col4, _col5, _col6, _col7
-                  Statistics: Num rows: 1023990 Data size: 394452395 Basic 
stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 4384693 Data size: 596191563 Basic 
stats: COMPLETE Column stats: NONE
                   Reduce Output Operator
                     key expressions: _col7 (type: string), _col4 (type: 
double), _col5 (type: decimal(37,22)), _col6 (type: decimal(37,22))
                     sort order: ++++
-                    Statistics: Num rows: 1023990 Data size: 394452395 Basic 
stats: COMPLETE Column stats: NONE
+                    Statistics: Num rows: 4384693 Data size: 596191563 Basic 
stats: COMPLETE Column stats: NONE
                     TopN Hash Memory Usage: 0.1
         Reducer 8 
             Execution mode: vectorized
@@ -507,13 +504,13 @@ STAGE PLANS:
               Select Operator
                 expressions: KEY.reducesinkkey0 (type: string), 
KEY.reducesinkkey1 (type: double), KEY.reducesinkkey2 (type: decimal(37,22)), 
KEY.reducesinkkey3 (type: decimal(37,22))
                 outputColumnNames: _col0, _col1, _col2, _col3
-                Statistics: Num rows: 1023990 Data size: 394452395 Basic 
stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 4384693 Data size: 596191563 Basic 
stats: COMPLETE Column stats: NONE
                 Limit
                   Number of rows: 100
-                  Statistics: Num rows: 100 Data size: 38500 Basic stats: 
COMPLETE Column stats: NONE
+                  Statistics: Num rows: 100 Data size: 13500 Basic stats: 
COMPLETE Column stats: NONE
                   File Output Operator
                     compressed: false
-                    Statistics: Num rows: 100 Data size: 38500 Basic stats: 
COMPLETE Column stats: NONE
+                    Statistics: Num rows: 100 Data size: 13500 Basic stats: 
COMPLETE Column stats: NONE
                     table:
                         input format: 
org.apache.hadoop.mapred.SequenceFileInputFormat
                         output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat

http://git-wip-us.apache.org/repos/asf/hive/blob/55887646/ql/src/test/results/clientpositive/perf/spark/query86.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/spark/query86.q.out 
b/ql/src/test/results/clientpositive/perf/spark/query86.q.out
index 3892340..835ac5c 100644
--- a/ql/src/test/results/clientpositive/perf/spark/query86.q.out
+++ b/ql/src/test/results/clientpositive/perf/spark/query86.q.out
@@ -154,10 +154,10 @@ STAGE PLANS:
                 keys:
                   0 _col1 (type: int)
                   1 _col0 (type: int)
-                outputColumnNames: _col2, _col6, _col7
+                outputColumnNames: _col2, _col5, _col6
                 Statistics: Num rows: 174243235 Data size: 23692040863 Basic 
stats: COMPLETE Column stats: NONE
                 Select Operator
-                  expressions: _col7 (type: string), _col6 (type: string), 
_col2 (type: decimal(7,2))
+                  expressions: _col6 (type: string), _col5 (type: string), 
_col2 (type: decimal(7,2))
                   outputColumnNames: _col0, _col1, _col2
                   Statistics: Num rows: 174243235 Data size: 23692040863 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/query87.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/spark/query87.q.out 
b/ql/src/test/results/clientpositive/perf/spark/query87.q.out
index daa725e..a74f1fa 100644
--- a/ql/src/test/results/clientpositive/perf/spark/query87.q.out
+++ b/ql/src/test/results/clientpositive/perf/spark/query87.q.out
@@ -198,10 +198,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
@@ -272,10 +272,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
@@ -346,10 +346,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/query89.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/spark/query89.q.out 
b/ql/src/test/results/clientpositive/perf/spark/query89.q.out
index 589dead..40a698a 100644
--- a/ql/src/test/results/clientpositive/perf/spark/query89.q.out
+++ b/ql/src/test/results/clientpositive/perf/spark/query89.q.out
@@ -154,14 +154,14 @@ STAGE PLANS:
                     Statistics: Num rows: 36524 Data size: 40870356 Basic 
stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: d_date_sk (type: int), d_moy (type: int)
-                      outputColumnNames: _col0, _col2
+                      outputColumnNames: _col0, _col1
                       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
-                        value expressions: _col2 (type: int)
+                        value expressions: _col1 (type: int)
             Execution mode: vectorized
         Reducer 2 
             Reduce Operator Tree:
@@ -189,7 +189,7 @@ STAGE PLANS:
                 keys:
                   0 _col0 (type: int)
                   1 _col0 (type: int)
-                outputColumnNames: _col2, _col3, _col5, _col6, _col7, _col10
+                outputColumnNames: _col2, _col3, _col5, _col6, _col7, _col9
                 Statistics: Num rows: 696954748 Data size: 61485550191 Basic 
stats: COMPLETE Column stats: NONE
                 Map Join Operator
                   condition map:
@@ -197,13 +197,13 @@ STAGE PLANS:
                   keys:
                     0 _col2 (type: int)
                     1 _col0 (type: int)
-                  outputColumnNames: _col3, _col5, _col6, _col7, _col10, 
_col12, _col13
+                  outputColumnNames: _col3, _col5, _col6, _col7, _col9, 
_col11, _col12
                   input vertices:
                     1 Map 9
                   Statistics: Num rows: 766650239 Data size: 67634106676 Basic 
stats: COMPLETE Column stats: NONE
                   Group By Operator
                     aggregations: sum(_col3)
-                    keys: _col5 (type: string), _col6 (type: string), _col7 
(type: string), _col10 (type: int), _col12 (type: string), _col13 (type: string)
+                    keys: _col5 (type: string), _col6 (type: string), _col7 
(type: string), _col9 (type: int), _col11 (type: string), _col12 (type: string)
                     mode: hash
                     outputColumnNames: _col0, _col1, _col2, _col3, _col4, 
_col5, _col6
                     Statistics: Num rows: 766650239 Data size: 67634106676 
Basic stats: COMPLETE Column stats: NONE

http://git-wip-us.apache.org/repos/asf/hive/blob/55887646/ql/src/test/results/clientpositive/perf/spark/query9.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/spark/query9.q.out 
b/ql/src/test/results/clientpositive/perf/spark/query9.q.out
index 6bb02a4..ce5e87a 100644
--- a/ql/src/test/results/clientpositive/perf/spark/query9.q.out
+++ b/ql/src/test/results/clientpositive/perf/spark/query9.q.out
@@ -524,10 +524,14 @@ STAGE PLANS:
                 mode: mergepartial
                 outputColumnNames: _col0
                 Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE 
Column stats: NONE
-                Spark HashTable Sink Operator
-                  keys:
-                    0 
-                    1 
+                Select Operator
+                  expressions: (_col0 > 7887297L) (type: boolean)
+                  outputColumnNames: _col0
+                  Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE 
Column stats: NONE
+                  Spark HashTable Sink Operator
+                    keys:
+                      0 
+                      1 
         Reducer 17 
             Execution mode: vectorized
             Local Work:
@@ -574,10 +578,14 @@ STAGE PLANS:
                 mode: mergepartial
                 outputColumnNames: _col0
                 Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE 
Column stats: NONE
-                Spark HashTable Sink Operator
-                  keys:
-                    0 
-                    1 
+                Select Operator
+                  expressions: (_col0 > 10872978L) (type: boolean)
+                  outputColumnNames: _col0
+                  Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE 
Column stats: NONE
+                  Spark HashTable Sink Operator
+                    keys:
+                      0 
+                      1 
         Reducer 23 
             Execution mode: vectorized
             Local Work:
@@ -624,10 +632,14 @@ STAGE PLANS:
                 mode: mergepartial
                 outputColumnNames: _col0
                 Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE 
Column stats: NONE
-                Spark HashTable Sink Operator
-                  keys:
-                    0 
-                    1 
+                Select Operator
+                  expressions: (_col0 > 43571537L) (type: boolean)
+                  outputColumnNames: _col0
+                  Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE 
Column stats: NONE
+                  Spark HashTable Sink Operator
+                    keys:
+                      0 
+                      1 
         Reducer 29 
             Execution mode: vectorized
             Local Work:
@@ -656,10 +668,14 @@ STAGE PLANS:
                 mode: mergepartial
                 outputColumnNames: _col0
                 Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE 
Column stats: NONE
-                Spark HashTable Sink Operator
-                  keys:
-                    0 
-                    1 
+                Select Operator
+                  expressions: (_col0 > 409437L) (type: boolean)
+                  outputColumnNames: _col0
+                  Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE 
Column stats: NONE
+                  Spark HashTable Sink Operator
+                    keys:
+                      0 
+                      1 
         Reducer 31 
             Execution mode: vectorized
             Local Work:
@@ -724,10 +740,14 @@ STAGE PLANS:
                 mode: mergepartial
                 outputColumnNames: _col0
                 Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE 
Column stats: NONE
-                Spark HashTable Sink Operator
-                  keys:
-                    0 
-                    1 
+                Select Operator
+                  expressions: (_col0 > 4595804L) (type: boolean)
+                  outputColumnNames: _col0
+                  Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE 
Column stats: NONE
+                  Spark HashTable Sink Operator
+                    keys:
+                      0 
+                      1 
 
   Stage: Stage-1
     Spark
@@ -895,7 +915,7 @@ STAGE PLANS:
                                                       1 Reducer 31
                                                     Statistics: Num rows: 36 
Data size: 52380 Basic stats: COMPLETE Column stats: NONE
                                                     Select Operator
-                                                      expressions: CASE WHEN 
((_col1 > 409437L)) THEN (_col2) ELSE (_col3) END (type: decimal(37,22)), CASE 
WHEN ((_col4 > 4595804L)) THEN (_col5) ELSE (_col6) END (type: decimal(37,22)), 
CASE WHEN ((_col7 > 7887297L)) THEN (_col8) ELSE (_col9) END (type: 
decimal(37,22)), CASE WHEN ((_col10 > 10872978L)) THEN (_col11) ELSE (_col12) 
END (type: decimal(37,22)), CASE WHEN ((_col13 > 43571537L)) THEN (_col14) ELSE 
(_col15) END (type: decimal(37,22))
+                                                      expressions: CASE WHEN 
(_col1) THEN (_col2) ELSE (_col3) END (type: decimal(37,22)), CASE WHEN (_col4) 
THEN (_col5) ELSE (_col6) END (type: decimal(37,22)), CASE WHEN (_col7) THEN 
(_col8) ELSE (_col9) END (type: decimal(37,22)), CASE WHEN (_col10) THEN 
(_col11) ELSE (_col12) END (type: decimal(37,22)), CASE WHEN (_col13) THEN 
(_col14) ELSE (_col15) END (type: decimal(37,22))
                                                       outputColumnNames: 
_col0, _col1, _col2, _col3, _col4
                                                       Statistics: Num rows: 36 
Data size: 52380 Basic stats: COMPLETE Column stats: NONE
                                                       File Output Operator

http://git-wip-us.apache.org/repos/asf/hive/blob/55887646/ql/src/test/results/clientpositive/perf/spark/query91.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/spark/query91.q.out 
b/ql/src/test/results/clientpositive/perf/spark/query91.q.out
index b9fa42f..be56486 100644
--- a/ql/src/test/results/clientpositive/perf/spark/query91.q.out
+++ b/ql/src/test/results/clientpositive/perf/spark/query91.q.out
@@ -258,7 +258,7 @@ STAGE PLANS:
                   keys:
                     0 _col2 (type: int)
                     1 _col0 (type: int)
-                  outputColumnNames: _col1, _col3, _col8, _col9, _col10
+                  outputColumnNames: _col1, _col3, _col6, _col7, _col8
                   input vertices:
                     1 Map 12
                   Statistics: Num rows: 34846646 Data size: 3699254122 Basic 
stats: COMPLETE Column stats: NONE
@@ -267,7 +267,7 @@ STAGE PLANS:
                     sort order: +
                     Map-reduce partition columns: _col1 (type: int)
                     Statistics: Num rows: 34846646 Data size: 3699254122 Basic 
stats: COMPLETE Column stats: NONE
-                    value expressions: _col3 (type: decimal(7,2)), _col8 
(type: string), _col9 (type: string), _col10 (type: string)
+                    value expressions: _col3 (type: decimal(7,2)), _col6 
(type: string), _col7 (type: string), _col8 (type: string)
         Reducer 2 
             Reduce Operator Tree:
               Join Operator
@@ -310,7 +310,7 @@ STAGE PLANS:
                 keys:
                   0 _col0 (type: int)
                   1 _col1 (type: int)
-                outputColumnNames: _col2, _col5, _col6, _col12, _col17, 
_col18, _col19
+                outputColumnNames: _col2, _col5, _col6, _col11, _col14, 
_col15, _col16
                 Statistics: Num rows: 106480005 Data size: 91574956652 Basic 
stats: COMPLETE Column stats: NONE
                 Map Join Operator
                   condition map:
@@ -318,13 +318,13 @@ STAGE PLANS:
                   keys:
                     0 _col2 (type: int)
                     1 _col0 (type: int)
-                  outputColumnNames: _col5, _col6, _col12, _col17, _col18, 
_col19
+                  outputColumnNames: _col5, _col6, _col11, _col14, _col15, 
_col16
                   input vertices:
                     1 Map 13
                   Statistics: Num rows: 117128008 Data size: 100732454500 
Basic stats: COMPLETE Column stats: NONE
                   Group By Operator
-                    aggregations: sum(_col12)
-                    keys: _col5 (type: string), _col6 (type: string), _col17 
(type: string), _col18 (type: string), _col19 (type: string)
+                    aggregations: sum(_col11)
+                    keys: _col5 (type: string), _col6 (type: string), _col14 
(type: string), _col15 (type: string), _col16 (type: string)
                     mode: hash
                     outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
                     Statistics: Num rows: 117128008 Data size: 100732454500 
Basic stats: COMPLETE Column stats: NONE

http://git-wip-us.apache.org/repos/asf/hive/blob/55887646/ql/src/test/results/clientpositive/perf/spark/query92.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/spark/query92.q.out 
b/ql/src/test/results/clientpositive/perf/spark/query92.q.out
index c7179e0..9aa135e 100644
--- a/ql/src/test/results/clientpositive/perf/spark/query92.q.out
+++ b/ql/src/test/results/clientpositive/perf/spark/query92.q.out
@@ -228,10 +228,10 @@ STAGE PLANS:
                 keys:
                   0 _col1 (type: int)
                   1 _col2 (type: int)
-                outputColumnNames: _col2, _col6
+                outputColumnNames: _col2, _col5
                 Statistics: Num rows: 174243235 Data size: 23692040863 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: 58081078 Data size: 7897346909 Basic 
stats: COMPLETE Column stats: NONE
                   Select Operator
                     expressions: _col2 (type: decimal(7,2))
@@ -290,7 +290,7 @@ STAGE PLANS:
                 outputColumnNames: _col0, _col1, _col2
                 Statistics: Num rows: 79201469 Data size: 10769109250 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: 79201469 Data size: 10769109250 Basic 
stats: COMPLETE Column stats: NONE
                   Reduce Output Operator
@@ -298,7 +298,7 @@ STAGE PLANS:
                     sort order: +
                     Map-reduce partition columns: _col0 (type: int)
                     Statistics: Num rows: 79201469 Data size: 10769109250 
Basic stats: COMPLETE Column stats: NONE
-                    value expressions: _col1 (type: decimal(37,22))
+                    value expressions: _col1 (type: decimal(14,7))
         Reducer 8 
             Reduce Operator Tree:
               Join Operator
@@ -314,7 +314,7 @@ STAGE PLANS:
                   sort order: +
                   Map-reduce partition columns: _col2 (type: int)
                   Statistics: Num rows: 87121617 Data size: 11846020431 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/query93.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/spark/query93.q.out 
b/ql/src/test/results/clientpositive/perf/spark/query93.q.out
index 0263eb0..f393c13 100644
--- a/ql/src/test/results/clientpositive/perf/spark/query93.q.out
+++ b/ql/src/test/results/clientpositive/perf/spark/query93.q.out
@@ -89,8 +89,8 @@ STAGE PLANS:
                     predicate: (sr_item_sk is not null and sr_reason_sk is not 
null and sr_ticket_number is not null) (type: boolean)
                     Statistics: Num rows: 57591150 Data size: 4462194832 Basic 
stats: COMPLETE Column stats: NONE
                     Select Operator
-                      expressions: sr_item_sk (type: int), sr_reason_sk (type: 
int), sr_ticket_number (type: int), sr_return_quantity (type: int)
-                      outputColumnNames: _col0, _col1, _col2, _col3
+                      expressions: sr_item_sk (type: int), sr_reason_sk (type: 
int), sr_ticket_number (type: int), sr_return_quantity (type: int), 
sr_return_quantity is not null (type: boolean)
+                      outputColumnNames: _col0, _col1, _col2, _col3, _col4
                       Statistics: Num rows: 57591150 Data size: 4462194832 
Basic stats: COMPLETE Column stats: NONE
                       Map Join Operator
                         condition map:
@@ -98,7 +98,7 @@ STAGE PLANS:
                         keys:
                           0 _col1 (type: int)
                           1 _col0 (type: int)
-                        outputColumnNames: _col0, _col2, _col3
+                        outputColumnNames: _col0, _col2, _col3, _col4
                         input vertices:
                           1 Map 5
                         Statistics: Num rows: 63350266 Data size: 4908414421 
Basic stats: COMPLETE Column stats: NONE
@@ -107,7 +107,7 @@ STAGE PLANS:
                           sort order: ++
                           Map-reduce partition columns: _col0 (type: int), 
_col2 (type: int)
                           Statistics: Num rows: 63350266 Data size: 4908414421 
Basic stats: COMPLETE Column stats: NONE
-                          value expressions: _col3 (type: int)
+                          value expressions: _col3 (type: int), _col4 (type: 
boolean)
             Execution mode: vectorized
             Local Work:
               Map Reduce Local Work
@@ -121,15 +121,15 @@ STAGE PLANS:
                     predicate: (ss_item_sk is not null and ss_ticket_number is 
not null) (type: boolean)
                     Statistics: Num rows: 575995635 Data size: 50814502088 
Basic stats: COMPLETE Column stats: NONE
                     Select Operator
-                      expressions: ss_item_sk (type: int), ss_customer_sk 
(type: int), ss_ticket_number (type: int), ss_quantity (type: int), 
ss_sales_price (type: decimal(7,2))
-                      outputColumnNames: _col0, _col1, _col2, _col3, _col4
+                      expressions: ss_item_sk (type: int), ss_customer_sk 
(type: int), ss_ticket_number (type: int), ss_quantity (type: int), 
ss_sales_price (type: decimal(7,2)), (CAST( ss_quantity AS decimal(10,0)) * 
ss_sales_price) (type: decimal(18,2))
+                      outputColumnNames: _col0, _col1, _col2, _col3, _col4, 
_col5
                       Statistics: Num rows: 575995635 Data size: 50814502088 
Basic stats: COMPLETE Column stats: NONE
                       Reduce Output Operator
                         key expressions: _col0 (type: int), _col2 (type: int)
                         sort order: ++
                         Map-reduce partition columns: _col0 (type: int), _col2 
(type: int)
                         Statistics: Num rows: 575995635 Data size: 50814502088 
Basic stats: COMPLETE Column stats: NONE
-                        value expressions: _col1 (type: int), _col3 (type: 
int), _col4 (type: decimal(7,2))
+                        value expressions: _col1 (type: int), _col3 (type: 
int), _col4 (type: decimal(7,2)), _col5 (type: decimal(18,2))
             Execution mode: vectorized
         Reducer 2 
             Reduce Operator Tree:
@@ -139,10 +139,10 @@ STAGE PLANS:
                 keys:
                   0 _col0 (type: int), _col2 (type: int)
                   1 _col0 (type: int), _col2 (type: int)
-                outputColumnNames: _col3, _col7, _col9, _col10
+                outputColumnNames: _col3, _col4, _col7, _col9, _col10, _col11
                 Statistics: Num rows: 633595212 Data size: 55895953508 Basic 
stats: COMPLETE Column stats: NONE
                 Select Operator
-                  expressions: _col7 (type: int), CASE WHEN (_col3 is not 
null) THEN ((CAST( (_col9 - _col3) AS decimal(10,0)) * _col10)) ELSE ((CAST( 
_col9 AS decimal(10,0)) * _col10)) END (type: decimal(18,2))
+                  expressions: _col7 (type: int), CASE WHEN (_col4) THEN 
((CAST( (_col9 - _col3) AS decimal(10,0)) * _col10)) ELSE (_col11) END (type: 
decimal(18,2))
                   outputColumnNames: _col0, _col1
                   Statistics: Num rows: 633595212 Data size: 55895953508 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/query98.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/spark/query98.q.out 
b/ql/src/test/results/clientpositive/perf/spark/query98.q.out
index 816da61..2931144 100644
--- a/ql/src/test/results/clientpositive/perf/spark/query98.q.out
+++ b/ql/src/test/results/clientpositive/perf/spark/query98.q.out
@@ -168,11 +168,11 @@ STAGE PLANS:
                 keys:
                   0 _col1 (type: int)
                   1 _col0 (type: int)
-                outputColumnNames: _col2, _col6, _col7, _col8, _col9, _col10
+                outputColumnNames: _col2, _col5, _col6, _col7, _col8, _col9
                 Statistics: Num rows: 696954748 Data size: 61485550191 Basic 
stats: COMPLETE Column stats: NONE
                 Group By Operator
                   aggregations: sum(_col2)
-                  keys: _col10 (type: string), _col9 (type: string), _col6 
(type: string), _col7 (type: string), _col8 (type: decimal(7,2))
+                  keys: _col9 (type: string), _col8 (type: string), _col5 
(type: string), _col6 (type: string), _col7 (type: decimal(7,2))
                   mode: hash
                   outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
                   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/query99.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/spark/query99.q.out 
b/ql/src/test/results/clientpositive/perf/spark/query99.q.out
index 6e656d4..220aae5 100644
--- a/ql/src/test/results/clientpositive/perf/spark/query99.q.out
+++ b/ql/src/test/results/clientpositive/perf/spark/query99.q.out
@@ -103,7 +103,7 @@ STAGE PLANS:
                       Statistics: Num rows: 60 Data size: 122700 Basic stats: 
COMPLETE Column stats: NONE
                       Spark HashTable Sink Operator
                         keys:
-                          0 _col2 (type: int)
+                          0 _col1 (type: int)
                           1 _col0 (type: int)
             Execution mode: vectorized
             Local Work:
@@ -118,12 +118,12 @@ STAGE PLANS:
                     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: w_warehouse_sk (type: int), 
w_warehouse_name (type: string)
+                      expressions: w_warehouse_sk (type: int), 
substr(w_warehouse_name, 1, 20) (type: string)
                       outputColumnNames: _col0, _col1
                       Statistics: Num rows: 27 Data size: 27802 Basic stats: 
COMPLETE Column stats: NONE
                       Spark HashTable Sink Operator
                         keys:
-                          0 _col4 (type: int)
+                          0 _col3 (type: int)
                           1 _col0 (type: int)
             Execution mode: vectorized
             Local Work:
@@ -143,7 +143,7 @@ STAGE PLANS:
                       Statistics: Num rows: 1 Data size: 0 Basic stats: 
PARTIAL Column stats: NONE
                       Spark HashTable Sink Operator
                         keys:
-                          0 _col3 (type: int)
+                          0 _col2 (type: int)
                           1 _col0 (type: int)
             Execution mode: vectorized
             Local Work:
@@ -167,15 +167,15 @@ STAGE PLANS:
                     predicate: (cs_call_center_sk is not null and 
cs_ship_date_sk is not null and cs_ship_mode_sk is not null and cs_warehouse_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_ship_date_sk (type: int), cs_call_center_sk (type: int), cs_ship_mode_sk 
(type: int), cs_warehouse_sk (type: int)
-                      outputColumnNames: _col0, _col1, _col2, _col3, _col4
+                      expressions: cs_ship_date_sk (type: int), 
cs_call_center_sk (type: int), cs_ship_mode_sk (type: int), cs_warehouse_sk 
(type: int), CASE WHEN (((cs_ship_date_sk - cs_sold_date_sk) <= 30)) THEN (1) 
ELSE (0) END (type: int), CASE WHEN ((((cs_ship_date_sk - cs_sold_date_sk) > 
30) and ((cs_ship_date_sk - cs_sold_date_sk) <= 60))) THEN (1) ELSE (0) END 
(type: int), CASE WHEN ((((cs_ship_date_sk - cs_sold_date_sk) > 60) and 
((cs_ship_date_sk - cs_sold_date_sk) <= 90))) THEN (1) ELSE (0) END (type: 
int), CASE WHEN ((((cs_ship_date_sk - cs_sold_date_sk) > 90) and 
((cs_ship_date_sk - cs_sold_date_sk) <= 120))) THEN (1) ELSE (0) END (type: 
int), CASE WHEN (((cs_ship_date_sk - cs_sold_date_sk) > 120)) THEN (1) ELSE (0) 
END (type: int)
+                      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: _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: 287989836 Data size: 38999608952 
Basic stats: COMPLETE Column stats: NONE
-                        value expressions: _col0 (type: int), _col2 (type: 
int), _col3 (type: int), _col4 (type: int)
+                        value expressions: _col1 (type: int), _col2 (type: 
int), _col3 (type: int), _col4 (type: int), _col5 (type: int), _col6 (type: 
int), _col7 (type: int), _col8 (type: int)
             Execution mode: vectorized
         Map 5 
             Map Operator Tree:
@@ -204,17 +204,17 @@ STAGE PLANS:
                 condition map:
                      Inner Join 0 to 1
                 keys:
-                  0 _col1 (type: int)
+                  0 _col0 (type: int)
                   1 _col0 (type: int)
-                outputColumnNames: _col0, _col1, _col2, _col3, _col4
+                outputColumnNames: _col1, _col2, _col3, _col4, _col5, _col6, 
_col7, _col8
                 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 _col1 (type: int)
                     1 _col0 (type: int)
-                  outputColumnNames: _col0, _col1, _col3, _col4, _col8
+                  outputColumnNames: _col2, _col3, _col4, _col5, _col6, _col7, 
_col8, _col11
                   input vertices:
                     1 Map 6
                   Statistics: Num rows: 348467716 Data size: 47189528877 Basic 
stats: COMPLETE Column stats: NONE
@@ -222,9 +222,9 @@ STAGE PLANS:
                     condition map:
                          Inner Join 0 to 1
                     keys:
-                      0 _col4 (type: int)
+                      0 _col3 (type: int)
                       1 _col0 (type: int)
-                    outputColumnNames: _col0, _col1, _col3, _col8, _col10
+                    outputColumnNames: _col2, _col4, _col5, _col6, _col7, 
_col8, _col11, _col13
                     input vertices:
                       1 Map 7
                     Statistics: Num rows: 383314495 Data size: 51908482889 
Basic stats: COMPLETE Column stats: NONE
@@ -232,29 +232,25 @@ STAGE PLANS:
                       condition map:
                            Inner Join 0 to 1
                       keys:
-                        0 _col3 (type: int)
+                        0 _col2 (type: int)
                         1 _col0 (type: int)
-                      outputColumnNames: _col0, _col1, _col8, _col10, _col12
+                      outputColumnNames: _col4, _col5, _col6, _col7, _col8, 
_col11, _col13, _col15
                       input vertices:
                         1 Map 8
                       Statistics: Num rows: 421645953 Data size: 57099332415 
Basic stats: PARTIAL Column stats: NONE
-                      Select Operator
-                        expressions: substr(_col10, 1, 20) (type: string), 
_col12 (type: string), _col8 (type: string), CASE WHEN (((_col1 - _col0) <= 
30)) THEN (1) ELSE (0) END (type: int), CASE WHEN ((((_col1 - _col0) > 30) and 
((_col1 - _col0) <= 60))) THEN (1) ELSE (0) END (type: int), CASE WHEN 
((((_col1 - _col0) > 60) and ((_col1 - _col0) <= 90))) THEN (1) ELSE (0) END 
(type: int), CASE WHEN ((((_col1 - _col0) > 90) and ((_col1 - _col0) <= 120))) 
THEN (1) ELSE (0) END (type: int), CASE WHEN (((_col1 - _col0) > 120)) THEN (1) 
ELSE (0) END (type: int)
+                      Group By Operator
+                        aggregations: sum(_col4), sum(_col5), sum(_col6), 
sum(_col7), sum(_col8)
+                        keys: _col13 (type: string), _col15 (type: string), 
_col11 (type: string)
+                        mode: hash
                         outputColumnNames: _col0, _col1, _col2, _col3, _col4, 
_col5, _col6, _col7
                         Statistics: Num rows: 421645953 Data size: 57099332415 
Basic stats: PARTIAL Column stats: NONE
-                        Group By Operator
-                          aggregations: sum(_col3), sum(_col4), sum(_col5), 
sum(_col6), sum(_col7)
-                          keys: _col0 (type: string), _col1 (type: string), 
_col2 (type: string)
-                          mode: hash
-                          outputColumnNames: _col0, _col1, _col2, _col3, 
_col4, _col5, _col6, _col7
+                        Reduce Output Operator
+                          key expressions: _col0 (type: string), _col1 (type: 
string), _col2 (type: string)
+                          sort order: +++
+                          Map-reduce partition columns: _col0 (type: string), 
_col1 (type: string), _col2 (type: string)
                           Statistics: Num rows: 421645953 Data size: 
57099332415 Basic stats: PARTIAL Column stats: NONE
-                          Reduce Output Operator
-                            key expressions: _col0 (type: string), _col1 
(type: string), _col2 (type: string)
-                            sort order: +++
-                            Map-reduce partition columns: _col0 (type: 
string), _col1 (type: string), _col2 (type: string)
-                            Statistics: Num rows: 421645953 Data size: 
57099332415 Basic stats: PARTIAL Column stats: NONE
-                            TopN Hash Memory Usage: 0.1
-                            value expressions: _col3 (type: bigint), _col4 
(type: bigint), _col5 (type: bigint), _col6 (type: bigint), _col7 (type: bigint)
+                          TopN Hash Memory Usage: 0.1
+                          value expressions: _col3 (type: bigint), _col4 
(type: bigint), _col5 (type: bigint), _col6 (type: bigint), _col7 (type: bigint)
         Reducer 3 
             Execution mode: vectorized
             Reduce Operator Tree:

http://git-wip-us.apache.org/repos/asf/hive/blob/55887646/ql/src/test/results/clientpositive/perf/tez/cbo_query1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/tez/cbo_query1.q.out 
b/ql/src/test/results/clientpositive/perf/tez/cbo_query1.q.out
index 295ba99..9d0fa3a 100644
--- a/ql/src/test/results/clientpositive/perf/tez/cbo_query1.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/cbo_query1.q.out
@@ -59,7 +59,7 @@ POSTHOOK: Output: hdfs://### HDFS PATH ###
 CBO PLAN:
 HiveSortLimit(sort0=[$0], dir0=[ASC], fetch=[100])
   HiveProject(c_customer_id=[$1])
-    HiveJoin(condition=[AND(=($3, $8), >($4, $7))], joinType=[inner], 
algorithm=[none], cost=[not available])
+    HiveJoin(condition=[AND(=($3, $7), >($4, $6))], joinType=[inner], 
algorithm=[none], cost=[not available])
       HiveJoin(condition=[=($2, $0)], joinType=[inner], algorithm=[none], 
cost=[not available])
         HiveProject(c_customer_sk=[$0], c_customer_id=[$1])
           HiveFilter(condition=[IS NOT NULL($0)])
@@ -71,10 +71,10 @@ HiveSortLimit(sort0=[$0], dir0=[ASC], fetch=[100])
                 HiveProject(sr_returned_date_sk=[$0], sr_customer_sk=[$3], 
sr_store_sk=[$7], sr_fee=[$14])
                   HiveFilter(condition=[AND(IS NOT NULL($0), IS NOT NULL($7), 
IS NOT NULL($3))])
                     HiveTableScan(table=[[default, store_returns]], 
table:alias=[store_returns])
-                HiveProject(d_date_sk=[$0], d_year=[CAST(2000):INTEGER])
+                HiveProject(d_date_sk=[$0])
                   HiveFilter(condition=[AND(=($6, 2000), IS NOT NULL($0))])
                     HiveTableScan(table=[[default, date_dim]], 
table:alias=[date_dim])
-          HiveProject(s_store_sk=[$0], 
s_state=[CAST(_UTF-16LE'NM'):VARCHAR(2147483647) CHARACTER SET "UTF-16LE" 
COLLATE "ISO-8859-1$en_US$primary"])
+          HiveProject(s_store_sk=[$0])
             HiveFilter(condition=[AND(=($24, _UTF-16LE'NM'), IS NOT NULL($0))])
               HiveTableScan(table=[[default, store]], table:alias=[store])
       HiveProject(_o__c0=[*(/($1, $2), 1.2)], ctr_store_sk=[$0])
@@ -85,7 +85,7 @@ HiveSortLimit(sort0=[$0], dir0=[ASC], fetch=[100])
                 HiveProject(sr_returned_date_sk=[$0], sr_customer_sk=[$3], 
sr_store_sk=[$7], sr_fee=[$14])
                   HiveFilter(condition=[AND(IS NOT NULL($0), IS NOT NULL($7))])
                     HiveTableScan(table=[[default, store_returns]], 
table:alias=[store_returns])
-                HiveProject(d_date_sk=[$0], d_year=[CAST(2000):INTEGER])
+                HiveProject(d_date_sk=[$0])
                   HiveFilter(condition=[AND(=($6, 2000), IS NOT NULL($0))])
                     HiveTableScan(table=[[default, date_dim]], 
table:alias=[date_dim])
 

http://git-wip-us.apache.org/repos/asf/hive/blob/55887646/ql/src/test/results/clientpositive/perf/tez/cbo_query10.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/tez/cbo_query10.q.out 
b/ql/src/test/results/clientpositive/perf/tez/cbo_query10.q.out
index b226905..ccad67d 100644
--- a/ql/src/test/results/clientpositive/perf/tez/cbo_query10.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/cbo_query10.q.out
@@ -154,7 +154,7 @@ HiveSortLimit(sort0=[$0], sort1=[$1], sort2=[$2], 
sort3=[$4], sort4=[$6], sort5=
                   HiveProject(ss_sold_date_sk=[$0], ss_customer_sk=[$3])
                     HiveFilter(condition=[AND(IS NOT NULL($3), IS NOT 
NULL($0))])
                       HiveTableScan(table=[[default, store_sales]], 
table:alias=[store_sales])
-                  HiveProject(d_date_sk=[$0], d_year=[CAST(2002):INTEGER], 
d_moy=[$8])
+                  HiveProject(d_date_sk=[$0])
                     HiveFilter(condition=[AND(=($6, 2002), BETWEEN(false, $8, 
4, 7), IS NOT NULL($0))])
                       HiveTableScan(table=[[default, date_dim]], 
table:alias=[date_dim])
             HiveProject(ws_bill_customer_sk0=[$0], $f1=[true])
@@ -163,7 +163,7 @@ HiveSortLimit(sort0=[$0], sort1=[$1], sort2=[$2], 
sort3=[$4], sort4=[$6], sort5=
                   HiveProject(ws_sold_date_sk=[$0], ws_bill_customer_sk=[$4])
                     HiveFilter(condition=[AND(IS NOT NULL($4), IS NOT 
NULL($0))])
                       HiveTableScan(table=[[default, web_sales]], 
table:alias=[web_sales])
-                  HiveProject(d_date_sk=[$0], d_year=[CAST(2002):INTEGER], 
d_moy=[$8])
+                  HiveProject(d_date_sk=[$0])
                     HiveFilter(condition=[AND(=($6, 2002), BETWEEN(false, $8, 
4, 7), IS NOT NULL($0))])
                       HiveTableScan(table=[[default, date_dim]], 
table:alias=[date_dim])
           HiveProject(cs_ship_customer_sk0=[$0], $f1=[true])
@@ -172,7 +172,7 @@ HiveSortLimit(sort0=[$0], sort1=[$1], sort2=[$2], 
sort3=[$4], sort4=[$6], sort5=
                 HiveProject(cs_sold_date_sk=[$0], cs_ship_customer_sk=[$7])
                   HiveFilter(condition=[AND(IS NOT NULL($7), IS NOT NULL($0))])
                     HiveTableScan(table=[[default, catalog_sales]], 
table:alias=[catalog_sales])
-                HiveProject(d_date_sk=[$0], d_year=[CAST(2002):INTEGER], 
d_moy=[$8])
+                HiveProject(d_date_sk=[$0])
                   HiveFilter(condition=[AND(=($6, 2002), BETWEEN(false, $8, 4, 
7), IS NOT NULL($0))])
                     HiveTableScan(table=[[default, date_dim]], 
table:alias=[date_dim])
 

http://git-wip-us.apache.org/repos/asf/hive/blob/55887646/ql/src/test/results/clientpositive/perf/tez/cbo_query11.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/tez/cbo_query11.q.out 
b/ql/src/test/results/clientpositive/perf/tez/cbo_query11.q.out
index e09f7ec..de0783b 100644
--- a/ql/src/test/results/clientpositive/perf/tez/cbo_query11.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/cbo_query11.q.out
@@ -159,65 +159,61 @@ POSTHOOK: Output: hdfs://### HDFS PATH ###
 CBO PLAN:
 HiveSortLimit(sort0=[$0], dir0=[ASC], fetch=[100])
   HiveProject(c_preferred_cust_flag=[$1])
-    HiveJoin(condition=[AND(=($0, $5), CASE(CAST(IS NOT NULL($6)):BOOLEAN, 
CASE(CAST(IS NOT NULL($8)):BOOLEAN, >(/($4, $8), /($2, $6)), >(null, /($2, 
$6))), CASE(CAST(IS NOT NULL($8)):BOOLEAN, >(/($4, $8), null), null)))], 
joinType=[inner], algorithm=[none], cost=[not available])
+    HiveJoin(condition=[AND(=($0, $5), CASE(CAST(IS NOT NULL($6)):BOOLEAN, 
CASE($9, >(/($4, $8), /($2, $6)), >(null, /($2, $6))), CASE($9, >(/($4, $8), 
null), null)))], joinType=[inner], algorithm=[none], cost=[not available])
       HiveProject($f0=[$0], $f4=[$3], $f9=[$7])
-        HiveAggregate(group=[{0, 1, 2, 3, 4, 5, 6}], agg#0=[sum($7)])
-          HiveProject($f0=[$1], $f1=[$2], $f2=[$3], $f4=[$4], $f5=[$5], 
$f6=[$6], $f7=[$7], $f9=[-($11, $10)])
-            HiveJoin(condition=[=($0, $9)], joinType=[inner], 
algorithm=[none], cost=[not available])
-              HiveProject(c_customer_sk=[$0], c_customer_id=[$1], 
c_first_name=[$8], c_last_name=[$9], c_preferred_cust_flag=[$10], 
c_birth_country=[$14], c_login=[$15], c_email_address=[$16])
-                HiveFilter(condition=[AND(IS NOT NULL($0), IS NOT NULL($1))])
-                  HiveTableScan(table=[[default, customer]], 
table:alias=[customer])
-              HiveJoin(condition=[=($0, $4)], joinType=[inner], 
algorithm=[none], cost=[not available])
-                HiveProject(ss_sold_date_sk=[$0], ss_customer_sk=[$3], 
ss_ext_discount_amt=[$14], ss_ext_list_price=[$17])
-                  HiveFilter(condition=[AND(IS NOT NULL($3), IS NOT NULL($0))])
-                    HiveTableScan(table=[[default, store_sales]], 
table:alias=[store_sales])
-                HiveProject(d_date_sk=[$0], d_year=[CAST(2002):INTEGER])
-                  HiveFilter(condition=[AND(=($6, 2002), IS NOT NULL($0))])
-                    HiveTableScan(table=[[default, date_dim]], 
table:alias=[date_dim])
+        HiveAggregate(group=[{1, 2, 3, 4, 5, 6, 7}], agg#0=[sum($10)])
+          HiveJoin(condition=[=($0, $9)], joinType=[inner], algorithm=[none], 
cost=[not available])
+            HiveProject(c_customer_sk=[$0], c_customer_id=[$1], 
c_first_name=[$8], c_last_name=[$9], c_preferred_cust_flag=[$10], 
c_birth_country=[$14], c_login=[$15], c_email_address=[$16])
+              HiveFilter(condition=[AND(IS NOT NULL($0), IS NOT NULL($1))])
+                HiveTableScan(table=[[default, customer]], 
table:alias=[customer])
+            HiveJoin(condition=[=($0, $3)], joinType=[inner], 
algorithm=[none], cost=[not available])
+              HiveProject(ss_sold_date_sk=[$0], ss_customer_sk=[$3], -=[-($17, 
$14)])
+                HiveFilter(condition=[AND(IS NOT NULL($3), IS NOT NULL($0))])
+                  HiveTableScan(table=[[default, store_sales]], 
table:alias=[store_sales])
+              HiveProject(d_date_sk=[$0])
+                HiveFilter(condition=[AND(=($6, 2002), IS NOT NULL($0))])
+                  HiveTableScan(table=[[default, date_dim]], 
table:alias=[date_dim])
       HiveJoin(condition=[=($2, $4)], joinType=[inner], algorithm=[none], 
cost=[not available])
         HiveJoin(condition=[=($2, $0)], joinType=[inner], algorithm=[none], 
cost=[not available])
           HiveProject($f0=[$0], $f8=[$7])
-            HiveAggregate(group=[{0, 1, 2, 3, 4, 5, 6}], agg#0=[sum($7)])
-              HiveProject($f0=[$1], $f1=[$2], $f2=[$3], $f3=[$4], $f4=[$5], 
$f5=[$6], $f6=[$7], $f8=[-($11, $10)])
-                HiveJoin(condition=[=($0, $9)], joinType=[inner], 
algorithm=[none], cost=[not available])
-                  HiveProject(c_customer_sk=[$0], c_customer_id=[$1], 
c_first_name=[$8], c_last_name=[$9], c_preferred_cust_flag=[$10], 
c_birth_country=[$14], c_login=[$15], c_email_address=[$16])
-                    HiveFilter(condition=[AND(IS NOT NULL($0), IS NOT 
NULL($1))])
-                      HiveTableScan(table=[[default, customer]], 
table:alias=[customer])
-                  HiveJoin(condition=[=($0, $4)], joinType=[inner], 
algorithm=[none], cost=[not available])
-                    HiveProject(ws_sold_date_sk=[$0], 
ws_bill_customer_sk=[$4], ws_ext_discount_amt=[$22], ws_ext_list_price=[$25])
-                      HiveFilter(condition=[AND(IS NOT NULL($4), IS NOT 
NULL($0))])
-                        HiveTableScan(table=[[default, web_sales]], 
table:alias=[web_sales])
-                    HiveProject(d_date_sk=[$0], d_year=[CAST(2002):INTEGER])
-                      HiveFilter(condition=[AND(=($6, 2002), IS NOT NULL($0))])
-                        HiveTableScan(table=[[default, date_dim]], 
table:alias=[date_dim])
+            HiveAggregate(group=[{1, 2, 3, 4, 5, 6, 7}], agg#0=[sum($10)])
+              HiveJoin(condition=[=($0, $9)], joinType=[inner], 
algorithm=[none], cost=[not available])
+                HiveProject(c_customer_sk=[$0], c_customer_id=[$1], 
c_first_name=[$8], c_last_name=[$9], c_preferred_cust_flag=[$10], 
c_birth_country=[$14], c_login=[$15], c_email_address=[$16])
+                  HiveFilter(condition=[AND(IS NOT NULL($0), IS NOT NULL($1))])
+                    HiveTableScan(table=[[default, customer]], 
table:alias=[customer])
+                HiveJoin(condition=[=($0, $3)], joinType=[inner], 
algorithm=[none], cost=[not available])
+                  HiveProject(ws_sold_date_sk=[$0], ws_bill_customer_sk=[$4], 
-=[-($25, $22)])
+                    HiveFilter(condition=[AND(IS NOT NULL($4), IS NOT 
NULL($0))])
+                      HiveTableScan(table=[[default, web_sales]], 
table:alias=[web_sales])
+                  HiveProject(d_date_sk=[$0])
+                    HiveFilter(condition=[AND(=($6, 2002), IS NOT NULL($0))])
+                      HiveTableScan(table=[[default, date_dim]], 
table:alias=[date_dim])
           HiveProject($f0=[$0], $f9=[$7])
             HiveFilter(condition=[>($7, 0)])
-              HiveAggregate(group=[{0, 1, 2, 3, 4, 5, 6}], agg#0=[sum($7)])
-                HiveProject($f0=[$1], $f1=[$2], $f2=[$3], $f4=[$4], $f5=[$5], 
$f6=[$6], $f7=[$7], $f9=[-($11, $10)])
-                  HiveJoin(condition=[=($0, $9)], joinType=[inner], 
algorithm=[none], cost=[not available])
-                    HiveProject(c_customer_sk=[$0], c_customer_id=[$1], 
c_first_name=[$8], c_last_name=[$9], c_preferred_cust_flag=[$10], 
c_birth_country=[$14], c_login=[$15], c_email_address=[$16])
-                      HiveFilter(condition=[AND(IS NOT NULL($0), IS NOT 
NULL($1))])
-                        HiveTableScan(table=[[default, customer]], 
table:alias=[customer])
-                    HiveJoin(condition=[=($0, $4)], joinType=[inner], 
algorithm=[none], cost=[not available])
-                      HiveProject(ss_sold_date_sk=[$0], ss_customer_sk=[$3], 
ss_ext_discount_amt=[$14], ss_ext_list_price=[$17])
-                        HiveFilter(condition=[AND(IS NOT NULL($3), IS NOT 
NULL($0))])
-                          HiveTableScan(table=[[default, store_sales]], 
table:alias=[store_sales])
-                      HiveProject(d_date_sk=[$0], d_year=[CAST(2001):INTEGER])
-                        HiveFilter(condition=[AND(=($6, 2001), IS NOT 
NULL($0))])
-                          HiveTableScan(table=[[default, date_dim]], 
table:alias=[date_dim])
-        HiveProject($f0=[$0], $f8=[$7])
-          HiveFilter(condition=[>($7, 0)])
-            HiveAggregate(group=[{0, 1, 2, 3, 4, 5, 6}], agg#0=[sum($7)])
-              HiveProject($f0=[$1], $f1=[$2], $f2=[$3], $f3=[$4], $f4=[$5], 
$f5=[$6], $f6=[$7], $f8=[-($11, $10)])
+              HiveAggregate(group=[{1, 2, 3, 4, 5, 6, 7}], agg#0=[sum($10)])
                 HiveJoin(condition=[=($0, $9)], joinType=[inner], 
algorithm=[none], cost=[not available])
                   HiveProject(c_customer_sk=[$0], c_customer_id=[$1], 
c_first_name=[$8], c_last_name=[$9], c_preferred_cust_flag=[$10], 
c_birth_country=[$14], c_login=[$15], c_email_address=[$16])
                     HiveFilter(condition=[AND(IS NOT NULL($0), IS NOT 
NULL($1))])
                       HiveTableScan(table=[[default, customer]], 
table:alias=[customer])
-                  HiveJoin(condition=[=($0, $4)], joinType=[inner], 
algorithm=[none], cost=[not available])
-                    HiveProject(ws_sold_date_sk=[$0], 
ws_bill_customer_sk=[$4], ws_ext_discount_amt=[$22], ws_ext_list_price=[$25])
-                      HiveFilter(condition=[AND(IS NOT NULL($4), IS NOT 
NULL($0))])
-                        HiveTableScan(table=[[default, web_sales]], 
table:alias=[web_sales])
-                    HiveProject(d_date_sk=[$0], d_year=[CAST(2001):INTEGER])
+                  HiveJoin(condition=[=($0, $3)], joinType=[inner], 
algorithm=[none], cost=[not available])
+                    HiveProject(ss_sold_date_sk=[$0], ss_customer_sk=[$3], 
-=[-($17, $14)])
+                      HiveFilter(condition=[AND(IS NOT NULL($3), IS NOT 
NULL($0))])
+                        HiveTableScan(table=[[default, store_sales]], 
table:alias=[store_sales])
+                    HiveProject(d_date_sk=[$0])
                       HiveFilter(condition=[AND(=($6, 2001), IS NOT NULL($0))])
                         HiveTableScan(table=[[default, date_dim]], 
table:alias=[date_dim])
+        HiveProject(customer_id=[$0], year_total=[$7], CAST=[CAST(IS NOT 
NULL($7)):BOOLEAN])
+          HiveFilter(condition=[>($7, 0)])
+            HiveAggregate(group=[{1, 2, 3, 4, 5, 6, 7}], agg#0=[sum($10)])
+              HiveJoin(condition=[=($0, $9)], joinType=[inner], 
algorithm=[none], cost=[not available])
+                HiveProject(c_customer_sk=[$0], c_customer_id=[$1], 
c_first_name=[$8], c_last_name=[$9], c_preferred_cust_flag=[$10], 
c_birth_country=[$14], c_login=[$15], c_email_address=[$16])
+                  HiveFilter(condition=[AND(IS NOT NULL($0), IS NOT NULL($1))])
+                    HiveTableScan(table=[[default, customer]], 
table:alias=[customer])
+                HiveJoin(condition=[=($0, $3)], joinType=[inner], 
algorithm=[none], cost=[not available])
+                  HiveProject(ws_sold_date_sk=[$0], ws_bill_customer_sk=[$4], 
-=[-($25, $22)])
+                    HiveFilter(condition=[AND(IS NOT NULL($4), IS NOT 
NULL($0))])
+                      HiveTableScan(table=[[default, web_sales]], 
table:alias=[web_sales])
+                  HiveProject(d_date_sk=[$0])
+                    HiveFilter(condition=[AND(=($6, 2001), IS NOT NULL($0))])
+                      HiveTableScan(table=[[default, date_dim]], 
table:alias=[date_dim])
 

http://git-wip-us.apache.org/repos/asf/hive/blob/55887646/ql/src/test/results/clientpositive/perf/tez/cbo_query12.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/tez/cbo_query12.q.out 
b/ql/src/test/results/clientpositive/perf/tez/cbo_query12.q.out
index dbfe6e7..cda7aa3 100644
--- a/ql/src/test/results/clientpositive/perf/tez/cbo_query12.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/cbo_query12.q.out
@@ -83,7 +83,7 @@ HiveProject(i_item_desc=[$0], i_category=[$1], i_class=[$2], 
i_current_price=[$3
             HiveProject(ws_sold_date_sk=[$0], ws_item_sk=[$3], 
ws_ext_sales_price=[$23])
               HiveFilter(condition=[AND(IS NOT NULL($3), IS NOT NULL($0))])
                 HiveTableScan(table=[[default, web_sales]], 
table:alias=[web_sales])
-            HiveProject(d_date_sk=[$0], d_date=[$2])
+            HiveProject(d_date_sk=[$0])
               HiveFilter(condition=[AND(BETWEEN(false, CAST($2):TIMESTAMP(9), 
2001-01-12 00:00:00, 2001-02-11 00:00:00), IS NOT NULL($0))])
                 HiveTableScan(table=[[default, date_dim]], 
table:alias=[date_dim])
 

Reply via email to