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

[14/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/query51.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/query51.q.out b/ql/src/test/results/clientpositive/perf/query51.q.out
index 7da09ba..2468c77 100644
--- a/ql/src/test/results/clientpositive/perf/query51.q.out
+++ b/ql/src/test/results/clientpositive/perf/query51.q.out
@@ -87,13 +87,13 @@ POSTHOOK: type: QUERY
 Plan optimized by CBO.
 
 Vertex dependency in root stage
-Reducer 10 <- Reducer 9 (SIMPLE_EDGE)
 Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 7 (SIMPLE_EDGE)
 Reducer 3 <- Reducer 2 (SIMPLE_EDGE)
-Reducer 4 <- Reducer 10 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
+Reducer 4 <- Reducer 3 (SIMPLE_EDGE), Reducer 9 (SIMPLE_EDGE)
 Reducer 5 <- Reducer 4 (SIMPLE_EDGE)
 Reducer 6 <- Reducer 5 (SIMPLE_EDGE)
-Reducer 9 <- Map 11 (SIMPLE_EDGE), Map 8 (SIMPLE_EDGE)
+Reducer 8 <- Map 10 (SIMPLE_EDGE), Map 7 (SIMPLE_EDGE)
+Reducer 9 <- Reducer 8 (SIMPLE_EDGE)
 
 Stage-0
   Fetch Operator
@@ -120,40 +120,6 @@ Stage-0
                         PartitionCols:CASE WHEN (_col3 is not null) THEN (_col3) ELSE (_col0) END
                         Merge Join Operator [MERGEJOIN_67] (rows=348477374 width=88)
                           Conds:RS_40._col0, _col1=RS_41._col0, _col1(Outer),Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
-                        <-Reducer 10 [SIMPLE_EDGE]
-                          SHUFFLE [RS_41]
-                            PartitionCols:_col0, _col1
-                            Select Operator [SEL_37] (rows=79201469 width=135)
-                              Output:["_col0","_col1","_col2"]
-                              PTF Operator [PTF_36] (rows=79201469 width=135)
-                                Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col1 ASC NULLS FIRST","partition by:":"_col0"}]
-                                Group By Operator [GBY_32] (rows=79201469 width=135)
-                                  Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1
-                                <-Reducer 9 [SIMPLE_EDGE]
-                                  SHUFFLE [RS_31]
-                                    PartitionCols:_col0
-                                    Group By Operator [GBY_30] (rows=158402938 width=135)
-                                      Output:["_col0","_col1","_col2"],aggregations:["sum(_col2)"],keys:_col1, _col4
-                                      Merge Join Operator [MERGEJOIN_66] (rows=158402938 width=135)
-                                        Conds:RS_26._col0=RS_27._col0(Inner),Output:["_col1","_col2","_col4"]
-                                      <-Map 11 [SIMPLE_EDGE]
-                                        SHUFFLE [RS_27]
-                                          PartitionCols:_col0
-                                          Select Operator [SEL_25] (rows=8116 width=1119)
-                                            Output:["_col0","_col1"]
-                                            Filter Operator [FIL_62] (rows=8116 width=1119)
-                                              predicate:(d_month_seq BETWEEN 1193 AND 1204 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_date","d_month_seq"]
-                                      <-Map 8 [SIMPLE_EDGE]
-                                        SHUFFLE [RS_26]
-                                          PartitionCols:_col0
-                                          Select Operator [SEL_22] (rows=144002668 width=135)
-                                            Output:["_col0","_col1","_col2"]
-                                            Filter Operator [FIL_61] (rows=144002668 width=135)
-                                              predicate:(ws_item_sk is not null and ws_sold_date_sk is not null)
-                                              TableScan [TS_20] (rows=144002668 width=135)
-                                                default@web_sales,web_sales,Tbl:COMPLETE,Col:NONE,Output:["ws_sold_date_sk","ws_item_sk","ws_sales_price"]
                         <-Reducer 3 [SIMPLE_EDGE]
                           SHUFFLE [RS_40]
                             PartitionCols:_col0, _col1
@@ -170,6 +136,15 @@ Stage-0
                                       Output:["_col0","_col1","_col2"],aggregations:["sum(_col2)"],keys:_col1, _col4
                                       Merge Join Operator [MERGEJOIN_65] (rows=633595212 width=88)
                                         Conds:RS_6._col0=RS_7._col0(Inner),Output:["_col1","_col2","_col4"]
+                                      <-Map 7 [SIMPLE_EDGE]
+                                        SHUFFLE [RS_7]
+                                          PartitionCols:_col0
+                                          Select Operator [SEL_5] (rows=8116 width=1119)
+                                            Output:["_col0","_col1"]
+                                            Filter Operator [FIL_60] (rows=8116 width=1119)
+                                              predicate:(d_month_seq BETWEEN 1193 AND 1204 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 1 [SIMPLE_EDGE]
                                         SHUFFLE [RS_6]
                                           PartitionCols:_col0
@@ -179,13 +154,37 @@ Stage-0
                                               predicate:(ss_item_sk is not null and ss_sold_date_sk is not null)
                                               TableScan [TS_0] (rows=575995635 width=88)
                                                 default@store_sales,store_sales,Tbl:COMPLETE,Col:NONE,Output:["ss_sold_date_sk","ss_item_sk","ss_sales_price"]
+                        <-Reducer 9 [SIMPLE_EDGE]
+                          SHUFFLE [RS_41]
+                            PartitionCols:_col0, _col1
+                            Select Operator [SEL_37] (rows=79201469 width=135)
+                              Output:["_col0","_col1","_col2"]
+                              PTF Operator [PTF_36] (rows=79201469 width=135)
+                                Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col1 ASC NULLS FIRST","partition by:":"_col0"}]
+                                Group By Operator [GBY_32] (rows=79201469 width=135)
+                                  Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1
+                                <-Reducer 8 [SIMPLE_EDGE]
+                                  SHUFFLE [RS_31]
+                                    PartitionCols:_col0
+                                    Group By Operator [GBY_30] (rows=158402938 width=135)
+                                      Output:["_col0","_col1","_col2"],aggregations:["sum(_col2)"],keys:_col1, _col4
+                                      Merge Join Operator [MERGEJOIN_66] (rows=158402938 width=135)
+                                        Conds:RS_26._col0=RS_27._col0(Inner),Output:["_col1","_col2","_col4"]
                                       <-Map 7 [SIMPLE_EDGE]
-                                        SHUFFLE [RS_7]
+                                        SHUFFLE [RS_27]
                                           PartitionCols:_col0
-                                          Select Operator [SEL_5] (rows=8116 width=1119)
+                                          Select Operator [SEL_25] (rows=8116 width=1119)
                                             Output:["_col0","_col1"]
-                                            Filter Operator [FIL_60] (rows=8116 width=1119)
+                                            Filter Operator [FIL_62] (rows=8116 width=1119)
                                               predicate:(d_month_seq BETWEEN 1193 AND 1204 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"]
+                                               Please refer to the previous TableScan [TS_3]
+                                      <-Map 10 [SIMPLE_EDGE]
+                                        SHUFFLE [RS_26]
+                                          PartitionCols:_col0
+                                          Select Operator [SEL_22] (rows=144002668 width=135)
+                                            Output:["_col0","_col1","_col2"]
+                                            Filter Operator [FIL_61] (rows=144002668 width=135)
+                                              predicate:(ws_item_sk is not null and ws_sold_date_sk is not null)
+                                              TableScan [TS_20] (rows=144002668 width=135)
+                                                default@web_sales,web_sales,Tbl:COMPLETE,Col:NONE,Output:["ws_sold_date_sk","ws_item_sk","ws_sales_price"]
 

http://git-wip-us.apache.org/repos/asf/hive/blob/59f65772/ql/src/test/results/clientpositive/perf/query56.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/query56.q.out b/ql/src/test/results/clientpositive/perf/query56.q.out
index 4fa28c2..9e710e0 100644
--- a/ql/src/test/results/clientpositive/perf/query56.q.out
+++ b/ql/src/test/results/clientpositive/perf/query56.q.out
@@ -133,26 +133,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
@@ -169,50 +169,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_item_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_item_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_item_id
-                                          Select Operator [SEL_42] (rows=231000 width=1436)
-                                            Output:["i_item_id"]
-                                            Filter Operator [FIL_165] (rows=231000 width=1436)
-                                              predicate:((i_color) IN ('orchid', 'chiffon', 'lace') and i_item_id is not null)
-                                              TableScan [TS_40] (rows=462000 width=1436)
-                                                default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_id","i_color"]
                             <-Reducer 23 [SIMPLE_EDGE]
                               SHUFFLE [RS_67]
                                 PartitionCols:_col4
@@ -220,14 +190,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 = -8) 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]
@@ -235,6 +205,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 = 2000) and (d_moy = 1) 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)
@@ -243,49 +222,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 = 2000) and (d_moy = 1) 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_item_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_item_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_item_id
+                                          Select Operator [SEL_42] (rows=231000 width=1436)
+                                            Output:["i_item_id"]
+                                            Filter Operator [FIL_165] (rows=231000 width=1436)
+                                              predicate:((i_color) IN ('orchid', 'chiffon', 'lace') and i_item_id is not null)
+                                              TableScan [TS_3] (rows=462000 width=1436)
+                                                default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_id","i_color"]
+                <-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_item_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_item_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)
@@ -294,30 +293,36 @@ Stage-0
                                             Output:["i_item_id"]
                                             Filter Operator [FIL_170] (rows=231000 width=1436)
                                               predicate:((i_color) IN ('orchid', 'chiffon', 'lace') and i_item_id is not null)
