You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by ha...@apache.org on 2017/04/08 03:58:06 UTC

[05/14] hive git commit: HIVE-14564 : Column Pruning generates out of order columns in SelectOperator which cause ArrayIndexOutOfBoundsException. (Zhihai Xu via Ashutosh Chauhan)

http://git-wip-us.apache.org/repos/asf/hive/blob/78d8b337/ql/src/test/results/clientpositive/perf/query65.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/query65.q.out b/ql/src/test/results/clientpositive/perf/query65.q.out
index 060cddf..901bcfd 100644
--- a/ql/src/test/results/clientpositive/perf/query65.q.out
+++ b/ql/src/test/results/clientpositive/perf/query65.q.out
@@ -144,28 +144,26 @@ Stage-0
                                       PartitionCols:_col0
                                       Group By Operator [GBY_24] (rows=633595212 width=88)
                                         Output:["_col0","_col1","_col2"],aggregations:["sum(_col3)"],keys:_col2, _col1
-                                        Select Operator [SEL_23] (rows=633595212 width=88)
-                                          Output:["_col2","_col1","_col3"]
-                                          Merge Join Operator [MERGEJOIN_80] (rows=633595212 width=88)
-                                            Conds:RS_20._col0=RS_21._col0(Inner),Output:["_col1","_col2","_col3"]
-                                          <-Map 11 [SIMPLE_EDGE]
-                                            SHUFFLE [RS_21]
-                                              PartitionCols:_col0
-                                              Select Operator [SEL_19] (rows=8116 width=1119)
-                                                Output:["_col0"]
-                                                Filter Operator [FIL_76] (rows=8116 width=1119)
-                                                  predicate:(d_month_seq BETWEEN 1212 AND 1223 and d_date_sk is not null)
-                                                  TableScan [TS_17] (rows=73049 width=1119)
-                                                    default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_month_seq"]
-                                          <-Map 8 [SIMPLE_EDGE]
-                                            SHUFFLE [RS_20]
-                                              PartitionCols:_col0
-                                              Select Operator [SEL_16] (rows=575995635 width=88)
-                                                Output:["_col0","_col1","_col2","_col3"]
-                                                Filter Operator [FIL_75] (rows=575995635 width=88)
-                                                  predicate:(ss_sold_date_sk is not null and ss_store_sk is not null)
-                                                  TableScan [TS_14] (rows=575995635 width=88)
-                                                    default@store_sales,store_sales,Tbl:COMPLETE,Col:NONE,Output:["ss_sold_date_sk","ss_item_sk","ss_store_sk","ss_sales_price"]
+                                        Merge Join Operator [MERGEJOIN_80] (rows=633595212 width=88)
+                                          Conds:RS_20._col0=RS_21._col0(Inner),Output:["_col1","_col2","_col3"]
+                                        <-Map 11 [SIMPLE_EDGE]
+                                          SHUFFLE [RS_21]
+                                            PartitionCols:_col0
+                                            Select Operator [SEL_19] (rows=8116 width=1119)
+                                              Output:["_col0"]
+                                              Filter Operator [FIL_76] (rows=8116 width=1119)
+                                                predicate:(d_month_seq BETWEEN 1212 AND 1223 and d_date_sk is not null)
+                                                TableScan [TS_17] (rows=73049 width=1119)
+                                                  default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_month_seq"]
+                                        <-Map 8 [SIMPLE_EDGE]
+                                          SHUFFLE [RS_20]
+                                            PartitionCols:_col0
+                                            Select Operator [SEL_16] (rows=575995635 width=88)
+                                              Output:["_col0","_col1","_col2","_col3"]
+                                              Filter Operator [FIL_75] (rows=575995635 width=88)
+                                                predicate:(ss_sold_date_sk is not null and ss_store_sk is not null)
+                                                TableScan [TS_14] (rows=575995635 width=88)
+                                                  default@store_sales,store_sales,Tbl:COMPLETE,Col:NONE,Output:["ss_sold_date_sk","ss_item_sk","ss_store_sk","ss_sales_price"]
                         <-Reducer 3 [SIMPLE_EDGE]
                           SHUFFLE [RS_39]
                             PartitionCols:_col0
@@ -176,26 +174,24 @@ Stage-0
                                 PartitionCols:_col0, _col1
                                 Group By Operator [GBY_10] (rows=633595212 width=88)
                                   Output:["_col0","_col1","_col2"],aggregations:["sum(_col3)"],keys:_col2, _col1
-                                  Select Operator [SEL_9] (rows=633595212 width=88)
-                                    Output:["_col2","_col1","_col3"]
-                                    Merge Join Operator [MERGEJOIN_79] (rows=633595212 width=88)
-                                      Conds:RS_6._col0=RS_7._col0(Inner),Output:["_col1","_col2","_col3"]
-                                    <-Map 1 [SIMPLE_EDGE]
-                                      SHUFFLE [RS_6]
-                                        PartitionCols:_col0
-                                        Select Operator [SEL_2] (rows=575995635 width=88)
-                                          Output:["_col0","_col1","_col2","_col3"]
-                                          Filter Operator [FIL_73] (rows=575995635 width=88)
-                                            predicate:(ss_sold_date_sk is not null and ss_store_sk is not null and ss_item_sk is not null)
-                                            TableScan [TS_0] (rows=575995635 width=88)
-                                              default@store_sales,store_sales,Tbl:COMPLETE,Col:NONE,Output:["ss_sold_date_sk","ss_item_sk","ss_store_sk","ss_sales_price"]
-                                    <-Map 7 [SIMPLE_EDGE]
-                                      SHUFFLE [RS_7]
-                                        PartitionCols:_col0
-                                        Select Operator [SEL_5] (rows=8116 width=1119)
-                                          Output:["_col0"]
-                                          Filter Operator [FIL_74] (rows=8116 width=1119)
-                                            predicate:(d_month_seq BETWEEN 1212 AND 1223 and d_date_sk is not null)
-                                            TableScan [TS_3] (rows=73049 width=1119)
-                                              default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_month_seq"]
+                                  Merge Join Operator [MERGEJOIN_79] (rows=633595212 width=88)
+                                    Conds:RS_6._col0=RS_7._col0(Inner),Output:["_col1","_col2","_col3"]
+                                  <-Map 1 [SIMPLE_EDGE]
+                                    SHUFFLE [RS_6]
+                                      PartitionCols:_col0
+                                      Select Operator [SEL_2] (rows=575995635 width=88)
+                                        Output:["_col0","_col1","_col2","_col3"]
+                                        Filter Operator [FIL_73] (rows=575995635 width=88)
+                                          predicate:(ss_sold_date_sk is not null and ss_store_sk is not null and ss_item_sk is not null)
+                                          TableScan [TS_0] (rows=575995635 width=88)
+                                            default@store_sales,store_sales,Tbl:COMPLETE,Col:NONE,Output:["ss_sold_date_sk","ss_item_sk","ss_store_sk","ss_sales_price"]
+                                  <-Map 7 [SIMPLE_EDGE]
+                                    SHUFFLE [RS_7]
+                                      PartitionCols:_col0
+                                      Select Operator [SEL_5] (rows=8116 width=1119)
+                                        Output:["_col0"]
+                                        Filter Operator [FIL_74] (rows=8116 width=1119)
+                                          predicate:(d_month_seq BETWEEN 1212 AND 1223 and d_date_sk is not null)
+                                          TableScan [TS_3] (rows=73049 width=1119)
+                                            default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_month_seq"]
 

http://git-wip-us.apache.org/repos/asf/hive/blob/78d8b337/ql/src/test/results/clientpositive/perf/query66.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/query66.q.out b/ql/src/test/results/clientpositive/perf/query66.q.out
index 5cf60f6..072bfee 100644
--- a/ql/src/test/results/clientpositive/perf/query66.q.out
+++ b/ql/src/test/results/clientpositive/perf/query66.q.out
@@ -465,7 +465,7 @@ Stage-0
           <-Reducer 8 [SIMPLE_EDGE]
             SHUFFLE [RS_73]
               Select Operator [SEL_72] (rows=158120068 width=135)
