You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by jd...@apache.org on 2016/05/05 20:10:57 UTC

[18/20] hive git commit: HIVE-13639: CBO rule to pull up constants through Union (Jesus Camacho Rodriguez, reviewed by Ashutosh Chauhan)

http://git-wip-us.apache.org/repos/asf/hive/blob/09271872/ql/src/test/results/clientpositive/perf/query75.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/query75.q.out b/ql/src/test/results/clientpositive/perf/query75.q.out
index 15c46c2..731ff62 100644
--- a/ql/src/test/results/clientpositive/perf/query75.q.out
+++ b/ql/src/test/results/clientpositive/perf/query75.q.out
@@ -41,363 +41,367 @@ Stage-0
           <-Reducer 7 [SIMPLE_EDGE]
             SHUFFLE [RS_153]
               Select Operator [SEL_152] (rows=169103 width=1436)
-                Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9"]
+                Output:["_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9"]
                 Filter Operator [FIL_151] (rows=169103 width=1436)
                   predicate:(UDFToDouble((CAST( _col5 AS decimal(17,2)) / CAST( _col12 AS decimal(17,2)))) < 0.9)
                   Merge Join Operator [MERGEJOIN_259] (rows=507310 width=1436)
-                    Conds:RS_148._col1, _col2, _col3, _col4=RS_149._col1, _col2, _col3, _col4(Inner),Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col12","_col13"]
+                    Conds:RS_148._col1, _col2, _col3, _col4=RS_149._col1, _col2, _col3, _col4(Inner),Output:["_col1","_col2","_col3","_col4","_col5","_col6","_col12","_col13"]
                   <-Reducer 31 [SIMPLE_EDGE]
                     SHUFFLE [RS_149]
                       PartitionCols:_col1, _col2, _col3, _col4
-                      Group By Operator [GBY_146] (rows=461191 width=1436)
-                        Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"],keys:KEY._col0, KEY._col1, KEY._col2, KEY._col3, KEY._col4
-                      <-Union 30 [SIMPLE_EDGE]
-                        <-Reducer 29 [CONTAINS]
-                          Reduce Output Operator [RS_145]
-                            PartitionCols:_col0, _col1, _col2, _col3, _col4
-                            Group By Operator [GBY_144] (rows=922383 width=1436)
-                              Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"],aggregations:["sum(_col5)","sum(_col6)"],keys:_col0, _col1, _col2, _col3, _col4
-                              Select Operator [SEL_142] (rows=922383 width=1436)
-                                Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
-                                Select Operator [SEL_95] (rows=307461 width=1436)
+                      Select Operator [SEL_147] (rows=461191 width=1436)
+                        Output:["_col1","_col2","_col3","_col4","_col5","_col6"]
+                        Group By Operator [GBY_146] (rows=461191 width=1436)
+                          Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"],keys:2001, KEY._col1, KEY._col2, KEY._col3, KEY._col4
+                        <-Union 30 [SIMPLE_EDGE]
+                          <-Reducer 29 [CONTAINS]
+                            Reduce Output Operator [RS_145]
+                              PartitionCols:2001, _col1, _col2, _col3, _col4
+                              Group By Operator [GBY_144] (rows=922383 width=1436)
+                                Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"],aggregations:["sum(_col5)","sum(_col6)"],keys:2001, _col1, _col2, _col3, _col4
+                                Select Operator [SEL_142] (rows=922383 width=1436)
                                   Output:["_col1","_col2","_col3","_col4","_col5","_col6"]
-                                  Merge Join Operator [MERGEJOIN_252] (rows=307461 width=1436)
-                                    Conds:RS_92._col2, _col1=RS_93._col1, _col0(Left Outer),Output:["_col3","_col4","_col6","_col7","_col8","_col10","_col15","_col16"]
-                                  <-Map 34 [SIMPLE_EDGE]
-                                    SHUFFLE [RS_93]
-                                      PartitionCols:_col1, _col0
-                                      Select Operator [SEL_85] (rows=1 width=0)
-                                        Output:["_col0","_col1","_col2","_col3"]
-                                        Filter Operator [FIL_232] (rows=1 width=0)
-                                          predicate:cr_item_sk is not null
-                                          TableScan [TS_83] (rows=1 width=0)
-                                            default@catalog_returns,catalog_returns,Tbl:PARTIAL,Col:NONE,Output:["cr_item_sk","cr_order_number","cr_return_quantity","cr_return_amount"]
-                                  <-Reducer 28 [SIMPLE_EDGE]
-                                    SHUFFLE [RS_92]
-                                      PartitionCols:_col2, _col1
-                                      Merge Join Operator [MERGEJOIN_251] (rows=279510 width=1436)
-                                        Conds:RS_89._col0=RS_90._col0(Inner),Output:["_col1","_col2","_col3","_col4","_col6","_col7","_col8","_col10"]
-                                      <-Map 33 [SIMPLE_EDGE]
-                                        SHUFFLE [RS_90]
-                                          PartitionCols:_col0
-                                          Select Operator [SEL_82] (rows=36524 width=1119)
-                                            Output:["_col0"]
-                                            Filter Operator [FIL_231] (rows=36524 width=1119)
-                                              predicate:((d_year = 2001) and d_date_sk is not null)
-                                              TableScan [TS_80] (rows=73049 width=1119)
-                                                default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year"]
-                                      <-Reducer 27 [SIMPLE_EDGE]
-                                        SHUFFLE [RS_89]
-                                          PartitionCols:_col0
-                                          Merge Join Operator [MERGEJOIN_250] (rows=254100 width=1436)
-                                            Conds:RS_86._col1=RS_87._col0(Inner),Output:["_col0","_col1","_col2","_col3","_col4","_col6","_col7","_col8","_col10"]
-                                          <-Map 26 [SIMPLE_EDGE]
-                                            SHUFFLE [RS_86]
-                                              PartitionCols:_col1
-                                              Select Operator [SEL_76] (rows=1 width=0)
-                                                Output:["_col0","_col1","_col2","_col3","_col4"]
-                                                Filter Operator [FIL_229] (rows=1 width=0)
-                                                  predicate:(cs_item_sk is not null and cs_sold_date_sk is not null)
-                                                  TableScan [TS_74] (rows=1 width=0)
-                                                    default@catalog_sales,catalog_sales,Tbl:PARTIAL,Col:NONE,Output:["cs_sold_date_sk","cs_item_sk","cs_order_number","cs_quantity","cs_ext_sales_price"]
-                                          <-Map 32 [SIMPLE_EDGE]
-                                            SHUFFLE [RS_87]
-                                              PartitionCols:_col0
-                                              Select Operator [SEL_79] (rows=231000 width=1436)
-                                                Output:["_col0","_col1","_col2","_col3","_col5"]
-                                                Filter Operator [FIL_230] (rows=231000 width=1436)
-                                                  predicate:((i_category = 'Sports') and i_item_sk is not null and i_brand_id is not null and i_class_id is not null and i_category_id is not null and i_manufact_id is not null)
-                                                  TableScan [TS_77] (rows=462000 width=1436)
-                                                    default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_brand_id","i_class_id","i_category_id","i_category","i_manufact_id"]
-                        <-Reducer 38 [CONTAINS]
-                          Reduce Output Operator [RS_145]
-                            PartitionCols:_col0, _col1, _col2, _col3, _col4
-                            Group By Operator [GBY_144] (rows=922383 width=1436)
-                              Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"],aggregations:["sum(_col5)","sum(_col6)"],keys:_col0, _col1, _col2, _col3, _col4
-                              Select Operator [SEL_142] (rows=922383 width=1436)
-                                Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
-                                Select Operator [SEL_117] (rows=307461 width=1436)
+                                  Select Operator [SEL_95] (rows=307461 width=1436)
+                                    Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
+                                    Merge Join Operator [MERGEJOIN_252] (rows=307461 width=1436)
+                                      Conds:RS_92._col2, _col1=RS_93._col1, _col0(Left Outer),Output:["_col3","_col4","_col6","_col7","_col8","_col10","_col15","_col16"]
+                                    <-Map 34 [SIMPLE_EDGE]
+                                      SHUFFLE [RS_93]
+                                        PartitionCols:_col1, _col0
+                                        Select Operator [SEL_85] (rows=1 width=0)
+                                          Output:["_col0","_col1","_col2","_col3"]
+                                          Filter Operator [FIL_232] (rows=1 width=0)
+                                            predicate:cr_item_sk is not null
+                                            TableScan [TS_83] (rows=1 width=0)
+                                              default@catalog_returns,catalog_returns,Tbl:PARTIAL,Col:NONE,Output:["cr_item_sk","cr_order_number","cr_return_quantity","cr_return_amount"]
+                                    <-Reducer 28 [SIMPLE_EDGE]
+                                      SHUFFLE [RS_92]
+                                        PartitionCols:_col2, _col1
+                                        Merge Join Operator [MERGEJOIN_251] (rows=279510 width=1436)
+                                          Conds:RS_89._col0=RS_90._col0(Inner),Output:["_col1","_col2","_col3","_col4","_col6","_col7","_col8","_col10"]
+                                        <-Map 33 [SIMPLE_EDGE]
+                                          SHUFFLE [RS_90]
+                                            PartitionCols:_col0
+                                            Select Operator [SEL_82] (rows=36524 width=1119)
+                                              Output:["_col0"]
+                                              Filter Operator [FIL_231] (rows=36524 width=1119)
+                                                predicate:((d_year = 2001) and d_date_sk is not null)
+                                                TableScan [TS_80] (rows=73049 width=1119)
+                                                  default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year"]
+                                        <-Reducer 27 [SIMPLE_EDGE]
+                                          SHUFFLE [RS_89]
+                                            PartitionCols:_col0
+                                            Merge Join Operator [MERGEJOIN_250] (rows=254100 width=1436)
+                                              Conds:RS_86._col1=RS_87._col0(Inner),Output:["_col0","_col1","_col2","_col3","_col4","_col6","_col7","_col8","_col10"]
+                                            <-Map 26 [SIMPLE_EDGE]
+                                              SHUFFLE [RS_86]
+                                                PartitionCols:_col1
+                                                Select Operator [SEL_76] (rows=1 width=0)
+                                                  Output:["_col0","_col1","_col2","_col3","_col4"]
+                                                  Filter Operator [FIL_229] (rows=1 width=0)
+                                                    predicate:(cs_item_sk is not null and cs_sold_date_sk is not null)
+                                                    TableScan [TS_74] (rows=1 width=0)
+                                                      default@catalog_sales,catalog_sales,Tbl:PARTIAL,Col:NONE,Output:["cs_sold_date_sk","cs_item_sk","cs_order_number","cs_quantity","cs_ext_sales_price"]
+                                            <-Map 32 [SIMPLE_EDGE]
+                                              SHUFFLE [RS_87]
+                                                PartitionCols:_col0
+                                                Select Operator [SEL_79] (rows=231000 width=1436)
+                                                  Output:["_col0","_col1","_col2","_col3","_col5"]
+                                                  Filter Operator [FIL_230] (rows=231000 width=1436)
+                                                    predicate:((i_category = 'Sports') and i_item_sk is not null and i_brand_id is not null and i_class_id is not null and i_category_id is not null and i_manufact_id is not null)
+                                                    TableScan [TS_77] (rows=462000 width=1436)
+                                                      default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_brand_id","i_class_id","i_category_id","i_category","i_manufact_id"]
+                          <-Reducer 38 [CONTAINS]
+                            Reduce Output Operator [RS_145]
+                              PartitionCols:2001, _col1, _col2, _col3, _col4
+                              Group By Operator [GBY_144] (rows=922383 width=1436)
+                                Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"],aggregations:["sum(_col5)","sum(_col6)"],keys:2001, _col1, _col2, _col3, _col4
+                                Select Operator [SEL_142] (rows=922383 width=1436)
                                   Output:["_col1","_col2","_col3","_col4","_col5","_col6"]