-                                              TableScan [TS_79] (rows=462000 width=1436)
-                                                default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_id","i_color"]
-                            <-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 = -8) 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 = 2000) and (d_moy = 1) 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)
@@ -326,15 +331,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 = 2000) and (d_moy = 1) 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
@@ -349,45 +345,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 = -8) 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 = 2000) and (d_moy = 1) 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
@@ -400,14 +357,13 @@ Stage-0
                                       Output:["_col0","_col1"]
                                       Filter Operator [FIL_159] (rows=462000 width=1436)
                                         predicate:(i_item_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_item_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)
@@ -416,6 +372,42 @@ Stage-0
                                             Output:["i_item_id"]
                                             Filter Operator [FIL_160] (rows=231000 width=1436)
                                               predicate:((i_color) IN ('orchid', 'chiffon', 'lace') and i_item_id is not null)
-                                              TableScan [TS_3] (rows=462000 width=1436)
-                                                default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_id","i_color"]
+                                               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 = -8) 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 = 2000) and (d_moy = 1) 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/query58.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/query58.q.out b/ql/src/test/results/clientpositive/perf/query58.q.out
index d03a736..e73605a 100644
--- a/ql/src/test/results/clientpositive/perf/query58.q.out
+++ b/ql/src/test/results/clientpositive/perf/query58.q.out
@@ -95,23 +95,23 @@ POSTHOOK: type: QUERY
 Plan optimized by CBO.
 
 Vertex dependency in root stage