-                Output:["_col0","_col1","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col18","_col19","_col2","_col20","_col21","_col22","_col23","_col24","_col25","_col26","_col27","_col28","_col29","_col3","_col30","_col31","_col32","_col33","_col34","_col35","_col36","_col37","_col38","_col39","_col4","_col40","_col41","_col42","_col43","_col5","_col8","_col9"]
+                Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col18","_col19","_col20","_col21","_col22","_col23","_col24","_col25","_col26","_col27","_col28","_col29","_col30","_col31","_col32","_col33","_col34","_col35","_col36","_col37","_col38","_col39","_col40","_col41","_col42","_col43"]
                 Group By Operator [GBY_71] (rows=158120068 width=135)
                   Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col18","_col19","_col20","_col21","_col22","_col23","_col24","_col25","_col26","_col27","_col28","_col29","_col30","_col31","_col32","_col33","_col34","_col35","_col36","_col37","_col38","_col39","_col40","_col41"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)","sum(VALUE._col3)","sum(VALUE._col4)","sum(VALUE._col5)","sum(VALUE._col6)","sum(VALUE._col7)","sum(VALUE._col8)","sum(VALUE._col9)","sum(VALUE._col10)","sum(VALUE._col11)","sum(VALUE._col12)","sum(VALUE._col13)","sum(VALUE._col14)","sum(VALUE._col15)","sum(VALUE._col16)","sum(VALUE._col17)","sum(VALUE._col18)","sum(VALUE._col19)","sum(VALUE._col20)","sum(VALUE._col21)","sum(VALUE._col22)","sum(VALUE._col23)","sum(VALUE._col24)","sum(VALUE._col25)","sum(VALUE._col26)","sum(VALUE._col27)","sum(VALUE._col28)","sum(VALUE._col29)
 ","sum(VALUE._col30)","sum(VALUE._col31)","sum(VALUE._col32)","sum(VALUE._col33)","sum(VALUE._col34)","sum(VALUE._col35)"],keys:KEY._col0, KEY._col1, KEY._col2, KEY._col3, KEY._col4, KEY._col5
                 <-Union 7 [SIMPLE_EDGE]

http://git-wip-us.apache.org/repos/asf/hive/blob/78d8b337/ql/src/test/results/clientpositive/perf/query67.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/query67.q.out b/ql/src/test/results/clientpositive/perf/query67.q.out
index 1f38027..4277e6c 100644
--- a/ql/src/test/results/clientpositive/perf/query67.q.out
+++ b/ql/src/test/results/clientpositive/perf/query67.q.out
@@ -118,7 +118,7 @@ Stage-0
                       SHUFFLE [RS_27]
                         PartitionCols:_col0
                         Select Operator [SEL_26] (rows=3449926075 width=88)
-                          Output:["_col0","_col1","_col16","_col2","_col3","_col4","_col5","_col6","_col7"]
+                          Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col16"]
                           Group By Operator [GBY_25] (rows=3449926075 width=88)
                             Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col9"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2, KEY._col3, KEY._col4, KEY._col5, KEY._col6, KEY._col7, KEY._col8
                           <-Reducer 4 [SIMPLE_EDGE]

http://git-wip-us.apache.org/repos/asf/hive/blob/78d8b337/ql/src/test/results/clientpositive/perf/query68.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/query68.q.out b/ql/src/test/results/clientpositive/perf/query68.q.out
index b84bdf6..a015852 100644
--- a/ql/src/test/results/clientpositive/perf/query68.q.out
+++ b/ql/src/test/results/clientpositive/perf/query68.q.out
@@ -44,70 +44,68 @@ Stage-0
                             PartitionCols:_col0, _col1, _col2, _col3
                             Group By Operator [GBY_34] (rows=843315281 width=88)
                               Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"],aggregations:["sum(_col6)","sum(_col7)","sum(_col8)"],keys:_col1, _col18, _col3, _col5