-                                  Merge Join Operator [MERGEJOIN_255] (rows=307461 width=1436)
-                                    Conds:RS_114._col2, _col1=RS_115._col1, _col0(Left Outer),Output:["_col3","_col4","_col6","_col7","_col8","_col10","_col15","_col16"]
-                                  <-Map 41 [SIMPLE_EDGE]
-                                    SHUFFLE [RS_115]
-                                      PartitionCols:_col1, _col0
-                                      Select Operator [SEL_107] (rows=1 width=0)
-                                        Output:["_col0","_col1","_col2","_col3"]
-                                        Filter Operator [FIL_236] (rows=1 width=0)
-                                          predicate:sr_item_sk is not null
-                                          TableScan [TS_105] (rows=1 width=0)
-                                            default@store_returns,store_returns,Tbl:PARTIAL,Col:NONE,Output:["sr_item_sk","sr_ticket_number","sr_return_quantity","sr_return_amt"]
-                                  <-Reducer 37 [SIMPLE_EDGE]
-                                    SHUFFLE [RS_114]
-                                      PartitionCols:_col2, _col1
-                                      Merge Join Operator [MERGEJOIN_254] (rows=279510 width=1436)
-                                        Conds:RS_111._col0=RS_112._col0(Inner),Output:["_col1","_col2","_col3","_col4","_col6","_col7","_col8","_col10"]
-                                      <-Map 40 [SIMPLE_EDGE]
-                                        SHUFFLE [RS_112]
-                                          PartitionCols:_col0
-                                          Select Operator [SEL_104] (rows=36524 width=1119)
-                                            Output:["_col0"]
-                                            Filter Operator [FIL_235] (rows=36524 width=1119)
-                                              predicate:((d_year = 2001) and d_date_sk is not null)
-                                              TableScan [TS_102] (rows=73049 width=1119)
-                                                default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year"]
-                                      <-Reducer 36 [SIMPLE_EDGE]
-                                        SHUFFLE [RS_111]
-                                          PartitionCols:_col0
-                                          Merge Join Operator [MERGEJOIN_253] (rows=254100 width=1436)
-                                            Conds:RS_108._col1=RS_109._col0(Inner),Output:["_col0","_col1","_col2","_col3","_col4","_col6","_col7","_col8","_col10"]
-                                          <-Map 35 [SIMPLE_EDGE]
-                                            SHUFFLE [RS_108]
-                                              PartitionCols:_col1
-                                              Select Operator [SEL_98] (rows=1 width=0)
-                                                Output:["_col0","_col1","_col2","_col3","_col4"]
-                                                Filter Operator [FIL_233] (rows=1 width=0)
-                                                  predicate:(ss_item_sk is not null and ss_sold_date_sk is not null)
-                                                  TableScan [TS_96] (rows=1 width=0)
-                                                    default@store_sales,store_sales,Tbl:PARTIAL,Col:NONE,Output:["ss_sold_date_sk","ss_item_sk","ss_ticket_number","ss_quantity","ss_ext_sales_price"]
-                                          <-Map 39 [SIMPLE_EDGE]
-                                            SHUFFLE [RS_109]
-                                              PartitionCols:_col0
-                                              Select Operator [SEL_101] (rows=231000 width=1436)
-                                                Output:["_col0","_col1","_col2","_col3","_col5"]
-                                                Filter Operator [FIL_234] (rows=231000 width=1436)
-                                                  predicate:((i_category = 'Sports') and i_item_sk is not null and i_brand_id is not null and i_class_id is not null and i_category_id is not null and i_manufact_id is not null)
-                                                  TableScan [TS_99] (rows=462000 width=1436)
-                                                    default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_brand_id","i_class_id","i_category_id","i_category","i_manufact_id"]
-                        <-Reducer 45 [CONTAINS]
-                          Reduce Output Operator [RS_145]
-                            PartitionCols:_col0, _col1, _col2, _col3, _col4
-                            Group By Operator [GBY_144] (rows=922383 width=1436)
-                              Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"],aggregations:["sum(_col5)","sum(_col6)"],keys:_col0, _col1, _col2, _col3, _col4
-                              Select Operator [SEL_142] (rows=922383 width=1436)
-                                Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
-                                Select Operator [SEL_141] (rows=307461 width=1436)
+                                  Select Operator [SEL_117] (rows=307461 width=1436)
+                                    Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
+                                    Merge Join Operator [MERGEJOIN_255] (rows=307461 width=1436)
+                                      Conds:RS_114._col2, _col1=RS_115._col1, _col0(Left Outer),Output:["_col3","_col4","_col6","_col7","_col8","_col10","_col15","_col16"]
+                                    <-Map 41 [SIMPLE_EDGE]
+                                      SHUFFLE [RS_115]
+                                        PartitionCols:_col1, _col0
+                                        Select Operator [SEL_107] (rows=1 width=0)
+                                          Output:["_col0","_col1","_col2","_col3"]
+                                          Filter Operator [FIL_236] (rows=1 width=0)
+                                            predicate:sr_item_sk is not null
+                                            TableScan [TS_105] (rows=1 width=0)
+                                              default@store_returns,store_returns,Tbl:PARTIAL,Col:NONE,Output:["sr_item_sk","sr_ticket_number","sr_return_quantity","sr_return_amt"]
+                                    <-Reducer 37 [SIMPLE_EDGE]
+                                      SHUFFLE [RS_114]
+                                        PartitionCols:_col2, _col1
+                                        Merge Join Operator [MERGEJOIN_254] (rows=279510 width=1436)
+                                          Conds:RS_111._col0=RS_112._col0(Inner),Output:["_col1","_col2","_col3","_col4","_col6","_col7","_col8","_col10"]
+                                        <-Map 40 [SIMPLE_EDGE]
+                                          SHUFFLE [RS_112]
+                                            PartitionCols:_col0
+                                            Select Operator [SEL_104] (rows=36524 width=1119)
+                                              Output:["_col0"]
+                                              Filter Operator [FIL_235] (rows=36524 width=1119)
+                                                predicate:((d_year = 2001) and d_date_sk is not null)
+                                                TableScan [TS_102] (rows=73049 width=1119)
+                                                  default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year"]
+                                        <-Reducer 36 [SIMPLE_EDGE]
+                                          SHUFFLE [RS_111]
+                                            PartitionCols:_col0
+                                            Merge Join Operator [MERGEJOIN_253] (rows=254100 width=1436)
+                                              Conds:RS_108._col1=RS_109._col0(Inner),Output:["_col0","_col1","_col2","_col3","_col4","_col6","_col7","_col8","_col10"]
+                                            <-Map 35 [SIMPLE_EDGE]
+                                              SHUFFLE [RS_108]
+                                                PartitionCols:_col1
+                                                Select Operator [SEL_98] (rows=1 width=0)
+                                                  Output:["_col0","_col1","_col2","_col3","_col4"]
+                                                  Filter Operator [FIL_233] (rows=1 width=0)
+                                                    predicate:(ss_item_sk is not null and ss_sold_date_sk is not null)
+                                                    TableScan [TS_96] (rows=1 width=0)
+                                                      default@store_sales,store_sales,Tbl:PARTIAL,Col:NONE,Output:["ss_sold_date_sk","ss_item_sk","ss_ticket_number","ss_quantity","ss_ext_sales_price"]
+                                            <-Map 39 [SIMPLE_EDGE]
+                                              SHUFFLE [RS_109]
+                                                PartitionCols:_col0
+                                                Select Operator [SEL_101] (rows=231000 width=1436)
+                                                  Output:["_col0","_col1","_col2","_col3","_col5"]
+                                                  Filter Operator [FIL_234] (rows=231000 width=1436)
+                                                    predicate:((i_category = 'Sports') and i_item_sk is not null and i_brand_id is not null and i_class_id is not null and i_category_id is not null and i_manufact_id is not null)
+                                                    TableScan [TS_99] (rows=462000 width=1436)
+                                                      default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_brand_id","i_class_id","i_category_id","i_category","i_manufact_id"]
+                          <-Reducer 45 [CONTAINS]
+                            Reduce Output Operator [RS_145]
+                              PartitionCols:2001, _col1, _col2, _col3, _col4
+                              Group By Operator [GBY_144] (rows=922383 width=1436)
+                                Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"],aggregations:["sum(_col5)","sum(_col6)"],keys:2001, _col1, _col2, _col3, _col4
+                                Select Operator [SEL_142] (rows=922383 width=1436)
                                   Output:["_col1","_col2","_col3","_col4","_col5","_col6"]