-Reducer 14 <- Map 13 (SIMPLE_EDGE), Reducer 19 (SIMPLE_EDGE)
-Reducer 15 <- Map 21 (SIMPLE_EDGE), Reducer 14 (SIMPLE_EDGE)
-Reducer 16 <- Map 22 (SIMPLE_EDGE), Reducer 15 (SIMPLE_EDGE)
-Reducer 17 <- Reducer 16 (SIMPLE_EDGE)
-Reducer 19 <- Map 18 (SIMPLE_EDGE), Map 20 (SIMPLE_EDGE)
-Reducer 2 <- Map 1 (SIMPLE_EDGE), Reducer 9 (SIMPLE_EDGE)
-Reducer 24 <- Map 23 (SIMPLE_EDGE), Reducer 29 (SIMPLE_EDGE)
-Reducer 25 <- Map 31 (SIMPLE_EDGE), Reducer 24 (SIMPLE_EDGE)
-Reducer 26 <- Map 32 (SIMPLE_EDGE), Reducer 25 (SIMPLE_EDGE)
-Reducer 27 <- Reducer 26 (SIMPLE_EDGE)
-Reducer 29 <- Map 28 (SIMPLE_EDGE), Map 30 (SIMPLE_EDGE)
-Reducer 3 <- Map 11 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
-Reducer 4 <- Map 12 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
+Reducer 10 <- Map 22 (SIMPLE_EDGE), Reducer 9 (SIMPLE_EDGE)
+Reducer 11 <- Reducer 10 (SIMPLE_EDGE)
+Reducer 12 <- Map 1 (SIMPLE_EDGE), Reducer 19 (SIMPLE_EDGE)
+Reducer 13 <- Map 24 (SIMPLE_EDGE), Reducer 12 (SIMPLE_EDGE)
+Reducer 14 <- Map 22 (SIMPLE_EDGE), Reducer 13 (SIMPLE_EDGE)
+Reducer 15 <- Reducer 14 (SIMPLE_EDGE)
+Reducer 17 <- Map 16 (SIMPLE_EDGE), Map 20 (SIMPLE_EDGE)
+Reducer 18 <- Map 16 (SIMPLE_EDGE), Map 20 (SIMPLE_EDGE)
+Reducer 19 <- Map 16 (SIMPLE_EDGE), Map 20 (SIMPLE_EDGE)
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Reducer 17 (SIMPLE_EDGE)
+Reducer 3 <- Map 21 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Map 22 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
 Reducer 5 <- Reducer 4 (SIMPLE_EDGE)
