You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by we...@apache.org on 2017/05/17 02:52:54 UTC

[16/50] [abbrv] hive git commit: HIVE-16602: Implement shared scans with Tez (Jesus Camacho Rodriguez, reviewed by Ashutosh Chauhan)

http://git-wip-us.apache.org/repos/asf/hive/blob/59f65772/ql/src/test/results/clientpositive/perf/query25.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/query25.q.out b/ql/src/test/results/clientpositive/perf/query25.q.out
index 7e15c26..2b1c064 100644
--- a/ql/src/test/results/clientpositive/perf/query25.q.out
+++ b/ql/src/test/results/clientpositive/perf/query25.q.out
@@ -6,14 +6,14 @@ Plan optimized by CBO.
 
 Vertex dependency in root stage
 Reducer 10 <- Map 14 (SIMPLE_EDGE), Reducer 9 (SIMPLE_EDGE)
-Reducer 11 <- Map 15 (SIMPLE_EDGE), Reducer 10 (SIMPLE_EDGE)
-Reducer 12 <- Map 16 (SIMPLE_EDGE), Reducer 11 (SIMPLE_EDGE)
+Reducer 12 <- Map 11 (SIMPLE_EDGE), Map 13 (SIMPLE_EDGE)
 Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 7 (SIMPLE_EDGE)
-Reducer 3 <- Reducer 12 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
-Reducer 4 <- Map 17 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
+Reducer 3 <- Reducer 10 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Map 15 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
 Reducer 5 <- Reducer 4 (SIMPLE_EDGE)
 Reducer 6 <- Reducer 5 (SIMPLE_EDGE)
-Reducer 9 <- Map 13 (SIMPLE_EDGE), Map 8 (SIMPLE_EDGE)
+Reducer 8 <- Map 7 (SIMPLE_EDGE), Reducer 12 (SIMPLE_EDGE)
+Reducer 9 <- Map 7 (SIMPLE_EDGE), Reducer 8 (SIMPLE_EDGE)
 
 Stage-0
   Fetch Operator
@@ -36,7 +36,7 @@ Stage-0
                     Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"],aggregations:["sum(_col18)","sum(_col23)","sum(_col3)"],keys:_col28, _col29, _col8, _col9
                     Merge Join Operator [MERGEJOIN_100] (rows=1020411534 width=88)
                       Conds:RS_43._col14=RS_44._col0(Inner),Output:["_col3","_col8","_col9","_col18","_col23","_col28","_col29"]
-                    <-Map 17 [SIMPLE_EDGE]
+                    <-Map 15 [SIMPLE_EDGE]
                       SHUFFLE [RS_44]
                         PartitionCols:_col0
                         Select Operator [SEL_36] (rows=462000 width=1436)
@@ -50,14 +50,14 @@ Stage-0
                         PartitionCols:_col14
                         Merge Join Operator [MERGEJOIN_99] (rows=927646829 width=88)
                           Conds:RS_40._col1, _col2=RS_41._col14, _col13(Inner),Output:["_col3","_col8","_col9","_col14","_col18","_col23"]
-                        <-Reducer 12 [SIMPLE_EDGE]
+                        <-Reducer 10 [SIMPLE_EDGE]
                           SHUFFLE [RS_41]
                             PartitionCols:_col14, _col13
                             Select Operator [SEL_33] (rows=843315281 width=88)
                               Output:["_col1","_col2","_col7","_col11","_col13","_col14","_col16"]
                               Merge Join Operator [MERGEJOIN_98] (rows=843315281 width=88)
                                 Conds:RS_30._col3=RS_31._col0(Inner),Output:["_col1","_col5","_col7","_col8","_col10","_col18","_col19"]
-                              <-Map 16 [SIMPLE_EDGE]
+                              <-Map 14 [SIMPLE_EDGE]
                                 SHUFFLE [RS_31]
                                   PartitionCols:_col0
                                   Select Operator [SEL_20] (rows=1704 width=1910)
@@ -66,39 +66,47 @@ Stage-0
                                       predicate:s_store_sk is not null
                                       TableScan [TS_18] (rows=1704 width=1910)
                                         default@store,store,Tbl:COMPLETE,Col:NONE,Output:["s_store_sk","s_store_id","s_store_name"]
-                              <-Reducer 11 [SIMPLE_EDGE]
+                              <-Reducer 9 [SIMPLE_EDGE]
                                 SHUFFLE [RS_30]
                                   PartitionCols:_col3
                                   Merge Join Operator [MERGEJOIN_97] (rows=766650239 width=88)
                                     Conds:RS_27._col6=RS_28._col0(Inner),Output:["_col1","_col3","_col5","_col7","_col8","_col10"]
-                                  <-Map 15 [SIMPLE_EDGE]
+                                  <-Map 7 [SIMPLE_EDGE]
                                     SHUFFLE [RS_28]
                                       PartitionCols:_col0
                                       Select Operator [SEL_17] (rows=4058 width=1119)
                                         Output:["_col0"]
                                         Filter Operator [FIL_91] (rows=4058 width=1119)
                                           predicate:(d_moy BETWEEN 4 AND 10 and (d_year = 1998) and d_date_sk is not null)
-                                          TableScan [TS_15] (rows=73049 width=1119)
-                                            default@date_dim,d2,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_moy"]
-                                  <-Reducer 10 [SIMPLE_EDGE]
+                                          TableScan [TS_3] (rows=73049 width=1119)
+                                            default@date_dim,d3,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_moy"]
+                                  <-Reducer 8 [SIMPLE_EDGE]
                                     SHUFFLE [RS_27]
                                       PartitionCols:_col6
                                       Merge Join Operator [MERGEJOIN_96] (rows=696954748 width=88)
                                         Conds:RS_24._col0=RS_25._col0(Inner),Output:["_col1","_col3","_col5","_col6","_col7","_col8","_col10"]
-                                      <-Map 14 [SIMPLE_EDGE]
+                                      <-Map 7 [SIMPLE_EDGE]
                                         SHUFFLE [RS_25]
                                           PartitionCols:_col0
                                           Select Operator [SEL_14] (rows=18262 width=1119)
                                             Output:["_col0"]
                                             Filter Operator [FIL_90] (rows=18262 width=1119)
                                               predicate:((d_moy = 4) and (d_year = 1998) and d_date_sk is not null)
-                                              TableScan [TS_12] (rows=73049 width=1119)
-                                                default@date_dim,d1,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_moy"]
-                                      <-Reducer 9 [SIMPLE_EDGE]
+                                               Please refer to the previous TableScan [TS_3]
+                                      <-Reducer 12 [SIMPLE_EDGE]
                                         SHUFFLE [RS_24]
                                           PartitionCols:_col0
                                           Merge Join Operator [MERGEJOIN_95] (rows=633595212 width=88)
                                             Conds:RS_21._col1, _col2, _col4=RS_22._col1, _col2, _col3(Inner),Output:["_col0","_col1","_col3","_col5","_col6","_col7","_col8","_col10"]