-                                  Merge Join Operator [MERGEJOIN_258] (rows=307461 width=1436)
-                                    Conds:RS_138._col2, _col1=RS_139._col1, _col0(Left Outer),Output:["_col3","_col4","_col6","_col7","_col8","_col10","_col15","_col16"]
-                                  <-Map 48 [SIMPLE_EDGE]
-                                    SHUFFLE [RS_139]
-                                      PartitionCols:_col1, _col0
-                                      Select Operator [SEL_131] (rows=1 width=0)
-                                        Output:["_col0","_col1","_col2","_col3"]
-                                        Filter Operator [FIL_240] (rows=1 width=0)
-                                          predicate:wr_item_sk is not null
-                                          TableScan [TS_129] (rows=1 width=0)
-                                            default@web_returns,web_returns,Tbl:PARTIAL,Col:NONE,Output:["wr_item_sk","wr_order_number","wr_return_quantity","wr_return_amt"]
-                                  <-Reducer 44 [SIMPLE_EDGE]
-                                    SHUFFLE [RS_138]
-                                      PartitionCols:_col2, _col1
-                                      Merge Join Operator [MERGEJOIN_257] (rows=279510 width=1436)
-                                        Conds:RS_135._col0=RS_136._col0(Inner),Output:["_col1","_col2","_col3","_col4","_col6","_col7","_col8","_col10"]
-                                      <-Map 47 [SIMPLE_EDGE]
-                                        SHUFFLE [RS_136]
-                                          PartitionCols:_col0
-                                          Select Operator [SEL_128] (rows=36524 width=1119)
-                                            Output:["_col0"]
-                                            Filter Operator [FIL_239] (rows=36524 width=1119)
-                                              predicate:((d_year = 2001) and d_date_sk is not null)
-                                              TableScan [TS_126] (rows=73049 width=1119)
-                                                default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year"]
-                                      <-Reducer 43 [SIMPLE_EDGE]
-                                        SHUFFLE [RS_135]
-                                          PartitionCols:_col0
-                                          Merge Join Operator [MERGEJOIN_256] (rows=254100 width=1436)
-                                            Conds:RS_132._col1=RS_133._col0(Inner),Output:["_col0","_col1","_col2","_col3","_col4","_col6","_col7","_col8","_col10"]
-                                          <-Map 42 [SIMPLE_EDGE]
-                                            SHUFFLE [RS_132]
-                                              PartitionCols:_col1
-                                              Select Operator [SEL_122] (rows=1 width=0)
-                                                Output:["_col0","_col1","_col2","_col3","_col4"]
-                                                Filter Operator [FIL_237] (rows=1 width=0)
-                                                  predicate:(ws_item_sk is not null and ws_sold_date_sk is not null)
-                                                  TableScan [TS_120] (rows=1 width=0)
-                                                    default@web_sales,web_sales,Tbl:PARTIAL,Col:NONE,Output:["ws_sold_date_sk","ws_item_sk","ws_order_number","ws_quantity","ws_ext_sales_price"]
-                                          <-Map 46 [SIMPLE_EDGE]
-                                            SHUFFLE [RS_133]
-                                              PartitionCols:_col0
-                                              Select Operator [SEL_125] (rows=231000 width=1436)
-                                                Output:["_col0","_col1","_col2","_col3","_col5"]
-                                                Filter Operator [FIL_238] (rows=231000 width=1436)
-                                                  predicate:((i_category = 'Sports') and i_item_sk is not null and i_brand_id is not null and i_class_id is not null and i_category_id is not null and i_manufact_id is not null)
-                                                  TableScan [TS_123] (rows=462000 width=1436)
-                                                    default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_brand_id","i_class_id","i_category_id","i_category","i_manufact_id"]
+                                  Select Operator [SEL_141] (rows=307461 width=1436)
+                                    Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
+                                    Merge Join Operator [MERGEJOIN_258] (rows=307461 width=1436)
+                                      Conds:RS_138._col2, _col1=RS_139._col1, _col0(Left Outer),Output:["_col3","_col4","_col6","_col7","_col8","_col10","_col15","_col16"]
+                                    <-Map 48 [SIMPLE_EDGE]
+                                      SHUFFLE [RS_139]
+                                        PartitionCols:_col1, _col0
+                                        Select Operator [SEL_131] (rows=1 width=0)
+                                          Output:["_col0","_col1","_col2","_col3"]
+                                          Filter Operator [FIL_240] (rows=1 width=0)
+                                            predicate:wr_item_sk is not null
+                                            TableScan [TS_129] (rows=1 width=0)
+                                              default@web_returns,web_returns,Tbl:PARTIAL,Col:NONE,Output:["wr_item_sk","wr_order_number","wr_return_quantity","wr_return_amt"]
+                                    <-Reducer 44 [SIMPLE_EDGE]
+                                      SHUFFLE [RS_138]
+                                        PartitionCols:_col2, _col1
+                                        Merge Join Operator [MERGEJOIN_257] (rows=279510 width=1436)
+                                          Conds:RS_135._col0=RS_136._col0(Inner),Output:["_col1","_col2","_col3","_col4","_col6","_col7","_col8","_col10"]
+                                        <-Map 47 [SIMPLE_EDGE]
+                                          SHUFFLE [RS_136]
+                                            PartitionCols:_col0
+                                            Select Operator [SEL_128] (rows=36524 width=1119)
+                                              Output:["_col0"]
+                                              Filter Operator [FIL_239] (rows=36524 width=1119)
+                                                predicate:((d_year = 2001) and d_date_sk is not null)
+                                                TableScan [TS_126] (rows=73049 width=1119)
+                                                  default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year"]
+                                        <-Reducer 43 [SIMPLE_EDGE]
+                                          SHUFFLE [RS_135]
+                                            PartitionCols:_col0
+                                            Merge Join Operator [MERGEJOIN_256] (rows=254100 width=1436)
+                                              Conds:RS_132._col1=RS_133._col0(Inner),Output:["_col0","_col1","_col2","_col3","_col4","_col6","_col7","_col8","_col10"]
+                                            <-Map 42 [SIMPLE_EDGE]
+                                              SHUFFLE [RS_132]
+                                                PartitionCols:_col1
+                                                Select Operator [SEL_122] (rows=1 width=0)
+                                                  Output:["_col0","_col1","_col2","_col3","_col4"]
+                                                  Filter Operator [FIL_237] (rows=1 width=0)
+                                                    predicate:(ws_item_sk is not null and ws_sold_date_sk is not null)
+                                                    TableScan [TS_120] (rows=1 width=0)
+                                                      default@web_sales,web_sales,Tbl:PARTIAL,Col:NONE,Output:["ws_sold_date_sk","ws_item_sk","ws_order_number","ws_quantity","ws_ext_sales_price"]
+                                            <-Map 46 [SIMPLE_EDGE]
+                                              SHUFFLE [RS_133]
+                                                PartitionCols:_col0
+                                                Select Operator [SEL_125] (rows=231000 width=1436)
+                                                  Output:["_col0","_col1","_col2","_col3","_col5"]
+                                                  Filter Operator [FIL_238] (rows=231000 width=1436)
+                                                    predicate:((i_category = 'Sports') and i_item_sk is not null and i_brand_id is not null and i_class_id is not null and i_category_id is not null and i_manufact_id is not null)
+                                                    TableScan [TS_123] (rows=462000 width=1436)
+                                                      default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_brand_id","i_class_id","i_category_id","i_category","i_manufact_id"]
                   <-Reducer 6 [SIMPLE_EDGE]
                     SHUFFLE [RS_148]
                       PartitionCols:_col1, _col2, _col3, _col4