-Reducer 6 <- Reducer 17 (SIMPLE_EDGE), Reducer 27 (SIMPLE_EDGE), Reducer 5 (SIMPLE_EDGE)
+Reducer 6 <- Reducer 11 (SIMPLE_EDGE), Reducer 15 (SIMPLE_EDGE), Reducer 5 (SIMPLE_EDGE)
 Reducer 7 <- Reducer 6 (SIMPLE_EDGE)
-Reducer 9 <- Map 10 (SIMPLE_EDGE), Map 8 (SIMPLE_EDGE)
+Reducer 8 <- Map 1 (SIMPLE_EDGE), Reducer 18 (SIMPLE_EDGE)
+Reducer 9 <- Map 23 (SIMPLE_EDGE), Reducer 8 (SIMPLE_EDGE)
 
 Stage-0
   Fetch Operator
@@ -131,12 +131,12 @@ Stage-0
                   predicate:(_col5 BETWEEN (0.9 * _col1) AND (1.1 * _col1) and _col5 BETWEEN (0.9 * _col3) AND (1.1 * _col3) and _col1 BETWEEN (0.9 * _col5) AND (1.1 * _col5) and _col3 BETWEEN (0.9 * _col5) AND (1.1 * _col5) and _col1 BETWEEN (0.9 * _col3) AND (1.1 * _col3) and _col3 BETWEEN (0.9 * _col1) AND (1.1 * _col1))
                   Merge Join Operator [MERGEJOIN_213] (rows=766650239 width=88)
                     Conds:RS_99._col0=RS_100._col0(Inner),RS_99._col0=RS_101._col0(Inner),Output:["_col0","_col1","_col3","_col5"]
-                  <-Reducer 17 [SIMPLE_EDGE]
+                  <-Reducer 11 [SIMPLE_EDGE]
                     SHUFFLE [RS_100]
                       PartitionCols:_col0
                       Group By Operator [GBY_64] (rows=348477374 width=88)
                         Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0
-                      <-Reducer 16 [SIMPLE_EDGE]
+                      <-Reducer 10 [SIMPLE_EDGE]
                         SHUFFLE [RS_63]
                           PartitionCols:_col0
                           Group By Operator [GBY_62] (rows=696954748 width=88)
@@ -150,14 +150,14 @@ Stage-0
                                   Output:["_col0","_col1"]
                                   Filter Operator [FIL_195] (rows=462000 width=1436)
                                     predicate:(i_item_sk is not null and i_item_id is not null)
-                                    TableScan [TS_49] (rows=462000 width=1436)
+                                    TableScan [TS_16] (rows=462000 width=1436)
                                       default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_item_id"]
-                            <-Reducer 15 [SIMPLE_EDGE]
+                            <-Reducer 9 [SIMPLE_EDGE]
                               SHUFFLE [RS_58]
                                 PartitionCols:_col4
                                 Merge Join Operator [MERGEJOIN_207] (rows=633595212 width=88)
                                   Conds:RS_55._col0=RS_56._col0(Inner),Output:["_col4","_col5"]
-                                <-Map 21 [SIMPLE_EDGE]
+                                <-Map 23 [SIMPLE_EDGE]
                                   SHUFFLE [RS_56]
                                     PartitionCols:_col0
                                     Select Operator [SEL_48] (rows=575995635 width=88)
@@ -166,33 +166,33 @@ Stage-0
                                         predicate:(ss_item_sk is not null and ss_sold_date_sk is not null)
                                         TableScan [TS_46] (rows=575995635 width=88)
                                           default@store_sales,store_sales,Tbl:COMPLETE,Col:NONE,Output:["ss_sold_date_sk","ss_item_sk","ss_ext_sales_price"]