+                                          <-Map 11 [SIMPLE_EDGE]
+                                            SHUFFLE [RS_21]
+                                              PartitionCols:_col1, _col2, _col4
+                                              Select Operator [SEL_8] (rows=575995635 width=88)
+                                                Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
+                                                Filter Operator [FIL_88] (rows=575995635 width=88)
+                                                  predicate:(ss_item_sk is not null and ss_customer_sk is not null and ss_ticket_number is not null and ss_sold_date_sk is not null and ss_store_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_item_sk","ss_customer_sk","ss_store_sk","ss_ticket_number","ss_net_profit"]
                                           <-Map 13 [SIMPLE_EDGE]
                                             SHUFFLE [RS_22]
                                               PartitionCols:_col1, _col2, _col3
@@ -108,20 +116,19 @@ Stage-0
                                                   predicate:(sr_item_sk is not null and sr_customer_sk is not null and sr_ticket_number is not null and sr_returned_date_sk is not null)
                                                   TableScan [TS_9] (rows=57591150 width=77)
                                                     default@store_returns,store_returns,Tbl:COMPLETE,Col:NONE,Output:["sr_returned_date_sk","sr_item_sk","sr_customer_sk","sr_ticket_number","sr_net_loss"]
-                                          <-Map 8 [SIMPLE_EDGE]
-                                            SHUFFLE [RS_21]
-                                              PartitionCols:_col1, _col2, _col4
-                                              Select Operator [SEL_8] (rows=575995635 width=88)
-                                                Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
-                                                Filter Operator [FIL_88] (rows=575995635 width=88)
-                                                  predicate:(ss_item_sk is not null and ss_customer_sk is not null and ss_ticket_number is not null and ss_sold_date_sk is not null and ss_store_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_item_sk","ss_customer_sk","ss_store_sk","ss_ticket_number","ss_net_profit"]
                         <-Reducer 2 [SIMPLE_EDGE]
                           SHUFFLE [RS_40]
                             PartitionCols:_col1, _col2
                             Merge Join Operator [MERGEJOIN_94] (rows=316788826 width=135)
                               Conds:RS_37._col0=RS_38._col0(Inner),Output:["_col1","_col2","_col3"]
+                            <-Map 7 [SIMPLE_EDGE]
+                              SHUFFLE [RS_38]
+                                PartitionCols:_col0
+                                Select Operator [SEL_5] (rows=4058 width=1119)
+                                  Output:["_col0"]
+                                  Filter Operator [FIL_87] (rows=4058 width=1119)
+                                    predicate:(d_moy BETWEEN 4 AND 10 and (d_year = 1998) and d_date_sk is not null)
+                                     Please refer to the previous TableScan [TS_3]
                             <-Map 1 [SIMPLE_EDGE]
                               SHUFFLE [RS_37]
                                 PartitionCols:_col0
@@ -131,13 +138,4 @@ Stage-0
                                     predicate:(cs_bill_customer_sk is not null and cs_item_sk is not null and cs_sold_date_sk is not null)
                                     TableScan [TS_0] (rows=287989836 width=135)
                                       default@catalog_sales,catalog_sales,Tbl:COMPLETE,Col:NONE,Output:["cs_sold_date_sk","cs_bill_customer_sk","cs_item_sk","cs_net_profit"]
-                            <-Map 7 [SIMPLE_EDGE]
-                              SHUFFLE [RS_38]
-                                PartitionCols:_col0
-                                Select Operator [SEL_5] (rows=4058 width=1119)
-                                  Output:["_col0"]
-                                  Filter Operator [FIL_87] (rows=4058 width=1119)
-                                    predicate:(d_moy BETWEEN 4 AND 10 and (d_year = 1998) and d_date_sk is not null)
-                                    TableScan [TS_3] (rows=73049 width=1119)
-                                      default@date_dim,d3,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_moy"]
 

http://git-wip-us.apache.org/repos/asf/hive/blob/59f65772/ql/src/test/results/clientpositive/perf/query28.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/query28.q.out b/ql/src/test/results/clientpositive/perf/query28.q.out
index f7c5225..78129cf 100644
--- a/ql/src/test/results/clientpositive/perf/query28.q.out
+++ b/ql/src/test/results/clientpositive/perf/query28.q.out
@@ -104,13 +104,13 @@ POSTHOOK: type: QUERY
 Plan optimized by CBO.
 
 Vertex dependency in root stage
-Reducer 11 <- Map 10 (SIMPLE_EDGE)
-Reducer 13 <- Map 12 (SIMPLE_EDGE)
 Reducer 2 <- Map 1 (SIMPLE_EDGE)
-Reducer 3 <- Reducer 11 (CUSTOM_SIMPLE_EDGE), Reducer 13 (CUSTOM_SIMPLE_EDGE), Reducer 2 (CUSTOM_SIMPLE_EDGE), Reducer 5 (CUSTOM_SIMPLE_EDGE), Reducer 7 (CUSTOM_SIMPLE_EDGE), Reducer 9 (CUSTOM_SIMPLE_EDGE)
-Reducer 5 <- Map 4 (SIMPLE_EDGE)
-Reducer 7 <- Map 6 (SIMPLE_EDGE)
-Reducer 9 <- Map 8 (SIMPLE_EDGE)
+Reducer 3 <- Reducer 2 (CUSTOM_SIMPLE_EDGE), Reducer 4 (CUSTOM_SIMPLE_EDGE), Reducer 5 (CUSTOM_SIMPLE_EDGE), Reducer 6 (CUSTOM_SIMPLE_EDGE), Reducer 7 (CUSTOM_SIMPLE_EDGE), Reducer 8 (CUSTOM_SIMPLE_EDGE)
+Reducer 4 <- Map 1 (SIMPLE_EDGE)
+Reducer 5 <- Map 1 (SIMPLE_EDGE)
+Reducer 6 <- Map 1 (SIMPLE_EDGE)
+Reducer 7 <- Map 1 (SIMPLE_EDGE)
+Reducer 8 <- Map 1 (SIMPLE_EDGE)
 
 Stage-0
   Fetch Operator
@@ -124,34 +124,6 @@ Stage-0
             Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17"]
             Merge Join Operator [MERGEJOIN_58] (rows=1 width=2497)
               Conds:(Inner),(Inner),(Inner),(Inner),(Inner),Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17"]
-            <-Reducer 11 [CUSTOM_SIMPLE_EDGE]
-              PARTITION_ONLY_SHUFFLE [RS_46]
-                Group By Operator [GBY_33] (rows=1 width=416)
-                  Output:["_col0","_col1","_col2"],aggregations:["avg(VALUE._col0)","count(VALUE._col1)","count(DISTINCT KEY._col0:0._col0)"]
-                <-Map 10 [SIMPLE_EDGE]
-                  SHUFFLE [RS_32]
-                    Group By Operator [GBY_31] (rows=21333171 width=88)
-                      Output:["_col0","_col1","_col2","_col3"],aggregations:["avg(ss_list_price)","count(ss_list_price)","count(DISTINCT ss_list_price)"],keys:ss_list_price
-                      Select Operator [SEL_30] (rows=21333171 width=88)
-                        Output:["ss_list_price"]
-                        Filter Operator [FIL_56] (rows=21333171 width=88)
-                          predicate:(ss_quantity BETWEEN 11 AND 15 and (ss_list_price BETWEEN 66 AND 76 or ss_coupon_amt BETWEEN 920 AND 1920 or ss_wholesale_cost BETWEEN 4 AND 24))
-                          TableScan [TS_28] (rows=575995635 width=88)
-                            default@store_sales,store_sales,Tbl:COMPLETE,Col:NONE,Output:["ss_quantity","ss_wholesale_cost","ss_list_price","ss_coupon_amt"]
-            <-Reducer 13 [CUSTOM_SIMPLE_EDGE]
-              PARTITION_ONLY_SHUFFLE [RS_47]
-                Group By Operator [GBY_40] (rows=1 width=416)
-                  Output:["_col0","_col1","_col2"],aggregations:["avg(VALUE._col0)","count(VALUE._col1)","count(DISTINCT KEY._col0:0._col0)"]
-                <-Map 12 [SIMPLE_EDGE]
-                  SHUFFLE [RS_39]
-                    Group By Operator [GBY_38] (rows=21333171 width=88)
-                      Output:["_col0","_col1","_col2","_col3"],aggregations:["avg(ss_list_price)","count(ss_list_price)","count(DISTINCT ss_list_price)"],keys:ss_list_price
-                      Select Operator [SEL_37] (rows=21333171 width=88)
-                        Output:["ss_list_price"]
-                        Filter Operator [FIL_57] (rows=21333171 width=88)
-                          predicate:(ss_quantity BETWEEN 6 AND 10 and (ss_list_price BETWEEN 91 AND 101 or ss_coupon_amt BETWEEN 1430 AND 2430 or ss_wholesale_cost BETWEEN 32 AND 52))
-                          TableScan [TS_35] (rows=575995635 width=88)
-                            default@store_sales,store_sales,Tbl:COMPLETE,Col:NONE,Output:["ss_quantity","ss_wholesale_cost","ss_list_price","ss_coupon_amt"]
             <-Reducer 2 [CUSTOM_SIMPLE_EDGE]
               PARTITION_ONLY_SHUFFLE [RS_42]
                 Group By Operator [GBY_5] (rows=1 width=416)
@@ -166,11 +138,11 @@ Stage-0
                           predicate:(ss_quantity BETWEEN 0 AND 5 and (ss_list_price BETWEEN 11 AND 21 or ss_coupon_amt BETWEEN 460 AND 1460 or ss_wholesale_cost BETWEEN 14 AND 34))
                           TableScan [TS_0] (rows=575995635 width=88)
                             default@store_sales,store_sales,Tbl:COMPLETE,Col:NONE,Output:["ss_quantity","ss_wholesale_cost","ss_list_price","ss_coupon_amt"]
-            <-Reducer 5 [CUSTOM_SIMPLE_EDGE]
+            <-Reducer 4 [CUSTOM_SIMPLE_EDGE]
               PARTITION_ONLY_SHUFFLE [RS_43]
                 Group By Operator [GBY_12] (rows=1 width=416)
                   Output:["_col0","_col1","_col2"],aggregations:["avg(VALUE._col0)","count(VALUE._col1)","count(DISTINCT KEY._col0:0._col0)"]
-                <-Map 4 [SIMPLE_EDGE]
+                <-Map 1 [SIMPLE_EDGE]
                   SHUFFLE [RS_11]
                     Group By Operator [GBY_10] (rows=21333171 width=88)
                       Output:["_col0","_col1","_col2","_col3"],aggregations:["avg(ss_list_price)","count(ss_list_price)","count(DISTINCT ss_list_price)"],keys:ss_list_price
@@ -178,13 +150,12 @@ Stage-0
                         Output:["ss_list_price"]
                         Filter Operator [FIL_53] (rows=21333171 width=88)
                           predicate:(ss_quantity BETWEEN 26 AND 30 and (ss_list_price BETWEEN 28 AND 38 or ss_coupon_amt BETWEEN 2513 AND 3513 or ss_wholesale_cost BETWEEN 42 AND 62))
-                          TableScan [TS_7] (rows=575995635 width=88)
-                            default@store_sales,store_sales,Tbl:COMPLETE,Col:NONE,Output:["ss_quantity","ss_wholesale_cost","ss_list_price","ss_coupon_amt"]
-            <-Reducer 7 [CUSTOM_SIMPLE_EDGE]
+                           Please refer to the previous TableScan [TS_0]
+            <-Reducer 5 [CUSTOM_SIMPLE_EDGE]
               PARTITION_ONLY_SHUFFLE [RS_44]
                 Group By Operator [GBY_19] (rows=1 width=416)
                   Output:["_col0","_col1","_col2"],aggregations:["avg(VALUE._col0)","count(VALUE._col1)","count(DISTINCT KEY._col0:0._col0)"]
-                <-Map 6 [SIMPLE_EDGE]
+                <-Map 1 [SIMPLE_EDGE]
                   SHUFFLE [RS_18]
                     Group By Operator [GBY_17] (rows=21333171 width=88)
                       Output:["_col0","_col1","_col2","_col3"],aggregations:["avg(ss_list_price)","count(ss_list_price)","count(DISTINCT ss_list_price)"],keys:ss_list_price
@@ -192,13 +163,12 @@ Stage-0
                         Output:["ss_list_price"]
                         Filter Operator [FIL_54] (rows=21333171 width=88)
                           predicate:(ss_quantity BETWEEN 21 AND 25 and (ss_list_price BETWEEN 135 AND 145 or ss_coupon_amt BETWEEN 14180 AND 15180 or ss_wholesale_cost BETWEEN 38 AND 58))
-                          TableScan [TS_14] (rows=575995635 width=88)
-                            default@store_sales,store_sales,Tbl:COMPLETE,Col:NONE,Output:["ss_quantity","ss_wholesale_cost","ss_list_price","ss_coupon_amt"]
-            <-Reducer 9 [CUSTOM_SIMPLE_EDGE]
+                           Please refer to the previous TableScan [TS_0]
+            <-Reducer 6 [CUSTOM_SIMPLE_EDGE]
               PARTITION_ONLY_SHUFFLE [RS_45]
                 Group By Operator [GBY_26] (rows=1 width=416)
                   Output:["_col0","_col1","_col2"],aggregations:["avg(VALUE._col0)","count(VALUE._col1)","count(DISTINCT KEY._col0:0._col0)"]
-                <-Map 8 [SIMPLE_EDGE]
+                <-Map 1 [SIMPLE_EDGE]
                   SHUFFLE [RS_25]
                     Group By Operator [GBY_24] (rows=21333171 width=88)
                       Output:["_col0","_col1","_col2","_col3"],aggregations:["avg(ss_list_price)","count(ss_list_price)","count(DISTINCT ss_list_price)"],keys:ss_list_price
@@ -206,6 +176,31 @@ Stage-0
                         Output:["ss_list_price"]
                         Filter Operator [FIL_55] (rows=21333171 width=88)
                           predicate:(ss_quantity BETWEEN 16 AND 20 and (ss_list_price BETWEEN 142 AND 152 or ss_coupon_amt BETWEEN 3054 AND 4054 or ss_wholesale_cost BETWEEN 80 AND 100))
-                          TableScan [TS_21] (rows=575995635 width=88)
-                            default@store_sales,store_sales,Tbl:COMPLETE,Col:NONE,Output:["ss_quantity","ss_wholesale_cost","ss_list_price","ss_coupon_amt"]
+                           Please refer to the previous TableScan [TS_0]
+            <-Reducer 7 [CUSTOM_SIMPLE_EDGE]
+              PARTITION_ONLY_SHUFFLE [RS_46]
+                Group By Operator [GBY_33] (rows=1 width=416)
+                  Output:["_col0","_col1","_col2"],aggregations:["avg(VALUE._col0)","count(VALUE._col1)","count(DISTINCT KEY._col0:0._col0)"]
+                <-Map 1 [SIMPLE_EDGE]
+                  SHUFFLE [RS_32]
+                    Group By Operator [GBY_31] (rows=21333171 width=88)
+                      Output:["_col0","_col1","_col2","_col3"],aggregations:["avg(ss_list_price)","count(ss_list_price)","count(DISTINCT ss_list_price)"],keys:ss_list_price
+                      Select Operator [SEL_30] (rows=21333171 width=88)
+                        Output:["ss_list_price"]
+                        Filter Operator [FIL_56] (rows=21333171 width=88)
+                          predicate:(ss_quantity BETWEEN 11 AND 15 and (ss_list_price BETWEEN 66 AND 76 or ss_coupon_amt BETWEEN 920 AND 1920 or ss_wholesale_cost BETWEEN 4 AND 24))
+                           Please refer to the previous TableScan [TS_0]
+            <-Reducer 8 [CUSTOM_SIMPLE_EDGE]
+              PARTITION_ONLY_SHUFFLE [RS_47]
+                Group By Operator [GBY_40] (rows=1 width=416)
+                  Output:["_col0","_col1","_col2"],aggregations:["avg(VALUE._col0)","count(VALUE._col1)","count(DISTINCT KEY._col0:0._col0)"]
+                <-Map 1 [SIMPLE_EDGE]
+                  SHUFFLE [RS_39]
+                    Group By Operator [GBY_38] (rows=21333171 width=88)
+                      Output:["_col0","_col1","_col2","_col3"],aggregations:["avg(ss_list_price)","count(ss_list_price)","count(DISTINCT ss_list_price)"],keys:ss_list_price
+                      Select Operator [SEL_37] (rows=21333171 width=88)
+                        Output:["ss_list_price"]
+                        Filter Operator [FIL_57] (rows=21333171 width=88)
+                          predicate:(ss_quantity BETWEEN 6 AND 10 and (ss_list_price BETWEEN 91 AND 101 or ss_coupon_amt BETWEEN 1430 AND 2430 or ss_wholesale_cost BETWEEN 32 AND 52))
+                           Please refer to the previous TableScan [TS_0]
 

http://git-wip-us.apache.org/repos/asf/hive/blob/59f65772/ql/src/test/results/clientpositive/perf/query29.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/query29.q.out b/ql/src/test/results/clientpositive/perf/query29.q.out
index 675bdd3..ec303d3 100644
--- a/ql/src/test/results/clientpositive/perf/query29.q.out
+++ b/ql/src/test/results/clientpositive/perf/query29.q.out
@@ -6,11 +6,11 @@ Plan optimized by CBO.
 
 Vertex dependency in root stage
 Reducer 10 <- Map 14 (SIMPLE_EDGE), Reducer 9 (SIMPLE_EDGE)
-Reducer 11 <- Map 15 (SIMPLE_EDGE), Reducer 10 (SIMPLE_EDGE)
-Reducer 12 <- Map 16 (SIMPLE_EDGE), Reducer 11 (SIMPLE_EDGE)
+Reducer 11 <- Map 14 (SIMPLE_EDGE), Reducer 10 (SIMPLE_EDGE)
+Reducer 12 <- Map 15 (SIMPLE_EDGE), Reducer 11 (SIMPLE_EDGE)
 Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 7 (SIMPLE_EDGE)
 Reducer 3 <- Reducer 12 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
-Reducer 4 <- Map 17 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
+Reducer 4 <- Map 16 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
 Reducer 5 <- Reducer 4 (SIMPLE_EDGE)
 Reducer 6 <- Reducer 5 (SIMPLE_EDGE)
 Reducer 9 <- Map 13 (SIMPLE_EDGE), Map 8 (SIMPLE_EDGE)
@@ -36,7 +36,7 @@ Stage-0
                     Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"],aggregations:["sum(_col17)","sum(_col22)","sum(_col3)"],keys:_col27, _col28, _col7, _col8
                     Merge Join Operator [MERGEJOIN_100] (rows=1020411534 width=88)
                       Conds:RS_43._col13=RS_44._col0(Inner),Output:["_col3","_col7","_col8","_col17","_col22","_col27","_col28"]
-                    <-Map 17 [SIMPLE_EDGE]
+                    <-Map 16 [SIMPLE_EDGE]
                       SHUFFLE [RS_44]
                         PartitionCols:_col0
                         Select Operator [SEL_36] (rows=462000 width=1436)
@@ -57,7 +57,7 @@ Stage-0
                               Output:["_col1","_col2","_col7","_col11","_col13","_col14","_col16"]
                               Merge Join Operator [MERGEJOIN_98] (rows=843315281 width=88)
                                 Conds:RS_30._col3=RS_31._col0(Inner),Output:["_col1","_col5","_col7","_col8","_col10","_col18","_col19"]
-                              <-Map 16 [SIMPLE_EDGE]
+                              <-Map 15 [SIMPLE_EDGE]
                                 SHUFFLE [RS_31]
                                   PartitionCols:_col0
                                   Select Operator [SEL_20] (rows=1704 width=1910)
@@ -71,15 +71,15 @@ Stage-0
                                   PartitionCols:_col3
                                   Merge Join Operator [MERGEJOIN_97] (rows=766650239 width=88)
                                     Conds:RS_27._col6=RS_28._col0(Inner),Output:["_col1","_col3","_col5","_col7","_col8","_col10"]
-                                  <-Map 15 [SIMPLE_EDGE]
+                                  <-Map 14 [SIMPLE_EDGE]
                                     SHUFFLE [RS_28]
                                       PartitionCols:_col0
                                       Select Operator [SEL_17] (rows=4058 width=1119)
                                         Output:["_col0"]
                                         Filter Operator [FIL_91] (rows=4058 width=1119)
                                           predicate:(d_moy BETWEEN 2 AND 5 and (d_year = 2000) and d_date_sk is not null)
-                                          TableScan [TS_15] (rows=73049 width=1119)
-                                            default@date_dim,d2,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_moy"]
+                                          TableScan [TS_12] (rows=73049 width=1119)
+                                            default@date_dim,d1,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_moy"]
                                   <-Reducer 10 [SIMPLE_EDGE]
                                     SHUFFLE [RS_27]
                                       PartitionCols:_col6
@@ -92,8 +92,7 @@ Stage-0
                                             Output:["_col0"]
                                             Filter Operator [FIL_90] (rows=18262 width=1119)
                                               predicate:((d_moy = 2) and (d_year = 2000) and d_date_sk is not null)
-                                              TableScan [TS_12] (rows=73049 width=1119)
-                                                default@date_dim,d1,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_moy"]
+                                               Please refer to the previous TableScan [TS_12]
                                       <-Reducer 9 [SIMPLE_EDGE]
                                         SHUFFLE [RS_24]
                                           PartitionCols:_col0

http://git-wip-us.apache.org/repos/asf/hive/blob/59f65772/ql/src/test/results/clientpositive/perf/query30.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/query30.q.out b/ql/src/test/results/clientpositive/perf/query30.q.out
index 4b7d949..abe92b5 100644
--- a/ql/src/test/results/clientpositive/perf/query30.q.out
+++ b/ql/src/test/results/clientpositive/perf/query30.q.out
@@ -59,16 +59,16 @@ POSTHOOK: type: QUERY
 Plan optimized by CBO.
 
 Vertex dependency in root stage
-Reducer 10 <- Reducer 16 (SIMPLE_EDGE), Reducer 9 (SIMPLE_EDGE)
-Reducer 14 <- Map 13 (SIMPLE_EDGE), Map 17 (SIMPLE_EDGE)
-Reducer 15 <- Map 18 (SIMPLE_EDGE), Reducer 14 (SIMPLE_EDGE)
-Reducer 16 <- Reducer 15 (SIMPLE_EDGE)
+Reducer 10 <- Reducer 9 (SIMPLE_EDGE)
+Reducer 12 <- Map 11 (SIMPLE_EDGE), Map 14 (SIMPLE_EDGE)
+Reducer 13 <- Map 11 (SIMPLE_EDGE), Map 14 (SIMPLE_EDGE)
 Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 5 (SIMPLE_EDGE)
-Reducer 3 <- Reducer 10 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 3 <- Reducer 2 (SIMPLE_EDGE), Reducer 8 (SIMPLE_EDGE)
 Reducer 4 <- Reducer 3 (SIMPLE_EDGE)
-Reducer 7 <- Map 11 (SIMPLE_EDGE), Map 6 (SIMPLE_EDGE)
-Reducer 8 <- Map 12 (SIMPLE_EDGE), Reducer 7 (SIMPLE_EDGE)
-Reducer 9 <- Reducer 8 (SIMPLE_EDGE)
+Reducer 6 <- Map 5 (SIMPLE_EDGE), Reducer 12 (SIMPLE_EDGE)
+Reducer 7 <- Reducer 6 (SIMPLE_EDGE)
+Reducer 8 <- Reducer 10 (SIMPLE_EDGE), Reducer 7 (SIMPLE_EDGE)
+Reducer 9 <- Map 5 (SIMPLE_EDGE), Reducer 13 (SIMPLE_EDGE)
 
 Stage-0
   Fetch Operator
@@ -90,12 +90,35 @@ Stage-0
                     Output:["_col2","_col6","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col18","_col19","_col20"]
                     Merge Join Operator [MERGEJOIN_105] (rows=96800003 width=860)
                       Conds:RS_58._col0=RS_59._col0(Inner),Output:["_col1","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col18","_col19","_col20"]
-                    <-Reducer 10 [SIMPLE_EDGE]
+                    <-Reducer 2 [SIMPLE_EDGE]
+                      SHUFFLE [RS_58]
+                        PartitionCols:_col0
+                        Merge Join Operator [MERGEJOIN_99] (rows=88000001 width=860)
+                          Conds:RS_55._col2=RS_56._col0(Inner),Output:["_col0","_col1","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13"]
+                        <-Map 5 [SIMPLE_EDGE]
+                          SHUFFLE [RS_56]
+                            PartitionCols:_col0
+                            Select Operator [SEL_5] (rows=20000000 width=1014)
+                              Output:["_col0"]
+                              Filter Operator [FIL_92] (rows=20000000 width=1014)
+                                predicate:((ca_state = 'IL') and ca_address_sk is not null)
+                                TableScan [TS_3] (rows=40000000 width=1014)
+                                  default@customer_address,customer_address,Tbl:COMPLETE,Col:NONE,Output:["ca_address_sk","ca_state"]
+                        <-Map 1 [SIMPLE_EDGE]
+                          SHUFFLE [RS_55]
+                            PartitionCols:_col2
+                            Select Operator [SEL_2] (rows=80000000 width=860)
+                              Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13"]
+                              Filter Operator [FIL_91] (rows=80000000 width=860)
+                                predicate:(c_customer_sk is not null and c_current_addr_sk is not null)
+                                TableScan [TS_0] (rows=80000000 width=860)
+                                  default@customer,customer,Tbl:COMPLETE,Col:NONE,Output:["c_customer_sk","c_customer_id","c_current_addr_sk","c_salutation","c_first_name","c_last_name","c_preferred_cust_flag","c_birth_day","c_birth_month","c_birth_year","c_birth_country","c_login","c_email_address","c_last_review_date"]
+                    <-Reducer 8 [SIMPLE_EDGE]
                       SHUFFLE [RS_59]
                         PartitionCols:_col0
                         Merge Join Operator [MERGEJOIN_104] (rows=24200000 width=1014)
                           Conds:RS_51._col1=RS_52._col2(Left Outer),Output:["_col0","_col2","_col3","_col4"]
-                        <-Reducer 16 [SIMPLE_EDGE]
+                        <-Reducer 10 [SIMPLE_EDGE]
                           SHUFFLE [RS_52]
                             PartitionCols:_col2
                             Select Operator [SEL_50] (rows=11000000 width=1014)
@@ -106,112 +129,85 @@ Stage-0
                                   Output:["_col0","_col2"]
                                   Group By Operator [GBY_44] (rows=22000000 width=1014)
                                     Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1
-                                  <-Reducer 15 [SIMPLE_EDGE]
+                                  <-Reducer 9 [SIMPLE_EDGE]
                                     SHUFFLE [RS_43]
                                       PartitionCols:_col0
                                       Group By Operator [GBY_42] (rows=44000000 width=1014)
                                         Output:["_col0","_col1","_col2"],aggregations:["sum(_col3)"],keys:_col7, _col1
                                         Merge Join Operator [MERGEJOIN_103] (rows=44000000 width=1014)
                                           Conds:RS_38._col2=RS_39._col0(Inner),Output:["_col1","_col3","_col7"]
-                                        <-Map 18 [SIMPLE_EDGE]
+                                        <-Map 5 [SIMPLE_EDGE]
                                           SHUFFLE [RS_39]
                                             PartitionCols:_col0
                                             Select Operator [SEL_34] (rows=40000000 width=1014)
                                               Output:["_col0","_col1"]
                                               Filter Operator [FIL_98] (rows=40000000 width=1014)
                                                 predicate:(ca_address_sk is not null and ca_state is not null)
-                                                TableScan [TS_32] (rows=40000000 width=1014)
-                                                  default@customer_address,customer_address,Tbl:COMPLETE,Col:NONE,Output:["ca_address_sk","ca_state"]
-                                        <-Reducer 14 [SIMPLE_EDGE]
+                                                 Please refer to the previous TableScan [TS_3]
+                                        <-Reducer 13 [SIMPLE_EDGE]
                                           SHUFFLE [RS_38]
                                             PartitionCols:_col2
                                             Merge Join Operator [MERGEJOIN_102] (rows=15838314 width=92)
                                               Conds:RS_35._col0=RS_36._col0(Inner),Output:["_col1","_col2","_col3"]
-                                            <-Map 13 [SIMPLE_EDGE]
+                                            <-Map 11 [SIMPLE_EDGE]
                                               SHUFFLE [RS_35]
                                                 PartitionCols:_col0
                                                 Select Operator [SEL_28] (rows=14398467 width=92)
                                                   Output:["_col0","_col1","_col2","_col3"]
                                                   Filter Operator [FIL_96] (rows=14398467 width=92)
                                                     predicate:(wr_returned_date_sk is not null and wr_returning_addr_sk is not null)
-                                                    TableScan [TS_26] (rows=14398467 width=92)
+                                                    TableScan [TS_6] (rows=14398467 width=92)
                                                       default@web_returns,web_returns,Tbl:COMPLETE,Col:NONE,Output:["wr_returned_date_sk","wr_returning_customer_sk","wr_returning_addr_sk","wr_return_amt"]
-                                            <-Map 17 [SIMPLE_EDGE]
+                                            <-Map 14 [SIMPLE_EDGE]
                                               SHUFFLE [RS_36]
                                                 PartitionCols:_col0
                                                 Select Operator [SEL_31] (rows=36524 width=1119)
                                                   Output:["_col0"]
                                                   Filter Operator [FIL_97] (rows=36524 width=1119)
                                                     predicate:((d_year = 2002) and d_date_sk is not null)
-                                                    TableScan [TS_29] (rows=73049 width=1119)
+                                                    TableScan [TS_9] (rows=73049 width=1119)
                                                       default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year"]
-                        <-Reducer 9 [SIMPLE_EDGE]
+                        <-Reducer 7 [SIMPLE_EDGE]
                           SHUFFLE [RS_51]
                             PartitionCols:_col1
                             Select Operator [SEL_25] (rows=22000000 width=1014)
                               Output:["_col0","_col1","_col2"]
                               Group By Operator [GBY_24] (rows=22000000 width=1014)
                                 Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1
-                              <-Reducer 8 [SIMPLE_EDGE]
+                              <-Reducer 6 [SIMPLE_EDGE]
                                 SHUFFLE [RS_23]
                                   PartitionCols:_col0, _col1
                                   Group By Operator [GBY_22] (rows=44000000 width=1014)
                                     Output:["_col0","_col1","_col2"],aggregations:["sum(_col3)"],keys:_col7, _col1
                                     Merge Join Operator [MERGEJOIN_101] (rows=44000000 width=1014)
                                       Conds:RS_18._col2=RS_19._col0(Inner),Output:["_col1","_col3","_col7"]
-                                    <-Map 12 [SIMPLE_EDGE]
+                                    <-Map 5 [SIMPLE_EDGE]
                                       SHUFFLE [RS_19]
                                         PartitionCols:_col0
                                         Select Operator [SEL_14] (rows=40000000 width=1014)
                                           Output:["_col0","_col1"]
                                           Filter Operator [FIL_95] (rows=40000000 width=1014)
                                             predicate:ca_address_sk is not null
-                                            TableScan [TS_12] (rows=40000000 width=1014)
-                                              default@customer_address,customer_address,Tbl:COMPLETE,Col:NONE,Output:["ca_address_sk","ca_state"]
-                                    <-Reducer 7 [SIMPLE_EDGE]
+                                             Please refer to the previous TableScan [TS_3]
+                                    <-Reducer 12 [SIMPLE_EDGE]
                                       SHUFFLE [RS_18]
                                         PartitionCols:_col2
                                         Merge Join Operator [MERGEJOIN_100] (rows=15838314 width=92)
                                           Conds:RS_15._col0=RS_16._col0(Inner),Output:["_col1","_col2","_col3"]
                                         <-Map 11 [SIMPLE_EDGE]
-                                          SHUFFLE [RS_16]
-                                            PartitionCols:_col0
-                                            Select Operator [SEL_11] (rows=36524 width=1119)
-                                              Output:["_col0"]
-                                              Filter Operator [FIL_94] (rows=36524 width=1119)
-                                                predicate:((d_year = 2002) 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"]
-                                        <-Map 6 [SIMPLE_EDGE]
                                           SHUFFLE [RS_15]
                                             PartitionCols:_col0
                                             Select Operator [SEL_8] (rows=14398467 width=92)
                                               Output:["_col0","_col1","_col2","_col3"]
                                               Filter Operator [FIL_93] (rows=14398467 width=92)
                                                 predicate:(wr_returned_date_sk is not null and wr_returning_addr_sk is not null and wr_returning_customer_sk is not null)
-                                                TableScan [TS_6] (rows=14398467 width=92)
-                                                  default@web_returns,web_returns,Tbl:COMPLETE,Col:NONE,Output:["wr_returned_date_sk","wr_returning_customer_sk","wr_returning_addr_sk","wr_return_amt"]
-                    <-Reducer 2 [SIMPLE_EDGE]
-                      SHUFFLE [RS_58]
-                        PartitionCols:_col0
-                        Merge Join Operator [MERGEJOIN_99] (rows=88000001 width=860)
-                          Conds:RS_55._col2=RS_56._col0(Inner),Output:["_col0","_col1","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13"]
-                        <-Map 1 [SIMPLE_EDGE]
-                          SHUFFLE [RS_55]
-                            PartitionCols:_col2
-                            Select Operator [SEL_2] (rows=80000000 width=860)
-                              Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13"]
-                              Filter Operator [FIL_91] (rows=80000000 width=860)
-                                predicate:(c_customer_sk is not null and c_current_addr_sk is not null)
-                                TableScan [TS_0] (rows=80000000 width=860)
-                                  default@customer,customer,Tbl:COMPLETE,Col:NONE,Output:["c_customer_sk","c_customer_id","c_current_addr_sk","c_salutation","c_first_name","c_last_name","c_preferred_cust_flag","c_birth_day","c_birth_month","c_birth_year","c_birth_country","c_login","c_email_address","c_last_review_date"]
-                        <-Map 5 [SIMPLE_EDGE]
-                          SHUFFLE [RS_56]
-                            PartitionCols:_col0
-                            Select Operator [SEL_5] (rows=20000000 width=1014)
-                              Output:["_col0"]
-                              Filter Operator [FIL_92] (rows=20000000 width=1014)
-                                predicate:((ca_state = 'IL') and ca_address_sk is not null)
-                                TableScan [TS_3] (rows=40000000 width=1014)
-                                  default@customer_address,customer_address,Tbl:COMPLETE,Col:NONE,Output:["ca_address_sk","ca_state"]
+                                                 Please refer to the previous TableScan [TS_6]
+                                        <-Map 14 [SIMPLE_EDGE]
+                                          SHUFFLE [RS_16]
+                                            PartitionCols:_col0
+                                            Select Operator [SEL_11] (rows=36524 width=1119)
+                                              Output:["_col0"]
+                                              Filter Operator [FIL_94] (rows=36524 width=1119)
+                                                predicate:((d_year = 2002) and d_date_sk is not null)
+                                                 Please refer to the previous TableScan [TS_9]
 

http://git-wip-us.apache.org/repos/asf/hive/blob/59f65772/ql/src/test/results/clientpositive/perf/query31.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/query31.q.out b/ql/src/test/results/clientpositive/perf/query31.q.out
index 3ed312d..9e3dad4 100644
--- a/ql/src/test/results/clientpositive/perf/query31.q.out
+++ b/ql/src/test/results/clientpositive/perf/query31.q.out
@@ -5,27 +5,27 @@ POSTHOOK: type: QUERY
 Plan optimized by CBO.
 
 Vertex dependency in root stage
-Reducer 10 <- Map 13 (SIMPLE_EDGE), Map 9 (SIMPLE_EDGE)
-Reducer 11 <- Map 14 (SIMPLE_EDGE), Reducer 10 (SIMPLE_EDGE)
+Reducer 10 <- Map 1 (SIMPLE_EDGE), Map 13 (SIMPLE_EDGE)
+Reducer 11 <- Map 24 (SIMPLE_EDGE), Reducer 10 (SIMPLE_EDGE)
 Reducer 12 <- Reducer 11 (SIMPLE_EDGE)
-Reducer 16 <- Map 15 (SIMPLE_EDGE), Map 19 (SIMPLE_EDGE)
-Reducer 17 <- Map 20 (SIMPLE_EDGE), Reducer 16 (SIMPLE_EDGE)
-Reducer 18 <- Reducer 17 (SIMPLE_EDGE)
-Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 7 (SIMPLE_EDGE)
-Reducer 22 <- Map 21 (SIMPLE_EDGE), Map 26 (SIMPLE_EDGE)
-Reducer 23 <- Map 27 (SIMPLE_EDGE), Reducer 22 (SIMPLE_EDGE)
-Reducer 24 <- Reducer 23 (SIMPLE_EDGE)
-Reducer 25 <- Reducer 24 (SIMPLE_EDGE), Reducer 31 (SIMPLE_EDGE), Reducer 37 (SIMPLE_EDGE)
-Reducer 29 <- Map 28 (SIMPLE_EDGE), Map 32 (SIMPLE_EDGE)
-Reducer 3 <- Map 8 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
-Reducer 30 <- Map 33 (SIMPLE_EDGE), Reducer 29 (SIMPLE_EDGE)
-Reducer 31 <- Reducer 30 (SIMPLE_EDGE)
-Reducer 35 <- Map 34 (SIMPLE_EDGE), Map 38 (SIMPLE_EDGE)
-Reducer 36 <- Map 39 (SIMPLE_EDGE), Reducer 35 (SIMPLE_EDGE)
-Reducer 37 <- Reducer 36 (SIMPLE_EDGE)
+Reducer 14 <- Map 13 (SIMPLE_EDGE), Map 25 (SIMPLE_EDGE)
+Reducer 15 <- Map 24 (SIMPLE_EDGE), Reducer 14 (SIMPLE_EDGE)
+Reducer 16 <- Reducer 15 (SIMPLE_EDGE)
+Reducer 17 <- Reducer 16 (SIMPLE_EDGE), Reducer 20 (SIMPLE_EDGE), Reducer 23 (SIMPLE_EDGE)
+Reducer 18 <- Map 13 (SIMPLE_EDGE), Map 25 (SIMPLE_EDGE)
+Reducer 19 <- Map 24 (SIMPLE_EDGE), Reducer 18 (SIMPLE_EDGE)
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 13 (SIMPLE_EDGE)
+Reducer 20 <- Reducer 19 (SIMPLE_EDGE)
+Reducer 21 <- Map 13 (SIMPLE_EDGE), Map 25 (SIMPLE_EDGE)
+Reducer 22 <- Map 24 (SIMPLE_EDGE), Reducer 21 (SIMPLE_EDGE)
+Reducer 23 <- Reducer 22 (SIMPLE_EDGE)
+Reducer 3 <- Map 24 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
 Reducer 4 <- Reducer 3 (SIMPLE_EDGE)
-Reducer 5 <- Reducer 12 (SIMPLE_EDGE), Reducer 18 (SIMPLE_EDGE), Reducer 25 (SIMPLE_EDGE), Reducer 4 (SIMPLE_EDGE)
+Reducer 5 <- Reducer 12 (SIMPLE_EDGE), Reducer 17 (SIMPLE_EDGE), Reducer 4 (SIMPLE_EDGE), Reducer 9 (SIMPLE_EDGE)
 Reducer 6 <- Reducer 5 (SIMPLE_EDGE)
+Reducer 7 <- Map 1 (SIMPLE_EDGE), Map 13 (SIMPLE_EDGE)
+Reducer 8 <- Map 24 (SIMPLE_EDGE), Reducer 7 (SIMPLE_EDGE)
+Reducer 9 <- Reducer 8 (SIMPLE_EDGE)
 
 Stage-0
   Fetch Operator
@@ -44,125 +44,88 @@ Stage-0
                 Merge Join Operator [MERGEJOIN_269] (rows=1149975359 width=88)
                   Conds:RS_125._col0=RS_126._col0(Inner),RS_125._col0=RS_127._col0(Inner),RS_125._col0=RS_128._col0(Inner),Output:["_col0","_col1","_col3","_col5","_col7","_col9","_col11"]
                 <-Reducer 12 [SIMPLE_EDGE]
-                  SHUFFLE [RS_126]
-                    PartitionCols:_col0
-                    Group By Operator [GBY_38] (rows=348477374 width=88)
-                      Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0
-                    <-Reducer 11 [SIMPLE_EDGE]
-                      SHUFFLE [RS_37]
-                        PartitionCols:_col0
-                        Group By Operator [GBY_36] (rows=696954748 width=88)
-                          Output:["_col0","_col1"],aggregations:["sum(_col2)"],keys:_col7
-                          Merge Join Operator [MERGEJOIN_259] (rows=696954748 width=88)
-                            Conds:RS_32._col1=RS_33._col0(Inner),Output:["_col2","_col7"]
-                          <-Map 14 [SIMPLE_EDGE]
-                            SHUFFLE [RS_33]
-                              PartitionCols:_col0
-                              Select Operator [SEL_28] (rows=40000000 width=1014)
-                                Output:["_col0","_col1"]
-                                Filter Operator [FIL_243] (rows=40000000 width=1014)
-                                  predicate:(ca_address_sk is not null and ca_county is not null)
-                                  TableScan [TS_26] (rows=40000000 width=1014)
-                                    default@customer_address,customer_address,Tbl:COMPLETE,Col:NONE,Output:["ca_address_sk","ca_county"]
-                          <-Reducer 10 [SIMPLE_EDGE]
-                            SHUFFLE [RS_32]
-                              PartitionCols:_col1
-                              Merge Join Operator [MERGEJOIN_258] (rows=633595212 width=88)
-                                Conds:RS_29._col0=RS_30._col0(Inner),Output:["_col1","_col2"]
-                              <-Map 13 [SIMPLE_EDGE]
-                                SHUFFLE [RS_30]
-                                  PartitionCols:_col0
-                                  Select Operator [SEL_25] (rows=18262 width=1119)
-                                    Output:["_col0"]
-                                    Filter Operator [FIL_242] (rows=18262 width=1119)
-                                      predicate:((d_qoy = 1) and (d_year = 1998) and d_date_sk is not null)
-                                      TableScan [TS_23] (rows=73049 width=1119)
-                                        default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_qoy"]
-                              <-Map 9 [SIMPLE_EDGE]
-                                SHUFFLE [RS_29]
-                                  PartitionCols:_col0
-                                  Select Operator [SEL_22] (rows=575995635 width=88)
-                                    Output:["_col0","_col1","_col2"]
-                                    Filter Operator [FIL_241] (rows=575995635 width=88)
-                                      predicate:(ss_sold_date_sk is not null and ss_addr_sk is not null)
-                                      TableScan [TS_20] (rows=575995635 width=88)
-                                        default@store_sales,store_sales,Tbl:COMPLETE,Col:NONE,Output:["ss_sold_date_sk","ss_addr_sk","ss_ext_sales_price"]
-                <-Reducer 18 [SIMPLE_EDGE]
                   SHUFFLE [RS_127]
                     PartitionCols:_col0
                     Group By Operator [GBY_58] (rows=348477374 width=88)
                       Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0
-                    <-Reducer 17 [SIMPLE_EDGE]
+                    <-Reducer 11 [SIMPLE_EDGE]
                       SHUFFLE [RS_57]
                         PartitionCols:_col0
                         Group By Operator [GBY_56] (rows=696954748 width=88)
                           Output:["_col0","_col1"],aggregations:["sum(_col2)"],keys:_col7
                           Merge Join Operator [MERGEJOIN_261] (rows=696954748 width=88)
                             Conds:RS_52._col1=RS_53._col0(Inner),Output:["_col2","_col7"]
-                          <-Map 20 [SIMPLE_EDGE]
+                          <-Map 24 [SIMPLE_EDGE]
                             SHUFFLE [RS_53]
                               PartitionCols:_col0
                               Select Operator [SEL_48] (rows=40000000 width=1014)
                                 Output:["_col0","_col1"]
                                 Filter Operator [FIL_246] (rows=40000000 width=1014)
                                   predicate:(ca_address_sk is not null and ca_county is not null)
-                                  TableScan [TS_46] (rows=40000000 width=1014)
+                                  TableScan [TS_6] (rows=40000000 width=1014)
                                     default@customer_address,customer_address,Tbl:COMPLETE,Col:NONE,Output:["ca_address_sk","ca_county"]
-                          <-Reducer 16 [SIMPLE_EDGE]
+                          <-Reducer 10 [SIMPLE_EDGE]
                             SHUFFLE [RS_52]
                               PartitionCols:_col1
                               Merge Join Operator [MERGEJOIN_260] (rows=633595212 width=88)
                                 Conds:RS_49._col0=RS_50._col0(Inner),Output:["_col1","_col2"]
-                              <-Map 15 [SIMPLE_EDGE]
-                                SHUFFLE [RS_49]
-                                  PartitionCols:_col0
-                                  Select Operator [SEL_42] (rows=575995635 width=88)
-                                    Output:["_col0","_col1","_col2"]
-                                    Filter Operator [FIL_244] (rows=575995635 width=88)
-                                      predicate:(ss_sold_date_sk is not null and ss_addr_sk is not null)
-                                      TableScan [TS_40] (rows=575995635 width=88)
-                                        default@store_sales,store_sales,Tbl:COMPLETE,Col:NONE,Output:["ss_sold_date_sk","ss_addr_sk","ss_ext_sales_price"]
-                              <-Map 19 [SIMPLE_EDGE]
+                              <-Map 13 [SIMPLE_EDGE]
                                 SHUFFLE [RS_50]
                                   PartitionCols:_col0
                                   Select Operator [SEL_45] (rows=18262 width=1119)
                                     Output:["_col0"]
                                     Filter Operator [FIL_245] (rows=18262 width=1119)
                                       predicate:((d_qoy = 3) and (d_year = 1998) and d_date_sk is not null)
-                                      TableScan [TS_43] (rows=73049 width=1119)
+                                      TableScan [TS_3] (rows=73049 width=1119)
                                         default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_qoy"]
-                <-Reducer 25 [SIMPLE_EDGE]
+                              <-Map 1 [SIMPLE_EDGE]
+                                SHUFFLE [RS_49]
+                                  PartitionCols:_col0
+                                  Select Operator [SEL_42] (rows=575995635 width=88)
+                                    Output:["_col0","_col1","_col2"]
+                                    Filter Operator [FIL_244] (rows=575995635 width=88)
+                                      predicate:(ss_sold_date_sk is not null and ss_addr_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_addr_sk","ss_ext_sales_price"]
+                <-Reducer 17 [SIMPLE_EDGE]
                   SHUFFLE [RS_128]
                     PartitionCols:_col0
                     Merge Join Operator [MERGEJOIN_268] (rows=191667561 width=135)
                       Conds:RS_120._col0=RS_121._col0(Inner),RS_120._col0=RS_122._col0(Inner),Output:["_col0","_col1","_col3","_col5"]
-                    <-Reducer 24 [SIMPLE_EDGE]
+                    <-Reducer 16 [SIMPLE_EDGE]
                       SHUFFLE [RS_120]
                         PartitionCols:_col0
                         Group By Operator [GBY_78] (rows=87121617 width=135)
                           Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0
-                        <-Reducer 23 [SIMPLE_EDGE]
+                        <-Reducer 15 [SIMPLE_EDGE]
                           SHUFFLE [RS_77]
                             PartitionCols:_col0
                             Group By Operator [GBY_76] (rows=174243235 width=135)
                               Output:["_col0","_col1"],aggregations:["sum(_col2)"],keys:_col7
                               Merge Join Operator [MERGEJOIN_263] (rows=174243235 width=135)
                                 Conds:RS_72._col1=RS_73._col0(Inner),Output:["_col2","_col7"]
-                              <-Map 27 [SIMPLE_EDGE]
+                              <-Map 24 [SIMPLE_EDGE]
                                 SHUFFLE [RS_73]
                                   PartitionCols:_col0
                                   Select Operator [SEL_68] (rows=40000000 width=1014)
                                     Output:["_col0","_col1"]
                                     Filter Operator [FIL_249] (rows=40000000 width=1014)
                                       predicate:(ca_address_sk is not null and ca_county is not null)
-                                      TableScan [TS_66] (rows=40000000 width=1014)
-                                        default@customer_address,customer_address,Tbl:COMPLETE,Col:NONE,Output:["ca_address_sk","ca_county"]
-                              <-Reducer 22 [SIMPLE_EDGE]
+                                       Please refer to the previous TableScan [TS_6]
+                              <-Reducer 14 [SIMPLE_EDGE]
                                 SHUFFLE [RS_72]
                                   PartitionCols:_col1
                                   Merge Join Operator [MERGEJOIN_262] (rows=158402938 width=135)
                                     Conds:RS_69._col0=RS_70._col0(Inner),Output:["_col1","_col2"]
-                                  <-Map 21 [SIMPLE_EDGE]
+                                  <-Map 13 [SIMPLE_EDGE]
+                                    SHUFFLE [RS_70]
+                                      PartitionCols:_col0
+                                      Select Operator [SEL_65] (rows=18262 width=1119)
+                                        Output:["_col0"]
+                                        Filter Operator [FIL_248] (rows=18262 width=1119)
+                                          predicate:((d_qoy = 1) and (d_year = 1998) and d_date_sk is not null)
+                                           Please refer to the previous TableScan [TS_3]
+                                  <-Map 25 [SIMPLE_EDGE]
                                     SHUFFLE [RS_69]
                                       PartitionCols:_col0
                                       Select Operator [SEL_62] (rows=144002668 width=135)
@@ -171,103 +134,88 @@ Stage-0
                                           predicate:(ws_sold_date_sk is not null and ws_bill_addr_sk is not null)
                                           TableScan [TS_60] (rows=144002668 width=135)
                                             default@web_sales,web_sales,Tbl:COMPLETE,Col:NONE,Output:["ws_sold_date_sk","ws_bill_addr_sk","ws_ext_sales_price"]
-                                  <-Map 26 [SIMPLE_EDGE]
-                                    SHUFFLE [RS_70]
-                                      PartitionCols:_col0
-                                      Select Operator [SEL_65] (rows=18262 width=1119)
-                                        Output:["_col0"]
-                                        Filter Operator [FIL_248] (rows=18262 width=1119)
-                                          predicate:((d_qoy = 1) and (d_year = 1998) and d_date_sk is not null)
-                                          TableScan [TS_63] (rows=73049 width=1119)
-                                            default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_qoy"]
-                    <-Reducer 31 [SIMPLE_EDGE]
+                    <-Reducer 20 [SIMPLE_EDGE]
                       SHUFFLE [RS_121]
                         PartitionCols:_col0
                         Group By Operator [GBY_98] (rows=87121617 width=135)
                           Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0
-                        <-Reducer 30 [SIMPLE_EDGE]
+                        <-Reducer 19 [SIMPLE_EDGE]
                           SHUFFLE [RS_97]
                             PartitionCols:_col0
                             Group By Operator [GBY_96] (rows=174243235 width=135)
                               Output:["_col0","_col1"],aggregations:["sum(_col2)"],keys:_col7
                               Merge Join Operator [MERGEJOIN_265] (rows=174243235 width=135)
                                 Conds:RS_92._col1=RS_93._col0(Inner),Output:["_col2","_col7"]
-                              <-Map 33 [SIMPLE_EDGE]
+                              <-Map 24 [SIMPLE_EDGE]
                                 SHUFFLE [RS_93]
                                   PartitionCols:_col0
                                   Select Operator [SEL_88] (rows=40000000 width=1014)
                                     Output:["_col0","_col1"]
                                     Filter Operator [FIL_252] (rows=40000000 width=1014)
                                       predicate:(ca_address_sk is not null and ca_county is not null)
-                                      TableScan [TS_86] (rows=40000000 width=1014)
-                                        default@customer_address,customer_address,Tbl:COMPLETE,Col:NONE,Output:["ca_address_sk","ca_county"]
-                              <-Reducer 29 [SIMPLE_EDGE]
+                                       Please refer to the previous TableScan [TS_6]
+                              <-Reducer 18 [SIMPLE_EDGE]
                                 SHUFFLE [RS_92]
                                   PartitionCols:_col1
                                   Merge Join Operator [MERGEJOIN_264] (rows=158402938 width=135)
                                     Conds:RS_89._col0=RS_90._col0(Inner),Output:["_col1","_col2"]
-                                  <-Map 28 [SIMPLE_EDGE]
-                                    SHUFFLE [RS_89]
-                                      PartitionCols:_col0
-                                      Select Operator [SEL_82] (rows=144002668 width=135)
-                                        Output:["_col0","_col1","_col2"]
-                                        Filter Operator [FIL_250] (rows=144002668 width=135)
-                                          predicate:(ws_sold_date_sk is not null and ws_bill_addr_sk is not null)
-                                          TableScan [TS_80] (rows=144002668 width=135)
-                                            default@web_sales,web_sales,Tbl:COMPLETE,Col:NONE,Output:["ws_sold_date_sk","ws_bill_addr_sk","ws_ext_sales_price"]
-                                  <-Map 32 [SIMPLE_EDGE]
+                                  <-Map 13 [SIMPLE_EDGE]
                                     SHUFFLE [RS_90]
                                       PartitionCols:_col0
                                       Select Operator [SEL_85] (rows=18262 width=1119)
                                         Output:["_col0"]
                                         Filter Operator [FIL_251] (rows=18262 width=1119)
                                           predicate:((d_qoy = 2) and (d_year = 1998) and d_date_sk is not null)
-                                          TableScan [TS_83] (rows=73049 width=1119)
-                                            default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_qoy"]
-                    <-Reducer 37 [SIMPLE_EDGE]
+                                           Please refer to the previous TableScan [TS_3]
+                                  <-Map 25 [SIMPLE_EDGE]
+                                    SHUFFLE [RS_89]
+                                      PartitionCols:_col0
+                                      Select Operator [SEL_82] (rows=144002668 width=135)
+                                        Output:["_col0","_col1","_col2"]
+                                        Filter Operator [FIL_250] (rows=144002668 width=135)
+                                          predicate:(ws_sold_date_sk is not null and ws_bill_addr_sk is not null)
+                                           Please refer to the previous TableScan [TS_60]
+                    <-Reducer 23 [SIMPLE_EDGE]
                       SHUFFLE [RS_122]
                         PartitionCols:_col0
                         Group By Operator [GBY_118] (rows=87121617 width=135)
                           Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0
-                        <-Reducer 36 [SIMPLE_EDGE]
+                        <-Reducer 22 [SIMPLE_EDGE]
                           SHUFFLE [RS_117]
                             PartitionCols:_col0
                             Group By Operator [GBY_116] (rows=174243235 width=135)
                               Output:["_col0","_col1"],aggregations:["sum(_col2)"],keys:_col7
                               Merge Join Operator [MERGEJOIN_267] (rows=174243235 width=135)
                                 Conds:RS_112._col1=RS_113._col0(Inner),Output:["_col2","_col7"]
-                              <-Map 39 [SIMPLE_EDGE]
+                              <-Map 24 [SIMPLE_EDGE]
                                 SHUFFLE [RS_113]
                                   PartitionCols:_col0
                                   Select Operator [SEL_108] (rows=40000000 width=1014)
                                     Output:["_col0","_col1"]
                                     Filter Operator [FIL_255] (rows=40000000 width=1014)
                                       predicate:(ca_address_sk is not null and ca_county is not null)
-                                      TableScan [TS_106] (rows=40000000 width=1014)
-                                        default@customer_address,customer_address,Tbl:COMPLETE,Col:NONE,Output:["ca_address_sk","ca_county"]
-                              <-Reducer 35 [SIMPLE_EDGE]
+                                       Please refer to the previous TableScan [TS_6]
+                              <-Reducer 21 [SIMPLE_EDGE]
                                 SHUFFLE [RS_112]
                                   PartitionCols:_col1
                                   Merge Join Operator [MERGEJOIN_266] (rows=158402938 width=135)
                                     Conds:RS_109._col0=RS_110._col0(Inner),Output:["_col1","_col2"]
-                                  <-Map 34 [SIMPLE_EDGE]
-                                    SHUFFLE [RS_109]
-                                      PartitionCols:_col0
-                                      Select Operator [SEL_102] (rows=144002668 width=135)
-                                        Output:["_col0","_col1","_col2"]
-                                        Filter Operator [FIL_253] (rows=144002668 width=135)
-                                          predicate:(ws_sold_date_sk is not null and ws_bill_addr_sk is not null)
-                                          TableScan [TS_100] (rows=144002668 width=135)
-                                            default@web_sales,web_sales,Tbl:COMPLETE,Col:NONE,Output:["ws_sold_date_sk","ws_bill_addr_sk","ws_ext_sales_price"]
-                                  <-Map 38 [SIMPLE_EDGE]
+                                  <-Map 13 [SIMPLE_EDGE]
                                     SHUFFLE [RS_110]
                                       PartitionCols:_col0
                                       Select Operator [SEL_105] (rows=18262 width=1119)
                                         Output:["_col0"]
                                         Filter Operator [FIL_254] (rows=18262 width=1119)
                                           predicate:((d_qoy = 3) and (d_year = 1998) and d_date_sk is not null)
-                                          TableScan [TS_103] (rows=73049 width=1119)
-                                            default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_qoy"]
+                                           Please refer to the previous TableScan [TS_3]
+                                  <-Map 25 [SIMPLE_EDGE]
+                                    SHUFFLE [RS_109]
+                                      PartitionCols:_col0
+                                      Select Operator [SEL_102] (rows=144002668 width=135)
+                                        Output:["_col0","_col1","_col2"]
+                                        Filter Operator [FIL_253] (rows=144002668 width=135)
+                                          predicate:(ws_sold_date_sk is not null and ws_bill_addr_sk is not null)
+                                           Please refer to the previous TableScan [TS_60]
                 <-Reducer 4 [SIMPLE_EDGE]
                   SHUFFLE [RS_125]
                     PartitionCols:_col0
@@ -280,20 +228,27 @@ Stage-0
                           Output:["_col0","_col1"],aggregations:["sum(_col2)"],keys:_col7
                           Merge Join Operator [MERGEJOIN_257] (rows=696954748 width=88)
                             Conds:RS_12._col1=RS_13._col0(Inner),Output:["_col2","_col7"]
-                          <-Map 8 [SIMPLE_EDGE]
+                          <-Map 24 [SIMPLE_EDGE]
                             SHUFFLE [RS_13]
                               PartitionCols:_col0
                               Select Operator [SEL_8] (rows=40000000 width=1014)
                                 Output:["_col0","_col1"]
                                 Filter Operator [FIL_240] (rows=40000000 width=1014)
                                   predicate:(ca_address_sk is not null and ca_county is not null)
-                                  TableScan [TS_6] (rows=40000000 width=1014)
-                                    default@customer_address,customer_address,Tbl:COMPLETE,Col:NONE,Output:["ca_address_sk","ca_county"]
+                                   Please refer to the previous TableScan [TS_6]
                           <-Reducer 2 [SIMPLE_EDGE]
                             SHUFFLE [RS_12]
                               PartitionCols:_col1
                               Merge Join Operator [MERGEJOIN_256] (rows=633595212 width=88)
                                 Conds:RS_9._col0=RS_10._col0(Inner),Output:["_col1","_col2"]
+                              <-Map 13 [SIMPLE_EDGE]
+                                SHUFFLE [RS_10]
+                                  PartitionCols:_col0
+                                  Select Operator [SEL_5] (rows=18262 width=1119)
+                                    Output:["_col0"]
+                                    Filter Operator [FIL_239] (rows=18262 width=1119)
+                                      predicate:((d_qoy = 2) and (d_year = 1998) and d_date_sk is not null)
+                                       Please refer to the previous TableScan [TS_3]
                               <-Map 1 [SIMPLE_EDGE]
                                 SHUFFLE [RS_9]
                                   PartitionCols:_col0
@@ -301,15 +256,46 @@ Stage-0
                                     Output:["_col0","_col1","_col2"]
                                     Filter Operator [FIL_238] (rows=575995635 width=88)
                                       predicate:(ss_sold_date_sk is not null and ss_addr_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_addr_sk","ss_ext_sales_price"]
-                              <-Map 7 [SIMPLE_EDGE]
-                                SHUFFLE [RS_10]
+                                       Please refer to the previous TableScan [TS_0]
+                <-Reducer 9 [SIMPLE_EDGE]
+                  SHUFFLE [RS_126]
+                    PartitionCols:_col0
+                    Group By Operator [GBY_38] (rows=348477374 width=88)
+                      Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0
+                    <-Reducer 8 [SIMPLE_EDGE]
+                      SHUFFLE [RS_37]
+                        PartitionCols:_col0
+                        Group By Operator [GBY_36] (rows=696954748 width=88)
+                          Output:["_col0","_col1"],aggregations:["sum(_col2)"],keys:_col7
+                          Merge Join Operator [MERGEJOIN_259] (rows=696954748 width=88)
+                            Conds:RS_32._col1=RS_33._col0(Inner),Output:["_col2","_col7"]
+                          <-Map 24 [SIMPLE_EDGE]
+                            SHUFFLE [RS_33]
+                              PartitionCols:_col0
+                              Select Operator [SEL_28] (rows=40000000 width=1014)
+                                Output:["_col0","_col1"]
+                                Filter Operator [FIL_243] (rows=40000000 width=1014)
+                                  predicate:(ca_address_sk is not null and ca_county is not null)
+                                   Please refer to the previous TableScan [TS_6]
+                          <-Reducer 7 [SIMPLE_EDGE]
+                            SHUFFLE [RS_32]
+                              PartitionCols:_col1
+                              Merge Join Operator [MERGEJOIN_258] (rows=633595212 width=88)
+                                Conds:RS_29._col0=RS_30._col0(Inner),Output:["_col1","_col2"]
+                              <-Map 13 [SIMPLE_EDGE]
+                                SHUFFLE [RS_30]
                                   PartitionCols:_col0
-                                  Select Operator [SEL_5] (rows=18262 width=1119)
+                                  Select Operator [SEL_25] (rows=18262 width=1119)
                                     Output:["_col0"]
-                                    Filter Operator [FIL_239] (rows=18262 width=1119)
-                                      predicate:((d_qoy = 2) and (d_year = 1998) 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_qoy"]
+                                    Filter Operator [FIL_242] (rows=18262 width=1119)
+                                      predicate:((d_qoy = 1) and (d_year = 1998) and d_date_sk is not null)
+                                       Please refer to the previous TableScan [TS_3]
+                              <-Map 1 [SIMPLE_EDGE]
+                                SHUFFLE [RS_29]
+                                  PartitionCols:_col0
+                                  Select Operator [SEL_22] (rows=575995635 width=88)
+                                    Output:["_col0","_col1","_col2"]
+                                    Filter Operator [FIL_241] (rows=575995635 width=88)
+                                      predicate:(ss_sold_date_sk is not null and ss_addr_sk is not null)
+                                       Please refer to the previous TableScan [TS_0]
 

http://git-wip-us.apache.org/repos/asf/hive/blob/59f65772/ql/src/test/results/clientpositive/perf/query32.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/query32.q.out b/ql/src/test/results/clientpositive/perf/query32.q.out
index 5a6514b..c9820b3 100644
--- a/ql/src/test/results/clientpositive/perf/query32.q.out
+++ b/ql/src/test/results/clientpositive/perf/query32.q.out
@@ -39,11 +39,11 @@ POSTHOOK: type: QUERY
 Plan optimized by CBO.
 
 Vertex dependency in root stage
-Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 6 (SIMPLE_EDGE)
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 7 (SIMPLE_EDGE)
 Reducer 3 <- Reducer 2 (SIMPLE_EDGE)
-Reducer 4 <- Map 7 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE), Reducer 9 (SIMPLE_EDGE)
+Reducer 4 <- Map 8 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE), Reducer 6 (SIMPLE_EDGE)
 Reducer 5 <- Reducer 4 (CUSTOM_SIMPLE_EDGE)
-Reducer 9 <- Map 10 (SIMPLE_EDGE), Map 8 (SIMPLE_EDGE)
+Reducer 6 <- Map 1 (SIMPLE_EDGE), Map 7 (SIMPLE_EDGE)
 
 Stage-0
   Fetch Operator
@@ -63,7 +63,7 @@ Stage-0
                   predicate:(_col5 > _col1)
                   Merge Join Operator [MERGEJOIN_59] (rows=696935432 width=135)
                     Conds:RS_27._col0=RS_28._col0(Inner),RS_28._col0=RS_29._col0(Inner),Output:["_col1","_col5"]
-                  <-Map 7 [SIMPLE_EDGE]
+                  <-Map 8 [SIMPLE_EDGE]
                     SHUFFLE [RS_28]
                       PartitionCols:_col0
                       Select Operator [SEL_16] (rows=231000 width=1436)
@@ -95,7 +95,7 @@ Stage-0
                                       predicate:(cs_sold_date_sk is not null and cs_item_sk is not null)
                                       TableScan [TS_0] (rows=287989836 width=135)
                                         default@catalog_sales,cs,Tbl:COMPLETE,Col:NONE,Output:["cs_sold_date_sk","cs_item_sk","cs_ext_discount_amt"]
-                              <-Map 6 [SIMPLE_EDGE]
+                              <-Map 7 [SIMPLE_EDGE]
                                 SHUFFLE [RS_7]
                                   PartitionCols:_col0
                                   Select Operator [SEL_5] (rows=8116 width=1119)
@@ -104,29 +104,27 @@ Stage-0
                                       predicate:(d_date BETWEEN '2000-01-27' AND '2000-04-27' and d_date_sk is not null)
                                       TableScan [TS_3] (rows=73049 width=1119)
                                         default@date_dim,d,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_date"]
-                  <-Reducer 9 [SIMPLE_EDGE]
+                  <-Reducer 6 [SIMPLE_EDGE]
                     SHUFFLE [RS_29]
                       PartitionCols:_col0
                       Select Operator [SEL_26] (rows=316788826 width=135)
                         Output:["_col0","_col1"]
                         Merge Join Operator [MERGEJOIN_58] (rows=316788826 width=135)
                           Conds:RS_23._col0=RS_24._col0(Inner),Output:["_col1","_col2"]
-                        <-Map 10 [SIMPLE_EDGE]
-                          SHUFFLE [RS_24]
-                            PartitionCols:_col0
-                            Select Operator [SEL_22] (rows=8116 width=1119)
-                              Output:["_col0"]
-                              Filter Operator [FIL_56] (rows=8116 width=1119)
-                                predicate:(d_date BETWEEN '2000-01-27' AND '2000-04-27' and d_date_sk is not null)
-                                TableScan [TS_20] (rows=73049 width=1119)
-                                  default@date_dim,d,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_date"]
-                        <-Map 8 [SIMPLE_EDGE]
+                        <-Map 1 [SIMPLE_EDGE]
                           SHUFFLE [RS_23]
                             PartitionCols:_col0
                             Select Operator [SEL_19] (rows=287989836 width=135)
                               Output:["_col0","_col1","_col2"]
                               Filter Operator [FIL_55] (rows=287989836 width=135)
                                 predicate:(cs_sold_date_sk is not null and cs_item_sk is not null)
-                                TableScan [TS_17] (rows=287989836 width=135)
-                                  default@catalog_sales,cs,Tbl:COMPLETE,Col:NONE,Output:["cs_sold_date_sk","cs_item_sk","cs_ext_discount_amt"]
+                                 Please refer to the previous TableScan [TS_0]
+                        <-Map 7 [SIMPLE_EDGE]
+                          SHUFFLE [RS_24]
+                            PartitionCols:_col0
+                            Select Operator [SEL_22] (rows=8116 width=1119)
+                              Output:["_col0"]
+                              Filter Operator [FIL_56] (rows=8116 width=1119)
+                                predicate:(d_date BETWEEN '2000-01-27' AND '2000-04-27' and d_date_sk is not null)
+                                 Please refer to the previous TableScan [TS_3]