-                      Group By Operator [GBY_72] (rows=461191 width=1436)
-                        Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"],keys:KEY._col0, KEY._col1, KEY._col2, KEY._col3, KEY._col4
-                      <-Union 5 [SIMPLE_EDGE]
-                        <-Reducer 15 [CONTAINS]
-                          Reduce Output Operator [RS_71]
-                            PartitionCols:_col0, _col1, _col2, _col3, _col4
-                            Group By Operator [GBY_70] (rows=922383 width=1436)
-                              Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"],aggregations:["sum(_col5)","sum(_col6)"],keys:_col0, _col1, _col2, _col3, _col4
-                              Select Operator [SEL_68] (rows=922383 width=1436)
-                                Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
-                                Select Operator [SEL_43] (rows=307461 width=1436)
+                      Select Operator [SEL_73] (rows=461191 width=1436)
+                        Output:["_col1","_col2","_col3","_col4","_col5","_col6"]
+                        Group By Operator [GBY_72] (rows=461191 width=1436)
+                          Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"],keys:2002, KEY._col1, KEY._col2, KEY._col3, KEY._col4
+                        <-Union 5 [SIMPLE_EDGE]
+                          <-Reducer 15 [CONTAINS]
+                            Reduce Output Operator [RS_71]
+                              PartitionCols:2002, _col1, _col2, _col3, _col4
+                              Group By Operator [GBY_70] (rows=922383 width=1436)
+                                Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"],aggregations:["sum(_col5)","sum(_col6)"],keys:2002, _col1, _col2, _col3, _col4
+                                Select Operator [SEL_68] (rows=922383 width=1436)
                                   Output:["_col1","_col2","_col3","_col4","_col5","_col6"]