-                                <-Reducer 14 [SIMPLE_EDGE]
+                                <-Reducer 8 [SIMPLE_EDGE]
                                   SHUFFLE [RS_55]
                                     PartitionCols:_col0
                                     Merge Join Operator [MERGEJOIN_206] (rows=88388 width=1119)
                                       Conds:RS_52._col1=RS_53._col0(Inner),Output:["_col0"]
-                                    <-Map 13 [SIMPLE_EDGE]
+                                    <-Map 1 [SIMPLE_EDGE]
                                       SHUFFLE [RS_52]
                                         PartitionCols:_col1
                                         Select Operator [SEL_35] (rows=73049 width=1119)
                                           Output:["_col0","_col1"]
                                           Filter Operator [FIL_191] (rows=73049 width=1119)
                                             predicate:(d_date_sk is not null and d_date is not null)
-                                            TableScan [TS_33] (rows=73049 width=1119)
+                                            TableScan [TS_0] (rows=73049 width=1119)
                                               default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_date"]
-                                    <-Reducer 19 [SIMPLE_EDGE]
+                                    <-Reducer 18 [SIMPLE_EDGE]
                                       SHUFFLE [RS_53]
                                         PartitionCols:_col0
                                         Merge Join Operator [MERGEJOIN_205] (rows=80353 width=1119)
                                           Conds:RS_42._col1=RS_43._col1(Inner),Output:["_col0"]
-                                        <-Map 18 [SIMPLE_EDGE]
+                                        <-Map 16 [SIMPLE_EDGE]
                                           SHUFFLE [RS_42]
                                             PartitionCols:_col1
                                             Select Operator [SEL_38] (rows=73049 width=1119)
                                               Output:["_col0","_col1"]
                                               Filter Operator [FIL_192] (rows=73049 width=1119)
                                                 predicate:(d_week_seq is not null and d_date is not null)
-                                                TableScan [TS_36] (rows=73049 width=1119)
+                                                TableScan [TS_3] (rows=73049 width=1119)
                                                   default@date_dim,d1,Tbl:COMPLETE,Col:NONE,Output:["d_date","d_week_seq"]
                                         <-Map 20 [SIMPLE_EDGE]
                                           SHUFFLE [RS_43]
@@ -201,35 +201,34 @@ Stage-0
                                               Output:["_col1"]
                                               Filter Operator [FIL_193] (rows=36524 width=1119)
                                                 predicate:((d_date = '1998-08-04') and d_week_seq is not null)
-                                                TableScan [TS_39] (rows=73049 width=1119)
+                                                TableScan [TS_6] (rows=73049 width=1119)
                                                   default@date_dim,d2,Tbl:COMPLETE,Col:NONE,Output:["d_date","d_week_seq"]
-                  <-Reducer 27 [SIMPLE_EDGE]
+                  <-Reducer 15 [SIMPLE_EDGE]
                     SHUFFLE [RS_101]
                       PartitionCols:_col0
                       Group By Operator [GBY_97] (rows=87121617 width=135)
                         Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0
-                      <-Reducer 26 [SIMPLE_EDGE]
+                      <-Reducer 14 [SIMPLE_EDGE]
                         SHUFFLE [RS_96]
                           PartitionCols:_col0
                           Group By Operator [GBY_95] (rows=174243235 width=135)
                             Output:["_col0","_col1"],aggregations:["sum(_col5)"],keys:_col7
                             Merge Join Operator [MERGEJOIN_212] (rows=174243235 width=135)
                               Conds:RS_91._col4=RS_92._col0(Inner),Output:["_col5","_col7"]
-                            <-Map 32 [SIMPLE_EDGE]
+                            <-Map 22 [SIMPLE_EDGE]
                               SHUFFLE [RS_92]
                                 PartitionCols:_col0
                                 Select Operator [SEL_84] (rows=462000 width=1436)
                                   Output:["_col0","_col1"]
                                   Filter Operator [FIL_200] (rows=462000 width=1436)
                                     predicate:(i_item_sk is not null and i_item_id is not null)
