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

[09/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/query83.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/query83.q.out b/ql/src/test/results/clientpositive/perf/query83.q.out
index 41e8a65..f96306b 100644
--- a/ql/src/test/results/clientpositive/perf/query83.q.out
+++ b/ql/src/test/results/clientpositive/perf/query83.q.out
@@ -131,29 +131,29 @@ POSTHOOK: type: QUERY
 Plan optimized by CBO.
 
 Vertex dependency in root stage
-Reducer 11 <- Map 10 (SIMPLE_EDGE), Reducer 14 (SIMPLE_EDGE)
-Reducer 12 <- Reducer 11 (SIMPLE_EDGE)
-Reducer 14 <- Map 13 (SIMPLE_EDGE)
-Reducer 16 <- Map 15 (SIMPLE_EDGE), Map 19 (SIMPLE_EDGE)
-Reducer 17 <- Reducer 16 (SIMPLE_EDGE), Reducer 21 (SIMPLE_EDGE)
-Reducer 18 <- Reducer 17 (SIMPLE_EDGE)
+Reducer 10 <- Reducer 9 (SIMPLE_EDGE)
+Reducer 11 <- Map 29 (SIMPLE_EDGE), Map 7 (SIMPLE_EDGE)
+Reducer 12 <- Reducer 11 (SIMPLE_EDGE), Reducer 17 (SIMPLE_EDGE)
+Reducer 13 <- Reducer 12 (SIMPLE_EDGE)
+Reducer 15 <- Map 14 (SIMPLE_EDGE), Reducer 20 (SIMPLE_EDGE)
+Reducer 16 <- Map 14 (SIMPLE_EDGE), Reducer 23 (SIMPLE_EDGE)
+Reducer 17 <- Map 14 (SIMPLE_EDGE), Reducer 26 (SIMPLE_EDGE)
+Reducer 19 <- Map 18 (SIMPLE_EDGE), Reducer 21 (SIMPLE_EDGE)
 Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 7 (SIMPLE_EDGE)
-Reducer 21 <- Map 20 (SIMPLE_EDGE), Reducer 24 (SIMPLE_EDGE)
-Reducer 23 <- Map 22 (SIMPLE_EDGE), Reducer 26 (SIMPLE_EDGE)
-Reducer 24 <- Reducer 23 (SIMPLE_EDGE)
-Reducer 26 <- Map 25 (SIMPLE_EDGE)
-Reducer 28 <- Map 27 (SIMPLE_EDGE), Map 31 (SIMPLE_EDGE)
-Reducer 29 <- Reducer 28 (SIMPLE_EDGE), Reducer 33 (SIMPLE_EDGE)
-Reducer 3 <- Reducer 2 (SIMPLE_EDGE), Reducer 9 (SIMPLE_EDGE)
-Reducer 30 <- Reducer 29 (SIMPLE_EDGE)
-Reducer 33 <- Map 32 (SIMPLE_EDGE), Reducer 36 (SIMPLE_EDGE)
-Reducer 35 <- Map 34 (SIMPLE_EDGE), Reducer 38 (SIMPLE_EDGE)
-Reducer 36 <- Reducer 35 (SIMPLE_EDGE)
-Reducer 38 <- Map 37 (SIMPLE_EDGE)
+Reducer 20 <- Reducer 19 (SIMPLE_EDGE)
+Reducer 21 <- Map 18 (SIMPLE_EDGE)
+Reducer 22 <- Map 18 (SIMPLE_EDGE), Reducer 24 (SIMPLE_EDGE)
+Reducer 23 <- Reducer 22 (SIMPLE_EDGE)
+Reducer 24 <- Map 18 (SIMPLE_EDGE)
+Reducer 25 <- Map 18 (SIMPLE_EDGE), Reducer 27 (SIMPLE_EDGE)
+Reducer 26 <- Reducer 25 (SIMPLE_EDGE)
+Reducer 27 <- Map 18 (SIMPLE_EDGE)
+Reducer 3 <- Reducer 15 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
 Reducer 4 <- Reducer 3 (SIMPLE_EDGE)
-Reducer 5 <- Reducer 18 (SIMPLE_EDGE), Reducer 30 (SIMPLE_EDGE), Reducer 4 (SIMPLE_EDGE)
+Reducer 5 <- Reducer 10 (SIMPLE_EDGE), Reducer 13 (SIMPLE_EDGE), Reducer 4 (SIMPLE_EDGE)
 Reducer 6 <- Reducer 5 (SIMPLE_EDGE)
-Reducer 9 <- Map 8 (SIMPLE_EDGE), Reducer 12 (SIMPLE_EDGE)
+Reducer 8 <- Map 28 (SIMPLE_EDGE), Map 7 (SIMPLE_EDGE)
+Reducer 9 <- Reducer 16 (SIMPLE_EDGE), Reducer 8 (SIMPLE_EDGE)
 
 Stage-0
   Fetch Operator
@@ -171,12 +171,12 @@ Stage-0
                 Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
                 Merge Join Operator [MERGEJOIN_228] (rows=76653825 width=77)
                   Conds:RS_126._col0=RS_127._col0(Inner),RS_126._col0=RS_128._col0(Inner),Output:["_col0","_col1","_col3","_col5"]
-                <-Reducer 18 [SIMPLE_EDGE]
+                <-Reducer 10 [SIMPLE_EDGE]
                   SHUFFLE [RS_127]
                     PartitionCols:_col0
                     Group By Operator [GBY_82] (rows=34842647 width=77)
                       Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0
-                    <-Reducer 17 [SIMPLE_EDGE]
+                    <-Reducer 9 [SIMPLE_EDGE]
                       SHUFFLE [RS_81]
                         PartitionCols:_col0
                         Group By Operator [GBY_80] (rows=69685294 width=77)
@@ -184,69 +184,46 @@ Stage-0
                           Merge Join Operator [MERGEJOIN_226] (rows=69685294 width=77)
                             Conds:RS_76._col0=RS_77._col0(Inner),Output:["_col2","_col4"]
                           <-Reducer 16 [SIMPLE_EDGE]
-                            SHUFFLE [RS_76]
-                              PartitionCols:_col0
-                              Merge Join Operator [MERGEJOIN_219] (rows=63350266 width=77)
-                                Conds:RS_73._col1=RS_74._col0(Inner),Output:["_col0","_col2","_col4"]
-                              <-Map 15 [SIMPLE_EDGE]
-                                SHUFFLE [RS_73]
-                                  PartitionCols:_col1
-                                  Select Operator [SEL_44] (rows=57591150 width=77)
-                                    Output:["_col0","_col1","_col2"]
-                                    Filter Operator [FIL_206] (rows=57591150 width=77)
-                                      predicate:(sr_item_sk is not null and sr_returned_date_sk is not null)
-                                      TableScan [TS_42] (rows=57591150 width=77)
-                                        default@store_returns,store_returns,Tbl:COMPLETE,Col:NONE,Output:["sr_returned_date_sk","sr_item_sk","sr_return_quantity"]
-                              <-Map 19 [SIMPLE_EDGE]
-                                SHUFFLE [RS_74]
-                                  PartitionCols:_col0
-                                  Select Operator [SEL_47] (rows=462000 width=1436)
-                                    Output:["_col0","_col1"]
-                                    Filter Operator [FIL_207] (rows=462000 width=1436)
-                                      predicate:(i_item_sk is not null and i_item_id is not null)
-                                      TableScan [TS_45] (rows=462000 width=1436)
-                                        default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_item_id"]
-                          <-Reducer 21 [SIMPLE_EDGE]
                             SHUFFLE [RS_77]
                               PartitionCols:_col0
                               Merge Join Operator [MERGEJOIN_221] (rows=80353 width=1119)
                                 Conds:RS_69._col1=RS_70._col0(Inner),Output:["_col0"]
-                              <-Map 20 [SIMPLE_EDGE]
+                              <-Map 14 [SIMPLE_EDGE]
                                 SHUFFLE [RS_69]
                                   PartitionCols:_col1
                                   Select Operator [SEL_50] (rows=73049 width=1119)
                                     Output:["_col0","_col1"]
                                     Filter Operator [FIL_208] (rows=73049 width=1119)
                                       predicate:(d_date is not null and d_date_sk is not null)
-                                      TableScan [TS_48] (rows=73049 width=1119)
+                                      TableScan [TS_6] (rows=73049 width=1119)
                                         default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_date"]
-                              <-Reducer 24 [SIMPLE_EDGE]
+                              <-Reducer 23 [SIMPLE_EDGE]
                                 SHUFFLE [RS_70]
                                   PartitionCols:_col0
                                   Group By Operator [GBY_67] (rows=40176 width=1119)
                                     Output:["_col0"],keys:KEY._col0
-                                  <-Reducer 23 [SIMPLE_EDGE]
+                                  <-Reducer 22 [SIMPLE_EDGE]
                                     SHUFFLE [RS_66]
                                       PartitionCols:_col0
                                       Group By Operator [GBY_65] (rows=80353 width=1119)
                                         Output:["_col0"],keys:_col0
                                         Merge Join Operator [MERGEJOIN_220] (rows=80353 width=1119)
                                           Conds:RS_61._col1=RS_62._col0(Inner),Output:["_col0"]
-                                        <-Map 22 [SIMPLE_EDGE]
+                                        <-Map 18 [SIMPLE_EDGE]
                                           SHUFFLE [RS_61]
                                             PartitionCols:_col1
                                             Select Operator [SEL_53] (rows=73049 width=1119)
                                               Output:["_col0","_col1"]
                                               Filter Operator [FIL_209] (rows=73049 width=1119)
                                                 predicate:(d_week_seq is not null and d_date is not null)
-                                                TableScan [TS_51] (rows=73049 width=1119)
+                                                TableScan [TS_9] (rows=73049 width=1119)
                                                   default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date","d_week_seq"]
-                                        <-Reducer 26 [SIMPLE_EDGE]
+                                        <-Reducer 24 [SIMPLE_EDGE]
                                           SHUFFLE [RS_62]
                                             PartitionCols:_col0
                                             Group By Operator [GBY_59] (rows=18262 width=1119)
                                               Output:["_col0"],keys:KEY._col0
-                                            <-Map 25 [SIMPLE_EDGE]
+                                            <-Map 18 [SIMPLE_EDGE]
                                               SHUFFLE [RS_58]
                                                 PartitionCols:_col0
                                                 Group By Operator [GBY_57] (rows=36525 width=1119)
@@ -255,26 +232,56 @@ Stage-0
                                                     Output:["d_week_seq"]
                                                     Filter Operator [FIL_210] (rows=36525 width=1119)
                                                       predicate:((d_date) IN ('1998-01-02', '1998-10-15', '1998-11-10') and d_week_seq is not null)
-                                                      TableScan [TS_54] (rows=73049 width=1119)
-                                                        default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date","d_week_seq"]
-                <-Reducer 30 [SIMPLE_EDGE]
+                                                       Please refer to the previous TableScan [TS_9]
+                          <-Reducer 8 [SIMPLE_EDGE]
+                            SHUFFLE [RS_76]
+                              PartitionCols:_col0
+                              Merge Join Operator [MERGEJOIN_219] (rows=63350266 width=77)
+                                Conds:RS_73._col1=RS_74._col0(Inner),Output:["_col0","_col2","_col4"]
+                              <-Map 7 [SIMPLE_EDGE]
+                                SHUFFLE [RS_74]
+                                  PartitionCols:_col0
+                                  Select Operator [SEL_47] (rows=462000 width=1436)
+                                    Output:["_col0","_col1"]
+                                    Filter Operator [FIL_207] (rows=462000 width=1436)
+                                      predicate:(i_item_sk is not null and i_item_id is not null)
+                                      TableScan [TS_3] (rows=462000 width=1436)
+                                        default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_item_id"]
+                              <-Map 28 [SIMPLE_EDGE]
+                                SHUFFLE [RS_73]
+                                  PartitionCols:_col1
+                                  Select Operator [SEL_44] (rows=57591150 width=77)
+                                    Output:["_col0","_col1","_col2"]
+                                    Filter Operator [FIL_206] (rows=57591150 width=77)
+                                      predicate:(sr_item_sk is not null and sr_returned_date_sk is not null)
+                                      TableScan [TS_42] (rows=57591150 width=77)
+                                        default@store_returns,store_returns,Tbl:COMPLETE,Col:NONE,Output:["sr_returned_date_sk","sr_item_sk","sr_return_quantity"]
+                <-Reducer 13 [SIMPLE_EDGE]
                   SHUFFLE [RS_128]
                     PartitionCols:_col0
                     Group By Operator [GBY_124] (rows=8711072 width=92)
                       Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0
-                    <-Reducer 29 [SIMPLE_EDGE]
+                    <-Reducer 12 [SIMPLE_EDGE]
                       SHUFFLE [RS_123]
                         PartitionCols:_col0
                         Group By Operator [GBY_122] (rows=17422145 width=92)
                           Output:["_col0","_col1"],aggregations:["sum(_col2)"],keys:_col4
                           Merge Join Operator [MERGEJOIN_227] (rows=17422145 width=92)
                             Conds:RS_118._col0=RS_119._col0(Inner),Output:["_col2","_col4"]
-                          <-Reducer 28 [SIMPLE_EDGE]
+                          <-Reducer 11 [SIMPLE_EDGE]
                             SHUFFLE [RS_118]
                               PartitionCols:_col0
                               Merge Join Operator [MERGEJOIN_222] (rows=15838314 width=92)
                                 Conds:RS_115._col1=RS_116._col0(Inner),Output:["_col0","_col2","_col4"]
-                              <-Map 27 [SIMPLE_EDGE]
+                              <-Map 7 [SIMPLE_EDGE]
+                                SHUFFLE [RS_116]
+                                  PartitionCols:_col0
+                                  Select Operator [SEL_89] (rows=462000 width=1436)
+                                    Output:["_col0","_col1"]
+                                    Filter Operator [FIL_212] (rows=462000 width=1436)
+                                      predicate:(i_item_sk is not null and i_item_id is not null)
+                                       Please refer to the previous TableScan [TS_3]
+                              <-Map 29 [SIMPLE_EDGE]
                                 SHUFFLE [RS_115]
                                   PartitionCols:_col1
                                   Select Operator [SEL_86] (rows=14398467 width=92)
@@ -283,56 +290,45 @@ Stage-0
                                       predicate:(wr_item_sk is not null and wr_returned_date_sk is not null)
                                       TableScan [TS_84] (rows=14398467 width=92)
                                         default@web_returns,web_returns,Tbl:COMPLETE,Col:NONE,Output:["wr_returned_date_sk","wr_item_sk","wr_return_quantity"]
-                              <-Map 31 [SIMPLE_EDGE]
-                                SHUFFLE [RS_116]
-                                  PartitionCols:_col0
-                                  Select Operator [SEL_89] (rows=462000 width=1436)
-                                    Output:["_col0","_col1"]
-                                    Filter Operator [FIL_212] (rows=462000 width=1436)
-                                      predicate:(i_item_sk is not null and i_item_id is not null)
-                                      TableScan [TS_87] (rows=462000 width=1436)
-                                        default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_item_id"]
-                          <-Reducer 33 [SIMPLE_EDGE]
+                          <-Reducer 17 [SIMPLE_EDGE]
                             SHUFFLE [RS_119]
                               PartitionCols:_col0
                               Merge Join Operator [MERGEJOIN_224] (rows=80353 width=1119)
                                 Conds:RS_111._col1=RS_112._col0(Inner),Output:["_col0"]
-                              <-Map 32 [SIMPLE_EDGE]
+                              <-Map 14 [SIMPLE_EDGE]
                                 SHUFFLE [RS_111]
                                   PartitionCols:_col1
                                   Select Operator [SEL_92] (rows=73049 width=1119)
                                     Output:["_col0","_col1"]
                                     Filter Operator [FIL_213] (rows=73049 width=1119)
                                       predicate:(d_date is not null and d_date_sk is not null)
-                                      TableScan [TS_90] (rows=73049 width=1119)
-                                        default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_date"]
-                              <-Reducer 36 [SIMPLE_EDGE]
+                                       Please refer to the previous TableScan [TS_6]
+                              <-Reducer 26 [SIMPLE_EDGE]
                                 SHUFFLE [RS_112]
                                   PartitionCols:_col0
                                   Group By Operator [GBY_109] (rows=40176 width=1119)
                                     Output:["_col0"],keys:KEY._col0
-                                  <-Reducer 35 [SIMPLE_EDGE]
+                                  <-Reducer 25 [SIMPLE_EDGE]
                                     SHUFFLE [RS_108]
                                       PartitionCols:_col0
                                       Group By Operator [GBY_107] (rows=80353 width=1119)
                                         Output:["_col0"],keys:_col0
                                         Merge Join Operator [MERGEJOIN_223] (rows=80353 width=1119)
                                           Conds:RS_103._col1=RS_104._col0(Inner),Output:["_col0"]
-                                        <-Map 34 [SIMPLE_EDGE]
+                                        <-Map 18 [SIMPLE_EDGE]
                                           SHUFFLE [RS_103]
                                             PartitionCols:_col1
                                             Select Operator [SEL_95] (rows=73049 width=1119)
                                               Output:["_col0","_col1"]
                                               Filter Operator [FIL_214] (rows=73049 width=1119)
                                                 predicate:(d_week_seq is not null and d_date is not null)
-                                                TableScan [TS_93] (rows=73049 width=1119)
-                                                  default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date","d_week_seq"]
-                                        <-Reducer 38 [SIMPLE_EDGE]
+                                                 Please refer to the previous TableScan [TS_9]
+                                        <-Reducer 27 [SIMPLE_EDGE]
                                           SHUFFLE [RS_104]
                                             PartitionCols:_col0
                                             Group By Operator [GBY_101] (rows=18262 width=1119)
                                               Output:["_col0"],keys:KEY._col0
-                                            <-Map 37 [SIMPLE_EDGE]
+                                            <-Map 18 [SIMPLE_EDGE]
                                               SHUFFLE [RS_100]
                                                 PartitionCols:_col0
                                                 Group By Operator [GBY_99] (rows=36525 width=1119)
@@ -341,8 +337,7 @@ Stage-0
                                                     Output:["d_week_seq"]
                                                     Filter Operator [FIL_215] (rows=36525 width=1119)
                                                       predicate:((d_date) IN ('1998-01-02', '1998-10-15', '1998-11-10') and d_week_seq is not null)
-                                                      TableScan [TS_96] (rows=73049 width=1119)
-                                                        default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date","d_week_seq"]
+                                                       Please refer to the previous TableScan [TS_9]
                 <-Reducer 4 [SIMPLE_EDGE]
                   SHUFFLE [RS_126]
                     PartitionCols:_col0
@@ -355,70 +350,45 @@ Stage-0
                           Output:["_col0","_col1"],aggregations:["sum(_col2)"],keys:_col4
                           Merge Join Operator [MERGEJOIN_225] (rows=34846646 width=106)
                             Conds:RS_34._col0=RS_35._col0(Inner),Output:["_col2","_col4"]
-                          <-Reducer 2 [SIMPLE_EDGE]
-                            SHUFFLE [RS_34]
-                              PartitionCols:_col0
-                              Merge Join Operator [MERGEJOIN_216] (rows=31678769 width=106)
-                                Conds:RS_31._col1=RS_32._col0(Inner),Output:["_col0","_col2","_col4"]
-                              <-Map 1 [SIMPLE_EDGE]
-                                SHUFFLE [RS_31]
-                                  PartitionCols:_col1
-                                  Select Operator [SEL_2] (rows=28798881 width=106)
-                                    Output:["_col0","_col1","_col2"]
-                                    Filter Operator [FIL_201] (rows=28798881 width=106)
-                                      predicate:(cr_item_sk is not null and cr_returned_date_sk is not null)
-                                      TableScan [TS_0] (rows=28798881 width=106)
-                                        default@catalog_returns,catalog_returns,Tbl:COMPLETE,Col:NONE,Output:["cr_returned_date_sk","cr_item_sk","cr_return_quantity"]
-                              <-Map 7 [SIMPLE_EDGE]
-                                SHUFFLE [RS_32]
-                                  PartitionCols:_col0
-                                  Select Operator [SEL_5] (rows=462000 width=1436)
-                                    Output:["_col0","_col1"]
-                                    Filter Operator [FIL_202] (rows=462000 width=1436)
-                                      predicate:(i_item_sk is not null and i_item_id is not null)
-                                      TableScan [TS_3] (rows=462000 width=1436)
-                                        default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_item_id"]
-                          <-Reducer 9 [SIMPLE_EDGE]
+                          <-Reducer 15 [SIMPLE_EDGE]
                             SHUFFLE [RS_35]
                               PartitionCols:_col0
                               Merge Join Operator [MERGEJOIN_218] (rows=80353 width=1119)
                                 Conds:RS_27._col1=RS_28._col0(Inner),Output:["_col0"]
-                              <-Map 8 [SIMPLE_EDGE]
+                              <-Map 14 [SIMPLE_EDGE]
                                 SHUFFLE [RS_27]
                                   PartitionCols:_col1
                                   Select Operator [SEL_8] (rows=73049 width=1119)
                                     Output:["_col0","_col1"]
                                     Filter Operator [FIL_203] (rows=73049 width=1119)
                                       predicate:(d_date is not null and d_date_sk is not null)
-                                      TableScan [TS_6] (rows=73049 width=1119)
-                                        default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_date"]
-                              <-Reducer 12 [SIMPLE_EDGE]
+                                       Please refer to the previous TableScan [TS_6]
+                              <-Reducer 20 [SIMPLE_EDGE]
                                 SHUFFLE [RS_28]
                                   PartitionCols:_col0
                                   Group By Operator [GBY_25] (rows=40176 width=1119)
                                     Output:["_col0"],keys:KEY._col0
-                                  <-Reducer 11 [SIMPLE_EDGE]
+                                  <-Reducer 19 [SIMPLE_EDGE]
                                     SHUFFLE [RS_24]
                                       PartitionCols:_col0
                                       Group By Operator [GBY_23] (rows=80353 width=1119)
                                         Output:["_col0"],keys:_col0
                                         Merge Join Operator [MERGEJOIN_217] (rows=80353 width=1119)
                                           Conds:RS_19._col1=RS_20._col0(Inner),Output:["_col0"]
-                                        <-Map 10 [SIMPLE_EDGE]
+                                        <-Map 18 [SIMPLE_EDGE]
                                           SHUFFLE [RS_19]
                                             PartitionCols:_col1
                                             Select Operator [SEL_11] (rows=73049 width=1119)
                                               Output:["_col0","_col1"]
                                               Filter Operator [FIL_204] (rows=73049 width=1119)
                                                 predicate:(d_week_seq is not null and d_date is not null)
-                                                TableScan [TS_9] (rows=73049 width=1119)
-                                                  default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date","d_week_seq"]
-                                        <-Reducer 14 [SIMPLE_EDGE]
+                                                 Please refer to the previous TableScan [TS_9]
+                                        <-Reducer 21 [SIMPLE_EDGE]
                                           SHUFFLE [RS_20]
                                             PartitionCols:_col0
                                             Group By Operator [GBY_17] (rows=18262 width=1119)
                                               Output:["_col0"],keys:KEY._col0
-                                            <-Map 13 [SIMPLE_EDGE]
+                                            <-Map 18 [SIMPLE_EDGE]
                                               SHUFFLE [RS_16]
                                                 PartitionCols:_col0
                                                 Group By Operator [GBY_15] (rows=36525 width=1119)
@@ -427,6 +397,27 @@ Stage-0
                                                     Output:["d_week_seq"]
                                                     Filter Operator [FIL_205] (rows=36525 width=1119)
                                                       predicate:((d_date) IN ('1998-01-02', '1998-10-15', '1998-11-10') and d_week_seq is not null)
-                                                      TableScan [TS_12] (rows=73049 width=1119)
-                                                        default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date","d_week_seq"]
+                                                       Please refer to the previous TableScan [TS_9]
+                          <-Reducer 2 [SIMPLE_EDGE]
+                            SHUFFLE [RS_34]
+                              PartitionCols:_col0
+                              Merge Join Operator [MERGEJOIN_216] (rows=31678769 width=106)
+                                Conds:RS_31._col1=RS_32._col0(Inner),Output:["_col0","_col2","_col4"]
+                              <-Map 7 [SIMPLE_EDGE]
+                                SHUFFLE [RS_32]
+                                  PartitionCols:_col0
+                                  Select Operator [SEL_5] (rows=462000 width=1436)
+                                    Output:["_col0","_col1"]
+                                    Filter Operator [FIL_202] (rows=462000 width=1436)
+                                      predicate:(i_item_sk is not null and i_item_id is not null)
+                                       Please refer to the previous TableScan [TS_3]
+                              <-Map 1 [SIMPLE_EDGE]
+                                SHUFFLE [RS_31]
+                                  PartitionCols:_col1
+                                  Select Operator [SEL_2] (rows=28798881 width=106)
+                                    Output:["_col0","_col1","_col2"]
+                                    Filter Operator [FIL_201] (rows=28798881 width=106)
+                                      predicate:(cr_item_sk is not null and cr_returned_date_sk is not null)
+                                      TableScan [TS_0] (rows=28798881 width=106)
+                                        default@catalog_returns,catalog_returns,Tbl:COMPLETE,Col:NONE,Output:["cr_returned_date_sk","cr_item_sk","cr_return_quantity"]
 

http://git-wip-us.apache.org/repos/asf/hive/blob/59f65772/ql/src/test/results/clientpositive/perf/query85.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/query85.q.out b/ql/src/test/results/clientpositive/perf/query85.q.out
index 168bcd2..ba8659e 100644
--- a/ql/src/test/results/clientpositive/perf/query85.q.out
+++ b/ql/src/test/results/clientpositive/perf/query85.q.out
@@ -12,7 +12,7 @@ Reducer 4 <- Map 13 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
 Reducer 5 <- Map 14 (SIMPLE_EDGE), Reducer 4 (SIMPLE_EDGE)
 Reducer 6 <- Map 15 (SIMPLE_EDGE), Reducer 5 (SIMPLE_EDGE)
 Reducer 7 <- Map 16 (SIMPLE_EDGE), Reducer 6 (SIMPLE_EDGE)
-Reducer 8 <- Map 17 (SIMPLE_EDGE), Reducer 7 (SIMPLE_EDGE)
+Reducer 8 <- Map 16 (SIMPLE_EDGE), Reducer 7 (SIMPLE_EDGE)
 Reducer 9 <- Reducer 8 (SIMPLE_EDGE)
 
 Stage-0
@@ -38,15 +38,15 @@ Stage-0
                       Output:["_col0","_col1","_col2","_col3"],aggregations:["avg(_col5)","avg(_col17)","avg(_col16)"],keys:_col19
                       Merge Join Operator [MERGEJOIN_105] (rows=2047980 width=385)
                         Conds:RS_44._col13, _col24, _col25=RS_45._col0, _col1, _col2(Inner),Output:["_col5","_col16","_col17","_col19"]
-                      <-Map 17 [SIMPLE_EDGE]
+                      <-Map 16 [SIMPLE_EDGE]
                         SHUFFLE [RS_45]
                           PartitionCols:_col0, _col1, _col2
                           Select Operator [SEL_23] (rows=1861800 width=385)
                             Output:["_col0","_col1","_col2"]
                             Filter Operator [FIL_98] (rows=1861800 width=385)
                               predicate:(((cd_education_status = '4 yr Degree') or (cd_education_status = 'Primary') or (cd_education_status = 'Advanced Degree')) and ((cd_marital_status = 'M') or (cd_marital_status = 'D') or (cd_marital_status = 'U')) and cd_demo_sk is not null and cd_marital_status is not null and cd_education_status is not null)
-                              TableScan [TS_21] (rows=1861800 width=385)
-                                default@customer_demographics,cd2,Tbl:COMPLETE,Col:NONE,Output:["cd_demo_sk","cd_marital_status","cd_education_status"]
+                              TableScan [TS_18] (rows=1861800 width=385)
+                                default@customer_demographics,cd1,Tbl:COMPLETE,Col:NONE,Output:["cd_demo_sk","cd_marital_status","cd_education_status"]
                       <-Reducer 7 [SIMPLE_EDGE]
                         SHUFFLE [RS_44]
                           PartitionCols:_col13, _col24, _col25
@@ -61,8 +61,7 @@ Stage-0
                                   Output:["_col0","_col1","_col2"]
                                   Filter Operator [FIL_97] (rows=1861800 width=385)
                                     predicate:(((cd_education_status = '4 yr Degree') or (cd_education_status = 'Primary') or (cd_education_status = 'Advanced Degree')) and ((cd_marital_status = 'M') or (cd_marital_status = 'D') or (cd_marital_status = 'U')) and cd_demo_sk is not null and cd_marital_status is not null and cd_education_status is not null)
-                                    TableScan [TS_18] (rows=1861800 width=385)
-                                      default@customer_demographics,cd1,Tbl:COMPLETE,Col:NONE,Output:["cd_demo_sk","cd_marital_status","cd_education_status"]
+                                     Please refer to the previous TableScan [TS_18]
                             <-Reducer 6 [SIMPLE_EDGE]
                               SHUFFLE [RS_40]
                                 PartitionCols:_col11

http://git-wip-us.apache.org/repos/asf/hive/blob/59f65772/ql/src/test/results/clientpositive/perf/query87.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/query87.q.out b/ql/src/test/results/clientpositive/perf/query87.q.out
index c7dd1d9..58a33d9 100644
--- a/ql/src/test/results/clientpositive/perf/query87.q.out
+++ b/ql/src/test/results/clientpositive/perf/query87.q.out
@@ -43,14 +43,14 @@ POSTHOOK: type: QUERY
 Plan optimized by CBO.
 
 Vertex dependency in root stage
-Reducer 13 <- Map 12 (SIMPLE_EDGE), Map 16 (SIMPLE_EDGE)
-Reducer 14 <- Map 17 (SIMPLE_EDGE), Reducer 13 (SIMPLE_EDGE)
-Reducer 15 <- Reducer 14 (SIMPLE_EDGE), Union 5 (CONTAINS)
-Reducer 19 <- Map 18 (SIMPLE_EDGE), Map 22 (SIMPLE_EDGE)
+Reducer 11 <- Map 10 (SIMPLE_EDGE), Map 18 (SIMPLE_EDGE)
+Reducer 12 <- Map 17 (SIMPLE_EDGE), Reducer 11 (SIMPLE_EDGE)
+Reducer 13 <- Reducer 12 (SIMPLE_EDGE), Union 5 (CONTAINS)
+Reducer 14 <- Map 10 (SIMPLE_EDGE), Map 19 (SIMPLE_EDGE)
+Reducer 15 <- Map 17 (SIMPLE_EDGE), Reducer 14 (SIMPLE_EDGE)
+Reducer 16 <- Reducer 15 (SIMPLE_EDGE), Union 7 (CONTAINS)
 Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 10 (SIMPLE_EDGE)
-Reducer 20 <- Map 23 (SIMPLE_EDGE), Reducer 19 (SIMPLE_EDGE)
-Reducer 21 <- Reducer 20 (SIMPLE_EDGE), Union 7 (CONTAINS)
-Reducer 3 <- Map 11 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 3 <- Map 17 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
 Reducer 4 <- Reducer 3 (SIMPLE_EDGE), Union 5 (CONTAINS)
 Reducer 6 <- Union 5 (SIMPLE_EDGE), Union 7 (CONTAINS)
 Reducer 8 <- Union 7 (SIMPLE_EDGE)
@@ -76,7 +76,7 @@ Stage-0
                     Group By Operator [GBY_96] (rows=27225312 width=129)
                       Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"],keys:KEY._col0, KEY._col1, KEY._col2
                     <-Union 7 [SIMPLE_EDGE]
-                      <-Reducer 21 [CONTAINS]
+                      <-Reducer 16 [CONTAINS]
                         Reduce Output Operator [RS_95]
                           PartitionCols:_col0, _col1, _col2
                           Group By Operator [GBY_94] (rows=54450625 width=129)
@@ -89,28 +89,37 @@ Stage-0
                                   Output:["_col0","_col1","_col2","_col3"],aggregations:["count(1)"],keys:_col0, _col1, _col2
                                   Group By Operator [GBY_83] (rows=87121617 width=135)
                                     Output:["_col0","_col1","_col2"],keys:KEY._col0, KEY._col1, KEY._col2
-                                  <-Reducer 20 [SIMPLE_EDGE]
+                                  <-Reducer 15 [SIMPLE_EDGE]
                                     SHUFFLE [RS_82]
                                       PartitionCols:_col0, _col1, _col2
                                       Group By Operator [GBY_81] (rows=174243235 width=135)
                                         Output:["_col0","_col1","_col2"],keys:_col7, _col6, _col3
                                         Merge Join Operator [MERGEJOIN_135] (rows=174243235 width=135)
                                           Conds:RS_77._col1=RS_78._col0(Inner),Output:["_col3","_col6","_col7"]
-                                        <-Map 23 [SIMPLE_EDGE]
+                                        <-Map 17 [SIMPLE_EDGE]
                                           SHUFFLE [RS_78]
                                             PartitionCols:_col0
                                             Select Operator [SEL_73] (rows=80000000 width=860)
                                               Output:["_col0","_col1","_col2"]
                                               Filter Operator [FIL_128] (rows=80000000 width=860)
                                                 predicate:c_customer_sk is not null
-                                                TableScan [TS_71] (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 19 [SIMPLE_EDGE]
+                                        <-Reducer 14 [SIMPLE_EDGE]
                                           SHUFFLE [RS_77]
                                             PartitionCols:_col1
                                             Merge Join Operator [MERGEJOIN_134] (rows=158402938 width=135)
                                               Conds:RS_74._col0=RS_75._col0(Inner),Output:["_col1","_col3"]
-                                            <-Map 18 [SIMPLE_EDGE]
+                                            <-Map 10 [SIMPLE_EDGE]
+                                              SHUFFLE [RS_75]
+                                                PartitionCols:_col0
+                                                Select Operator [SEL_70] (rows=8116 width=1119)
+                                                  Output:["_col0","_col1"]
+                                                  Filter Operator [FIL_127] (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 19 [SIMPLE_EDGE]
                                               SHUFFLE [RS_74]
                                                 PartitionCols:_col0
                                                 Select Operator [SEL_67] (rows=144002668 width=135)
@@ -119,15 +128,6 @@ Stage-0
                                                     predicate:(ws_sold_date_sk is not null and ws_bill_customer_sk is not null)
                                                     TableScan [TS_65] (rows=144002668 width=135)
                                                       default@web_sales,web_sales,Tbl:COMPLETE,Col:NONE,Output:["ws_sold_date_sk","ws_bill_customer_sk"]
-                                            <-Map 22 [SIMPLE_EDGE]
-                                              SHUFFLE [RS_75]
-                                                PartitionCols:_col0
-                                                Select Operator [SEL_70] (rows=8116 width=1119)
-                                                  Output:["_col0","_col1"]
-                                                  Filter Operator [FIL_127] (rows=8116 width=1119)
-                                                    predicate:(d_month_seq BETWEEN 1212 AND 1223 and d_date_sk is not null)
-                                                    TableScan [TS_68] (rows=73049 width=1119)
-                                                      default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_date","d_month_seq"]
                       <-Reducer 6 [CONTAINS]
                         Reduce Output Operator [RS_95]
                           PartitionCols:_col0, _col1, _col2
@@ -146,7 +146,7 @@ Stage-0
                                       Group By Operator [GBY_57] (rows=130677808 width=103)
                                         Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"],keys:KEY._col0, KEY._col1, KEY._col2
                                       <-Union 5 [SIMPLE_EDGE]
-                                        <-Reducer 15 [CONTAINS]
+                                        <-Reducer 13 [CONTAINS]
                                           Reduce Output Operator [RS_56]
                                             PartitionCols:_col0, _col1, _col2
                                             Group By Operator [GBY_55] (rows=261355616 width=103)
@@ -159,7 +159,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 14 [SIMPLE_EDGE]
+                                                    <-Reducer 12 [SIMPLE_EDGE]
                                                       SHUFFLE [RS_43]
                                                         PartitionCols:_col0, _col1, _col2
                                                         Group By Operator [GBY_42] (rows=348467716 width=135)
@@ -173,14 +173,21 @@ Stage-0
                                                                 Output:["_col0","_col1","_col2"]
                                                                 Filter Operator [FIL_125] (rows=80000000 width=860)
                                                                   predicate:c_customer_sk is not null
-                                                                  TableScan [TS_32] (rows=80000000 width=860)
-                                                                    default@customer,customer,Tbl:COMPLETE,Col:NONE,Output:["c_customer_sk","c_first_name","c_last_name"]
-                                                          <-Reducer 13 [SIMPLE_EDGE]
+                                                                   Please refer to the previous TableScan [TS_6]
+                                                          <-Reducer 11 [SIMPLE_EDGE]
                                                             SHUFFLE [RS_38]
                                                               PartitionCols:_col1
                                                               Merge Join Operator [MERGEJOIN_132] (rows=316788826 width=135)
                                                                 Conds:RS_35._col0=RS_36._col0(Inner),Output:["_col1","_col3"]
-                                                              <-Map 12 [SIMPLE_EDGE]
+                                                              <-Map 10 [SIMPLE_EDGE]
+                                                                SHUFFLE [RS_36]
+                                                                  PartitionCols:_col0
+                                                                  Select Operator [SEL_31] (rows=8116 width=1119)
+                                                                    Output:["_col0","_col1"]
+                                                                    Filter Operator [FIL_124] (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 18 [SIMPLE_EDGE]
                                                                 SHUFFLE [RS_35]
                                                                   PartitionCols:_col0
                                                                   Select Operator [SEL_28] (rows=287989836 width=135)
@@ -189,15 +196,6 @@ 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 16 [SIMPLE_EDGE]
-                                                                SHUFFLE [RS_36]
-                                                                  PartitionCols:_col0
-                                                                  Select Operator [SEL_31] (rows=8116 width=1119)
-                                                                    Output:["_col0","_col1"]
-                                                                    Filter Operator [FIL_124] (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 4 [CONTAINS]
                                           Reduce Output Operator [RS_56]
                                             PartitionCols:_col0, _col1, _col2
@@ -218,20 +216,27 @@ Stage-0
                                                           Output:["_col0","_col1","_col2"],keys:_col7, _col6, _col3
                                                           Merge Join Operator [MERGEJOIN_131] (rows=696954748 width=88)
                                                             Conds:RS_12._col1=RS_13._col0(Inner),Output:["_col3","_col6","_col7"]
-                                                          <-Map 11 [SIMPLE_EDGE]
+                                                          <-Map 17 [SIMPLE_EDGE]
                                                             SHUFFLE [RS_13]
                                                               PartitionCols:_col0
                                                               Select Operator [SEL_8] (rows=80000000 width=860)
                                                                 Output:["_col0","_col1","_col2"]
                                                                 Filter Operator [FIL_122] (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_130] (rows=633595212 width=88)
                                                                 Conds:RS_9._col0=RS_10._col0(Inner),Output:["_col1","_col3"]
+                                                              <-Map 10 [SIMPLE_EDGE]
+                                                                SHUFFLE [RS_10]
+                                                                  PartitionCols:_col0
+                                                                  Select Operator [SEL_5] (rows=8116 width=1119)
+                                                                    Output:["_col0","_col1"]
+                                                                    Filter Operator [FIL_121] (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
@@ -241,13 +246,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 10 [SIMPLE_EDGE]
-                                                                SHUFFLE [RS_10]
-                                                                  PartitionCols:_col0
-                                                                  Select Operator [SEL_5] (rows=8116 width=1119)
-                                                                    Output:["_col0","_col1"]
-                                                                    Filter Operator [FIL_121] (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"]