-                              Select Operator [SEL_33] (rows=843315281 width=88)
-                                Output:["_col1","_col18","_col3","_col5","_col6","_col7","_col8"]
-                                Merge Join Operator [MERGEJOIN_85] (rows=843315281 width=88)
-                                  Conds:RS_30._col3=RS_31._col0(Inner),Output:["_col1","_col3","_col5","_col6","_col7","_col8","_col18"]
-                                <-Map 15 [SIMPLE_EDGE]
-                                  SHUFFLE [RS_31]
-                                    PartitionCols:_col0
-                                    Select Operator [SEL_20] (rows=40000000 width=1014)
-                                      Output:["_col0","_col1"]
-                                      Filter Operator [FIL_80] (rows=40000000 width=1014)
-                                        predicate:ca_address_sk is not null
-                                        TableScan [TS_18] (rows=40000000 width=1014)
-                                          default@customer_address,customer_address,Tbl:COMPLETE,Col:NONE,Output:["ca_address_sk","ca_city"]
-                                <-Reducer 9 [SIMPLE_EDGE]
-                                  SHUFFLE [RS_30]
-                                    PartitionCols:_col3
-                                    Merge Join Operator [MERGEJOIN_84] (rows=766650239 width=88)
-                                      Conds:RS_27._col2=RS_28._col0(Inner),Output:["_col1","_col3","_col5","_col6","_col7","_col8"]
-                                    <-Map 14 [SIMPLE_EDGE]
-                                      SHUFFLE [RS_28]
-                                        PartitionCols:_col0
-                                        Select Operator [SEL_17] (rows=7200 width=107)
-                                          Output:["_col0"]
-                                          Filter Operator [FIL_79] (rows=7200 width=107)
-                                            predicate:(((hd_dep_count = 4) or (hd_vehicle_count = 2)) and hd_demo_sk is not null)
-                                            TableScan [TS_15] (rows=7200 width=107)
-                                              default@household_demographics,household_demographics,Tbl:COMPLETE,Col:NONE,Output:["hd_demo_sk","hd_dep_count","hd_vehicle_count"]
-                                    <-Reducer 8 [SIMPLE_EDGE]
-                                      SHUFFLE [RS_27]
-                                        PartitionCols:_col2
-                                        Merge Join Operator [MERGEJOIN_83] (rows=696954748 width=88)
-                                          Conds:RS_24._col4=RS_25._col0(Inner),Output:["_col1","_col2","_col3","_col5","_col6","_col7","_col8"]
-                                        <-Map 13 [SIMPLE_EDGE]
-                                          SHUFFLE [RS_25]
-                                            PartitionCols:_col0
-                                            Select Operator [SEL_14] (rows=852 width=1910)
-                                              Output:["_col0"]
-                                              Filter Operator [FIL_78] (rows=852 width=1910)
-                                                predicate:((s_city) IN ('Rosedale', 'Bethlehem') and s_store_sk is not null)
-                                                TableScan [TS_12] (rows=1704 width=1910)
-                                                  default@store,store,Tbl:COMPLETE,Col:NONE,Output:["s_store_sk","s_city"]
-                                        <-Reducer 7 [SIMPLE_EDGE]
-                                          SHUFFLE [RS_24]
-                                            PartitionCols:_col4
-                                            Merge Join Operator [MERGEJOIN_82] (rows=633595212 width=88)
-                                              Conds:RS_21._col0=RS_22._col0(Inner),Output:["_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8"]
-                                            <-Map 12 [SIMPLE_EDGE]
-                                              SHUFFLE [RS_22]
-                                                PartitionCols:_col0
-                                                Select Operator [SEL_11] (rows=4058 width=1119)
-                                                  Output:["_col0"]
-                                                  Filter Operator [FIL_77] (rows=4058 width=1119)
-                                                    predicate:((d_year) IN (1998, 1999, 2000) and d_dom BETWEEN 1 AND 2 and d_date_sk is not null)
-                                                    TableScan [TS_9] (rows=73049 width=1119)
-                                                      default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_dom"]
-                                            <-Map 6 [SIMPLE_EDGE]
-                                              SHUFFLE [RS_21]
-                                                PartitionCols:_col0
-                                                Select Operator [SEL_8] (rows=575995635 width=88)
-                                                  Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8"]
-                                                  Filter Operator [FIL_76] (rows=575995635 width=88)
-                                                    predicate:(ss_sold_date_sk is not null and ss_store_sk is not null and ss_hdemo_sk is not null and ss_addr_sk is not null and ss_customer_sk is not null)
-                                                    TableScan [TS_6] (rows=575995635 width=88)
-                                                      default@store_sales,store_sales,Tbl:COMPLETE,Col:NONE,Output:["ss_sold_date_sk","ss_customer_sk","ss_hdemo_sk","ss_addr_sk","ss_store_sk","ss_ticket_number","ss_ext_sales_price","ss_ext_list_price","ss_ext_tax"]
+                              Merge Join Operator [MERGEJOIN_85] (rows=843315281 width=88)
+                                Conds:RS_30._col3=RS_31._col0(Inner),Output:["_col1","_col3","_col5","_col6","_col7","_col8","_col18"]
+                              <-Map 15 [SIMPLE_EDGE]
+                                SHUFFLE [RS_31]
+                                  PartitionCols:_col0
+                                  Select Operator [SEL_20] (rows=40000000 width=1014)
+                                    Output:["_col0","_col1"]
+                                    Filter Operator [FIL_80] (rows=40000000 width=1014)
+                                      predicate:ca_address_sk is not null
+                                      TableScan [TS_18] (rows=40000000 width=1014)
+                                        default@customer_address,customer_address,Tbl:COMPLETE,Col:NONE,Output:["ca_address_sk","ca_city"]
+                              <-Reducer 9 [SIMPLE_EDGE]
+                                SHUFFLE [RS_30]
+                                  PartitionCols:_col3
+                                  Merge Join Operator [MERGEJOIN_84] (rows=766650239 width=88)
+                                    Conds:RS_27._col2=RS_28._col0(Inner),Output:["_col1","_col3","_col5","_col6","_col7","_col8"]
+                                  <-Map 14 [SIMPLE_EDGE]
+                                    SHUFFLE [RS_28]
+                                      PartitionCols:_col0
+                                      Select Operator [SEL_17] (rows=7200 width=107)
+                                        Output:["_col0"]
+                                        Filter Operator [FIL_79] (rows=7200 width=107)
+                                          predicate:(((hd_dep_count = 4) or (hd_vehicle_count = 2)) and hd_demo_sk is not null)
+                                          TableScan [TS_15] (rows=7200 width=107)
+                                            default@household_demographics,household_demographics,Tbl:COMPLETE,Col:NONE,Output:["hd_demo_sk","hd_dep_count","hd_vehicle_count"]
+                                  <-Reducer 8 [SIMPLE_EDGE]
+                                    SHUFFLE [RS_27]
+                                      PartitionCols:_col2
+                                      Merge Join Operator [MERGEJOIN_83] (rows=696954748 width=88)
+                                        Conds:RS_24._col4=RS_25._col0(Inner),Output:["_col1","_col2","_col3","_col5","_col6","_col7","_col8"]
+                                      <-Map 13 [SIMPLE_EDGE]
+                                        SHUFFLE [RS_25]
+                                          PartitionCols:_col0
+                                          Select Operator [SEL_14] (rows=852 width=1910)
+                                            Output:["_col0"]
+                                            Filter Operator [FIL_78] (rows=852 width=1910)
+                                              predicate:((s_city) IN ('Rosedale', 'Bethlehem') and s_store_sk is not null)
+                                              TableScan [TS_12] (rows=1704 width=1910)
+                                                default@store,store,Tbl:COMPLETE,Col:NONE,Output:["s_store_sk","s_city"]
+                                      <-Reducer 7 [SIMPLE_EDGE]
+                                        SHUFFLE [RS_24]
+                                          PartitionCols:_col4
+                                          Merge Join Operator [MERGEJOIN_82] (rows=633595212 width=88)
+                                            Conds:RS_21._col0=RS_22._col0(Inner),Output:["_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8"]
+                                          <-Map 12 [SIMPLE_EDGE]
+                                            SHUFFLE [RS_22]
+                                              PartitionCols:_col0
+                                              Select Operator [SEL_11] (rows=4058 width=1119)
+                                                Output:["_col0"]
+                                                Filter Operator [FIL_77] (rows=4058 width=1119)
+                                                  predicate:((d_year) IN (1998, 1999, 2000) and d_dom BETWEEN 1 AND 2 and d_date_sk is not null)
+                                                  TableScan [TS_9] (rows=73049 width=1119)
+                                                    default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_dom"]
+                                          <-Map 6 [SIMPLE_EDGE]
+                                            SHUFFLE [RS_21]
+                                              PartitionCols:_col0
+                                              Select Operator [SEL_8] (rows=575995635 width=88)
+                                                Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8"]
+                                                Filter Operator [FIL_76] (rows=575995635 width=88)
+                                                  predicate:(ss_sold_date_sk is not null and ss_store_sk is not null and ss_hdemo_sk is not null and ss_addr_sk is not null and ss_customer_sk is not null)
+                                                  TableScan [TS_6] (rows=575995635 width=88)
+                                                    default@store_sales,store_sales,Tbl:COMPLETE,Col:NONE,Output:["ss_sold_date_sk","ss_customer_sk","ss_hdemo_sk","ss_addr_sk","ss_store_sk","ss_ticket_number","ss_ext_sales_price","ss_ext_list_price","ss_ext_tax"]
                   <-Reducer 2 [SIMPLE_EDGE]
                     SHUFFLE [RS_42]
                       PartitionCols:_col0

http://git-wip-us.apache.org/repos/asf/hive/blob/78d8b337/ql/src/test/results/clientpositive/perf/query69.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/query69.q.out b/ql/src/test/results/clientpositive/perf/query69.q.out
index 90224ce..8bd154f 100644
--- a/ql/src/test/results/clientpositive/perf/query69.q.out
+++ b/ql/src/test/results/clientpositive/perf/query69.q.out
@@ -167,7 +167,7 @@ Stage-0
                             SHUFFLE [RS_64]
                               PartitionCols:_col0
                               Select Operator [SEL_49] (rows=191662558 width=88)
-                                Output:["_col0","_col10","_col6","_col7","_col8","_col9"]
+                                Output:["_col0","_col6","_col7","_col8","_col9","_col10"]
                                 Filter Operator [FIL_48] (rows=191662558 width=88)
                                   predicate:_col13 is null
                                   Select Operator [SEL_47] (rows=383325116 width=88)

http://git-wip-us.apache.org/repos/asf/hive/blob/78d8b337/ql/src/test/results/clientpositive/perf/query7.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/query7.q.out b/ql/src/test/results/clientpositive/perf/query7.q.out
index 65478ab..af77d9a 100644
--- a/ql/src/test/results/clientpositive/perf/query7.q.out
+++ b/ql/src/test/results/clientpositive/perf/query7.q.out
@@ -31,68 +31,66 @@ Stage-0
                   PartitionCols:_col0
                   Group By Operator [GBY_28] (rows=843315281 width=88)
                     Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["avg(_col4)","avg(_col5)","avg(_col7)","avg(_col6)"],keys:_col18