-                                    TableScan [TS_82] (rows=462000 width=1436)
-                                      default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_item_id"]
-                            <-Reducer 25 [SIMPLE_EDGE]
+                                     Please refer to the previous TableScan [TS_16]
+                            <-Reducer 13 [SIMPLE_EDGE]
                               SHUFFLE [RS_91]
                                 PartitionCols:_col4
                                 Merge Join Operator [MERGEJOIN_211] (rows=158402938 width=135)
                                   Conds:RS_88._col0=RS_89._col0(Inner),Output:["_col4","_col5"]
-                                <-Map 31 [SIMPLE_EDGE]
+                                <-Map 24 [SIMPLE_EDGE]
                                   SHUFFLE [RS_89]
                                     PartitionCols:_col0
                                     Select Operator [SEL_81] (rows=144002668 width=135)
@@ -238,43 +237,40 @@ Stage-0
                                         predicate:(ws_item_sk is not null and ws_sold_date_sk is not null)
                                         TableScan [TS_79] (rows=144002668 width=135)
                                           default@web_sales,web_sales,Tbl:COMPLETE,Col:NONE,Output:["ws_sold_date_sk","ws_item_sk","ws_ext_sales_price"]
-                                <-Reducer 24 [SIMPLE_EDGE]
+                                <-Reducer 12 [SIMPLE_EDGE]
                                   SHUFFLE [RS_88]
                                     PartitionCols:_col0
                                     Merge Join Operator [MERGEJOIN_210] (rows=88388 width=1119)
                                       Conds:RS_85._col1=RS_86._col0(Inner),Output:["_col0"]
-                                    <-Map 23 [SIMPLE_EDGE]
+                                    <-Map 1 [SIMPLE_EDGE]
                                       SHUFFLE [RS_85]
                                         PartitionCols:_col1
                                         Select Operator [SEL_68] (rows=73049 width=1119)
                                           Output:["_col0","_col1"]
                                           Filter Operator [FIL_196] (rows=73049 width=1119)
                                             predicate:(d_date_sk is not null and d_date is not null)
-                                            TableScan [TS_66] (rows=73049 width=1119)
-                                              default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_date"]
-                                    <-Reducer 29 [SIMPLE_EDGE]
+                                             Please refer to the previous TableScan [TS_0]
+                                    <-Reducer 19 [SIMPLE_EDGE]
                                       SHUFFLE [RS_86]
                                         PartitionCols:_col0
                                         Merge Join Operator [MERGEJOIN_209] (rows=80353 width=1119)
                                           Conds:RS_75._col1=RS_76._col1(Inner),Output:["_col0"]
-                                        <-Map 28 [SIMPLE_EDGE]
+                                        <-Map 16 [SIMPLE_EDGE]
                                           SHUFFLE [RS_75]
                                             PartitionCols:_col1
                                             Select Operator [SEL_71] (rows=73049 width=1119)
                                               Output:["_col0","_col1"]
                                               Filter Operator [FIL_197] (rows=73049 width=1119)
                                                 predicate:(d_week_seq is not null and d_date is not null)
-                                                TableScan [TS_69] (rows=73049 width=1119)
-                                                  default@date_dim,d1,Tbl:COMPLETE,Col:NONE,Output:["d_date","d_week_seq"]
-                                        <-Map 30 [SIMPLE_EDGE]
+                                                 Please refer to the previous TableScan [TS_3]
+                                        <-Map 20 [SIMPLE_EDGE]
                                           SHUFFLE [RS_76]
                                             PartitionCols:_col1
                                             Select Operator [SEL_74] (rows=36524 width=1119)
                                               Output:["_col1"]
                                               Filter Operator [FIL_198] (rows=36524 width=1119)
                                                 predicate:((d_date = '1998-08-04') and d_week_seq is not null)
-                                                TableScan [TS_72] (rows=73049 width=1119)
-                                                  default@date_dim,d2,Tbl:COMPLETE,Col:NONE,Output:["d_date","d_week_seq"]
+                                                 Please refer to the previous TableScan [TS_6]
                   <-Reducer 5 [SIMPLE_EDGE]
                     SHUFFLE [RS_99]
                       PartitionCols:_col0
@@ -287,21 +283,20 @@ Stage-0
                             Output:["_col0","_col1"],aggregations:["sum(_col5)"],keys:_col7
                             Merge Join Operator [MERGEJOIN_204] (rows=348467716 width=135)
                               Conds:RS_25._col4=RS_26._col0(Inner),Output:["_col5","_col7"]