-                                  Merge Join Operator [MERGEJOIN_246] (rows=307461 width=1436)
-                                    Conds:RS_40._col2, _col1=RS_41._col1, _col0(Left Outer),Output:["_col3","_col4","_col6","_col7","_col8","_col10","_col15","_col16"]
-                                  <-Map 18 [SIMPLE_EDGE]
-                                    SHUFFLE [RS_41]
-                                      PartitionCols:_col1, _col0
-                                      Select Operator [SEL_33] (rows=1 width=0)
-                                        Output:["_col0","_col1","_col2","_col3"]
-                                        Filter Operator [FIL_224] (rows=1 width=0)
-                                          predicate:sr_item_sk is not null
-                                          TableScan [TS_31] (rows=1 width=0)
-                                            default@store_returns,store_returns,Tbl:PARTIAL,Col:NONE,Output:["sr_item_sk","sr_ticket_number","sr_return_quantity","sr_return_amt"]
-                                  <-Reducer 14 [SIMPLE_EDGE]
-                                    SHUFFLE [RS_40]
-                                      PartitionCols:_col2, _col1
-                                      Merge Join Operator [MERGEJOIN_245] (rows=279510 width=1436)
-                                        Conds:RS_37._col0=RS_38._col0(Inner),Output:["_col1","_col2","_col3","_col4","_col6","_col7","_col8","_col10"]
-                                      <-Map 17 [SIMPLE_EDGE]
-                                        SHUFFLE [RS_38]
-                                          PartitionCols:_col0
-                                          Select Operator [SEL_30] (rows=36524 width=1119)
-                                            Output:["_col0"]
-                                            Filter Operator [FIL_223] (rows=36524 width=1119)
-                                              predicate:((d_year = 2002) and d_date_sk is not null)
-                                              TableScan [TS_28] (rows=73049 width=1119)
-                                                default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year"]
-                                      <-Reducer 13 [SIMPLE_EDGE]
-                                        SHUFFLE [RS_37]
-                                          PartitionCols:_col0
-                                          Merge Join Operator [MERGEJOIN_244] (rows=254100 width=1436)
-                                            Conds:RS_34._col1=RS_35._col0(Inner),Output:["_col0","_col1","_col2","_col3","_col4","_col6","_col7","_col8","_col10"]
-                                          <-Map 12 [SIMPLE_EDGE]
-                                            SHUFFLE [RS_34]
-                                              PartitionCols:_col1
-                                              Select Operator [SEL_24] (rows=1 width=0)
-                                                Output:["_col0","_col1","_col2","_col3","_col4"]
-                                                Filter Operator [FIL_221] (rows=1 width=0)
-                                                  predicate:(ss_item_sk is not null and ss_sold_date_sk is not null)
-                                                  TableScan [TS_22] (rows=1 width=0)
-                                                    default@store_sales,store_sales,Tbl:PARTIAL,Col:NONE,Output:["ss_sold_date_sk","ss_item_sk","ss_ticket_number","ss_quantity","ss_ext_sales_price"]
-                                          <-Map 16 [SIMPLE_EDGE]
-                                            SHUFFLE [RS_35]
-                                              PartitionCols:_col0
-                                              Select Operator [SEL_27] (rows=231000 width=1436)
-                                                Output:["_col0","_col1","_col2","_col3","_col5"]
-                                                Filter Operator [FIL_222] (rows=231000 width=1436)
-                                                  predicate:((i_category = 'Sports') and i_item_sk is not null and i_brand_id is not null and i_class_id is not null and i_category_id is not null and i_manufact_id is not null)
-                                                  TableScan [TS_25] (rows=462000 width=1436)
-                                                    default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_brand_id","i_class_id","i_category_id","i_category","i_manufact_id"]
-                        <-Reducer 22 [CONTAINS]
-                          Reduce Output Operator [RS_71]
-                            PartitionCols:_col0, _col1, _col2, _col3, _col4
-                            Group By Operator [GBY_70] (rows=922383 width=1436)
-                              Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"],aggregations:["sum(_col5)","sum(_col6)"],keys:_col0, _col1, _col2, _col3, _col4
-                              Select Operator [SEL_68] (rows=922383 width=1436)
-                                Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
-                                Select Operator [SEL_67] (rows=307461 width=1436)
+                                  Select Operator [SEL_43] (rows=307461 width=1436)
+                                    Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
+                                    Merge Join Operator [MERGEJOIN_246] (rows=307461 width=1436)
+                                      Conds:RS_40._col2, _col1=RS_41._col1, _col0(Left Outer),Output:["_col3","_col4","_col6","_col7","_col8","_col10","_col15","_col16"]
+                                    <-Map 18 [SIMPLE_EDGE]
+                                      SHUFFLE [RS_41]
+                                        PartitionCols:_col1, _col0
+                                        Select Operator [SEL_33] (rows=1 width=0)
+                                          Output:["_col0","_col1","_col2","_col3"]
+                                          Filter Operator [FIL_224] (rows=1 width=0)
+                                            predicate:sr_item_sk is not null
+                                            TableScan [TS_31] (rows=1 width=0)
+                                              default@store_returns,store_returns,Tbl:PARTIAL,Col:NONE,Output:["sr_item_sk","sr_ticket_number","sr_return_quantity","sr_return_amt"]
+                                    <-Reducer 14 [SIMPLE_EDGE]
+                                      SHUFFLE [RS_40]
+                                        PartitionCols:_col2, _col1
+                                        Merge Join Operator [MERGEJOIN_245] (rows=279510 width=1436)
+                                          Conds:RS_37._col0=RS_38._col0(Inner),Output:["_col1","_col2","_col3","_col4","_col6","_col7","_col8","_col10"]
+                                        <-Map 17 [SIMPLE_EDGE]
+                                          SHUFFLE [RS_38]
+                                            PartitionCols:_col0
+                                            Select Operator [SEL_30] (rows=36524 width=1119)
+                                              Output:["_col0"]
+                                              Filter Operator [FIL_223] (rows=36524 width=1119)
+                                                predicate:((d_year = 2002) and d_date_sk is not null)
+                                                TableScan [TS_28] (rows=73049 width=1119)
+                                                  default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year"]
+                                        <-Reducer 13 [SIMPLE_EDGE]
+                                          SHUFFLE [RS_37]
+                                            PartitionCols:_col0
+                                            Merge Join Operator [MERGEJOIN_244] (rows=254100 width=1436)
+                                              Conds:RS_34._col1=RS_35._col0(Inner),Output:["_col0","_col1","_col2","_col3","_col4","_col6","_col7","_col8","_col10"]
+                                            <-Map 12 [SIMPLE_EDGE]
+                                              SHUFFLE [RS_34]
+                                                PartitionCols:_col1
+                                                Select Operator [SEL_24] (rows=1 width=0)
+                                                  Output:["_col0","_col1","_col2","_col3","_col4"]
+                                                  Filter Operator [FIL_221] (rows=1 width=0)
+                                                    predicate:(ss_item_sk is not null and ss_sold_date_sk is not null)
+                                                    TableScan [TS_22] (rows=1 width=0)
+                                                      default@store_sales,store_sales,Tbl:PARTIAL,Col:NONE,Output:["ss_sold_date_sk","ss_item_sk","ss_ticket_number","ss_quantity","ss_ext_sales_price"]
+                                            <-Map 16 [SIMPLE_EDGE]
+                                              SHUFFLE [RS_35]
+                                                PartitionCols:_col0
+                                                Select Operator [SEL_27] (rows=231000 width=1436)
+                                                  Output:["_col0","_col1","_col2","_col3","_col5"]
+                                                  Filter Operator [FIL_222] (rows=231000 width=1436)
+                                                    predicate:((i_category = 'Sports') and i_item_sk is not null and i_brand_id is not null and i_class_id is not null and i_category_id is not null and i_manufact_id is not null)
+                                                    TableScan [TS_25] (rows=462000 width=1436)
+                                                      default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_brand_id","i_class_id","i_category_id","i_category","i_manufact_id"]
+                          <-Reducer 22 [CONTAINS]
+                            Reduce Output Operator [RS_71]
+                              PartitionCols:2002, _col1, _col2, _col3, _col4
+                              Group By Operator [GBY_70] (rows=922383 width=1436)
+                                Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"],aggregations:["sum(_col5)","sum(_col6)"],keys:2002, _col1, _col2, _col3, _col4
+                                Select Operator [SEL_68] (rows=922383 width=1436)
                                   Output:["_col1","_col2","_col3","_col4","_col5","_col6"]