-                    Select Operator [SEL_27] (rows=843315281 width=88)
-                      Output:["_col18","_col4","_col5","_col7","_col6"]
-                      Merge Join Operator [MERGEJOIN_58] (rows=843315281 width=88)
-                        Conds:RS_24._col1=RS_25._col0(Inner),Output:["_col4","_col5","_col6","_col7","_col18"]
-                      <-Map 11 [SIMPLE_EDGE]
-                        SHUFFLE [RS_25]
-                          PartitionCols:_col0
-                          Select Operator [SEL_14] (rows=462000 width=1436)
-                            Output:["_col0","_col1"]
-                            Filter Operator [FIL_54] (rows=462000 width=1436)
-                              predicate:i_item_sk is not null
-                              TableScan [TS_12] (rows=462000 width=1436)
-                                default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_item_id"]
-                      <-Reducer 4 [SIMPLE_EDGE]
-                        SHUFFLE [RS_24]
-                          PartitionCols:_col1
-                          Merge Join Operator [MERGEJOIN_57] (rows=766650239 width=88)
-                            Conds:RS_21._col3=RS_22._col0(Inner),Output:["_col1","_col4","_col5","_col6","_col7"]
-                          <-Map 10 [SIMPLE_EDGE]
-                            SHUFFLE [RS_22]
-                              PartitionCols:_col0
-                              Select Operator [SEL_11] (rows=2300 width=1179)
-                                Output:["_col0"]
-                                Filter Operator [FIL_53] (rows=2300 width=1179)
-                                  predicate:(((p_channel_email = 'N') or (p_channel_event = 'N')) and p_promo_sk is not null)
-                                  TableScan [TS_9] (rows=2300 width=1179)
-                                    default@promotion,promotion,Tbl:COMPLETE,Col:NONE,Output:["p_promo_sk","p_channel_email","p_channel_event"]
-                          <-Reducer 3 [SIMPLE_EDGE]
-                            SHUFFLE [RS_21]
-                              PartitionCols:_col3
-                              Merge Join Operator [MERGEJOIN_56] (rows=696954748 width=88)
-                                Conds:RS_18._col0=RS_19._col0(Inner),Output:["_col1","_col3","_col4","_col5","_col6","_col7"]
-                              <-Map 9 [SIMPLE_EDGE]
-                                SHUFFLE [RS_19]
-                                  PartitionCols:_col0
-                                  Select Operator [SEL_8] (rows=36524 width=1119)
-                                    Output:["_col0"]
-                                    Filter Operator [FIL_52] (rows=36524 width=1119)
-                                      predicate:((d_year = 1998) and d_date_sk is not null)
-                                      TableScan [TS_6] (rows=73049 width=1119)
-                                        default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year"]
-                              <-Reducer 2 [SIMPLE_EDGE]
-                                SHUFFLE [RS_18]
-                                  PartitionCols:_col0
-                                  Merge Join Operator [MERGEJOIN_55] (rows=633595212 width=88)
-                                    Conds:RS_15._col2=RS_16._col0(Inner),Output:["_col0","_col1","_col3","_col4","_col5","_col6","_col7"]
-                                  <-Map 1 [SIMPLE_EDGE]
-                                    SHUFFLE [RS_15]
-                                      PartitionCols:_col2
-                                      Select Operator [SEL_2] (rows=575995635 width=88)
-                                        Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
-                                        Filter Operator [FIL_50] (rows=575995635 width=88)
-                                          predicate:(ss_cdemo_sk is not null and ss_sold_date_sk is not null and ss_item_sk is not null and ss_promo_sk is not null)
-                                          TableScan [TS_0] (rows=575995635 width=88)
-                                            default@store_sales,store_sales,Tbl:COMPLETE,Col:NONE,Output:["ss_sold_date_sk","ss_item_sk","ss_cdemo_sk","ss_promo_sk","ss_quantity","ss_list_price","ss_sales_price","ss_coupon_amt"]
-                                  <-Map 8 [SIMPLE_EDGE]
-                                    SHUFFLE [RS_16]
-                                      PartitionCols:_col0
-                                      Select Operator [SEL_5] (rows=232725 width=385)
-                                        Output:["_col0"]
-                                        Filter Operator [FIL_51] (rows=232725 width=385)
-                                          predicate:((cd_gender = 'F') and (cd_marital_status = 'W') and (cd_education_status = 'Primary') and cd_demo_sk is not null)
-                                          TableScan [TS_3] (rows=1861800 width=385)
-                                            default@customer_demographics,customer_demographics,Tbl:COMPLETE,Col:NONE,Output:["cd_demo_sk","cd_gender","cd_marital_status","cd_education_status"]
+                    Merge Join Operator [MERGEJOIN_58] (rows=843315281 width=88)
+                      Conds:RS_24._col1=RS_25._col0(Inner),Output:["_col4","_col5","_col6","_col7","_col18"]
+                    <-Map 11 [SIMPLE_EDGE]
+                      SHUFFLE [RS_25]
+                        PartitionCols:_col0
+                        Select Operator [SEL_14] (rows=462000 width=1436)
+                          Output:["_col0","_col1"]
+                          Filter Operator [FIL_54] (rows=462000 width=1436)
+                            predicate:i_item_sk is not null
+                            TableScan [TS_12] (rows=462000 width=1436)
+                              default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_item_id"]
+                    <-Reducer 4 [SIMPLE_EDGE]
+                      SHUFFLE [RS_24]
+                        PartitionCols:_col1
+                        Merge Join Operator [MERGEJOIN_57] (rows=766650239 width=88)
+                          Conds:RS_21._col3=RS_22._col0(Inner),Output:["_col1","_col4","_col5","_col6","_col7"]
+                        <-Map 10 [SIMPLE_EDGE]
+                          SHUFFLE [RS_22]
+                            PartitionCols:_col0
+                            Select Operator [SEL_11] (rows=2300 width=1179)
+                              Output:["_col0"]
+                              Filter Operator [FIL_53] (rows=2300 width=1179)
+                                predicate:(((p_channel_email = 'N') or (p_channel_event = 'N')) and p_promo_sk is not null)
+                                TableScan [TS_9] (rows=2300 width=1179)
+                                  default@promotion,promotion,Tbl:COMPLETE,Col:NONE,Output:["p_promo_sk","p_channel_email","p_channel_event"]
+                        <-Reducer 3 [SIMPLE_EDGE]
+                          SHUFFLE [RS_21]
+                            PartitionCols:_col3
+                            Merge Join Operator [MERGEJOIN_56] (rows=696954748 width=88)
+                              Conds:RS_18._col0=RS_19._col0(Inner),Output:["_col1","_col3","_col4","_col5","_col6","_col7"]
+                            <-Map 9 [SIMPLE_EDGE]
+                              SHUFFLE [RS_19]
+                                PartitionCols:_col0
+                                Select Operator [SEL_8] (rows=36524 width=1119)
+                                  Output:["_col0"]
+                                  Filter Operator [FIL_52] (rows=36524 width=1119)
+                                    predicate:((d_year = 1998) and d_date_sk is not null)
+                                    TableScan [TS_6] (rows=73049 width=1119)
+                                      default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year"]
+                            <-Reducer 2 [SIMPLE_EDGE]
+                              SHUFFLE [RS_18]
+                                PartitionCols:_col0
+                                Merge Join Operator [MERGEJOIN_55] (rows=633595212 width=88)
+                                  Conds:RS_15._col2=RS_16._col0(Inner),Output:["_col0","_col1","_col3","_col4","_col5","_col6","_col7"]
+                                <-Map 1 [SIMPLE_EDGE]
+                                  SHUFFLE [RS_15]
+                                    PartitionCols:_col2
+                                    Select Operator [SEL_2] (rows=575995635 width=88)
+                                      Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
+                                      Filter Operator [FIL_50] (rows=575995635 width=88)
+                                        predicate:(ss_cdemo_sk is not null and ss_sold_date_sk is not null and ss_item_sk is not null and ss_promo_sk is not null)
+                                        TableScan [TS_0] (rows=575995635 width=88)
+                                          default@store_sales,store_sales,Tbl:COMPLETE,Col:NONE,Output:["ss_sold_date_sk","ss_item_sk","ss_cdemo_sk","ss_promo_sk","ss_quantity","ss_list_price","ss_sales_price","ss_coupon_amt"]
+                                <-Map 8 [SIMPLE_EDGE]
+                                  SHUFFLE [RS_16]
+                                    PartitionCols:_col0
+                                    Select Operator [SEL_5] (rows=232725 width=385)
+                                      Output:["_col0"]
+                                      Filter Operator [FIL_51] (rows=232725 width=385)
+                                        predicate:((cd_gender = 'F') and (cd_marital_status = 'W') and (cd_education_status = 'Primary') and cd_demo_sk is not null)
+                                        TableScan [TS_3] (rows=1861800 width=385)
+                                          default@customer_demographics,customer_demographics,Tbl:COMPLETE,Col:NONE,Output:["cd_demo_sk","cd_gender","cd_marital_status","cd_education_status"]
 