-                            <-Map 12 [SIMPLE_EDGE]
+                            <-Map 22 [SIMPLE_EDGE]
                               SHUFFLE [RS_26]
                                 PartitionCols:_col0
                                 Select Operator [SEL_18] (rows=462000 width=1436)
                                   Output:["_col0","_col1"]
                                   Filter Operator [FIL_190] (rows=462000 width=1436)
                                     predicate:(i_item_sk is not null and i_item_id is not null)
-                                    TableScan [TS_16] (rows=462000 width=1436)
-                                      default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_item_id"]
+                                     Please refer to the previous TableScan [TS_16]
                             <-Reducer 3 [SIMPLE_EDGE]
                               SHUFFLE [RS_25]
                                 PartitionCols:_col4
                                 Merge Join Operator [MERGEJOIN_203] (rows=316788826 width=135)
                                   Conds:RS_22._col0=RS_23._col0(Inner),Output:["_col4","_col5"]
-                                <-Map 11 [SIMPLE_EDGE]
+                                <-Map 21 [SIMPLE_EDGE]
                                   SHUFFLE [RS_23]
                                     PartitionCols:_col0
                                     Select Operator [SEL_15] (rows=287989836 width=135)
@@ -322,29 +317,26 @@ Stage-0
                                           Output:["_col0","_col1"]
                                           Filter Operator [FIL_186] (rows=73049 width=1119)
                                             predicate:(d_date_sk is not null and d_date is not null)
-                                            TableScan [TS_0] (rows=73049 width=1119)
-                                              default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_date"]
-                                    <-Reducer 9 [SIMPLE_EDGE]
+                                             Please refer to the previous TableScan [TS_0]
+                                    <-Reducer 17 [SIMPLE_EDGE]
                                       SHUFFLE [RS_20]
                                         PartitionCols:_col0
                                         Merge Join Operator [MERGEJOIN_201] (rows=80353 width=1119)
                                           Conds:RS_9._col1=RS_10._col1(Inner),Output:["_col0"]
-                                        <-Map 10 [SIMPLE_EDGE]
-                                          SHUFFLE [RS_10]
-                                            PartitionCols:_col1
-                                            Select Operator [SEL_8] (rows=36524 width=1119)
-                                              Output:["_col1"]
-                                              Filter Operator [FIL_188] (rows=36524 width=1119)
-                                                predicate:((d_date = '1998-08-04') and d_week_seq is not null)
-                                                TableScan [TS_6] (rows=73049 width=1119)
-                                                  default@date_dim,d2,Tbl:COMPLETE,Col:NONE,Output:["d_date","d_week_seq"]
-                                        <-Map 8 [SIMPLE_EDGE]
+                                        <-Map 16 [SIMPLE_EDGE]
                                           SHUFFLE [RS_9]
                                             PartitionCols:_col1
                                             Select Operator [SEL_5] (rows=73049 width=1119)
                                               Output:["_col0","_col1"]
                                               Filter Operator [FIL_187] (rows=73049 width=1119)
                                                 predicate:(d_week_seq is not null and d_date is not null)
-                                                TableScan [TS_3] (rows=73049 width=1119)
-                                                  default@date_dim,d1,Tbl:COMPLETE,Col:NONE,Output:["d_date","d_week_seq"]
+                                                 Please refer to the previous TableScan [TS_3]
+                                        <-Map 20 [SIMPLE_EDGE]
+                                          SHUFFLE [RS_10]
+                                            PartitionCols:_col1
+                                            Select Operator [SEL_8] (rows=36524 width=1119)
+                                              Output:["_col1"]
+                                              Filter Operator [FIL_188] (rows=36524 width=1119)
+                                                predicate:((d_date = '1998-08-04') and d_week_seq is not null)
+                                                 Please refer to the previous TableScan [TS_6]
 

http://git-wip-us.apache.org/repos/asf/hive/blob/59f65772/ql/src/test/results/clientpositive/perf/query6.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/query6.q.out b/ql/src/test/results/clientpositive/perf/query6.q.out
index 183c2ec..04bda70 100644
--- a/ql/src/test/results/clientpositive/perf/query6.q.out
+++ b/ql/src/test/results/clientpositive/perf/query6.q.out
@@ -52,11 +52,11 @@ Plan optimized by CBO.
 Vertex dependency in root stage
 Reducer 12 <- Map 11 (SIMPLE_EDGE), Map 13 (SIMPLE_EDGE)
 Reducer 15 <- Map 14 (SIMPLE_EDGE)