-                                  Merge Join Operator [MERGEJOIN_249] (rows=307461 width=1436)
-                                    Conds:RS_64._col2, _col1=RS_65._col1, _col0(Left Outer),Output:["_col3","_col4","_col6","_col7","_col8","_col10","_col15","_col16"]
-                                  <-Map 25 [SIMPLE_EDGE]
-                                    SHUFFLE [RS_65]
-                                      PartitionCols:_col1, _col0
-                                      Select Operator [SEL_57] (rows=1 width=0)
-                                        Output:["_col0","_col1","_col2","_col3"]
-                                        Filter Operator [FIL_228] (rows=1 width=0)
-                                          predicate:wr_item_sk is not null
-                                          TableScan [TS_55] (rows=1 width=0)
-                                            default@web_returns,web_returns,Tbl:PARTIAL,Col:NONE,Output:["wr_item_sk","wr_order_number","wr_return_quantity","wr_return_amt"]
-                                  <-Reducer 21 [SIMPLE_EDGE]
-                                    SHUFFLE [RS_64]
-                                      PartitionCols:_col2, _col1
-                                      Merge Join Operator [MERGEJOIN_248] (rows=279510 width=1436)
-                                        Conds:RS_61._col0=RS_62._col0(Inner),Output:["_col1","_col2","_col3","_col4","_col6","_col7","_col8","_col10"]
-                                      <-Map 24 [SIMPLE_EDGE]
-                                        SHUFFLE [RS_62]
-                                          PartitionCols:_col0
-                                          Select Operator [SEL_54] (rows=36524 width=1119)
-                                            Output:["_col0"]
-                                            Filter Operator [FIL_227] (rows=36524 width=1119)
-                                              predicate:((d_year = 2002) and d_date_sk is not null)
-                                              TableScan [TS_52] (rows=73049 width=1119)
-                                                default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year"]
-                                      <-Reducer 20 [SIMPLE_EDGE]
-                                        SHUFFLE [RS_61]
-                                          PartitionCols:_col0
-                                          Merge Join Operator [MERGEJOIN_247] (rows=254100 width=1436)
-                                            Conds:RS_58._col1=RS_59._col0(Inner),Output:["_col0","_col1","_col2","_col3","_col4","_col6","_col7","_col8","_col10"]
-                                          <-Map 19 [SIMPLE_EDGE]
-                                            SHUFFLE [RS_58]
-                                              PartitionCols:_col1
-                                              Select Operator [SEL_48] (rows=1 width=0)
-                                                Output:["_col0","_col1","_col2","_col3","_col4"]
-                                                Filter Operator [FIL_225] (rows=1 width=0)
-                                                  predicate:(ws_item_sk is not null and ws_sold_date_sk is not null)
-                                                  TableScan [TS_46] (rows=1 width=0)
-                                                    default@web_sales,web_sales,Tbl:PARTIAL,Col:NONE,Output:["ws_sold_date_sk","ws_item_sk","ws_order_number","ws_quantity","ws_ext_sales_price"]
-                                          <-Map 23 [SIMPLE_EDGE]
-                                            SHUFFLE [RS_59]
-                                              PartitionCols:_col0
-                                              Select Operator [SEL_51] (rows=231000 width=1436)
-                                                Output:["_col0","_col1","_col2","_col3","_col5"]
-                                                Filter Operator [FIL_226] (rows=231000 width=1436)
-                                                  predicate:((i_category = 'Sports') and i_item_sk is not null and i_brand_id is not null and i_class_id is not null and i_category_id is not null and i_manufact_id is not null)
-                                                  TableScan [TS_49] (rows=462000 width=1436)
-                                                    default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_brand_id","i_class_id","i_category_id","i_category","i_manufact_id"]
-                        <-Reducer 4 [CONTAINS]
-                          Reduce Output Operator [RS_71]
-                            PartitionCols:_col0, _col1, _col2, _col3, _col4
-                            Group By Operator [GBY_70] (rows=922383 width=1436)
-                              Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"],aggregations:["sum(_col5)","sum(_col6)"],keys:_col0, _col1, _col2, _col3, _col4
-                              Select Operator [SEL_68] (rows=922383 width=1436)
-                                Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
-                                Select Operator [SEL_21] (rows=307461 width=1436)
+                                  Select Operator [SEL_67] (rows=307461 width=1436)
+                                    Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
+                                    Merge Join Operator [MERGEJOIN_249] (rows=307461 width=1436)
+                                      Conds:RS_64._col2, _col1=RS_65._col1, _col0(Left Outer),Output:["_col3","_col4","_col6","_col7","_col8","_col10","_col15","_col16"]
+                                    <-Map 25 [SIMPLE_EDGE]
+                                      SHUFFLE [RS_65]
+                                        PartitionCols:_col1, _col0
+                                        Select Operator [SEL_57] (rows=1 width=0)
+                                          Output:["_col0","_col1","_col2","_col3"]
+                                          Filter Operator [FIL_228] (rows=1 width=0)
+                                            predicate:wr_item_sk is not null
+                                            TableScan [TS_55] (rows=1 width=0)
+                                              default@web_returns,web_returns,Tbl:PARTIAL,Col:NONE,Output:["wr_item_sk","wr_order_number","wr_return_quantity","wr_return_amt"]
+                                    <-Reducer 21 [SIMPLE_EDGE]
+                                      SHUFFLE [RS_64]
+                                        PartitionCols:_col2, _col1
+                                        Merge Join Operator [MERGEJOIN_248] (rows=279510 width=1436)
+                                          Conds:RS_61._col0=RS_62._col0(Inner),Output:["_col1","_col2","_col3","_col4","_col6","_col7","_col8","_col10"]
+                                        <-Map 24 [SIMPLE_EDGE]
+                                          SHUFFLE [RS_62]
+                                            PartitionCols:_col0
+                                            Select Operator [SEL_54] (rows=36524 width=1119)
+                                              Output:["_col0"]
+                                              Filter Operator [FIL_227] (rows=36524 width=1119)
+                                                predicate:((d_year = 2002) and d_date_sk is not null)
+                                                TableScan [TS_52] (rows=73049 width=1119)
+                                                  default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year"]
+                                        <-Reducer 20 [SIMPLE_EDGE]
+                                          SHUFFLE [RS_61]
+                                            PartitionCols:_col0
+                                            Merge Join Operator [MERGEJOIN_247] (rows=254100 width=1436)
+                                              Conds:RS_58._col1=RS_59._col0(Inner),Output:["_col0","_col1","_col2","_col3","_col4","_col6","_col7","_col8","_col10"]
+                                            <-Map 19 [SIMPLE_EDGE]
+                                              SHUFFLE [RS_58]
+                                                PartitionCols:_col1
+                                                Select Operator [SEL_48] (rows=1 width=0)
+                                                  Output:["_col0","_col1","_col2","_col3","_col4"]
+                                                  Filter Operator [FIL_225] (rows=1 width=0)
+                                                    predicate:(ws_item_sk is not null and ws_sold_date_sk is not null)
+                                                    TableScan [TS_46] (rows=1 width=0)
+                                                      default@web_sales,web_sales,Tbl:PARTIAL,Col:NONE,Output:["ws_sold_date_sk","ws_item_sk","ws_order_number","ws_quantity","ws_ext_sales_price"]
+                                            <-Map 23 [SIMPLE_EDGE]
+                                              SHUFFLE [RS_59]
+                                                PartitionCols:_col0
+                                                Select Operator [SEL_51] (rows=231000 width=1436)
+                                                  Output:["_col0","_col1","_col2","_col3","_col5"]
+                                                  Filter Operator [FIL_226] (rows=231000 width=1436)
+                                                    predicate:((i_category = 'Sports') and i_item_sk is not null and i_brand_id is not null and i_class_id is not null and i_category_id is not null and i_manufact_id is not null)
+                                                    TableScan [TS_49] (rows=462000 width=1436)
+                                                      default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_brand_id","i_class_id","i_category_id","i_category","i_manufact_id"]
+                          <-Reducer 4 [CONTAINS]
+                            Reduce Output Operator [RS_71]
+                              PartitionCols:2002, _col1, _col2, _col3, _col4
+                              Group By Operator [GBY_70] (rows=922383 width=1436)
+                                Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"],aggregations:["sum(_col5)","sum(_col6)"],keys:2002, _col1, _col2, _col3, _col4
+                                Select Operator [SEL_68] (rows=922383 width=1436)
                                   Output:["_col1","_col2","_col3","_col4","_col5","_col6"]