http://git-wip-us.apache.org/repos/asf/hive/blob/78d8b337/ql/src/test/results/clientpositive/perf/query70.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/query70.q.out b/ql/src/test/results/clientpositive/perf/query70.q.out
index 96fba40..95b740b 100644
--- a/ql/src/test/results/clientpositive/perf/query70.q.out
+++ b/ql/src/test/results/clientpositive/perf/query70.q.out
@@ -143,42 +143,40 @@ Stage-0
                                                     PartitionCols:_col0
                                                     Group By Operator [GBY_25] (rows=696954748 width=88)
                                                       Output:["_col0","_col1"],aggregations:["sum(_col2)"],keys:_col6
-                                                      Select Operator [SEL_24] (rows=696954748 width=88)
-                                                        Output:["_col6","_col2"]
-                                                        Merge Join Operator [MERGEJOIN_89] (rows=696954748 width=88)
-                                                          Conds:RS_21._col1=RS_22._col0(Inner),Output:["_col2","_col6"]
-                                                        <-Map 16 [SIMPLE_EDGE]
-                                                          SHUFFLE [RS_22]
-                                                            PartitionCols:_col0
-                                                            Select Operator [SEL_17] (rows=1704 width=1910)
-                                                              Output:["_col0","_col1"]
-                                                              Filter Operator [FIL_85] (rows=1704 width=1910)
-                                                                predicate:(s_store_sk is not null and s_state is not null)
-                                                                TableScan [TS_15] (rows=1704 width=1910)
-                                                                  default@store,store,Tbl:COMPLETE,Col:NONE,Output:["s_store_sk","s_state"]
-                                                        <-Reducer 11 [SIMPLE_EDGE]
-                                                          SHUFFLE [RS_21]
-                                                            PartitionCols:_col1
-                                                            Merge Join Operator [MERGEJOIN_88] (rows=633595212 width=88)
-                                                              Conds:RS_18._col0=RS_19._col0(Inner),Output:["_col1","_col2"]
-                                                            <-Map 10 [SIMPLE_EDGE]
-                                                              SHUFFLE [RS_18]
-                                                                PartitionCols:_col0
-                                                                Select Operator [SEL_11] (rows=575995635 width=88)
-                                                                  Output:["_col0","_col1","_col2"]
-                                                                  Filter Operator [FIL_83] (rows=575995635 width=88)
-                                                                    predicate:(ss_store_sk is not null and ss_sold_date_sk is not null)
-                                                                    TableScan [TS_9] (rows=575995635 width=88)
-                                                                      default@store_sales,store_sales,Tbl:COMPLETE,Col:NONE,Output:["ss_sold_date_sk","ss_store_sk","ss_net_profit"]
-                                                            <-Map 15 [SIMPLE_EDGE]
-                                                              SHUFFLE [RS_19]
-                                                                PartitionCols:_col0
-                                                                Select Operator [SEL_14] (rows=8116 width=1119)
-                                                                  Output:["_col0"]
-                                                                  Filter Operator [FIL_84] (rows=8116 width=1119)
-                                                                    predicate:(d_month_seq BETWEEN 1212 AND 1223 and d_date_sk is not null)
-                                                                    TableScan [TS_12] (rows=73049 width=1119)
-                                                                      default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_month_seq"]
+                                                      Merge Join Operator [MERGEJOIN_89] (rows=696954748 width=88)
+                                                        Conds:RS_21._col1=RS_22._col0(Inner),Output:["_col2","_col6"]
+                                                      <-Map 16 [SIMPLE_EDGE]
+                                                        SHUFFLE [RS_22]
+                                                          PartitionCols:_col0
+                                                          Select Operator [SEL_17] (rows=1704 width=1910)
+                                                            Output:["_col0","_col1"]
+                                                            Filter Operator [FIL_85] (rows=1704 width=1910)
+                                                              predicate:(s_store_sk is not null and s_state is not null)
+                                                              TableScan [TS_15] (rows=1704 width=1910)
+                                                                default@store,store,Tbl:COMPLETE,Col:NONE,Output:["s_store_sk","s_state"]
+                                                      <-Reducer 11 [SIMPLE_EDGE]
+                                                        SHUFFLE [RS_21]
+                                                          PartitionCols:_col1
+                                                          Merge Join Operator [MERGEJOIN_88] (rows=633595212 width=88)
+                                                            Conds:RS_18._col0=RS_19._col0(Inner),Output:["_col1","_col2"]
+                                                          <-Map 10 [SIMPLE_EDGE]
+                                                            SHUFFLE [RS_18]
+                                                              PartitionCols:_col0
+                                                              Select Operator [SEL_11] (rows=575995635 width=88)
+                                                                Output:["_col0","_col1","_col2"]
+                                                                Filter Operator [FIL_83] (rows=575995635 width=88)
+                                                                  predicate:(ss_store_sk is not null and ss_sold_date_sk is not null)
+                                                                  TableScan [TS_9] (rows=575995635 width=88)
+                                                                    default@store_sales,store_sales,Tbl:COMPLETE,Col:NONE,Output:["ss_sold_date_sk","ss_store_sk","ss_net_profit"]
+                                                          <-Map 15 [SIMPLE_EDGE]
+                                                            SHUFFLE [RS_19]
+                                                              PartitionCols:_col0
+                                                              Select Operator [SEL_14] (rows=8116 width=1119)
+                                                                Output:["_col0"]
+                                                                Filter Operator [FIL_84] (rows=8116 width=1119)
+                                                                  predicate:(d_month_seq BETWEEN 1212 AND 1223 and d_date_sk is not null)
+                                                                  TableScan [TS_12] (rows=73049 width=1119)
+                                                                    default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_month_seq"]
                                 <-Reducer 3 [SIMPLE_EDGE]
                                   SHUFFLE [RS_45]
                                     PartitionCols:_col7

http://git-wip-us.apache.org/repos/asf/hive/blob/78d8b337/ql/src/test/results/clientpositive/perf/query71.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/query71.q.out b/ql/src/test/results/clientpositive/perf/query71.q.out
index 9bb010c..6d85629 100644
--- a/ql/src/test/results/clientpositive/perf/query71.q.out
+++ b/ql/src/test/results/clientpositive/perf/query71.q.out
@@ -32,107 +32,105 @@ Stage-0
                   PartitionCols:_col0, _col1, _col2, _col3
                   Group By Operator [GBY_46] (rows=1341632299 width=108)
                     Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(_col0)"],keys:_col4, _col8, _col9, _col5