-Reducer 16 <- Reducer 15 (CUSTOM_SIMPLE_EDGE), Reducer 20 (CUSTOM_SIMPLE_EDGE)
-Reducer 17 <- Map 21 (SIMPLE_EDGE), Reducer 16 (SIMPLE_EDGE)
-Reducer 19 <- Map 18 (SIMPLE_EDGE)
+Reducer 16 <- Reducer 15 (CUSTOM_SIMPLE_EDGE), Reducer 19 (CUSTOM_SIMPLE_EDGE)
+Reducer 17 <- Map 20 (SIMPLE_EDGE), Reducer 16 (SIMPLE_EDGE)
+Reducer 18 <- Map 14 (SIMPLE_EDGE)
+Reducer 19 <- Reducer 18 (CUSTOM_SIMPLE_EDGE)
 Reducer 2 <- Map 1 (SIMPLE_EDGE), Reducer 9 (SIMPLE_EDGE)
-Reducer 20 <- Reducer 19 (CUSTOM_SIMPLE_EDGE)
 Reducer 3 <- Map 10 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
 Reducer 4 <- Reducer 12 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
 Reducer 5 <- Reducer 17 (SIMPLE_EDGE), Reducer 4 (SIMPLE_EDGE)
@@ -100,7 +100,7 @@ Stage-0
                                   Output:["_col0"]
                                   Merge Join Operator [MERGEJOIN_112] (rows=80353 width=1119)
                                     Conds:RS_50._col0=RS_51._col1(Inner),Output:["_col2"]
-                                  <-Map 21 [SIMPLE_EDGE]
+                                  <-Map 20 [SIMPLE_EDGE]
                                     SHUFFLE [RS_51]
                                       PartitionCols:_col1
                                       Select Operator [SEL_46] (rows=73049 width=1119)
@@ -129,21 +129,21 @@ Stage-0
                                                     predicate:((d_year = 2000) and (d_moy = 2) and d_month_seq is not null)
                                                     TableScan [TS_23] (rows=73049 width=1119)
                                                       default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_month_seq","d_year","d_moy"]
-                                      <-Reducer 20 [CUSTOM_SIMPLE_EDGE]
+                                      <-Reducer 19 [CUSTOM_SIMPLE_EDGE]
                                         PARTITION_ONLY_SHUFFLE [RS_48]
                                           Select Operator [SEL_43] (rows=1 width=8)
                                             Filter Operator [FIL_42] (rows=1 width=8)
                                               predicate:(sq_count_check(_col0) <= 1)
                                               Group By Operator [GBY_40] (rows=1 width=8)
                                                 Output:["_col0"],aggregations:["count(VALUE._col0)"]
-                                              <-Reducer 19 [CUSTOM_SIMPLE_EDGE]
+                                              <-Reducer 18 [CUSTOM_SIMPLE_EDGE]
                                                 PARTITION_ONLY_SHUFFLE [RS_39]
                                                   Group By Operator [GBY_38] (rows=1 width=8)
                                                     Output:["_col0"],aggregations:["count()"]
                                                     Select Operator [SEL_36] (rows=9131 width=1119)
                                                       Group By Operator [GBY_35] (rows=9131 width=1119)
                                                         Output:["_col0"],keys:KEY._col0
-                                                      <-Map 18 [SIMPLE_EDGE]
+                                                      <-Map 14 [SIMPLE_EDGE]
                                                         SHUFFLE [RS_34]
                                                           PartitionCols:_col0
                                                           Group By Operator [GBY_33] (rows=18262 width=1119)
@@ -152,8 +152,7 @@ Stage-0
                                                               Output:["d_month_seq"]
                                                               Filter Operator [FIL_106] (rows=18262 width=1119)
                                                                 predicate:((d_year = 2000) and (d_moy = 2))
-                                                                TableScan [TS_30] (rows=73049 width=1119)
-                                                                  default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_month_seq","d_year","d_moy"]
+                                                                 Please refer to the previous TableScan [TS_23]
                             <-Reducer 4 [SIMPLE_EDGE]
                               SHUFFLE [RS_63]
                                 PartitionCols:_col6