-                                  Merge Join Operator [MERGEJOIN_243] (rows=307461 width=1436)
-                                    Conds:RS_18._col2, _col1=RS_19._col1, _col0(Left Outer),Output:["_col3","_col4","_col6","_col7","_col8","_col10","_col15","_col16"]
-                                  <-Map 11 [SIMPLE_EDGE]
-                                    SHUFFLE [RS_19]
-                                      PartitionCols:_col1, _col0
-                                      Select Operator [SEL_11] (rows=1 width=0)
-                                        Output:["_col0","_col1","_col2","_col3"]
-                                        Filter Operator [FIL_220] (rows=1 width=0)
-                                          predicate:cr_item_sk is not null
-                                          TableScan [TS_9] (rows=1 width=0)
-                                            default@catalog_returns,catalog_returns,Tbl:PARTIAL,Col:NONE,Output:["cr_item_sk","cr_order_number","cr_return_quantity","cr_return_amount"]
-                                  <-Reducer 3 [SIMPLE_EDGE]
-                                    SHUFFLE [RS_18]
-                                      PartitionCols:_col2, _col1
-                                      Merge Join Operator [MERGEJOIN_242] (rows=279510 width=1436)
-                                        Conds:RS_15._col0=RS_16._col0(Inner),Output:["_col1","_col2","_col3","_col4","_col6","_col7","_col8","_col10"]
-                                      <-Map 10 [SIMPLE_EDGE]
-                                        SHUFFLE [RS_16]
-                                          PartitionCols:_col0
-                                          Select Operator [SEL_8] (rows=36524 width=1119)
-                                            Output:["_col0"]
-                                            Filter Operator [FIL_219] (rows=36524 width=1119)
-                                              predicate:((d_year = 2002) 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_15]
-                                          PartitionCols:_col0
-                                          Merge Join Operator [MERGEJOIN_241] (rows=254100 width=1436)
-                                            Conds:RS_12._col1=RS_13._col0(Inner),Output:["_col0","_col1","_col2","_col3","_col4","_col6","_col7","_col8","_col10"]
-                                          <-Map 1 [SIMPLE_EDGE]
-                                            SHUFFLE [RS_12]
-                                              PartitionCols:_col1
-                                              Select Operator [SEL_2] (rows=1 width=0)
-                                                Output:["_col0","_col1","_col2","_col3","_col4"]
-                                                Filter Operator [FIL_217] (rows=1 width=0)
-                                                  predicate:(cs_item_sk is not null and cs_sold_date_sk is not null)
-                                                  TableScan [TS_0] (rows=1 width=0)
-                                                    default@catalog_sales,catalog_sales,Tbl:PARTIAL,Col:NONE,Output:["cs_sold_date_sk","cs_item_sk","cs_order_number","cs_quantity","cs_ext_sales_price"]
-                                          <-Map 9 [SIMPLE_EDGE]
-                                            SHUFFLE [RS_13]
-                                              PartitionCols:_col0
-                                              Select Operator [SEL_5] (rows=231000 width=1436)
-                                                Output:["_col0","_col1","_col2","_col3","_col5"]
-                                                Filter Operator [FIL_218] (rows=231000 width=1436)
-                                                  predicate:((i_category = 'Sports') and i_item_sk is not null and i_brand_id is not null and i_class_id is not null and i_category_id is not null and i_manufact_id is not null)
-                                                  TableScan [TS_3] (rows=462000 width=1436)
-                                                    default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_brand_id","i_class_id","i_category_id","i_category","i_manufact_id"]
+                                  Select Operator [SEL_21] (rows=307461 width=1436)
+                                    Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
+                                    Merge Join Operator [MERGEJOIN_243] (rows=307461 width=1436)
+                                      Conds:RS_18._col2, _col1=RS_19._col1, _col0(Left Outer),Output:["_col3","_col4","_col6","_col7","_col8","_col10","_col15","_col16"]
+                                    <-Map 11 [SIMPLE_EDGE]
+                                      SHUFFLE [RS_19]
+                                        PartitionCols:_col1, _col0
+                                        Select Operator [SEL_11] (rows=1 width=0)
+                                          Output:["_col0","_col1","_col2","_col3"]
+                                          Filter Operator [FIL_220] (rows=1 width=0)
+                                            predicate:cr_item_sk is not null
+                                            TableScan [TS_9] (rows=1 width=0)
+                                              default@catalog_returns,catalog_returns,Tbl:PARTIAL,Col:NONE,Output:["cr_item_sk","cr_order_number","cr_return_quantity","cr_return_amount"]
+                                    <-Reducer 3 [SIMPLE_EDGE]
+                                      SHUFFLE [RS_18]
+                                        PartitionCols:_col2, _col1
+                                        Merge Join Operator [MERGEJOIN_242] (rows=279510 width=1436)
+                                          Conds:RS_15._col0=RS_16._col0(Inner),Output:["_col1","_col2","_col3","_col4","_col6","_col7","_col8","_col10"]
+                                        <-Map 10 [SIMPLE_EDGE]
+                                          SHUFFLE [RS_16]
+                                            PartitionCols:_col0
+                                            Select Operator [SEL_8] (rows=36524 width=1119)
+                                              Output:["_col0"]
+                                              Filter Operator [FIL_219] (rows=36524 width=1119)
+                                                predicate:((d_year = 2002) 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_15]
+                                            PartitionCols:_col0
+                                            Merge Join Operator [MERGEJOIN_241] (rows=254100 width=1436)
+                                              Conds:RS_12._col1=RS_13._col0(Inner),Output:["_col0","_col1","_col2","_col3","_col4","_col6","_col7","_col8","_col10"]
+                                            <-Map 1 [SIMPLE_EDGE]
+                                              SHUFFLE [RS_12]
+                                                PartitionCols:_col1
+                                                Select Operator [SEL_2] (rows=1 width=0)
+                                                  Output:["_col0","_col1","_col2","_col3","_col4"]
+                                                  Filter Operator [FIL_217] (rows=1 width=0)
+                                                    predicate:(cs_item_sk is not null and cs_sold_date_sk is not null)
+                                                    TableScan [TS_0] (rows=1 width=0)
+                                                      default@catalog_sales,catalog_sales,Tbl:PARTIAL,Col:NONE,Output:["cs_sold_date_sk","cs_item_sk","cs_order_number","cs_quantity","cs_ext_sales_price"]
+                                            <-Map 9 [SIMPLE_EDGE]
+                                              SHUFFLE [RS_13]
+                                                PartitionCols:_col0
+                                                Select Operator [SEL_5] (rows=231000 width=1436)
+                                                  Output:["_col0","_col1","_col2","_col3","_col5"]
+                                                  Filter Operator [FIL_218] (rows=231000 width=1436)
+                                                    predicate:((i_category = 'Sports') and i_item_sk is not null and i_brand_id is not null and i_class_id is not null and i_category_id is not null and i_manufact_id is not null)
+                                                    TableScan [TS_3] (rows=462000 width=1436)
+                                                      default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_brand_id","i_class_id","i_category_id","i_category","i_manufact_id"]
 

http://git-wip-us.apache.org/repos/asf/hive/blob/09271872/ql/src/test/results/clientpositive/spark/union_remove_25.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/union_remove_25.q.out b/ql/src/test/results/clientpositive/spark/union_remove_25.q.out
index 190bea5..eb95cad 100644
--- a/ql/src/test/results/clientpositive/spark/union_remove_25.q.out
+++ b/ql/src/test/results/clientpositive/spark/union_remove_25.q.out
@@ -458,21 +458,17 @@ STAGE PLANS:
                   Number of rows: 1000
                   Statistics: Num rows: 1000 Data size: 10000 Basic stats: COMPLETE Column stats: NONE
                   Select Operator
-                    expressions: _col0 (type: string), _col1 (type: string), _col2 (type: string)
-                    outputColumnNames: _col0, _col1, _col3
-                    Statistics: Num rows: 1000 Data size: 10000 Basic stats: COMPLETE Column stats: NONE
-                    Select Operator
-                      expressions: _col0 (type: string), UDFToLong(_col1) (type: bigint), '2008-04-08' (type: string), _col3 (type: string)
-                      outputColumnNames: _col0, _col1, _col2, _col3
+                    expressions: _col0 (type: string), UDFToLong(_col1) (type: bigint), '2008-04-08' (type: string), _col2 (type: string)
+                    outputColumnNames: _col0, _col1, _col2, _col3
+                    Statistics: Num rows: 2000 Data size: 20000 Basic stats: COMPLETE Column stats: NONE
+                    File Output Operator
+                      compressed: false
                       Statistics: Num rows: 2000 Data size: 20000 Basic stats: COMPLETE Column stats: NONE
-                      File Output Operator
-                        compressed: false
-                        Statistics: Num rows: 2000 Data size: 20000 Basic stats: COMPLETE Column stats: NONE
-                        table:
-                            input format: org.apache.hadoop.mapred.TextInputFormat
-                            output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
-                            serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-                            name: default.outputtbl3
+                      table:
+                          input format: org.apache.hadoop.mapred.TextInputFormat
+                          output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                          serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                          name: default.outputtbl3
         Reducer 4 
             Reduce Operator Tree:
               Select Operator
@@ -483,21 +479,17 @@ STAGE PLANS:
                   Number of rows: 1000
                   Statistics: Num rows: 1000 Data size: 10000 Basic stats: COMPLETE Column stats: NONE
                   Select Operator
-                    expressions: _col0 (type: string), _col1 (type: string), _col2 (type: string)
-                    outputColumnNames: _col0, _col1, _col3
-                    Statistics: Num rows: 1000 Data size: 10000 Basic stats: COMPLETE Column stats: NONE
-                    Select Operator
-                      expressions: _col0 (type: string), UDFToLong(_col1) (type: bigint), '2008-04-08' (type: string), _col3 (type: string)
-                      outputColumnNames: _col0, _col1, _col2, _col3
+                    expressions: _col0 (type: string), UDFToLong(_col1) (type: bigint), '2008-04-08' (type: string), _col2 (type: string)
+                    outputColumnNames: _col0, _col1, _col2, _col3
+                    Statistics: Num rows: 2000 Data size: 20000 Basic stats: COMPLETE Column stats: NONE
+                    File Output Operator
+                      compressed: false
                       Statistics: Num rows: 2000 Data size: 20000 Basic stats: COMPLETE Column stats: NONE
-                      File Output Operator
-                        compressed: false
-                        Statistics: Num rows: 2000 Data size: 20000 Basic stats: COMPLETE Column stats: NONE
-                        table:
-                            input format: org.apache.hadoop.mapred.TextInputFormat
-                            output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
-                            serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-                            name: default.outputtbl3
+                      table:
+                          input format: org.apache.hadoop.mapred.TextInputFormat
+                          output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                          serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                          name: default.outputtbl3
 
   Stage: Stage-0
     Move Operator