-                    Select Operator [SEL_45] (rows=1341632299 width=108)
-                      Output:["_col4","_col8","_col9","_col5","_col0"]
-                      Merge Join Operator [MERGEJOIN_87] (rows=1341632299 width=108)
-                        Conds:RS_42._col2=RS_43._col0(Inner),Output:["_col0","_col4","_col5","_col8","_col9"]
-                      <-Map 16 [SIMPLE_EDGE]
-                        SHUFFLE [RS_43]
-                          PartitionCols:_col0
-                          Select Operator [SEL_38] (rows=86400 width=471)
-                            Output:["_col0","_col1","_col2"]
-                            Filter Operator [FIL_82] (rows=86400 width=471)
-                              predicate:(((t_meal_time = 'breakfast') or (t_meal_time = 'dinner')) and t_time_sk is not null)
-                              TableScan [TS_36] (rows=86400 width=471)
-                                default@time_dim,time_dim,Tbl:COMPLETE,Col:NONE,Output:["t_time_sk","t_hour","t_minute","t_meal_time"]
-                      <-Reducer 4 [SIMPLE_EDGE]
-                        SHUFFLE [RS_42]
-                          PartitionCols:_col2
-                          Merge Join Operator [MERGEJOIN_86] (rows=1219665700 width=108)
-                            Conds:Union 3._col1=RS_40._col0(Inner),Output:["_col0","_col2","_col4","_col5"]
-                          <-Map 15 [SIMPLE_EDGE]
-                            SHUFFLE [RS_40]
-                              PartitionCols:_col0
-                              Select Operator [SEL_35] (rows=231000 width=1436)
+                    Merge Join Operator [MERGEJOIN_87] (rows=1341632299 width=108)
+                      Conds:RS_42._col2=RS_43._col0(Inner),Output:["_col0","_col4","_col5","_col8","_col9"]
+                    <-Map 16 [SIMPLE_EDGE]
+                      SHUFFLE [RS_43]
+                        PartitionCols:_col0
+                        Select Operator [SEL_38] (rows=86400 width=471)
+                          Output:["_col0","_col1","_col2"]
+                          Filter Operator [FIL_82] (rows=86400 width=471)
+                            predicate:(((t_meal_time = 'breakfast') or (t_meal_time = 'dinner')) and t_time_sk is not null)
+                            TableScan [TS_36] (rows=86400 width=471)
+                              default@time_dim,time_dim,Tbl:COMPLETE,Col:NONE,Output:["t_time_sk","t_hour","t_minute","t_meal_time"]
+                    <-Reducer 4 [SIMPLE_EDGE]
+                      SHUFFLE [RS_42]
+                        PartitionCols:_col2
+                        Merge Join Operator [MERGEJOIN_86] (rows=1219665700 width=108)
+                          Conds:Union 3._col1=RS_40._col0(Inner),Output:["_col0","_col2","_col4","_col5"]
+                        <-Map 15 [SIMPLE_EDGE]
+                          SHUFFLE [RS_40]
+                            PartitionCols:_col0
+                            Select Operator [SEL_35] (rows=231000 width=1436)
+                              Output:["_col0","_col1","_col2"]
+                              Filter Operator [FIL_81] (rows=231000 width=1436)
+                                predicate:((i_manager_id = 1) and i_item_sk is not null)
+                                TableScan [TS_33] (rows=462000 width=1436)
+                                  default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_brand_id","i_brand","i_manager_id"]
+                        <-Union 3 [SIMPLE_EDGE]
+                          <-Reducer 10 [CONTAINS]
+                            Reduce Output Operator [RS_39]
+                              PartitionCols:_col1
+                              Select Operator [SEL_19] (rows=316788826 width=135)
                                 Output:["_col0","_col1","_col2"]
