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:53 UTC

[15/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/query33.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/query33.q.out b/ql/src/test/results/clientpositive/perf/query33.q.out
index 342bd90..00c021b 100644
--- a/ql/src/test/results/clientpositive/perf/query33.q.out
+++ b/ql/src/test/results/clientpositive/perf/query33.q.out
@@ -147,26 +147,26 @@ POSTHOOK: type: QUERY
 Plan optimized by CBO.
 
 Vertex dependency in root stage
-Reducer 11 <- Map 10 (SIMPLE_EDGE), Map 13 (SIMPLE_EDGE)
-Reducer 12 <- Map 14 (SIMPLE_EDGE), Reducer 11 (SIMPLE_EDGE)
-Reducer 16 <- Map 15 (SIMPLE_EDGE), Reducer 20 (SIMPLE_EDGE)
-Reducer 17 <- Reducer 16 (SIMPLE_EDGE), Reducer 23 (SIMPLE_EDGE)
-Reducer 18 <- Reducer 17 (SIMPLE_EDGE), Union 5 (CONTAINS)
-Reducer 2 <- Map 1 (SIMPLE_EDGE), Reducer 9 (SIMPLE_EDGE)
-Reducer 20 <- Map 19 (SIMPLE_EDGE)
-Reducer 22 <- Map 21 (SIMPLE_EDGE), Map 24 (SIMPLE_EDGE)
-Reducer 23 <- Map 25 (SIMPLE_EDGE), Reducer 22 (SIMPLE_EDGE)
-Reducer 27 <- Map 26 (SIMPLE_EDGE), Reducer 31 (SIMPLE_EDGE)
-Reducer 28 <- Reducer 27 (SIMPLE_EDGE), Reducer 34 (SIMPLE_EDGE)
-Reducer 29 <- Reducer 28 (SIMPLE_EDGE), Union 5 (CONTAINS)
-Reducer 3 <- Reducer 12 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
-Reducer 31 <- Map 30 (SIMPLE_EDGE)
-Reducer 33 <- Map 32 (SIMPLE_EDGE), Map 35 (SIMPLE_EDGE)
-Reducer 34 <- Map 36 (SIMPLE_EDGE), Reducer 33 (SIMPLE_EDGE)
+Reducer 10 <- Reducer 9 (SIMPLE_EDGE), Union 5 (CONTAINS)
+Reducer 11 <- Map 1 (SIMPLE_EDGE), Reducer 17 (SIMPLE_EDGE)
+Reducer 12 <- Reducer 11 (SIMPLE_EDGE), Reducer 25 (SIMPLE_EDGE)
+Reducer 13 <- Reducer 12 (SIMPLE_EDGE), Union 5 (CONTAINS)
+Reducer 15 <- Map 14 (SIMPLE_EDGE)
+Reducer 16 <- Map 14 (SIMPLE_EDGE)
+Reducer 17 <- Map 14 (SIMPLE_EDGE)
+Reducer 19 <- Map 18 (SIMPLE_EDGE), Map 21 (SIMPLE_EDGE)
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Reducer 15 (SIMPLE_EDGE)
+Reducer 20 <- Map 26 (SIMPLE_EDGE), Reducer 19 (SIMPLE_EDGE)
+Reducer 22 <- Map 21 (SIMPLE_EDGE), Map 27 (SIMPLE_EDGE)
+Reducer 23 <- Map 26 (SIMPLE_EDGE), Reducer 22 (SIMPLE_EDGE)
+Reducer 24 <- Map 21 (SIMPLE_EDGE), Map 28 (SIMPLE_EDGE)
+Reducer 25 <- Map 26 (SIMPLE_EDGE), Reducer 24 (SIMPLE_EDGE)
+Reducer 3 <- Reducer 2 (SIMPLE_EDGE), Reducer 20 (SIMPLE_EDGE)
 Reducer 4 <- Reducer 3 (SIMPLE_EDGE), Union 5 (CONTAINS)
 Reducer 6 <- Union 5 (SIMPLE_EDGE)
 Reducer 7 <- Reducer 6 (SIMPLE_EDGE)
-Reducer 9 <- Map 8 (SIMPLE_EDGE)
+Reducer 8 <- Map 1 (SIMPLE_EDGE), Reducer 16 (SIMPLE_EDGE)
+Reducer 9 <- Reducer 23 (SIMPLE_EDGE), Reducer 8 (SIMPLE_EDGE)
 
 Stage-0
   Fetch Operator
@@ -183,50 +183,20 @@ Stage-0
               Group By Operator [GBY_117] (rows=335408073 width=108)
                 Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0
               <-Union 5 [SIMPLE_EDGE]
-                <-Reducer 18 [CONTAINS]
+                <-Reducer 10 [CONTAINS]
                   Reduce Output Operator [RS_116]
                     PartitionCols:_col0
                     Group By Operator [GBY_115] (rows=670816147 width=108)
                       Output:["_col0","_col1"],aggregations:["sum(_col1)"],keys:_col0
                       Group By Operator [GBY_72] (rows=191657247 width=135)
                         Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0
-                      <-Reducer 17 [SIMPLE_EDGE]
+                      <-Reducer 9 [SIMPLE_EDGE]
                         SHUFFLE [RS_71]
                           PartitionCols:_col0
                           Group By Operator [GBY_70] (rows=383314495 width=135)
                             Output:["_col0","_col1"],aggregations:["sum(_col8)"],keys:_col1
                             Merge Join Operator [MERGEJOIN_184] (rows=383314495 width=135)
                               Conds:RS_66._col0=RS_67._col4(Inner),Output:["_col1","_col8"]
-                            <-Reducer 16 [SIMPLE_EDGE]
-                              SHUFFLE [RS_66]
-                                PartitionCols:_col0
-                                Merge Join Operator [MERGEJOIN_177] (rows=508200 width=1436)
-                                  Conds:RS_63._col1=RS_64._col0(Inner),Output:["_col0","_col1"]
-                                <-Map 15 [SIMPLE_EDGE]
-                                  SHUFFLE [RS_63]
-                                    PartitionCols:_col1
-                                    Select Operator [SEL_39] (rows=462000 width=1436)
-                                      Output:["_col0","_col1"]
-                                      Filter Operator [FIL_164] (rows=462000 width=1436)
-                                        predicate:(i_manufact_id is not null and i_item_sk is not null)
-                                        TableScan [TS_37] (rows=462000 width=1436)
-                                          default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_manufact_id"]
-                                <-Reducer 20 [SIMPLE_EDGE]
-                                  SHUFFLE [RS_64]
-                                    PartitionCols:_col0
-                                    Group By Operator [GBY_45] (rows=115500 width=1436)
-                                      Output:["_col0"],keys:KEY._col0
-                                    <-Map 19 [SIMPLE_EDGE]
-                                      SHUFFLE [RS_44]
-                                        PartitionCols:_col0
-                                        Group By Operator [GBY_43] (rows=231000 width=1436)
-                                          Output:["_col0"],keys:i_manufact_id
-                                          Select Operator [SEL_42] (rows=231000 width=1436)
-                                            Output:["i_manufact_id"]
-                                            Filter Operator [FIL_165] (rows=231000 width=1436)
-                                              predicate:((i_category) IN ('Books') and i_manufact_id is not null)
-                                              TableScan [TS_40] (rows=462000 width=1436)
-                                                default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_category","i_manufact_id"]
                             <-Reducer 23 [SIMPLE_EDGE]
                               SHUFFLE [RS_67]
                                 PartitionCols:_col4
@@ -234,14 +204,14 @@ Stage-0
                                   Output:["_col4","_col5"]
                                   Merge Join Operator [MERGEJOIN_179] (rows=348467716 width=135)
                                     Conds:RS_59._col1=RS_60._col0(Inner),Output:["_col2","_col3"]
-                                  <-Map 25 [SIMPLE_EDGE]
+                                  <-Map 26 [SIMPLE_EDGE]
                                     SHUFFLE [RS_60]
                                       PartitionCols:_col0
                                       Select Operator [SEL_55] (rows=20000000 width=1014)
                                         Output:["_col0"]
                                         Filter Operator [FIL_168] (rows=20000000 width=1014)
                                           predicate:((ca_gmt_offset = -6) and ca_address_sk is not null)
-                                          TableScan [TS_53] (rows=40000000 width=1014)
+                                          TableScan [TS_16] (rows=40000000 width=1014)
                                             default@customer_address,customer_address,Tbl:COMPLETE,Col:NONE,Output:["ca_address_sk","ca_gmt_offset"]
                                   <-Reducer 22 [SIMPLE_EDGE]
                                     SHUFFLE [RS_59]
@@ -249,6 +219,15 @@ Stage-0
                                       Merge Join Operator [MERGEJOIN_178] (rows=316788826 width=135)
                                         Conds:RS_56._col0=RS_57._col0(Inner),Output:["_col1","_col2","_col3"]
                                       <-Map 21 [SIMPLE_EDGE]
+                                        SHUFFLE [RS_57]
+                                          PartitionCols:_col0
+                                          Select Operator [SEL_52] (rows=18262 width=1119)
+                                            Output:["_col0"]
+                                            Filter Operator [FIL_167] (rows=18262 width=1119)
+                                              predicate:((d_year = 1999) and (d_moy = 3) and d_date_sk is not null)
+                                              TableScan [TS_13] (rows=73049 width=1119)
+                                                default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_moy"]
+                                      <-Map 27 [SIMPLE_EDGE]
                                         SHUFFLE [RS_56]
                                           PartitionCols:_col0
                                           Select Operator [SEL_49] (rows=287989836 width=135)
@@ -257,49 +236,69 @@ Stage-0
                                               predicate:(cs_sold_date_sk is not null and cs_bill_addr_sk is not null and cs_item_sk is not null)
                                               TableScan [TS_47] (rows=287989836 width=135)
                                                 default@catalog_sales,catalog_sales,Tbl:COMPLETE,Col:NONE,Output:["cs_sold_date_sk","cs_bill_addr_sk","cs_item_sk","cs_ext_sales_price"]
-                                      <-Map 24 [SIMPLE_EDGE]
-                                        SHUFFLE [RS_57]
-                                          PartitionCols:_col0
-                                          Select Operator [SEL_52] (rows=18262 width=1119)
-                                            Output:["_col0"]
-                                            Filter Operator [FIL_167] (rows=18262 width=1119)
-                                              predicate:((d_year = 1999) and (d_moy = 3) and d_date_sk is not null)
-                                              TableScan [TS_50] (rows=73049 width=1119)
-                                                default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_moy"]
-                <-Reducer 29 [CONTAINS]
+                            <-Reducer 8 [SIMPLE_EDGE]
+                              SHUFFLE [RS_66]
+                                PartitionCols:_col0
+                                Merge Join Operator [MERGEJOIN_177] (rows=508200 width=1436)
+                                  Conds:RS_63._col1=RS_64._col0(Inner),Output:["_col0","_col1"]
+                                <-Map 1 [SIMPLE_EDGE]
+                                  SHUFFLE [RS_63]
+                                    PartitionCols:_col1
+                                    Select Operator [SEL_39] (rows=462000 width=1436)
+                                      Output:["_col0","_col1"]
+                                      Filter Operator [FIL_164] (rows=462000 width=1436)
+                                        predicate:(i_manufact_id is not null and i_item_sk is not null)
+                                        TableScan [TS_0] (rows=462000 width=1436)
+                                          default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_manufact_id"]
+                                <-Reducer 16 [SIMPLE_EDGE]
+                                  SHUFFLE [RS_64]
+                                    PartitionCols:_col0
+                                    Group By Operator [GBY_45] (rows=115500 width=1436)
+                                      Output:["_col0"],keys:KEY._col0
+                                    <-Map 14 [SIMPLE_EDGE]
+                                      SHUFFLE [RS_44]
+                                        PartitionCols:_col0
+                                        Group By Operator [GBY_43] (rows=231000 width=1436)
+                                          Output:["_col0"],keys:i_manufact_id
+                                          Select Operator [SEL_42] (rows=231000 width=1436)
+                                            Output:["i_manufact_id"]
+                                            Filter Operator [FIL_165] (rows=231000 width=1436)
+                                              predicate:((i_category) IN ('Books') and i_manufact_id is not null)
+                                              TableScan [TS_3] (rows=462000 width=1436)
+                                                default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_category","i_manufact_id"]
+                <-Reducer 13 [CONTAINS]
                   Reduce Output Operator [RS_116]
                     PartitionCols:_col0
                     Group By Operator [GBY_115] (rows=670816147 width=108)
                       Output:["_col0","_col1"],aggregations:["sum(_col1)"],keys:_col0
                       Group By Operator [GBY_111] (rows=95833781 width=135)
                         Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0
-                      <-Reducer 28 [SIMPLE_EDGE]
+                      <-Reducer 12 [SIMPLE_EDGE]
                         SHUFFLE [RS_110]
                           PartitionCols:_col0
                           Group By Operator [GBY_109] (rows=191667562 width=135)
                             Output:["_col0","_col1"],aggregations:["sum(_col8)"],keys:_col1
                             Merge Join Operator [MERGEJOIN_185] (rows=191667562 width=135)
                               Conds:RS_105._col0=RS_106._col3(Inner),Output:["_col1","_col8"]
-                            <-Reducer 27 [SIMPLE_EDGE]
+                            <-Reducer 11 [SIMPLE_EDGE]
                               SHUFFLE [RS_105]
                                 PartitionCols:_col0
                                 Merge Join Operator [MERGEJOIN_180] (rows=508200 width=1436)
                                   Conds:RS_102._col1=RS_103._col0(Inner),Output:["_col0","_col1"]
-                                <-Map 26 [SIMPLE_EDGE]
+                                <-Map 1 [SIMPLE_EDGE]
                                   SHUFFLE [RS_102]
                                     PartitionCols:_col1
                                     Select Operator [SEL_78] (rows=462000 width=1436)
                                       Output:["_col0","_col1"]
                                       Filter Operator [FIL_169] (rows=462000 width=1436)
                                         predicate:(i_manufact_id is not null and i_item_sk is not null)
-                                        TableScan [TS_76] (rows=462000 width=1436)
-                                          default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_manufact_id"]
-                                <-Reducer 31 [SIMPLE_EDGE]
+                                         Please refer to the previous TableScan [TS_0]
+                                <-Reducer 17 [SIMPLE_EDGE]
                                   SHUFFLE [RS_103]
                                     PartitionCols:_col0
                                     Group By Operator [GBY_84] (rows=115500 width=1436)
                                       Output:["_col0"],keys:KEY._col0
-                                    <-Map 30 [SIMPLE_EDGE]
+                                    <-Map 14 [SIMPLE_EDGE]
                                       SHUFFLE [RS_83]
                                         PartitionCols:_col0
                                         Group By Operator [GBY_82] (rows=231000 width=1436)
@@ -308,30 +307,36 @@ Stage-0
                                             Output:["i_manufact_id"]
                                             Filter Operator [FIL_170] (rows=231000 width=1436)
                                               predicate:((i_category) IN ('Books') and i_manufact_id is not null)
-                                              TableScan [TS_79] (rows=462000 width=1436)
-                                                default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_category","i_manufact_id"]
-                            <-Reducer 34 [SIMPLE_EDGE]
+                                               Please refer to the previous TableScan [TS_3]
+                            <-Reducer 25 [SIMPLE_EDGE]
                               SHUFFLE [RS_106]
                                 PartitionCols:_col3
                                 Select Operator [SEL_101] (rows=174243235 width=135)
                                   Output:["_col3","_col5"]
                                   Merge Join Operator [MERGEJOIN_182] (rows=174243235 width=135)
                                     Conds:RS_98._col2=RS_99._col0(Inner),Output:["_col1","_col3"]
-                                  <-Map 36 [SIMPLE_EDGE]
+                                  <-Map 26 [SIMPLE_EDGE]
                                     SHUFFLE [RS_99]
                                       PartitionCols:_col0
                                       Select Operator [SEL_94] (rows=20000000 width=1014)
                                         Output:["_col0"]
                                         Filter Operator [FIL_173] (rows=20000000 width=1014)
                                           predicate:((ca_gmt_offset = -6) and ca_address_sk is not null)
-                                          TableScan [TS_92] (rows=40000000 width=1014)
-                                            default@customer_address,customer_address,Tbl:COMPLETE,Col:NONE,Output:["ca_address_sk","ca_gmt_offset"]
-                                  <-Reducer 33 [SIMPLE_EDGE]
+                                           Please refer to the previous TableScan [TS_16]
+                                  <-Reducer 24 [SIMPLE_EDGE]
                                     SHUFFLE [RS_98]
                                       PartitionCols:_col2
                                       Merge Join Operator [MERGEJOIN_181] (rows=158402938 width=135)
                                         Conds:RS_95._col0=RS_96._col0(Inner),Output:["_col1","_col2","_col3"]
-                                      <-Map 32 [SIMPLE_EDGE]
+                                      <-Map 21 [SIMPLE_EDGE]
+                                        SHUFFLE [RS_96]
+                                          PartitionCols:_col0
+                                          Select Operator [SEL_91] (rows=18262 width=1119)
+                                            Output:["_col0"]
+                                            Filter Operator [FIL_172] (rows=18262 width=1119)
+                                              predicate:((d_year = 1999) and (d_moy = 3) and d_date_sk is not null)
+                                               Please refer to the previous TableScan [TS_13]
+                                      <-Map 28 [SIMPLE_EDGE]
                                         SHUFFLE [RS_95]
                                           PartitionCols:_col0
                                           Select Operator [SEL_88] (rows=144002668 width=135)
@@ -340,15 +345,6 @@ Stage-0
                                               predicate:(ws_sold_date_sk is not null and ws_bill_addr_sk is not null and ws_item_sk is not null)
                                               TableScan [TS_86] (rows=144002668 width=135)
                                                 default@web_sales,web_sales,Tbl:COMPLETE,Col:NONE,Output:["ws_sold_date_sk","ws_item_sk","ws_bill_addr_sk","ws_ext_sales_price"]
-                                      <-Map 35 [SIMPLE_EDGE]
-                                        SHUFFLE [RS_96]
-                                          PartitionCols:_col0
-                                          Select Operator [SEL_91] (rows=18262 width=1119)
-                                            Output:["_col0"]
-                                            Filter Operator [FIL_172] (rows=18262 width=1119)
-                                              predicate:((d_year = 1999) and (d_moy = 3) and d_date_sk is not null)
-                                              TableScan [TS_89] (rows=73049 width=1119)
-                                                default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_moy"]
                 <-Reducer 4 [CONTAINS]
                   Reduce Output Operator [RS_116]
                     PartitionCols:_col0
@@ -363,45 +359,6 @@ Stage-0
                             Output:["_col0","_col1"],aggregations:["sum(_col8)"],keys:_col1
                             Merge Join Operator [MERGEJOIN_183] (rows=766650239 width=88)
                               Conds:RS_29._col0=RS_30._col3(Inner),Output:["_col1","_col8"]
-                            <-Reducer 12 [SIMPLE_EDGE]
-                              SHUFFLE [RS_30]
-                                PartitionCols:_col3
-                                Select Operator [SEL_25] (rows=696954748 width=88)
-                                  Output:["_col3","_col5"]
-                                  Merge Join Operator [MERGEJOIN_176] (rows=696954748 width=88)
-                                    Conds:RS_22._col2=RS_23._col0(Inner),Output:["_col1","_col3"]
-                                  <-Map 14 [SIMPLE_EDGE]
-                                    SHUFFLE [RS_23]
-                                      PartitionCols:_col0
-                                      Select Operator [SEL_18] (rows=20000000 width=1014)
-                                        Output:["_col0"]
-                                        Filter Operator [FIL_163] (rows=20000000 width=1014)
-                                          predicate:((ca_gmt_offset = -6) and ca_address_sk is not null)
-                                          TableScan [TS_16] (rows=40000000 width=1014)
-                                            default@customer_address,customer_address,Tbl:COMPLETE,Col:NONE,Output:["ca_address_sk","ca_gmt_offset"]
-                                  <-Reducer 11 [SIMPLE_EDGE]
-                                    SHUFFLE [RS_22]
-                                      PartitionCols:_col2
-                                      Merge Join Operator [MERGEJOIN_175] (rows=633595212 width=88)
-                                        Conds:RS_19._col0=RS_20._col0(Inner),Output:["_col1","_col2","_col3"]
-                                      <-Map 10 [SIMPLE_EDGE]
-                                        SHUFFLE [RS_19]
-                                          PartitionCols:_col0
-                                          Select Operator [SEL_12] (rows=575995635 width=88)
-                                            Output:["_col0","_col1","_col2","_col3"]
-                                            Filter Operator [FIL_161] (rows=575995635 width=88)
-                                              predicate:(ss_sold_date_sk is not null and ss_addr_sk is not null and ss_item_sk is not null)
-                                              TableScan [TS_10] (rows=575995635 width=88)
-                                                default@store_sales,store_sales,Tbl:COMPLETE,Col:NONE,Output:["ss_sold_date_sk","ss_item_sk","ss_addr_sk","ss_ext_sales_price"]
-                                      <-Map 13 [SIMPLE_EDGE]
-                                        SHUFFLE [RS_20]
-                                          PartitionCols:_col0
-                                          Select Operator [SEL_15] (rows=18262 width=1119)
-                                            Output:["_col0"]
-                                            Filter Operator [FIL_162] (rows=18262 width=1119)
-                                              predicate:((d_year = 1999) and (d_moy = 3) and d_date_sk is not null)
-                                              TableScan [TS_13] (rows=73049 width=1119)
-                                                default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_moy"]
                             <-Reducer 2 [SIMPLE_EDGE]
                               SHUFFLE [RS_29]
                                 PartitionCols:_col0
@@ -414,14 +371,13 @@ Stage-0
                                       Output:["_col0","_col1"]
                                       Filter Operator [FIL_159] (rows=462000 width=1436)
                                         predicate:(i_manufact_id is not null and i_item_sk is not null)
-                                        TableScan [TS_0] (rows=462000 width=1436)
-                                          default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_manufact_id"]
-                                <-Reducer 9 [SIMPLE_EDGE]
+                                         Please refer to the previous TableScan [TS_0]
+                                <-Reducer 15 [SIMPLE_EDGE]
                                   SHUFFLE [RS_27]
                                     PartitionCols:_col0
                                     Group By Operator [GBY_8] (rows=115500 width=1436)
                                       Output:["_col0"],keys:KEY._col0
-                                    <-Map 8 [SIMPLE_EDGE]
+                                    <-Map 14 [SIMPLE_EDGE]
                                       SHUFFLE [RS_7]
                                         PartitionCols:_col0
                                         Group By Operator [GBY_6] (rows=231000 width=1436)
@@ -430,6 +386,42 @@ Stage-0
                                             Output:["i_manufact_id"]
                                             Filter Operator [FIL_160] (rows=231000 width=1436)
                                               predicate:((i_category) IN ('Books') and i_manufact_id is not null)
-                                              TableScan [TS_3] (rows=462000 width=1436)
-                                                default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_category","i_manufact_id"]
+                                               Please refer to the previous TableScan [TS_3]
+                            <-Reducer 20 [SIMPLE_EDGE]
+                              SHUFFLE [RS_30]
+                                PartitionCols:_col3
+                                Select Operator [SEL_25] (rows=696954748 width=88)
+                                  Output:["_col3","_col5"]
+                                  Merge Join Operator [MERGEJOIN_176] (rows=696954748 width=88)
+                                    Conds:RS_22._col2=RS_23._col0(Inner),Output:["_col1","_col3"]
+                                  <-Map 26 [SIMPLE_EDGE]
+                                    SHUFFLE [RS_23]
+                                      PartitionCols:_col0
+                                      Select Operator [SEL_18] (rows=20000000 width=1014)
+                                        Output:["_col0"]
+                                        Filter Operator [FIL_163] (rows=20000000 width=1014)
+                                          predicate:((ca_gmt_offset = -6) and ca_address_sk is not null)
+                                           Please refer to the previous TableScan [TS_16]
+                                  <-Reducer 19 [SIMPLE_EDGE]
+                                    SHUFFLE [RS_22]
+                                      PartitionCols:_col2
+                                      Merge Join Operator [MERGEJOIN_175] (rows=633595212 width=88)
+                                        Conds:RS_19._col0=RS_20._col0(Inner),Output:["_col1","_col2","_col3"]
+                                      <-Map 21 [SIMPLE_EDGE]
+                                        SHUFFLE [RS_20]
+                                          PartitionCols:_col0
+                                          Select Operator [SEL_15] (rows=18262 width=1119)
+                                            Output:["_col0"]
+                                            Filter Operator [FIL_162] (rows=18262 width=1119)
+                                              predicate:((d_year = 1999) and (d_moy = 3) and d_date_sk is not null)
+                                               Please refer to the previous TableScan [TS_13]
+                                      <-Map 18 [SIMPLE_EDGE]
+                                        SHUFFLE [RS_19]
+                                          PartitionCols:_col0
+                                          Select Operator [SEL_12] (rows=575995635 width=88)
+                                            Output:["_col0","_col1","_col2","_col3"]
+                                            Filter Operator [FIL_161] (rows=575995635 width=88)
+                                              predicate:(ss_sold_date_sk is not null and ss_addr_sk is not null and ss_item_sk is not null)
+                                              TableScan [TS_10] (rows=575995635 width=88)
+                                                default@store_sales,store_sales,Tbl:COMPLETE,Col:NONE,Output:["ss_sold_date_sk","ss_item_sk","ss_addr_sk","ss_ext_sales_price"]
 

http://git-wip-us.apache.org/repos/asf/hive/blob/59f65772/ql/src/test/results/clientpositive/perf/query38.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/query38.q.out b/ql/src/test/results/clientpositive/perf/query38.q.out
index 133363f..ae9ada5 100644
--- a/ql/src/test/results/clientpositive/perf/query38.q.out
+++ b/ql/src/test/results/clientpositive/perf/query38.q.out
@@ -45,17 +45,17 @@ POSTHOOK: type: QUERY
 Plan optimized by CBO.
 
 Vertex dependency in root stage
-Reducer 11 <- Map 10 (SIMPLE_EDGE), Map 14 (SIMPLE_EDGE)
-Reducer 12 <- Map 15 (SIMPLE_EDGE), Reducer 11 (SIMPLE_EDGE)
-Reducer 13 <- Reducer 12 (SIMPLE_EDGE), Union 5 (CONTAINS)
-Reducer 17 <- Map 16 (SIMPLE_EDGE), Map 20 (SIMPLE_EDGE)
-Reducer 18 <- Map 21 (SIMPLE_EDGE), Reducer 17 (SIMPLE_EDGE)
-Reducer 19 <- Reducer 18 (SIMPLE_EDGE), Union 5 (CONTAINS)
+Reducer 10 <- Map 15 (SIMPLE_EDGE), Reducer 9 (SIMPLE_EDGE)
+Reducer 11 <- Reducer 10 (SIMPLE_EDGE), Union 5 (CONTAINS)
+Reducer 12 <- Map 17 (SIMPLE_EDGE), Map 8 (SIMPLE_EDGE)
+Reducer 13 <- Map 15 (SIMPLE_EDGE), Reducer 12 (SIMPLE_EDGE)
+Reducer 14 <- Reducer 13 (SIMPLE_EDGE), Union 5 (CONTAINS)
 Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 8 (SIMPLE_EDGE)
-Reducer 3 <- Map 9 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 3 <- Map 15 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
 Reducer 4 <- Reducer 3 (SIMPLE_EDGE), Union 5 (CONTAINS)
 Reducer 6 <- Union 5 (SIMPLE_EDGE)
 Reducer 7 <- Reducer 6 (CUSTOM_SIMPLE_EDGE)
+Reducer 9 <- Map 16 (SIMPLE_EDGE), Map 8 (SIMPLE_EDGE)
 
 Stage-0
   Fetch Operator
@@ -79,7 +79,7 @@ Stage-0
                       Group By Operator [GBY_83] (rows=152458212 width=108)
                         Output:["_col0","_col1","_col2","_col3"],aggregations:["count(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2
                       <-Union 5 [SIMPLE_EDGE]
-                        <-Reducer 13 [CONTAINS]
+                        <-Reducer 11 [CONTAINS]
                           Reduce Output Operator [RS_82]
                             PartitionCols:_col0, _col1, _col2
                             Group By Operator [GBY_81] (rows=304916424 width=108)
@@ -88,7 +88,7 @@ Stage-0
                                 Output:["_col0","_col1","_col2","_col3"],aggregations:["count(1)"],keys:_col0, _col1, _col2
                                 Group By Operator [GBY_44] (rows=174233858 width=135)
                                   Output:["_col0","_col1","_col2"],keys:KEY._col0, KEY._col1, KEY._col2
-                                <-Reducer 12 [SIMPLE_EDGE]
+                                <-Reducer 10 [SIMPLE_EDGE]
                                   SHUFFLE [RS_43]
                                     PartitionCols:_col0, _col1, _col2
                                     Group By Operator [GBY_42] (rows=348467716 width=135)
@@ -102,14 +102,23 @@ Stage-0
                                             Output:["_col0","_col1","_col2"]
                                             Filter Operator [FIL_113] (rows=80000000 width=860)
                                               predicate:c_customer_sk is not null
-                                              TableScan [TS_32] (rows=80000000 width=860)
+                                              TableScan [TS_6] (rows=80000000 width=860)
                                                 default@customer,customer,Tbl:COMPLETE,Col:NONE,Output:["c_customer_sk","c_first_name","c_last_name"]
-                                      <-Reducer 11 [SIMPLE_EDGE]
+                                      <-Reducer 9 [SIMPLE_EDGE]
                                         SHUFFLE [RS_38]
                                           PartitionCols:_col1
                                           Merge Join Operator [MERGEJOIN_120] (rows=316788826 width=135)
                                             Conds:RS_35._col0=RS_36._col0(Inner),Output:["_col1","_col3"]
-                                          <-Map 10 [SIMPLE_EDGE]
+                                          <-Map 8 [SIMPLE_EDGE]
+                                            SHUFFLE [RS_36]
+                                              PartitionCols:_col0
+                                              Select Operator [SEL_31] (rows=8116 width=1119)
+                                                Output:["_col0","_col1"]
+                                                Filter Operator [FIL_112] (rows=8116 width=1119)
+                                                  predicate:(d_month_seq BETWEEN 1212 AND 1223 and d_date_sk is not null)
+                                                  TableScan [TS_3] (rows=73049 width=1119)
+                                                    default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_date","d_month_seq"]
+                                          <-Map 16 [SIMPLE_EDGE]
                                             SHUFFLE [RS_35]
                                               PartitionCols:_col0
                                               Select Operator [SEL_28] (rows=287989836 width=135)
@@ -118,16 +127,7 @@ Stage-0
                                                   predicate:(cs_sold_date_sk is not null and cs_bill_customer_sk is not null)
                                                   TableScan [TS_26] (rows=287989836 width=135)
                                                     default@catalog_sales,catalog_sales,Tbl:COMPLETE,Col:NONE,Output:["cs_sold_date_sk","cs_bill_customer_sk"]
-                                          <-Map 14 [SIMPLE_EDGE]
-                                            SHUFFLE [RS_36]
-                                              PartitionCols:_col0
-                                              Select Operator [SEL_31] (rows=8116 width=1119)
-                                                Output:["_col0","_col1"]
-                                                Filter Operator [FIL_112] (rows=8116 width=1119)
-                                                  predicate:(d_month_seq BETWEEN 1212 AND 1223 and d_date_sk is not null)
-                                                  TableScan [TS_29] (rows=73049 width=1119)
-                                                    default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_date","d_month_seq"]
-                        <-Reducer 19 [CONTAINS]
+                        <-Reducer 14 [CONTAINS]
                           Reduce Output Operator [RS_82]
                             PartitionCols:_col0, _col1, _col2
                             Group By Operator [GBY_81] (rows=304916424 width=108)
@@ -136,28 +136,35 @@ Stage-0
                                 Output:["_col0","_col1","_col2","_col3"],aggregations:["count(1)"],keys:_col0, _col1, _col2
                                 Group By Operator [GBY_71] (rows=87121617 width=135)
                                   Output:["_col0","_col1","_col2"],keys:KEY._col0, KEY._col1, KEY._col2
-                                <-Reducer 18 [SIMPLE_EDGE]
+                                <-Reducer 13 [SIMPLE_EDGE]
                                   SHUFFLE [RS_70]
                                     PartitionCols:_col0, _col1, _col2
                                     Group By Operator [GBY_69] (rows=174243235 width=135)
                                       Output:["_col0","_col1","_col2"],keys:_col7, _col6, _col3
                                       Merge Join Operator [MERGEJOIN_123] (rows=174243235 width=135)
                                         Conds:RS_65._col1=RS_66._col0(Inner),Output:["_col3","_col6","_col7"]
-                                      <-Map 21 [SIMPLE_EDGE]
+                                      <-Map 15 [SIMPLE_EDGE]
                                         SHUFFLE [RS_66]
                                           PartitionCols:_col0
                                           Select Operator [SEL_61] (rows=80000000 width=860)
                                             Output:["_col0","_col1","_col2"]
                                             Filter Operator [FIL_116] (rows=80000000 width=860)
                                               predicate:c_customer_sk is not null
-                                              TableScan [TS_59] (rows=80000000 width=860)
-                                                default@customer,customer,Tbl:COMPLETE,Col:NONE,Output:["c_customer_sk","c_first_name","c_last_name"]
-                                      <-Reducer 17 [SIMPLE_EDGE]
+                                               Please refer to the previous TableScan [TS_6]
+                                      <-Reducer 12 [SIMPLE_EDGE]
                                         SHUFFLE [RS_65]
                                           PartitionCols:_col1
                                           Merge Join Operator [MERGEJOIN_122] (rows=158402938 width=135)
                                             Conds:RS_62._col0=RS_63._col0(Inner),Output:["_col1","_col3"]
-                                          <-Map 16 [SIMPLE_EDGE]
+                                          <-Map 8 [SIMPLE_EDGE]
+                                            SHUFFLE [RS_63]
+                                              PartitionCols:_col0
+                                              Select Operator [SEL_58] (rows=8116 width=1119)
+                                                Output:["_col0","_col1"]
+                                                Filter Operator [FIL_115] (rows=8116 width=1119)
+                                                  predicate:(d_month_seq BETWEEN 1212 AND 1223 and d_date_sk is not null)
+                                                   Please refer to the previous TableScan [TS_3]
+                                          <-Map 17 [SIMPLE_EDGE]
                                             SHUFFLE [RS_62]
                                               PartitionCols:_col0
                                               Select Operator [SEL_55] (rows=144002668 width=135)
@@ -166,15 +173,6 @@ Stage-0
                                                   predicate:(ws_sold_date_sk is not null and ws_bill_customer_sk is not null)
                                                   TableScan [TS_53] (rows=144002668 width=135)
                                                     default@web_sales,web_sales,Tbl:COMPLETE,Col:NONE,Output:["ws_sold_date_sk","ws_bill_customer_sk"]
-                                          <-Map 20 [SIMPLE_EDGE]
-                                            SHUFFLE [RS_63]
-                                              PartitionCols:_col0
-                                              Select Operator [SEL_58] (rows=8116 width=1119)
-                                                Output:["_col0","_col1"]
-                                                Filter Operator [FIL_115] (rows=8116 width=1119)
-                                                  predicate:(d_month_seq BETWEEN 1212 AND 1223 and d_date_sk is not null)
-                                                  TableScan [TS_56] (rows=73049 width=1119)
-                                                    default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_date","d_month_seq"]
                         <-Reducer 4 [CONTAINS]
                           Reduce Output Operator [RS_82]
                             PartitionCols:_col0, _col1, _col2
@@ -191,20 +189,27 @@ Stage-0
                                       Output:["_col0","_col1","_col2"],keys:_col7, _col6, _col3
                                       Merge Join Operator [MERGEJOIN_119] (rows=696954748 width=88)
                                         Conds:RS_12._col1=RS_13._col0(Inner),Output:["_col3","_col6","_col7"]
-                                      <-Map 9 [SIMPLE_EDGE]
+                                      <-Map 15 [SIMPLE_EDGE]
                                         SHUFFLE [RS_13]
                                           PartitionCols:_col0
                                           Select Operator [SEL_8] (rows=80000000 width=860)
                                             Output:["_col0","_col1","_col2"]
                                             Filter Operator [FIL_110] (rows=80000000 width=860)
                                               predicate:c_customer_sk is not null
-                                              TableScan [TS_6] (rows=80000000 width=860)
-                                                default@customer,customer,Tbl:COMPLETE,Col:NONE,Output:["c_customer_sk","c_first_name","c_last_name"]
+                                               Please refer to the previous TableScan [TS_6]
                                       <-Reducer 2 [SIMPLE_EDGE]
                                         SHUFFLE [RS_12]
                                           PartitionCols:_col1
                                           Merge Join Operator [MERGEJOIN_118] (rows=633595212 width=88)
                                             Conds:RS_9._col0=RS_10._col0(Inner),Output:["_col1","_col3"]
+                                          <-Map 8 [SIMPLE_EDGE]
+                                            SHUFFLE [RS_10]
+                                              PartitionCols:_col0
+                                              Select Operator [SEL_5] (rows=8116 width=1119)
+                                                Output:["_col0","_col1"]
+                                                Filter Operator [FIL_109] (rows=8116 width=1119)
+                                                  predicate:(d_month_seq BETWEEN 1212 AND 1223 and d_date_sk is not null)
+                                                   Please refer to the previous TableScan [TS_3]
                                           <-Map 1 [SIMPLE_EDGE]
                                             SHUFFLE [RS_9]
                                               PartitionCols:_col0
@@ -214,13 +219,4 @@ Stage-0
                                                   predicate:(ss_sold_date_sk is not null and ss_customer_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_customer_sk"]
-                                          <-Map 8 [SIMPLE_EDGE]
-                                            SHUFFLE [RS_10]
-                                              PartitionCols:_col0
-                                              Select Operator [SEL_5] (rows=8116 width=1119)
-                                                Output:["_col0","_col1"]
-                                                Filter Operator [FIL_109] (rows=8116 width=1119)
-                                                  predicate:(d_month_seq BETWEEN 1212 AND 1223 and d_date_sk is not null)
-                                                  TableScan [TS_3] (rows=73049 width=1119)
-                                                    default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_date","d_month_seq"]
 

http://git-wip-us.apache.org/repos/asf/hive/blob/59f65772/ql/src/test/results/clientpositive/perf/query39.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/query39.q.out b/ql/src/test/results/clientpositive/perf/query39.q.out
index 19472c4..dcf3cb2 100644
--- a/ql/src/test/results/clientpositive/perf/query39.q.out
+++ b/ql/src/test/results/clientpositive/perf/query39.q.out
@@ -5,16 +5,16 @@ POSTHOOK: type: QUERY
 Plan optimized by CBO.
 
 Vertex dependency in root stage
-Reducer 12 <- Map 11 (SIMPLE_EDGE), Map 16 (SIMPLE_EDGE)
-Reducer 13 <- Map 17 (SIMPLE_EDGE), Reducer 12 (SIMPLE_EDGE)
-Reducer 14 <- Map 18 (SIMPLE_EDGE), Reducer 13 (SIMPLE_EDGE)
-Reducer 15 <- Reducer 14 (SIMPLE_EDGE)
-Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 8 (SIMPLE_EDGE)
-Reducer 3 <- Map 9 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
-Reducer 4 <- Map 10 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
+Reducer 10 <- Map 14 (SIMPLE_EDGE), Reducer 9 (SIMPLE_EDGE)
+Reducer 11 <- Reducer 10 (SIMPLE_EDGE)
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 12 (SIMPLE_EDGE)
+Reducer 3 <- Map 13 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Map 14 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
 Reducer 5 <- Reducer 4 (SIMPLE_EDGE)
-Reducer 6 <- Reducer 15 (SIMPLE_EDGE), Reducer 5 (SIMPLE_EDGE)
+Reducer 6 <- Reducer 11 (SIMPLE_EDGE), Reducer 5 (SIMPLE_EDGE)
 Reducer 7 <- Reducer 6 (SIMPLE_EDGE)
+Reducer 8 <- Map 1 (SIMPLE_EDGE), Map 12 (SIMPLE_EDGE)
+Reducer 9 <- Map 13 (SIMPLE_EDGE), Reducer 8 (SIMPLE_EDGE)
 
 Stage-0
   Fetch Operator
@@ -30,7 +30,7 @@ Stage-0
               Output:["_col0","_col1","_col3","_col4","_col5","_col6","_col8","_col9"]
               Merge Join Operator [MERGEJOIN_103] (rows=13756683 width=15)
                 Conds:RS_56._col1, _col2=RS_57._col1, _col2(Inner),Output:["_col1","_col2","_col3","_col4","_col6","_col7","_col8","_col9"]
-              <-Reducer 15 [SIMPLE_EDGE]
+              <-Reducer 11 [SIMPLE_EDGE]
                 SHUFFLE [RS_57]
                   PartitionCols:_col1, _col2
                   Select Operator [SEL_55] (rows=12506076 width=15)
@@ -41,58 +41,58 @@ Stage-0
                         Output:["_col1","_col2","_col3","_col4"]
                         Group By Operator [GBY_52] (rows=25012152 width=15)
                           Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["stddev_samp(VALUE._col0)","avg(VALUE._col1)"],keys:KEY._col0, KEY._col1, KEY._col2
-                        <-Reducer 14 [SIMPLE_EDGE]
+                        <-Reducer 10 [SIMPLE_EDGE]
                           SHUFFLE [RS_51]
                             PartitionCols:_col0, _col1, _col2
                             Group By Operator [GBY_50] (rows=50024305 width=15)
                               Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["stddev_samp(_col3)","avg(_col3)"],keys:_col8, _col7, _col9
                               Merge Join Operator [MERGEJOIN_102] (rows=50024305 width=15)
                                 Conds:RS_46._col2=RS_47._col0(Inner),Output:["_col3","_col7","_col8","_col9"]
-                              <-Map 18 [SIMPLE_EDGE]
+                              <-Map 14 [SIMPLE_EDGE]
                                 SHUFFLE [RS_47]
                                   PartitionCols:_col0
                                   Select Operator [SEL_39] (rows=27 width=1029)
                                     Output:["_col0","_col1"]
                                     Filter Operator [FIL_96] (rows=27 width=1029)
                                       predicate:w_warehouse_sk is not null
-                                      TableScan [TS_37] (rows=27 width=1029)
+                                      TableScan [TS_9] (rows=27 width=1029)
                                         default@warehouse,warehouse,Tbl:COMPLETE,Col:NONE,Output:["w_warehouse_sk","w_warehouse_name"]
-                              <-Reducer 13 [SIMPLE_EDGE]
+                              <-Reducer 9 [SIMPLE_EDGE]
                                 SHUFFLE [RS_46]
                                   PartitionCols:_col2
                                   Merge Join Operator [MERGEJOIN_101] (rows=45476640 width=15)
                                     Conds:RS_43._col1=RS_44._col0(Inner),Output:["_col2","_col3","_col7"]
-                                  <-Map 17 [SIMPLE_EDGE]
+                                  <-Map 13 [SIMPLE_EDGE]
                                     SHUFFLE [RS_44]
                                       PartitionCols:_col0
                                       Select Operator [SEL_36] (rows=462000 width=1436)
                                         Output:["_col0"]
                                         Filter Operator [FIL_95] (rows=462000 width=1436)
                                           predicate:i_item_sk is not null
-                                          TableScan [TS_34] (rows=462000 width=1436)
+                                          TableScan [TS_6] (rows=462000 width=1436)
                                             default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk"]
-                                  <-Reducer 12 [SIMPLE_EDGE]
+                                  <-Reducer 8 [SIMPLE_EDGE]
                                     SHUFFLE [RS_43]
                                       PartitionCols:_col1
                                       Merge Join Operator [MERGEJOIN_100] (rows=41342400 width=15)
                                         Conds:RS_40._col0=RS_41._col0(Inner),Output:["_col1","_col2","_col3"]
-                                      <-Map 11 [SIMPLE_EDGE]
+                                      <-Map 1 [SIMPLE_EDGE]
                                         SHUFFLE [RS_40]
                                           PartitionCols:_col0
                                           Select Operator [SEL_30] (rows=37584000 width=15)
                                             Output:["_col0","_col1","_col2","_col3"]
                                             Filter Operator [FIL_93] (rows=37584000 width=15)
                                               predicate:(inv_item_sk is not null and inv_warehouse_sk is not null and inv_date_sk is not null)
-                                              TableScan [TS_28] (rows=37584000 width=15)
+                                              TableScan [TS_0] (rows=37584000 width=15)
                                                 default@inventory,inventory,Tbl:COMPLETE,Col:NONE,Output:["inv_date_sk","inv_item_sk","inv_warehouse_sk","inv_quantity_on_hand"]
-                                      <-Map 16 [SIMPLE_EDGE]
+                                      <-Map 12 [SIMPLE_EDGE]
                                         SHUFFLE [RS_41]
                                           PartitionCols:_col0
                                           Select Operator [SEL_33] (rows=18262 width=1119)
                                             Output:["_col0"]
                                             Filter Operator [FIL_94] (rows=18262 width=1119)
                                               predicate:((d_year = 1999) and (d_moy = 4) and d_date_sk is not null)
-                                              TableScan [TS_31] (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_moy"]
               <-Reducer 5 [SIMPLE_EDGE]
                 SHUFFLE [RS_56]
@@ -112,29 +112,27 @@ Stage-0
                               Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["stddev_samp(_col3)","avg(_col3)"],keys:_col8, _col7, _col9
                               Merge Join Operator [MERGEJOIN_99] (rows=50024305 width=15)
                                 Conds:RS_18._col2=RS_19._col0(Inner),Output:["_col3","_col7","_col8","_col9"]
-                              <-Map 10 [SIMPLE_EDGE]
+                              <-Map 14 [SIMPLE_EDGE]
                                 SHUFFLE [RS_19]
                                   PartitionCols:_col0
                                   Select Operator [SEL_11] (rows=27 width=1029)
                                     Output:["_col0","_col1"]
                                     Filter Operator [FIL_92] (rows=27 width=1029)
                                       predicate:w_warehouse_sk is not null
-                                      TableScan [TS_9] (rows=27 width=1029)
-                                        default@warehouse,warehouse,Tbl:COMPLETE,Col:NONE,Output:["w_warehouse_sk","w_warehouse_name"]
+                                       Please refer to the previous TableScan [TS_9]
                               <-Reducer 3 [SIMPLE_EDGE]
                                 SHUFFLE [RS_18]
                                   PartitionCols:_col2
                                   Merge Join Operator [MERGEJOIN_98] (rows=45476640 width=15)
                                     Conds:RS_15._col1=RS_16._col0(Inner),Output:["_col2","_col3","_col7"]
-                                  <-Map 9 [SIMPLE_EDGE]
+                                  <-Map 13 [SIMPLE_EDGE]
                                     SHUFFLE [RS_16]
                                       PartitionCols:_col0
                                       Select Operator [SEL_8] (rows=462000 width=1436)
                                         Output:["_col0"]
                                         Filter Operator [FIL_91] (rows=462000 width=1436)
                                           predicate:i_item_sk is not null
-                                          TableScan [TS_6] (rows=462000 width=1436)
-                                            default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk"]
+                                           Please refer to the previous TableScan [TS_6]
                                   <-Reducer 2 [SIMPLE_EDGE]
                                     SHUFFLE [RS_15]
                                       PartitionCols:_col1
@@ -147,17 +145,15 @@ Stage-0
                                             Output:["_col0","_col1","_col2","_col3"]
                                             Filter Operator [FIL_89] (rows=37584000 width=15)
                                               predicate:(inv_item_sk is not null and inv_warehouse_sk is not null and inv_date_sk is not null)
-                                              TableScan [TS_0] (rows=37584000 width=15)
-                                                default@inventory,inventory,Tbl:COMPLETE,Col:NONE,Output:["inv_date_sk","inv_item_sk","inv_warehouse_sk","inv_quantity_on_hand"]
-                                      <-Map 8 [SIMPLE_EDGE]
+                                               Please refer to the previous TableScan [TS_0]
+                                      <-Map 12 [SIMPLE_EDGE]
                                         SHUFFLE [RS_13]
                                           PartitionCols:_col0
                                           Select Operator [SEL_5] (rows=18262 width=1119)
                                             Output:["_col0"]
                                             Filter Operator [FIL_90] (rows=18262 width=1119)
                                               predicate:((d_year = 1999) and (d_moy = 3) and d_date_sk is not null)
-                                              TableScan [TS_3] (rows=73049 width=1119)
-                                                default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_moy"]
+                                               Please refer to the previous TableScan [TS_3]
 
 PREHOOK: query: with inv as (select w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy ,stdev,mean, case mean when 0 then null else stdev/mean end cov from(select w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy ,stddev_samp(inv_quantity_on_hand) stdev,avg(inv_quantity_on_hand) mean from inventory ,item ,warehouse ,date_dim where inv_item_sk = i_item_sk and inv_warehouse_sk = w_warehouse_sk and inv_date_sk = d_date_sk and d_year =1999 group by w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy) foo where case mean when 0 then 0 else stdev/mean end > 1) select inv1.w_warehouse_sk,inv1.i_item_sk,inv1.d_moy,inv1.mean, inv1.cov ,inv2.w_warehouse_sk,inv2.i_item_sk,inv2.d_moy,inv2.mean, inv2.cov from inv inv1,inv inv2 where inv1.i_item_sk = inv2.i_item_sk and inv1.w_warehouse_sk = inv2.w_warehouse_sk and inv1.d_moy=3 and inv2.d_moy=3+1 and inv1.cov > 1.5 order by inv1.w_warehouse_sk,inv1.i_item_sk,inv1.d_moy,inv1.mean,inv1.cov ,inv2.d_moy,inv2.mean, inv2.cov
 PREHOOK: type: QUERY

http://git-wip-us.apache.org/repos/asf/hive/blob/59f65772/ql/src/test/results/clientpositive/perf/query46.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/query46.q.out b/ql/src/test/results/clientpositive/perf/query46.q.out
index 556e4b8..8c6e914 100644
--- a/ql/src/test/results/clientpositive/perf/query46.q.out
+++ b/ql/src/test/results/clientpositive/perf/query46.q.out
@@ -5,14 +5,14 @@ POSTHOOK: type: QUERY
 Plan optimized by CBO.
 
 Vertex dependency in root stage
-Reducer 10 <- Map 15 (SIMPLE_EDGE), Reducer 9 (SIMPLE_EDGE)
-Reducer 11 <- Reducer 10 (SIMPLE_EDGE)
+Reducer 10 <- Map 13 (SIMPLE_EDGE), Reducer 9 (SIMPLE_EDGE)
+Reducer 11 <- Map 14 (SIMPLE_EDGE), Reducer 10 (SIMPLE_EDGE)
 Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 5 (SIMPLE_EDGE)
-Reducer 3 <- Reducer 11 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 3 <- Reducer 2 (SIMPLE_EDGE), Reducer 7 (SIMPLE_EDGE)
 Reducer 4 <- Reducer 3 (SIMPLE_EDGE)
-Reducer 7 <- Map 12 (SIMPLE_EDGE), Map 6 (SIMPLE_EDGE)
-Reducer 8 <- Map 13 (SIMPLE_EDGE), Reducer 7 (SIMPLE_EDGE)
-Reducer 9 <- Map 14 (SIMPLE_EDGE), Reducer 8 (SIMPLE_EDGE)
+Reducer 6 <- Map 5 (SIMPLE_EDGE), Reducer 11 (SIMPLE_EDGE)
+Reducer 7 <- Reducer 6 (SIMPLE_EDGE)
+Reducer 9 <- Map 12 (SIMPLE_EDGE), Map 8 (SIMPLE_EDGE)
 
 Stage-0
   Fetch Operator
@@ -32,30 +32,52 @@ Stage-0
                   predicate:(_col5 <> _col8)
                   Merge Join Operator [MERGEJOIN_86] (rows=463823414 width=88)
                     Conds:RS_42._col0=RS_43._col1(Inner),Output:["_col2","_col3","_col5","_col6","_col8","_col9","_col10"]
-                  <-Reducer 11 [SIMPLE_EDGE]
+                  <-Reducer 2 [SIMPLE_EDGE]
+                    SHUFFLE [RS_42]
+                      PartitionCols:_col0
+                      Merge Join Operator [MERGEJOIN_81] (rows=88000001 width=860)
+                        Conds:RS_39._col1=RS_40._col0(Inner),Output:["_col0","_col2","_col3","_col5"]
+                      <-Map 5 [SIMPLE_EDGE]
+                        SHUFFLE [RS_40]
+                          PartitionCols:_col0
+                          Select Operator [SEL_5] (rows=40000000 width=1014)
+                            Output:["_col0","_col1"]
+                            Filter Operator [FIL_75] (rows=40000000 width=1014)
+                              predicate:ca_address_sk is not null
+                              TableScan [TS_3] (rows=40000000 width=1014)
+                                default@customer_address,current_addr,Tbl:COMPLETE,Col:NONE,Output:["ca_address_sk","ca_city"]
+                      <-Map 1 [SIMPLE_EDGE]
+                        SHUFFLE [RS_39]
+                          PartitionCols:_col1
+                          Select Operator [SEL_2] (rows=80000000 width=860)
+                            Output:["_col0","_col1","_col2","_col3"]
+                            Filter Operator [FIL_74] (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_current_addr_sk","c_first_name","c_last_name"]
+                  <-Reducer 7 [SIMPLE_EDGE]
                     SHUFFLE [RS_43]
                       PartitionCols:_col1
                       Select Operator [SEL_37] (rows=421657640 width=88)
                         Output:["_col0","_col1","_col2","_col3","_col4"]
                         Group By Operator [GBY_36] (rows=421657640 width=88)
                           Output:["_col0","_col1","_col2","_col3","_col4","_col5"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"],keys:KEY._col0, KEY._col1, KEY._col2, KEY._col3
-                        <-Reducer 10 [SIMPLE_EDGE]
+                        <-Reducer 6 [SIMPLE_EDGE]
                           SHUFFLE [RS_35]
                             PartitionCols:_col0, _col1, _col2, _col3
                             Group By Operator [GBY_34] (rows=843315281 width=88)
                               Output:["_col0","_col1","_col2","_col3","_col4","_col5"],aggregations:["sum(_col6)","sum(_col7)"],keys:_col1, _col17, _col3, _col5
                               Merge Join Operator [MERGEJOIN_85] (rows=843315281 width=88)
                                 Conds:RS_30._col3=RS_31._col0(Inner),Output:["_col1","_col3","_col5","_col6","_col7","_col17"]
-                              <-Map 15 [SIMPLE_EDGE]
+                              <-Map 5 [SIMPLE_EDGE]
                                 SHUFFLE [RS_31]
                                   PartitionCols:_col0
                                   Select Operator [SEL_20] (rows=40000000 width=1014)
                                     Output:["_col0","_col1"]
                                     Filter Operator [FIL_80] (rows=40000000 width=1014)
                                       predicate:ca_address_sk is not null
-                                      TableScan [TS_18] (rows=40000000 width=1014)
-                                        default@customer_address,customer_address,Tbl:COMPLETE,Col:NONE,Output:["ca_address_sk","ca_city"]
-                              <-Reducer 9 [SIMPLE_EDGE]
+                                       Please refer to the previous TableScan [TS_3]
+                              <-Reducer 11 [SIMPLE_EDGE]
                                 SHUFFLE [RS_30]
                                   PartitionCols:_col3
                                   Merge Join Operator [MERGEJOIN_84] (rows=766650239 width=88)
@@ -69,7 +91,7 @@ Stage-0
                                           predicate:(((hd_dep_count = 4) or (hd_vehicle_count = 2)) and hd_demo_sk is not null)
                                           TableScan [TS_15] (rows=7200 width=107)
                                             default@household_demographics,household_demographics,Tbl:COMPLETE,Col:NONE,Output:["hd_demo_sk","hd_dep_count","hd_vehicle_count"]
-                                  <-Reducer 8 [SIMPLE_EDGE]
+                                  <-Reducer 10 [SIMPLE_EDGE]
                                     SHUFFLE [RS_27]
                                       PartitionCols:_col2
                                       Merge Join Operator [MERGEJOIN_83] (rows=696954748 width=88)
@@ -83,7 +105,7 @@ Stage-0
                                               predicate:((s_city) IN ('Rosedale', 'Bethlehem', 'Clinton', 'Clifton', 'Springfield') and s_store_sk is not null)
                                               TableScan [TS_12] (rows=1704 width=1910)
                                                 default@store,store,Tbl:COMPLETE,Col:NONE,Output:["s_store_sk","s_city"]
-                                      <-Reducer 7 [SIMPLE_EDGE]
+                                      <-Reducer 9 [SIMPLE_EDGE]
                                         SHUFFLE [RS_24]
                                           PartitionCols:_col4
                                           Merge Join Operator [MERGEJOIN_82] (rows=633595212 width=88)
@@ -97,7 +119,7 @@ Stage-0
                                                   predicate:((d_dow) IN (6, 0) and (d_year) IN (1998, 1999, 2000) and d_date_sk is not null)
                                                   TableScan [TS_9] (rows=73049 width=1119)
                                                     default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_dow"]
-                                          <-Map 6 [SIMPLE_EDGE]
+                                          <-Map 8 [SIMPLE_EDGE]
                                             SHUFFLE [RS_21]
                                               PartitionCols:_col0
                                               Select Operator [SEL_8] (rows=575995635 width=88)
@@ -106,27 +128,4 @@ Stage-0
                                                   predicate:(ss_sold_date_sk is not null and ss_store_sk is not null and ss_hdemo_sk is not null and ss_addr_sk is not null and ss_customer_sk is not null)
                                                   TableScan [TS_6] (rows=575995635 width=88)
                                                     default@store_sales,store_sales,Tbl:COMPLETE,Col:NONE,Output:["ss_sold_date_sk","ss_customer_sk","ss_hdemo_sk","ss_addr_sk","ss_store_sk","ss_ticket_number","ss_coupon_amt","ss_net_profit"]
-                  <-Reducer 2 [SIMPLE_EDGE]
-                    SHUFFLE [RS_42]
-                      PartitionCols:_col0
-                      Merge Join Operator [MERGEJOIN_81] (rows=88000001 width=860)
-                        Conds:RS_39._col1=RS_40._col0(Inner),Output:["_col0","_col2","_col3","_col5"]
-                      <-Map 1 [SIMPLE_EDGE]
-                        SHUFFLE [RS_39]
-                          PartitionCols:_col1
-                          Select Operator [SEL_2] (rows=80000000 width=860)
-                            Output:["_col0","_col1","_col2","_col3"]
-                            Filter Operator [FIL_74] (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_current_addr_sk","c_first_name","c_last_name"]
-                      <-Map 5 [SIMPLE_EDGE]
-                        SHUFFLE [RS_40]
-                          PartitionCols:_col0
-                          Select Operator [SEL_5] (rows=40000000 width=1014)
-                            Output:["_col0","_col1"]
-                            Filter Operator [FIL_75] (rows=40000000 width=1014)
-                              predicate:ca_address_sk is not null
-                              TableScan [TS_3] (rows=40000000 width=1014)
-                                default@customer_address,current_addr,Tbl:COMPLETE,Col:NONE,Output:["ca_address_sk","ca_city"]
 

http://git-wip-us.apache.org/repos/asf/hive/blob/59f65772/ql/src/test/results/clientpositive/perf/query5.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/query5.q.out b/ql/src/test/results/clientpositive/perf/query5.q.out
index ad78d7e..a3f2d58 100644
--- a/ql/src/test/results/clientpositive/perf/query5.q.out
+++ b/ql/src/test/results/clientpositive/perf/query5.q.out
@@ -256,19 +256,19 @@ Plan optimized by CBO.
 
 Vertex dependency in root stage
 Map 1 <- Union 2 (CONTAINS)
-Map 12 <- Union 13 (CONTAINS)
-Map 17 <- Union 13 (CONTAINS)
-Map 20 <- Union 21 (CONTAINS)
+Map 18 <- Union 19 (CONTAINS)
+Map 20 <- Union 19 (CONTAINS)
+Map 22 <- Union 23 (CONTAINS)
 Map 9 <- Union 2 (CONTAINS)
-Reducer 14 <- Map 18 (SIMPLE_EDGE), Union 13 (SIMPLE_EDGE)
-Reducer 15 <- Map 19 (SIMPLE_EDGE), Reducer 14 (SIMPLE_EDGE)
+Reducer 11 <- Map 10 (SIMPLE_EDGE), Union 19 (SIMPLE_EDGE)
+Reducer 12 <- Map 21 (SIMPLE_EDGE), Reducer 11 (SIMPLE_EDGE)
+Reducer 13 <- Reducer 12 (SIMPLE_EDGE), Union 6 (CONTAINS)
+Reducer 14 <- Map 10 (SIMPLE_EDGE), Union 23 (SIMPLE_EDGE)
+Reducer 15 <- Map 27 (SIMPLE_EDGE), Reducer 14 (SIMPLE_EDGE)
 Reducer 16 <- Reducer 15 (SIMPLE_EDGE), Union 6 (CONTAINS)
-Reducer 22 <- Map 28 (SIMPLE_EDGE), Union 21 (SIMPLE_EDGE)
-Reducer 23 <- Map 29 (SIMPLE_EDGE), Reducer 22 (SIMPLE_EDGE)
-Reducer 24 <- Reducer 23 (SIMPLE_EDGE), Union 6 (CONTAINS)
-Reducer 26 <- Map 25 (SIMPLE_EDGE), Map 27 (SIMPLE_EDGE), Union 21 (CONTAINS)
+Reducer 25 <- Map 24 (SIMPLE_EDGE), Map 26 (SIMPLE_EDGE), Union 23 (CONTAINS)
 Reducer 3 <- Map 10 (SIMPLE_EDGE), Union 2 (SIMPLE_EDGE)
-Reducer 4 <- Map 11 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
+Reducer 4 <- Map 17 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
 Reducer 5 <- Reducer 4 (SIMPLE_EDGE), Union 6 (CONTAINS)
 Reducer 7 <- Union 6 (SIMPLE_EDGE)
 Reducer 8 <- Reducer 7 (SIMPLE_EDGE)
@@ -290,7 +290,7 @@ Stage-0
                 Group By Operator [GBY_88] (rows=1136898901 width=110)
                   Output:["_col0","_col1","_col3","_col4","_col5"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)"],keys:KEY._col0, KEY._col1, KEY._col2
                 <-Union 6 [SIMPLE_EDGE]
-                  <-Reducer 16 [CONTAINS]
+                  <-Reducer 13 [CONTAINS]
                     Reduce Output Operator [RS_87]
                       PartitionCols:_col0, _col1, _col2
                       Group By Operator [GBY_86] (rows=2273797803 width=110)
@@ -299,14 +299,14 @@ Stage-0
                           Output:["_col0","_col1","_col2","_col3","_col4"]
                           Group By Operator [GBY_48] (rows=191657181 width=132)
                             Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)","sum(VALUE._col3)"],keys:KEY._col0
-                          <-Reducer 15 [SIMPLE_EDGE]
+                          <-Reducer 12 [SIMPLE_EDGE]
                             SHUFFLE [RS_47]
                               PartitionCols:_col0
                               Group By Operator [GBY_46] (rows=383314363 width=132)
                                 Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(_col2)","sum(_col4)","sum(_col3)","sum(_col5)"],keys:_col9
                                 Merge Join Operator [MERGEJOIN_136] (rows=383314363 width=132)
                                   Conds:RS_42._col0=RS_43._col0(Inner),Output:["_col2","_col3","_col4","_col5","_col9"]
-                                <-Map 19 [SIMPLE_EDGE]
+                                <-Map 21 [SIMPLE_EDGE]
                                   SHUFFLE [RS_43]
                                     PartitionCols:_col0
                                     Select Operator [SEL_38] (rows=46000 width=460)
@@ -315,22 +315,22 @@ Stage-0
                                         predicate:cp_catalog_page_sk is not null
                                         TableScan [TS_36] (rows=46000 width=460)
                                           default@catalog_page,catalog_page,Tbl:COMPLETE,Col:NONE,Output:["cp_catalog_page_sk","cp_catalog_page_id"]
-                                <-Reducer 14 [SIMPLE_EDGE]
+                                <-Reducer 11 [SIMPLE_EDGE]
                                   SHUFFLE [RS_42]
                                     PartitionCols:_col0
                                     Merge Join Operator [MERGEJOIN_135] (rows=348467596 width=132)
-                                      Conds:Union 13._col1=RS_40._col0(Inner),Output:["_col0","_col2","_col3","_col4","_col5"]
-                                    <-Map 18 [SIMPLE_EDGE]
+                                      Conds:Union 19._col1=RS_40._col0(Inner),Output:["_col0","_col2","_col3","_col4","_col5"]
+                                    <-Map 10 [SIMPLE_EDGE]
                                       SHUFFLE [RS_40]
                                         PartitionCols:_col0
                                         Select Operator [SEL_35] (rows=8116 width=1119)
                                           Output:["_col0"]
                                           Filter Operator [FIL_125] (rows=8116 width=1119)
                                             predicate:(CAST( d_date AS TIMESTAMP) BETWEEN 1998-08-04 00:00:00.0 AND 1998-08-18 00:00:00.0 and d_date_sk is not null)
-                                            TableScan [TS_33] (rows=73049 width=1119)
+                                            TableScan [TS_8] (rows=73049 width=1119)
                                               default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_date"]
-                                    <-Union 13 [SIMPLE_EDGE]
-                                      <-Map 12 [CONTAINS]
+                                    <-Union 19 [SIMPLE_EDGE]
+                                      <-Map 18 [CONTAINS]
                                         Reduce Output Operator [RS_39]
                                           PartitionCols:_col1
                                           Select Operator [SEL_27] (rows=287989836 width=135)
@@ -339,7 +339,7 @@ Stage-0
                                               predicate:(cs_sold_date_sk is not null and cs_catalog_page_sk is not null)
                                               TableScan [TS_25] (rows=287989836 width=135)
                                                 Output:["cs_sold_date_sk","cs_catalog_page_sk","cs_ext_sales_price","cs_net_profit"]
-                                      <-Map 17 [CONTAINS]
+                                      <-Map 20 [CONTAINS]
                                         Reduce Output Operator [RS_39]
                                           PartitionCols:_col1
                                           Select Operator [SEL_30] (rows=28798881 width=106)
@@ -348,7 +348,7 @@ Stage-0
                                               predicate:(cr_returned_date_sk is not null and cr_catalog_page_sk is not null)
                                               TableScan [TS_28] (rows=28798881 width=106)
                                                 Output:["cr_returned_date_sk","cr_catalog_page_sk","cr_return_amount","cr_net_loss"]
-                  <-Reducer 24 [CONTAINS]
+                  <-Reducer 16 [CONTAINS]
                     Reduce Output Operator [RS_87]
                       PartitionCols:_col0, _col1, _col2
                       Group By Operator [GBY_86] (rows=2273797803 width=110)
@@ -357,14 +357,14 @@ Stage-0
                           Output:["_col0","_col1","_col2","_col3","_col4"]
                           Group By Operator [GBY_82] (rows=182955399 width=135)
                             Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)","sum(VALUE._col3)"],keys:KEY._col0
-                          <-Reducer 23 [SIMPLE_EDGE]
+                          <-Reducer 15 [SIMPLE_EDGE]
                             SHUFFLE [RS_81]
                               PartitionCols:_col0
                               Group By Operator [GBY_80] (rows=365910798 width=135)
                                 Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(_col2)","sum(_col4)","sum(_col3)","sum(_col5)"],keys:_col9
                                 Merge Join Operator [MERGEJOIN_138] (rows=365910798 width=135)
                                   Conds:RS_76._col0=RS_77._col0(Inner),Output:["_col2","_col3","_col4","_col5","_col9"]
-                                <-Map 29 [SIMPLE_EDGE]
+                                <-Map 27 [SIMPLE_EDGE]
                                   SHUFFLE [RS_77]
                                     PartitionCols:_col0
                                     Select Operator [SEL_72] (rows=84 width=1850)
@@ -373,22 +373,21 @@ Stage-0
                                         predicate:web_site_sk is not null
                                         TableScan [TS_70] (rows=84 width=1850)
                                           default@web_site,web_site,Tbl:COMPLETE,Col:NONE,Output:["web_site_sk","web_site_id"]
-                                <-Reducer 22 [SIMPLE_EDGE]
+                                <-Reducer 14 [SIMPLE_EDGE]
                                   SHUFFLE [RS_76]
                                     PartitionCols:_col0
                                     Merge Join Operator [MERGEJOIN_137] (rows=332646173 width=135)
-                                      Conds:Union 21._col1=RS_74._col0(Inner),Output:["_col0","_col2","_col3","_col4","_col5"]
-                                    <-Map 28 [SIMPLE_EDGE]
+                                      Conds:Union 23._col1=RS_74._col0(Inner),Output:["_col0","_col2","_col3","_col4","_col5"]
+                                    <-Map 10 [SIMPLE_EDGE]
                                       SHUFFLE [RS_74]
                                         PartitionCols:_col0
                                         Select Operator [SEL_69] (rows=8116 width=1119)
                                           Output:["_col0"]
                                           Filter Operator [FIL_130] (rows=8116 width=1119)
                                             predicate:(CAST( d_date AS TIMESTAMP) BETWEEN 1998-08-04 00:00:00.0 AND 1998-08-18 00:00:00.0 and d_date_sk is not null)
-                                            TableScan [TS_67] (rows=73049 width=1119)
-                                              default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_date"]
-                                    <-Union 21 [SIMPLE_EDGE]
-                                      <-Map 20 [CONTAINS]
+                                             Please refer to the previous TableScan [TS_8]
+                                    <-Union 23 [SIMPLE_EDGE]
+                                      <-Map 22 [CONTAINS]
                                         Reduce Output Operator [RS_73]
                                           PartitionCols:_col1
                                           Select Operator [SEL_54] (rows=144002668 width=135)
@@ -397,14 +396,14 @@ Stage-0
                                               predicate:(ws_sold_date_sk is not null and ws_web_site_sk is not null)
                                               TableScan [TS_52] (rows=144002668 width=135)
                                                 Output:["ws_sold_date_sk","ws_web_site_sk","ws_ext_sales_price","ws_net_profit"]
-                                      <-Reducer 26 [CONTAINS]
+                                      <-Reducer 25 [CONTAINS]
                                         Reduce Output Operator [RS_73]
                                           PartitionCols:_col1
                                           Select Operator [SEL_64] (rows=158402938 width=135)
                                             Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
                                             Merge Join Operator [MERGEJOIN_132] (rows=158402938 width=135)
                                               Conds:RS_61._col0, _col2=RS_62._col1, _col2(Inner),Output:["_col1","_col3","_col6","_col7"]
-                                            <-Map 25 [SIMPLE_EDGE]
+                                            <-Map 24 [SIMPLE_EDGE]
                                               SHUFFLE [RS_61]
                                                 PartitionCols:_col0, _col2
                                                 Select Operator [SEL_57] (rows=144002668 width=135)
@@ -413,7 +412,7 @@ Stage-0
                                                     predicate:(ws_web_site_sk is not null and ws_order_number is not null and ws_item_sk is not null)
                                                     TableScan [TS_55] (rows=144002668 width=135)
                                                       default@web_sales,web_sales,Tbl:COMPLETE,Col:NONE,Output:["ws_item_sk","ws_web_site_sk","ws_order_number"]
-                                            <-Map 27 [SIMPLE_EDGE]
+                                            <-Map 26 [SIMPLE_EDGE]
                                               SHUFFLE [RS_62]
                                                 PartitionCols:_col1, _col2
                                                 Select Operator [SEL_60] (rows=14398467 width=92)
@@ -438,7 +437,7 @@ Stage-0
                                 Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(_col2)","sum(_col4)","sum(_col3)","sum(_col5)"],keys:_col9
                                 Merge Join Operator [MERGEJOIN_134] (rows=766640042 width=87)
                                   Conds:RS_17._col0=RS_18._col0(Inner),Output:["_col2","_col3","_col4","_col5","_col9"]
-                                <-Map 11 [SIMPLE_EDGE]
+                                <-Map 17 [SIMPLE_EDGE]
                                   SHUFFLE [RS_18]
                                     PartitionCols:_col0
                                     Select Operator [SEL_13] (rows=1704 width=1910)
@@ -459,8 +458,7 @@ Stage-0
                                           Output:["_col0"]
                                           Filter Operator [FIL_121] (rows=8116 width=1119)
                                             predicate:(CAST( d_date AS TIMESTAMP) BETWEEN 1998-08-04 00:00:00.0 AND 1998-08-18 00:00:00.0 and d_date_sk is not null)
-                                            TableScan [TS_8] (rows=73049 width=1119)
-                                              default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_date"]
+                                             Please refer to the previous TableScan [TS_8]
                                     <-Union 2 [SIMPLE_EDGE]
                                       <-Map 1 [CONTAINS]
                                         Reduce Output Operator [RS_14]