http://git-wip-us.apache.org/repos/asf/hive/blob/09271872/ql/src/test/results/clientpositive/spark/union_view.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/union_view.q.out b/ql/src/test/results/clientpositive/spark/union_view.q.out
index 402d9fd..3372afb 100644
--- a/ql/src/test/results/clientpositive/spark/union_view.q.out
+++ b/ql/src/test/results/clientpositive/spark/union_view.q.out
@@ -272,10 +272,10 @@ STAGE PLANS:
                     Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: value (type: string)
-                      outputColumnNames: _col1
+                      outputColumnNames: _col0
                       Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE
                       Select Operator
-                        expressions: 86 (type: int), _col1 (type: string), '1' (type: string)
+                        expressions: 86 (type: int), _col0 (type: string), '1' (type: string)
                         outputColumnNames: _col0, _col1, _col2
                         Statistics: Num rows: 252 Data size: 2656 Basic stats: COMPLETE Column stats: NONE
                         File Output Operator
@@ -296,10 +296,10 @@ STAGE PLANS:
                     Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
                     Select Operator
                       expressions: value (type: string)
-                      outputColumnNames: _col1
+                      outputColumnNames: _col0
                       Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
                       Select Operator
-                        expressions: 86 (type: int), _col1 (type: string), '1' (type: string)
+                        expressions: 86 (type: int), _col0 (type: string), '1' (type: string)
                         outputColumnNames: _col0, _col1, _col2
                         Statistics: Num rows: 252 Data size: 2656 Basic stats: COMPLETE Column stats: NONE
                         File Output Operator
@@ -320,10 +320,10 @@ STAGE PLANS:
                     Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
                     Select Operator
                       expressions: value (type: string)
-                      outputColumnNames: _col1
+                      outputColumnNames: _col0
                       Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
                       Select Operator
-                        expressions: 86 (type: int), _col1 (type: string), '1' (type: string)
+                        expressions: 86 (type: int), _col0 (type: string), '1' (type: string)
                         outputColumnNames: _col0, _col1, _col2
                         Statistics: Num rows: 252 Data size: 2656 Basic stats: COMPLETE Column stats: NONE
                         File Output Operator
@@ -360,10 +360,10 @@ STAGE PLANS:
                     Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
                     Select Operator
                       expressions: value (type: string)
-                      outputColumnNames: _col1
+                      outputColumnNames: _col0
                       Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
                       Select Operator
-                        expressions: 86 (type: int), _col1 (type: string), '2' (type: string)
+                        expressions: 86 (type: int), _col0 (type: string), '2' (type: string)
                         outputColumnNames: _col0, _col1, _col2
                         Statistics: Num rows: 502 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
                         File Output Operator
@@ -384,10 +384,10 @@ STAGE PLANS:
                     Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: value (type: string)
-                      outputColumnNames: _col1
+                      outputColumnNames: _col0
                       Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
                       Select Operator
-                        expressions: 86 (type: int), _col1 (type: string), '2' (type: string)
+                        expressions: 86 (type: int), _col0 (type: string), '2' (type: string)
                         outputColumnNames: _col0, _col1, _col2
                         Statistics: Num rows: 502 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
                         File Output Operator
@@ -408,10 +408,10 @@ STAGE PLANS:
                     Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
                     Select Operator
                       expressions: value (type: string)
-                      outputColumnNames: _col1
+                      outputColumnNames: _col0
                       Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
                       Select Operator
-                        expressions: 86 (type: int), _col1 (type: string), '2' (type: string)
+                        expressions: 86 (type: int), _col0 (type: string), '2' (type: string)
                         outputColumnNames: _col0, _col1, _col2
                         Statistics: Num rows: 502 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
                         File Output Operator
@@ -448,10 +448,10 @@ STAGE PLANS:
                     Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
                     Select Operator
                       expressions: value (type: string)
-                      outputColumnNames: _col1
+                      outputColumnNames: _col0
                       Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
                       Select Operator
-                        expressions: 86 (type: int), _col1 (type: string), '3' (type: string)
+                        expressions: 86 (type: int), _col0 (type: string), '3' (type: string)
                         outputColumnNames: _col0, _col1, _col2
                         Statistics: Num rows: 502 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
                         File Output Operator
@@ -472,10 +472,10 @@ STAGE PLANS:
                     Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
                     Select Operator
                       expressions: value (type: string)
-                      outputColumnNames: _col1
+                      outputColumnNames: _col0
                       Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
                       Select Operator
-                        expressions: 86 (type: int), _col1 (type: string), '3' (type: string)
+                        expressions: 86 (type: int), _col0 (type: string), '3' (type: string)
                         outputColumnNames: _col0, _col1, _col2
                         Statistics: Num rows: 502 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
                         File Output Operator
@@ -496,10 +496,10 @@ STAGE PLANS:
                     Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: value (type: string)
-                      outputColumnNames: _col1
+                      outputColumnNames: _col0
                       Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
                       Select Operator
-                        expressions: 86 (type: int), _col1 (type: string), '3' (type: string)
+                        expressions: 86 (type: int), _col0 (type: string), '3' (type: string)
                         outputColumnNames: _col0, _col1, _col2
                         Statistics: Num rows: 502 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
                         File Output Operator
@@ -538,10 +538,10 @@ STAGE PLANS:
                     Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: value (type: string), ds (type: string)
-                      outputColumnNames: _col1, _col2
+                      outputColumnNames: _col0, _col1
                       Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE
                       Select Operator
-                        expressions: _col1 (type: string), _col2 (type: string)
+                        expressions: _col0 (type: string), _col1 (type: string)
                         outputColumnNames: _col1, _col2
                         Statistics: Num rows: 1250 Data size: 13280 Basic stats: COMPLETE Column stats: NONE
                         Reduce Output Operator
@@ -560,10 +560,10 @@ STAGE PLANS:
                     Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: value (type: string), ds (type: string)
-                      outputColumnNames: _col1, _col2
+                      outputColumnNames: _col0, _col1
                       Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
                       Select Operator
-                        expressions: _col1 (type: string), _col2 (type: string)
+                        expressions: _col0 (type: string), _col1 (type: string)
                         outputColumnNames: _col1, _col2
                         Statistics: Num rows: 1250 Data size: 13280 Basic stats: COMPLETE Column stats: NONE
                         Reduce Output Operator
@@ -582,10 +582,10 @@ STAGE PLANS:
                     Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: value (type: string), ds (type: string)
-                      outputColumnNames: _col1, _col2
+                      outputColumnNames: _col0, _col1
                       Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
                       Select Operator
-                        expressions: _col1 (type: string), _col2 (type: string)
+                        expressions: _col0 (type: string), _col1 (type: string)
                         outputColumnNames: _col1, _col2
                         Statistics: Num rows: 1250 Data size: 13280 Basic stats: COMPLETE Column stats: NONE
                         Reduce Output Operator
@@ -931,10 +931,10 @@ STAGE PLANS:
                     Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
                     Select Operator
                       expressions: value (type: string)
-                      outputColumnNames: _col1
+                      outputColumnNames: _col0
                       Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
                       Select Operator
-                        expressions: 86 (type: int), _col1 (type: string), '4' (type: string)
+                        expressions: 86 (type: int), _col0 (type: string), '4' (type: string)
                         outputColumnNames: _col0, _col1, _col2
                         Statistics: Num rows: 252 Data size: 2656 Basic stats: COMPLETE Column stats: NONE
                         File Output Operator
@@ -955,10 +955,10 @@ STAGE PLANS:
                     Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
                     Select Operator
                       expressions: value (type: string)
-                      outputColumnNames: _col1
+                      outputColumnNames: _col0
                       Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
                       Select Operator
-                        expressions: 86 (type: int), _col1 (type: string), '4' (type: string)
+                        expressions: 86 (type: int), _col0 (type: string), '4' (type: string)
                         outputColumnNames: _col0, _col1, _col2
                         Statistics: Num rows: 252 Data size: 2656 Basic stats: COMPLETE Column stats: NONE
                         File Output Operator
@@ -979,10 +979,10 @@ STAGE PLANS:
                     Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: value (type: string)
-                      outputColumnNames: _col1
+                      outputColumnNames: _col0
                       Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE
                       Select Operator
-                        expressions: 86 (type: int), _col1 (type: string), '4' (type: string)
+                        expressions: 86 (type: int), _col0 (type: string), '4' (type: string)
                         outputColumnNames: _col0, _col1, _col2
                         Statistics: Num rows: 252 Data size: 2656 Basic stats: COMPLETE Column stats: NONE
                         File Output Operator