-                                Filter Operator [FIL_81] (rows=231000 width=1436)
-                                  predicate:((i_manager_id = 1) and i_item_sk is not null)
-                                  TableScan [TS_33] (rows=462000 width=1436)
-                                    default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_brand_id","i_brand","i_manager_id"]
-                          <-Union 3 [SIMPLE_EDGE]
-                            <-Reducer 10 [CONTAINS]
-                              Reduce Output Operator [RS_39]
-                                PartitionCols:_col1
-                                Select Operator [SEL_19] (rows=316788826 width=135)
-                                  Output:["_col0","_col1","_col2"]
-                                  Merge Join Operator [MERGEJOIN_84] (rows=316788826 width=135)
-                                    Conds:RS_16._col0=RS_17._col0(Inner),Output:["_col1","_col2","_col3"]
-                                  <-Map 11 [SIMPLE_EDGE]
-                                    SHUFFLE [RS_17]
-                                      PartitionCols:_col0
-                                      Select Operator [SEL_15] (rows=18262 width=1119)
-                                        Output:["_col0"]
-                                        Filter Operator [FIL_78] (rows=18262 width=1119)
-                                          predicate:((d_moy = 12) and (d_year = 2001) and d_date_sk is not null)
-                                          TableScan [TS_13] (rows=73049 width=1119)
-                                            default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_moy"]
-                                  <-Map 9 [SIMPLE_EDGE]
-                                    SHUFFLE [RS_16]
-                                      PartitionCols:_col0
-                                      Select Operator [SEL_12] (rows=287989836 width=135)
-                                        Output:["_col0","_col1","_col2","_col3"]
-                                        Filter Operator [FIL_77] (rows=287989836 width=135)
-                                          predicate:(cs_sold_date_sk is not null and cs_item_sk is not null and cs_sold_time_sk is not null)
-                                          TableScan [TS_10] (rows=287989836 width=135)
-                                            default@catalog_sales,catalog_sales,Tbl:COMPLETE,Col:NONE,Output:["cs_sold_date_sk","cs_sold_time_sk","cs_item_sk","cs_ext_sales_price"]
-                            <-Reducer 13 [CONTAINS]
-                              Reduce Output Operator [RS_39]
-                                PartitionCols:_col1
-                                Select Operator [SEL_31] (rows=633595212 width=88)
-                                  Output:["_col0","_col1","_col2"]
-                                  Merge Join Operator [MERGEJOIN_85] (rows=633595212 width=88)
-                                    Conds:RS_28._col0=RS_29._col0(Inner),Output:["_col1","_col2","_col3"]
-                                  <-Map 12 [SIMPLE_EDGE]
-                                    SHUFFLE [RS_28]
-                                      PartitionCols:_col0
-                                      Select Operator [SEL_24] (rows=575995635 width=88)
-                                        Output:["_col0","_col1","_col2","_col3"]
-                                        Filter Operator [FIL_79] (rows=575995635 width=88)
-                                          predicate:(ss_sold_date_sk is not null and ss_item_sk is not null and ss_sold_time_sk is not null)
-                                          TableScan [TS_22] (rows=575995635 width=88)
-                                            default@store_sales,store_sales,Tbl:COMPLETE,Col:NONE,Output:["ss_sold_date_sk","ss_sold_time_sk","ss_item_sk","ss_ext_sales_price"]
-                                  <-Map 14 [SIMPLE_EDGE]
-                                    SHUFFLE [RS_29]
-                                      PartitionCols:_col0
-                                      Select Operator [SEL_27] (rows=18262 width=1119)
-                                        Output:["_col0"]
-                                        Filter Operator [FIL_80] (rows=18262 width=1119)
-                                          predicate:((d_moy = 12) and (d_year = 2001) and d_date_sk is not null)
-                                          TableScan [TS_25] (rows=73049 width=1119)
-                                            default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_moy"]
-                            <-Reducer 2 [CONTAINS]
-                              Reduce Output Operator [RS_39]
-                                PartitionCols:_col1
-                                Select Operator [SEL_9] (rows=158402938 width=135)
-                                  Output:["_col0","_col1","_col2"]
-                                  Merge Join Operator [MERGEJOIN_83] (rows=158402938 width=135)
-                                    Conds:RS_6._col0=RS_7._col0(Inner),Output:["_col1","_col2","_col3"]
-                                  <-Map 1 [SIMPLE_EDGE]
-                                    SHUFFLE [RS_6]
-                                      PartitionCols:_col0
-                                      Select Operator [SEL_2] (rows=144002668 width=135)
-                                        Output:["_col0","_col1","_col2","_col3"]
-                                        Filter Operator [FIL_75] (rows=144002668 width=135)
-                                          predicate:(ws_sold_date_sk is not null and ws_item_sk is not null and ws_sold_time_sk is not null)
-                                          TableScan [TS_0] (rows=144002668 width=135)
-                                            default@web_sales,web_sales,Tbl:COMPLETE,Col:NONE,Output:["ws_sold_date_sk","ws_sold_time_sk","ws_item_sk","ws_ext_sales_price"]
-                                  <-Map 8 [SIMPLE_EDGE]
-                                    SHUFFLE [RS_7]
-                                      PartitionCols:_col0
-                                      Select Operator [SEL_5] (rows=18262 width=1119)
-                                        Output:["_col0"]
-                                        Filter Operator [FIL_76] (rows=18262 width=1119)
-                                          predicate:((d_moy = 12) and (d_year = 2001) and d_date_sk is not null)
-                                          TableScan [TS_3] (rows=73049 width=1119)
-                                            default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_moy"]
+                                Merge Join Operator [MERGEJOIN_84] (rows=316788826 width=135)
+                                  Conds:RS_16._col0=RS_17._col0(Inner),Output:["_col1","_col2","_col3"]
+                                <-Map 11 [SIMPLE_EDGE]
+                                  SHUFFLE [RS_17]
+                                    PartitionCols:_col0
+                                    Select Operator [SEL_15] (rows=18262 width=1119)
+                                      Output:["_col0"]
+                                      Filter Operator [FIL_78] (rows=18262 width=1119)
+                                        predicate:((d_moy = 12) and (d_year = 2001) and d_date_sk is not null)
+                                        TableScan [TS_13] (rows=73049 width=1119)
+                                          default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_moy"]
+                                <-Map 9 [SIMPLE_EDGE]
+                                  SHUFFLE [RS_16]
+                                    PartitionCols:_col0
+                                    Select Operator [SEL_12] (rows=287989836 width=135)
+                                      Output:["_col0","_col1","_col2","_col3"]
+                                      Filter Operator [FIL_77] (rows=287989836 width=135)
+                                        predicate:(cs_sold_date_sk is not null and cs_item_sk is not null and cs_sold_time_sk is not null)
+                                        TableScan [TS_10] (rows=287989836 width=135)
+                                          default@catalog_sales,catalog_sales,Tbl:COMPLETE,Col:NONE,Output:["cs_sold_date_sk","cs_sold_time_sk","cs_item_sk","cs_ext_sales_price"]
+                          <-Reducer 13 [CONTAINS]
+                            Reduce Output Operator [RS_39]
+                              PartitionCols:_col1
+                              Select Operator [SEL_31] (rows=633595212 width=88)
+                                Output:["_col0","_col1","_col2"]
+                                Merge Join Operator [MERGEJOIN_85] (rows=633595212 width=88)
+                                  Conds:RS_28._col0=RS_29._col0(Inner),Output:["_col1","_col2","_col3"]
+                                <-Map 12 [SIMPLE_EDGE]
+                                  SHUFFLE [RS_28]
+                                    PartitionCols:_col0
+                                    Select Operator [SEL_24] (rows=575995635 width=88)
+                                      Output:["_col0","_col1","_col2","_col3"]
+                                      Filter Operator [FIL_79] (rows=575995635 width=88)
+                                        predicate:(ss_sold_date_sk is not null and ss_item_sk is not null and ss_sold_time_sk is not null)
+                                        TableScan [TS_22] (rows=575995635 width=88)
+                                          default@store_sales,store_sales,Tbl:COMPLETE,Col:NONE,Output:["ss_sold_date_sk","ss_sold_time_sk","ss_item_sk","ss_ext_sales_price"]
+                                <-Map 14 [SIMPLE_EDGE]
+                                  SHUFFLE [RS_29]
+                                    PartitionCols:_col0
+                                    Select Operator [SEL_27] (rows=18262 width=1119)
+                                      Output:["_col0"]
+                                      Filter Operator [FIL_80] (rows=18262 width=1119)
+                                        predicate:((d_moy = 12) and (d_year = 2001) and d_date_sk is not null)
+                                        TableScan [TS_25] (rows=73049 width=1119)
+                                          default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_moy"]
+                          <-Reducer 2 [CONTAINS]
+                            Reduce Output Operator [RS_39]
+                              PartitionCols:_col1
+                              Select Operator [SEL_9] (rows=158402938 width=135)
+                                Output:["_col0","_col1","_col2"]
+                                Merge Join Operator [MERGEJOIN_83] (rows=158402938 width=135)
+                                  Conds:RS_6._col0=RS_7._col0(Inner),Output:["_col1","_col2","_col3"]
+                                <-Map 1 [SIMPLE_EDGE]
+                                  SHUFFLE [RS_6]
+                                    PartitionCols:_col0
+                                    Select Operator [SEL_2] (rows=144002668 width=135)
+                                      Output:["_col0","_col1","_col2","_col3"]
+                                      Filter Operator [FIL_75] (rows=144002668 width=135)
+                                        predicate:(ws_sold_date_sk is not null and ws_item_sk is not null and ws_sold_time_sk is not null)
+                                        TableScan [TS_0] (rows=144002668 width=135)
+                                          default@web_sales,web_sales,Tbl:COMPLETE,Col:NONE,Output:["ws_sold_date_sk","ws_sold_time_sk","ws_item_sk","ws_ext_sales_price"]
+                                <-Map 8 [SIMPLE_EDGE]
+                                  SHUFFLE [RS_7]
+                                    PartitionCols:_col0
+                                    Select Operator [SEL_5] (rows=18262 width=1119)
+                                      Output:["_col0"]
+                                      Filter Operator [FIL_76] (rows=18262 width=1119)
+                                        predicate:((d_moy = 12) and (d_year = 2001) and d_date_sk is not null)
+                                        TableScan [TS_3] (rows=73049 width=1119)
+                                          default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_moy"]
 

http://git-wip-us.apache.org/repos/asf/hive/blob/78d8b337/ql/src/test/results/clientpositive/perf/query72.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/query72.q.out b/ql/src/test/results/clientpositive/perf/query72.q.out
index 828aa28..58e8174 100644
--- a/ql/src/test/results/clientpositive/perf/query72.q.out
+++ b/ql/src/test/results/clientpositive/perf/query72.q.out
@@ -122,7 +122,7 @@ Stage-0
                             SHUFFLE [RS_61]
                               PartitionCols:_col5
                               Select Operator [SEL_55] (rows=68592431 width=135)
-                                Output:["_col13","_col15","_col22","_col4","_col5","_col6"]
+                                Output:["_col4","_col5","_col6","_col13","_col15","_col22"]
                                 Filter Operator [FIL_54] (rows=68592431 width=135)
                                   predicate:(UDFToDouble(_col27) > (UDFToDouble(_col21) + 5.0))
                                   Select Operator [SEL_53] (rows=205777294 width=135)
@@ -226,7 +226,7 @@ Stage-0
                                                               SHUFFLE [RS_32]
                                                                 PartitionCols:_col0
                                                                 Select Operator [SEL_10] (rows=105596275 width=135)
-                                                                  Output:["_col0","_col1","_col10","_col2","_col3","_col4","_col5","_col6","_col8"]
+                                                                  Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col8","_col10"]
                                                                   Filter Operator [FIL_9] (rows=105596275 width=135)
                                                                     predicate:(_col11 < _col7)
                                                                     Merge Join Operator [MERGEJOIN_134] (rows=316788826 width=135)

http://git-wip-us.apache.org/repos/asf/hive/blob/78d8b337/ql/src/test/results/clientpositive/perf/query79.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/query79.q.out b/ql/src/test/results/clientpositive/perf/query79.q.out
index 6ce9592..4955745 100644
--- a/ql/src/test/results/clientpositive/perf/query79.q.out
+++ b/ql/src/test/results/clientpositive/perf/query79.q.out
@@ -49,54 +49,52 @@ Stage-0
                           PartitionCols:_col0, _col1, _col2, _col3
                           Group By Operator [GBY_25] (rows=766650239 width=88)
                             Output:["_col0","_col1","_col2","_col3","_col4","_col5"],aggregations:["sum(_col6)","sum(_col7)"],keys:_col1, _col3, _col5, _col13
-                            Select Operator [SEL_24] (rows=766650239 width=88)
-                              Output:["_col1","_col3","_col5","_col13","_col6","_col7"]
-                              Merge Join Operator [MERGEJOIN_59] (rows=766650239 width=88)
-                                Conds:RS_21._col2=RS_22._col0(Inner),Output:["_col1","_col3","_col5","_col6","_col7","_col13"]
-                              <-Map 11 [SIMPLE_EDGE]
-                                SHUFFLE [RS_22]
-                                  PartitionCols:_col0
-                                  Select Operator [SEL_14] (rows=6000 width=107)
-                                    Output:["_col0"]
-                                    Filter Operator [FIL_56] (rows=6000 width=107)
-                                      predicate:(((hd_dep_count = 8) or (hd_vehicle_count > 0)) and hd_demo_sk is not null)
-                                      TableScan [TS_12] (rows=7200 width=107)
-                                        default@household_demographics,household_demographics,Tbl:COMPLETE,Col:NONE,Output:["hd_demo_sk","hd_dep_count","hd_vehicle_count"]
-                              <-Reducer 6 [SIMPLE_EDGE]
-                                SHUFFLE [RS_21]
-                                  PartitionCols:_col2
-                                  Merge Join Operator [MERGEJOIN_58] (rows=696954748 width=88)
-                                    Conds:RS_18._col4=RS_19._col0(Inner),Output:["_col1","_col2","_col3","_col5","_col6","_col7","_col13"]
-                                  <-Map 10 [SIMPLE_EDGE]
-                                    SHUFFLE [RS_19]
-                                      PartitionCols:_col0
-                                      Select Operator [SEL_11] (rows=189 width=1910)
-                                        Output:["_col0","_col2"]
-                                        Filter Operator [FIL_55] (rows=189 width=1910)
-                                          predicate:(s_number_employees BETWEEN 200 AND 295 and s_store_sk is not null)
-                                          TableScan [TS_9] (rows=1704 width=1910)
-                                            default@store,store,Tbl:COMPLETE,Col:NONE,Output:["s_store_sk","s_number_employees","s_city"]
-                                  <-Reducer 5 [SIMPLE_EDGE]
-                                    SHUFFLE [RS_18]
-                                      PartitionCols:_col4
-                                      Merge Join Operator [MERGEJOIN_57] (rows=633595212 width=88)
-                                        Conds:RS_15._col0=RS_16._col0(Inner),Output:["_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
-                                      <-Map 4 [SIMPLE_EDGE]
-                                        SHUFFLE [RS_15]
-                                          PartitionCols:_col0
-                                          Select Operator [SEL_5] (rows=575995635 width=88)
-                                            Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
-                                            Filter Operator [FIL_53] (rows=575995635 width=88)
-                                              predicate:(ss_sold_date_sk is not null and ss_store_sk is not null and ss_hdemo_sk is not null and ss_customer_sk is not null)
-                                              TableScan [TS_3] (rows=575995635 width=88)
-                                                default@store_sales,store_sales,Tbl:COMPLETE,Col:NONE,Output:["ss_sold_date_sk","ss_customer_sk","ss_hdemo_sk","ss_addr_sk","ss_store_sk","ss_ticket_number","ss_coupon_amt","ss_net_profit"]
-                                      <-Map 9 [SIMPLE_EDGE]
-                                        SHUFFLE [RS_16]
-                                          PartitionCols:_col0
-                                          Select Operator [SEL_8] (rows=18262 width=1119)
-                                            Output:["_col0"]
-                                            Filter Operator [FIL_54] (rows=18262 width=1119)
-                                              predicate:((d_year) IN (1998, 1999, 2000) and (d_dow = 1) and d_date_sk is not null)
-                                              TableScan [TS_6] (rows=73049 width=1119)
-                                                default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_dow"]
+                            Merge Join Operator [MERGEJOIN_59] (rows=766650239 width=88)
+                              Conds:RS_21._col2=RS_22._col0(Inner),Output:["_col1","_col3","_col5","_col6","_col7","_col13"]
+                            <-Map 11 [SIMPLE_EDGE]
+                              SHUFFLE [RS_22]
+                                PartitionCols:_col0
+                                Select Operator [SEL_14] (rows=6000 width=107)
+                                  Output:["_col0"]
+                                  Filter Operator [FIL_56] (rows=6000 width=107)
+                                    predicate:(((hd_dep_count = 8) or (hd_vehicle_count > 0)) and hd_demo_sk is not null)
+                                    TableScan [TS_12] (rows=7200 width=107)
+                                      default@household_demographics,household_demographics,Tbl:COMPLETE,Col:NONE,Output:["hd_demo_sk","hd_dep_count","hd_vehicle_count"]
+                            <-Reducer 6 [SIMPLE_EDGE]
+                              SHUFFLE [RS_21]
+                                PartitionCols:_col2
+                                Merge Join Operator [MERGEJOIN_58] (rows=696954748 width=88)
+                                  Conds:RS_18._col4=RS_19._col0(Inner),Output:["_col1","_col2","_col3","_col5","_col6","_col7","_col13"]
+                                <-Map 10 [SIMPLE_EDGE]
+                                  SHUFFLE [RS_19]
+                                    PartitionCols:_col0
+                                    Select Operator [SEL_11] (rows=189 width=1910)
+                                      Output:["_col0","_col2"]
+                                      Filter Operator [FIL_55] (rows=189 width=1910)
+                                        predicate:(s_number_employees BETWEEN 200 AND 295 and s_store_sk is not null)
+                                        TableScan [TS_9] (rows=1704 width=1910)
+                                          default@store,store,Tbl:COMPLETE,Col:NONE,Output:["s_store_sk","s_number_employees","s_city"]
+                                <-Reducer 5 [SIMPLE_EDGE]
+                                  SHUFFLE [RS_18]
+                                    PartitionCols:_col4
+                                    Merge Join Operator [MERGEJOIN_57] (rows=633595212 width=88)
+                                      Conds:RS_15._col0=RS_16._col0(Inner),Output:["_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
+                                    <-Map 4 [SIMPLE_EDGE]
+                                      SHUFFLE [RS_15]
+                                        PartitionCols:_col0
+                                        Select Operator [SEL_5] (rows=575995635 width=88)
+                                          Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
+                                          Filter Operator [FIL_53] (rows=575995635 width=88)
+                                            predicate:(ss_sold_date_sk is not null and ss_store_sk is not null and ss_hdemo_sk is not null and ss_customer_sk is not null)
+                                            TableScan [TS_3] (rows=575995635 width=88)
+                                              default@store_sales,store_sales,Tbl:COMPLETE,Col:NONE,Output:["ss_sold_date_sk","ss_customer_sk","ss_hdemo_sk","ss_addr_sk","ss_store_sk","ss_ticket_number","ss_coupon_amt","ss_net_profit"]
+                                    <-Map 9 [SIMPLE_EDGE]
+                                      SHUFFLE [RS_16]
+                                        PartitionCols:_col0
+                                        Select Operator [SEL_8] (rows=18262 width=1119)
+                                          Output:["_col0"]
+                                          Filter Operator [FIL_54] (rows=18262 width=1119)
+                                            predicate:((d_year) IN (1998, 1999, 2000) and (d_dow = 1) and d_date_sk is not null)
+                                            TableScan [TS_6] (rows=73049 width=1119)
+                                              default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_dow"]