You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by jc...@apache.org on 2018/09/23 20:31:06 UTC

[05/10] hive git commit: HIVE-20612: Create new join multi-key correlation flag for CBO (Jesus Camacho Rodriguez, reviewed by Ashutosh Chauhan)

http://git-wip-us.apache.org/repos/asf/hive/blob/491c9f62/ql/src/test/results/clientpositive/perf/tez/query29.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/tez/query29.q.out b/ql/src/test/results/clientpositive/perf/tez/query29.q.out
index b15ae42..5b8e4f6 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query29.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query29.q.out
@@ -93,140 +93,140 @@ POSTHOOK: type: QUERY
 Plan optimized by CBO.
 
 Vertex dependency in root stage
-Reducer 10 <- Map 15 (SIMPLE_EDGE), Reducer 9 (SIMPLE_EDGE)
-Reducer 11 <- Map 16 (SIMPLE_EDGE), Reducer 10 (SIMPLE_EDGE)
-Reducer 13 <- Map 12 (SIMPLE_EDGE), Map 14 (SIMPLE_EDGE)
-Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 6 (SIMPLE_EDGE)
-Reducer 3 <- Reducer 11 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
-Reducer 4 <- Reducer 3 (SIMPLE_EDGE)
+Reducer 10 <- Map 14 (SIMPLE_EDGE), Reducer 9 (SIMPLE_EDGE)
+Reducer 11 <- Map 14 (SIMPLE_EDGE), Reducer 10 (SIMPLE_EDGE)
+Reducer 12 <- Map 15 (SIMPLE_EDGE), Reducer 11 (SIMPLE_EDGE)
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 7 (SIMPLE_EDGE)
+Reducer 3 <- Reducer 12 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Map 16 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
 Reducer 5 <- Reducer 4 (SIMPLE_EDGE)
-Reducer 8 <- Map 12 (SIMPLE_EDGE), Map 7 (SIMPLE_EDGE)
-Reducer 9 <- Reducer 13 (SIMPLE_EDGE), Reducer 8 (SIMPLE_EDGE)
+Reducer 6 <- Reducer 5 (SIMPLE_EDGE)
+Reducer 9 <- Map 13 (SIMPLE_EDGE), Map 8 (SIMPLE_EDGE)
 
 Stage-0
   Fetch Operator
     limit:100
     Stage-1
-      Reducer 5 vectorized
-      File Output Operator [FS_129]
-        Limit [LIM_128] (rows=100 width=88)
+      Reducer 6 vectorized
+      File Output Operator [FS_130]
+        Limit [LIM_129] (rows=100 width=88)
           Number of rows:100
-          Select Operator [SEL_127] (rows=463823414 width=88)
+          Select Operator [SEL_128] (rows=510205767 width=88)
             Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
-          <-Reducer 4 [SIMPLE_EDGE] vectorized
-            SHUFFLE [RS_126]
-              Group By Operator [GBY_125] (rows=463823414 width=88)
+          <-Reducer 5 [SIMPLE_EDGE] vectorized
+            SHUFFLE [RS_127]
+              Group By Operator [GBY_126] (rows=510205767 width=88)
                 Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)"],keys:KEY._col0, KEY._col1, KEY._col2, KEY._col3
-              <-Reducer 3 [SIMPLE_EDGE]
-                SHUFFLE [RS_49]
+              <-Reducer 4 [SIMPLE_EDGE]
+                SHUFFLE [RS_48]
                   PartitionCols:_col0, _col1, _col2, _col3
-                  Group By Operator [GBY_48] (rows=927646829 width=88)
-                    Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"],aggregations:["sum(_col14)","sum(_col22)","sum(_col3)"],keys:_col7, _col8, _col27, _col28
-                    Top N Key Operator [TNK_93] (rows=927646829 width=88)
-                      keys:_col7, _col8, _col27, _col28,sort order:++++,top n:100
-                      Merge Join Operator [MERGEJOIN_100] (rows=927646829 width=88)
-                        Conds:RS_44._col1, _col2=RS_45._col14, _col13(Inner),Output:["_col3","_col7","_col8","_col14","_col22","_col27","_col28"]
-                      <-Reducer 11 [SIMPLE_EDGE]
-                        SHUFFLE [RS_45]
-                          PartitionCols:_col14, _col13
-                          Select Operator [SEL_40] (rows=843315281 width=88)
-                            Output:["_col1","_col2","_col8","_col13","_col14","_col16","_col21","_col22"]
-                            Merge Join Operator [MERGEJOIN_99] (rows=843315281 width=88)
-                              Conds:RS_37._col3=RS_124._col0(Inner),Output:["_col5","_col10","_col11","_col13","_col18","_col19","_col21","_col22"]
-                            <-Map 16 [SIMPLE_EDGE] vectorized
-                              SHUFFLE [RS_124]
-                                PartitionCols:_col0
-                                Select Operator [SEL_123] (rows=1704 width=1910)
-                                  Output:["_col0","_col1","_col2"]
-                                  Filter Operator [FIL_122] (rows=1704 width=1910)
-                                    predicate:s_store_sk is not null
-                                    TableScan [TS_25] (rows=1704 width=1910)
-                                      default@store,store,Tbl:COMPLETE,Col:NONE,Output:["s_store_sk","s_store_id","s_store_name"]
-                            <-Reducer 10 [SIMPLE_EDGE]
-                              SHUFFLE [RS_37]
-                                PartitionCols:_col3
-                                Merge Join Operator [MERGEJOIN_98] (rows=766650239 width=88)
-                                  Conds:RS_34._col1=RS_121._col0(Inner),Output:["_col3","_col5","_col10","_col11","_col13","_col18","_col19"]
+                  Group By Operator [GBY_47] (rows=1020411534 width=88)
+                    Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"],aggregations:["sum(_col17)","sum(_col22)","sum(_col3)"],keys:_col27, _col28, _col7, _col8
+                    Top N Key Operator [TNK_94] (rows=1020411534 width=88)
+                      keys:_col27, _col28, _col7, _col8,sort order:++++,top n:100
+                      Merge Join Operator [MERGEJOIN_101] (rows=1020411534 width=88)
+                        Conds:RS_43._col13=RS_125._col0(Inner),Output:["_col3","_col7","_col8","_col17","_col22","_col27","_col28"]
+                      <-Map 16 [SIMPLE_EDGE] vectorized
+                        SHUFFLE [RS_125]
+                          PartitionCols:_col0
+                          Select Operator [SEL_124] (rows=462000 width=1436)
+                            Output:["_col0","_col1","_col2"]
+                            Filter Operator [FIL_123] (rows=462000 width=1436)
+                              predicate:i_item_sk is not null
+                              TableScan [TS_34] (rows=462000 width=1436)
+                                default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_item_id","i_item_desc"]
+                      <-Reducer 3 [SIMPLE_EDGE]
+                        SHUFFLE [RS_43]
+                          PartitionCols:_col13
+                          Merge Join Operator [MERGEJOIN_100] (rows=927646829 width=88)
+                            Conds:RS_40._col1, _col2=RS_41._col14, _col13(Inner),Output:["_col3","_col7","_col8","_col13","_col17","_col22"]
+                          <-Reducer 12 [SIMPLE_EDGE]
+                            SHUFFLE [RS_41]
+                              PartitionCols:_col14, _col13
+                              Select Operator [SEL_33] (rows=843315281 width=88)
+                                Output:["_col1","_col2","_col7","_col11","_col13","_col14","_col16"]
+                                Merge Join Operator [MERGEJOIN_99] (rows=843315281 width=88)
+                                  Conds:RS_30._col3=RS_122._col0(Inner),Output:["_col1","_col5","_col7","_col8","_col10","_col18","_col19"]
                                 <-Map 15 [SIMPLE_EDGE] vectorized
-                                  SHUFFLE [RS_121]
+                                  SHUFFLE [RS_122]
                                     PartitionCols:_col0
-                                    Select Operator [SEL_120] (rows=462000 width=1436)
+                                    Select Operator [SEL_121] (rows=1704 width=1910)
                                       Output:["_col0","_col1","_col2"]
-                                      Filter Operator [FIL_119] (rows=462000 width=1436)
-                                        predicate:i_item_sk is not null
-                                        TableScan [TS_22] (rows=462000 width=1436)
-                                          default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_item_id","i_item_desc"]
-                                <-Reducer 9 [SIMPLE_EDGE]
-                                  SHUFFLE [RS_34]
-                                    PartitionCols:_col1
-                                    Merge Join Operator [MERGEJOIN_97] (rows=696954748 width=88)
-                                      Conds:RS_31._col1, _col2, _col4=RS_32._col1, _col2, _col3(Inner),Output:["_col1","_col3","_col5","_col10","_col11","_col13"]
-                                    <-Reducer 13 [SIMPLE_EDGE]
-                                      SHUFFLE [RS_32]
-                                        PartitionCols:_col1, _col2, _col3
-                                        Merge Join Operator [MERGEJOIN_96] (rows=63350266 width=77)
-                                          Conds:RS_118._col0=RS_115._col0(Inner),Output:["_col1","_col2","_col3","_col4"]
-                                        <-Map 12 [SIMPLE_EDGE] vectorized
-                                          SHUFFLE [RS_115]
-                                            PartitionCols:_col0
-                                            Select Operator [SEL_113] (rows=4058 width=1119)
-                                              Output:["_col0"]
-                                              Filter Operator [FIL_111] (rows=4058 width=1119)
-                                                predicate:((d_year = 1999) and d_date_sk is not null and d_moy BETWEEN 4 AND 7)
-                                                TableScan [TS_9] (rows=73049 width=1119)
-                                                  default@date_dim,d1,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_moy"]
+                                      Filter Operator [FIL_120] (rows=1704 width=1910)
+                                        predicate:s_store_sk is not null
+                                        TableScan [TS_18] (rows=1704 width=1910)
+                                          default@store,store,Tbl:COMPLETE,Col:NONE,Output:["s_store_sk","s_store_id","s_store_name"]
+                                <-Reducer 11 [SIMPLE_EDGE]
+                                  SHUFFLE [RS_30]
+                                    PartitionCols:_col3
+                                    Merge Join Operator [MERGEJOIN_98] (rows=766650239 width=88)
+                                      Conds:RS_27._col6=RS_118._col0(Inner),Output:["_col1","_col3","_col5","_col7","_col8","_col10"]
+                                    <-Map 14 [SIMPLE_EDGE] vectorized
+                                      SHUFFLE [RS_118]
+                                        PartitionCols:_col0
+                                        Select Operator [SEL_116] (rows=4058 width=1119)
+                                          Output:["_col0"]
+                                          Filter Operator [FIL_114] (rows=4058 width=1119)
+                                            predicate:((d_year = 1999) and d_date_sk is not null and d_moy BETWEEN 4 AND 7)
+                                            TableScan [TS_15] (rows=73049 width=1119)
+                                              default@date_dim,d2,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_moy"]
+                                    <-Reducer 10 [SIMPLE_EDGE]
+                                      SHUFFLE [RS_27]
+                                        PartitionCols:_col6
+                                        Merge Join Operator [MERGEJOIN_97] (rows=696954748 width=88)
+                                          Conds:RS_24._col0=RS_119._col0(Inner),Output:["_col1","_col3","_col5","_col6","_col7","_col8","_col10"]
                                         <-Map 14 [SIMPLE_EDGE] vectorized
-                                          SHUFFLE [RS_118]
-                                            PartitionCols:_col0
-                                            Select Operator [SEL_117] (rows=57591150 width=77)
-                                              Output:["_col0","_col1","_col2","_col3","_col4"]
-                                              Filter Operator [FIL_116] (rows=57591150 width=77)
-                                                predicate:(sr_customer_sk is not null and sr_item_sk is not null and sr_returned_date_sk is not null and sr_ticket_number is not null)
-                                                TableScan [TS_12] (rows=57591150 width=77)
-                                                  default@store_returns,store_returns,Tbl:COMPLETE,Col:NONE,Output:["sr_returned_date_sk","sr_item_sk","sr_customer_sk","sr_ticket_number","sr_return_quantity"]
-                                    <-Reducer 8 [SIMPLE_EDGE]
-                                      SHUFFLE [RS_31]
-                                        PartitionCols:_col1, _col2, _col4
-                                        Merge Join Operator [MERGEJOIN_95] (rows=633595212 width=88)
-                                          Conds:RS_109._col0=RS_114._col0(Inner),Output:["_col1","_col2","_col3","_col4","_col5"]
-                                        <-Map 12 [SIMPLE_EDGE] vectorized
-                                          SHUFFLE [RS_114]
+                                          SHUFFLE [RS_119]
                                             PartitionCols:_col0
-                                            Select Operator [SEL_112] (rows=18262 width=1119)
+                                            Select Operator [SEL_117] (rows=18262 width=1119)
                                               Output:["_col0"]
-                                              Filter Operator [FIL_110] (rows=18262 width=1119)
+                                              Filter Operator [FIL_115] (rows=18262 width=1119)
                                                 predicate:((d_moy = 4) and (d_year = 1999) and d_date_sk is not null)
-                                                 Please refer to the previous TableScan [TS_9]
-                                        <-Map 7 [SIMPLE_EDGE] vectorized
-                                          SHUFFLE [RS_109]
+                                                 Please refer to the previous TableScan [TS_15]
+                                        <-Reducer 9 [SIMPLE_EDGE]
+                                          SHUFFLE [RS_24]
                                             PartitionCols:_col0
-                                            Select Operator [SEL_108] (rows=575995635 width=88)
-                                              Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
-                                              Filter Operator [FIL_107] (rows=575995635 width=88)
-                                                predicate:(ss_customer_sk is not null and ss_item_sk is not null and ss_sold_date_sk is not null and ss_store_sk is not null and ss_ticket_number is not null)
-                                                TableScan [TS_6] (rows=575995635 width=88)
-                                                  default@store_sales,store_sales,Tbl:COMPLETE,Col:NONE,Output:["ss_sold_date_sk","ss_item_sk","ss_customer_sk","ss_store_sk","ss_ticket_number","ss_quantity"]
-                      <-Reducer 2 [SIMPLE_EDGE]
-                        SHUFFLE [RS_44]
-                          PartitionCols:_col1, _col2
-                          Merge Join Operator [MERGEJOIN_94] (rows=316788826 width=135)
-                            Conds:RS_103._col0=RS_106._col0(Inner),Output:["_col1","_col2","_col3"]
-                          <-Map 1 [SIMPLE_EDGE] vectorized
-                            SHUFFLE [RS_103]
-                              PartitionCols:_col0
-                              Select Operator [SEL_102] (rows=287989836 width=135)
-                                Output:["_col0","_col1","_col2","_col3"]
-                                Filter Operator [FIL_101] (rows=287989836 width=135)
-                                  predicate:(cs_bill_customer_sk is not null and cs_item_sk is not null and cs_sold_date_sk is not null)
-                                  TableScan [TS_0] (rows=287989836 width=135)
-                                    default@catalog_sales,catalog_sales,Tbl:COMPLETE,Col:NONE,Output:["cs_sold_date_sk","cs_bill_customer_sk","cs_item_sk","cs_quantity"]
-                          <-Map 6 [SIMPLE_EDGE] vectorized
-                            SHUFFLE [RS_106]
-                              PartitionCols:_col0
-                              Select Operator [SEL_105] (rows=36525 width=1119)
-                                Output:["_col0"]
-                                Filter Operator [FIL_104] (rows=36525 width=1119)
-                                  predicate:((d_year) IN (1999, 2000, 2001) and d_date_sk is not null)
-                                  TableScan [TS_3] (rows=73049 width=1119)
-                                    default@date_dim,d3,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year"]
+                                            Merge Join Operator [MERGEJOIN_96] (rows=633595212 width=88)
+                                              Conds:RS_110._col1, _col2, _col4=RS_113._col1, _col2, _col3(Inner),Output:["_col0","_col1","_col3","_col5","_col6","_col7","_col8","_col10"]
+                                            <-Map 13 [SIMPLE_EDGE] vectorized
+                                              SHUFFLE [RS_113]
+                                                PartitionCols:_col1, _col2, _col3
+                                                Select Operator [SEL_112] (rows=57591150 width=77)
+                                                  Output:["_col0","_col1","_col2","_col3","_col4"]
+                                                  Filter Operator [FIL_111] (rows=57591150 width=77)
+                                                    predicate:(sr_customer_sk is not null and sr_item_sk is not null and sr_returned_date_sk is not null and sr_ticket_number is not null)
+                                                    TableScan [TS_9] (rows=57591150 width=77)
+                                                      default@store_returns,store_returns,Tbl:COMPLETE,Col:NONE,Output:["sr_returned_date_sk","sr_item_sk","sr_customer_sk","sr_ticket_number","sr_return_quantity"]
+                                            <-Map 8 [SIMPLE_EDGE] vectorized
+                                              SHUFFLE [RS_110]
+                                                PartitionCols:_col1, _col2, _col4
+                                                Select Operator [SEL_109] (rows=575995635 width=88)
+                                                  Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
+                                                  Filter Operator [FIL_108] (rows=575995635 width=88)
+                                                    predicate:(ss_customer_sk is not null and ss_item_sk is not null and ss_sold_date_sk is not null and ss_store_sk is not null and ss_ticket_number is not null)
+                                                    TableScan [TS_6] (rows=575995635 width=88)
+                                                      default@store_sales,store_sales,Tbl:COMPLETE,Col:NONE,Output:["ss_sold_date_sk","ss_item_sk","ss_customer_sk","ss_store_sk","ss_ticket_number","ss_quantity"]
+                          <-Reducer 2 [SIMPLE_EDGE]
+                            SHUFFLE [RS_40]
+                              PartitionCols:_col1, _col2
+                              Merge Join Operator [MERGEJOIN_95] (rows=316788826 width=135)
+                                Conds:RS_104._col0=RS_107._col0(Inner),Output:["_col1","_col2","_col3"]
+                              <-Map 1 [SIMPLE_EDGE] vectorized
+                                SHUFFLE [RS_104]
+                                  PartitionCols:_col0
+                                  Select Operator [SEL_103] (rows=287989836 width=135)
+                                    Output:["_col0","_col1","_col2","_col3"]
+                                    Filter Operator [FIL_102] (rows=287989836 width=135)
+                                      predicate:(cs_bill_customer_sk is not null and cs_item_sk is not null and cs_sold_date_sk is not null)
+                                      TableScan [TS_0] (rows=287989836 width=135)
+                                        default@catalog_sales,catalog_sales,Tbl:COMPLETE,Col:NONE,Output:["cs_sold_date_sk","cs_bill_customer_sk","cs_item_sk","cs_quantity"]
+                              <-Map 7 [SIMPLE_EDGE] vectorized
+                                SHUFFLE [RS_107]
+                                  PartitionCols:_col0
+                                  Select Operator [SEL_106] (rows=36525 width=1119)
+                                    Output:["_col0"]
+                                    Filter Operator [FIL_105] (rows=36525 width=1119)
+                                      predicate:((d_year) IN (1999, 2000, 2001) and d_date_sk is not null)
+                                      TableScan [TS_3] (rows=73049 width=1119)
+                                        default@date_dim,d3,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year"]
 

http://git-wip-us.apache.org/repos/asf/hive/blob/491c9f62/ql/src/test/results/clientpositive/perf/tez/query50.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/tez/query50.q.out b/ql/src/test/results/clientpositive/perf/tez/query50.q.out
index f251f23..5cf70d8 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query50.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query50.q.out
@@ -132,23 +132,23 @@ Stage-0
       File Output Operator [FS_80]
         Limit [LIM_79] (rows=100 width=88)
           Number of rows:100
-          Select Operator [SEL_78] (rows=383325119 width=88)
+          Select Operator [SEL_78] (rows=421657640 width=88)
             Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14"]
           <-Reducer 6 [SIMPLE_EDGE] vectorized
             SHUFFLE [RS_77]
-              Group By Operator [GBY_76] (rows=383325119 width=88)
+              Group By Operator [GBY_76] (rows=421657640 width=88)
                 Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)","sum(VALUE._col3)","sum(VALUE._col4)"],keys:KEY._col0, KEY._col1, KEY._col2, KEY._col3, KEY._col4, KEY._col5, KEY._col6, KEY._col7, KEY._col8, KEY._col9
               <-Reducer 5 [SIMPLE_EDGE]
                 SHUFFLE [RS_30]
                   PartitionCols:_col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9
-                  Group By Operator [GBY_29] (rows=766650239 width=88)
+                  Group By Operator [GBY_29] (rows=843315281 width=88)
                     Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14"],aggregations:["sum(_col10)","sum(_col11)","sum(_col12)","sum(_col13)","sum(_col14)"],keys:_col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9
-                    Top N Key Operator [TNK_56] (rows=766650239 width=88)
+                    Top N Key Operator [TNK_56] (rows=843315281 width=88)
                       keys:_col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9,sort order:++++++++++,top n:100
-                      Select Operator [SEL_27] (rows=766650239 width=88)
+                      Select Operator [SEL_27] (rows=843315281 width=88)
                         Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14"]
-                        Merge Join Operator [MERGEJOIN_60] (rows=766650239 width=88)
-                          Conds:RS_24._col10=RS_75._col0(Inner),Output:["_col0","_col7","_col14","_col15","_col16","_col17","_col18","_col19","_col20","_col21","_col22","_col23"]
+                        Merge Join Operator [MERGEJOIN_60] (rows=843315281 width=88)
+                          Conds:RS_24._col3=RS_75._col0(Inner),Output:["_col0","_col5","_col14","_col15","_col16","_col17","_col18","_col19","_col20","_col21","_col22","_col23"]
                         <-Map 11 [SIMPLE_EDGE] vectorized
                           SHUFFLE [RS_75]
                             PartitionCols:_col0
@@ -160,9 +160,9 @@ Stage-0
                                   default@store,store,Tbl:COMPLETE,Col:NONE,Output:["s_store_sk","s_store_name","s_company_id","s_street_number","s_street_name","s_street_type","s_suite_number","s_city","s_county","s_state","s_zip"]
                         <-Reducer 4 [SIMPLE_EDGE]
                           SHUFFLE [RS_24]
-                            PartitionCols:_col10
-                            Merge Join Operator [MERGEJOIN_59] (rows=696954748 width=88)
-                              Conds:RS_21._col7=RS_72._col0(Inner),Output:["_col0","_col7","_col10"]
+                            PartitionCols:_col3
+                            Merge Join Operator [MERGEJOIN_59] (rows=766650239 width=88)
+                              Conds:RS_21._col0=RS_72._col0(Inner),Output:["_col0","_col3","_col5"]
                             <-Map 10 [SIMPLE_EDGE] vectorized
                               SHUFFLE [RS_72]
                                 PartitionCols:_col0
@@ -174,39 +174,39 @@ Stage-0
                                       default@date_dim,d1,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk"]
                             <-Reducer 3 [SIMPLE_EDGE]
                               SHUFFLE [RS_21]
-                                PartitionCols:_col7
-                                Merge Join Operator [MERGEJOIN_58] (rows=633595212 width=88)
-                                  Conds:RS_18._col1, _col2, _col3=RS_69._col1, _col2, _col4(Inner),Output:["_col0","_col7","_col10"]
+                                PartitionCols:_col0
+                                Merge Join Operator [MERGEJOIN_58] (rows=696954748 width=88)
+                                  Conds:RS_18._col5=RS_69._col0(Inner),Output:["_col0","_col3","_col5"]
                                 <-Map 9 [SIMPLE_EDGE] vectorized
                                   SHUFFLE [RS_69]
-                                    PartitionCols:_col1, _col2, _col4
-                                    Select Operator [SEL_68] (rows=575995635 width=88)
-                                      Output:["_col0","_col1","_col2","_col3","_col4"]
-                                      Filter Operator [FIL_67] (rows=575995635 width=88)
-                                        predicate:(ss_customer_sk is not null and ss_item_sk is not null and ss_sold_date_sk is not null and ss_store_sk is not null and ss_ticket_number is not null)
-                                        TableScan [TS_6] (rows=575995635 width=88)
-                                          default@store_sales,store_sales,Tbl:COMPLETE,Col:NONE,Output:["ss_sold_date_sk","ss_item_sk","ss_customer_sk","ss_store_sk","ss_ticket_number"]
+                                    PartitionCols:_col0
+                                    Select Operator [SEL_68] (rows=18262 width=1119)
+                                      Output:["_col0"]
+                                      Filter Operator [FIL_67] (rows=18262 width=1119)
+                                        predicate:((d_moy = 9) and (d_year = 2000) and d_date_sk is not null)
+                                        TableScan [TS_6] (rows=73049 width=1119)
+                                          default@date_dim,d2,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_moy"]
                                 <-Reducer 2 [SIMPLE_EDGE]
                                   SHUFFLE [RS_18]
-                                    PartitionCols:_col1, _col2, _col3
-                                    Merge Join Operator [MERGEJOIN_57] (rows=63350266 width=77)
-                                      Conds:RS_63._col0=RS_66._col0(Inner),Output:["_col0","_col1","_col2","_col3"]
+                                    PartitionCols:_col5
+                                    Merge Join Operator [MERGEJOIN_57] (rows=633595212 width=88)
+                                      Conds:RS_63._col1, _col2, _col4=RS_66._col1, _col2, _col3(Inner),Output:["_col0","_col3","_col5"]
                                     <-Map 1 [SIMPLE_EDGE] vectorized
                                       SHUFFLE [RS_63]
-                                        PartitionCols:_col0
-                                        Select Operator [SEL_62] (rows=57591150 width=77)
+                                        PartitionCols:_col1, _col2, _col4
+                                        Select Operator [SEL_62] (rows=575995635 width=88)
+                                          Output:["_col0","_col1","_col2","_col3","_col4"]
+                                          Filter Operator [FIL_61] (rows=575995635 width=88)
+                                            predicate:(ss_customer_sk is not null and ss_item_sk is not null and ss_sold_date_sk is not null and ss_store_sk is not null and ss_ticket_number 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_customer_sk","ss_store_sk","ss_ticket_number"]
+                                    <-Map 8 [SIMPLE_EDGE] vectorized
+                                      SHUFFLE [RS_66]
+                                        PartitionCols:_col1, _col2, _col3
+                                        Select Operator [SEL_65] (rows=57591150 width=77)
                                           Output:["_col0","_col1","_col2","_col3"]
-                                          Filter Operator [FIL_61] (rows=57591150 width=77)
+                                          Filter Operator [FIL_64] (rows=57591150 width=77)
                                             predicate:(sr_customer_sk is not null and sr_item_sk is not null and sr_returned_date_sk is not null and sr_ticket_number is not null)
-                                            TableScan [TS_0] (rows=57591150 width=77)
+                                            TableScan [TS_3] (rows=57591150 width=77)
                                               default@store_returns,store_returns,Tbl:COMPLETE,Col:NONE,Output:["sr_returned_date_sk","sr_item_sk","sr_customer_sk","sr_ticket_number"]
-                                    <-Map 8 [SIMPLE_EDGE] vectorized
-                                      SHUFFLE [RS_66]
-                                        PartitionCols:_col0
-                                        Select Operator [SEL_65] (rows=18262 width=1119)
-                                          Output:["_col0"]
-                                          Filter Operator [FIL_64] (rows=18262 width=1119)
-                                            predicate:((d_moy = 9) and (d_year = 2000) and d_date_sk is not null)
-                                            TableScan [TS_3] (rows=73049 width=1119)
-                                              default@date_dim,d2,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_moy"]
 

http://git-wip-us.apache.org/repos/asf/hive/blob/491c9f62/ql/src/test/results/clientpositive/perf/tez/query54.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/tez/query54.q.out b/ql/src/test/results/clientpositive/perf/tez/query54.q.out
index 386ea4b..924cc42 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query54.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query54.q.out
@@ -1,7 +1,7 @@
-Warning: Shuffle Join MERGEJOIN[184][tables = [$hdt$_0, $hdt$_1, $hdt$_2, $hdt$_3]] in Stage 'Reducer 4' is a cross product
-Warning: Shuffle Join MERGEJOIN[185][tables = [$hdt$_0, $hdt$_1, $hdt$_2, $hdt$_3, $hdt$_4]] in Stage 'Reducer 5' is a cross product
-Warning: Shuffle Join MERGEJOIN[183][tables = [$hdt$_1, $hdt$_2]] in Stage 'Reducer 29' is a cross product
-Warning: Shuffle Join MERGEJOIN[186][tables = [$hdt$_1, $hdt$_2, $hdt$_0]] in Stage 'Reducer 6' is a cross product
+Warning: Shuffle Join MERGEJOIN[188][tables = [$hdt$_1, $hdt$_2, $hdt$_3, $hdt$_0, $hdt$_4]] in Stage 'Reducer 5' is a cross product
+Warning: Shuffle Join MERGEJOIN[190][tables = [$hdt$_1, $hdt$_2, $hdt$_3, $hdt$_0, $hdt$_4, $hdt$_5, $hdt$_6]] in Stage 'Reducer 7' is a cross product
+Warning: Shuffle Join MERGEJOIN[191][tables = [$hdt$_1, $hdt$_2]] in Stage 'Reducer 28' is a cross product
+Warning: Shuffle Join MERGEJOIN[192][tables = [$hdt$_1, $hdt$_2, $hdt$_0]] in Stage 'Reducer 8' is a cross product
 PREHOOK: query: explain
 with my_customers as (
  select distinct c_customer_sk
@@ -115,266 +115,266 @@ POSTHOOK: type: QUERY
 Plan optimized by CBO.
 
 Vertex dependency in root stage
-Map 15 <- Union 16 (CONTAINS)
-Map 21 <- Union 16 (CONTAINS)
-Reducer 12 <- Map 11 (SIMPLE_EDGE), Map 14 (SIMPLE_EDGE)
-Reducer 13 <- Reducer 12 (SIMPLE_EDGE), Reducer 20 (SIMPLE_EDGE)
-Reducer 17 <- Map 22 (SIMPLE_EDGE), Union 16 (SIMPLE_EDGE)
-Reducer 18 <- Map 23 (SIMPLE_EDGE), Reducer 17 (SIMPLE_EDGE)
-Reducer 19 <- Map 24 (SIMPLE_EDGE), Reducer 18 (SIMPLE_EDGE)
-Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 10 (SIMPLE_EDGE)
-Reducer 20 <- Reducer 19 (SIMPLE_EDGE)
-Reducer 26 <- Map 25 (SIMPLE_EDGE)
-Reducer 27 <- Reducer 26 (CUSTOM_SIMPLE_EDGE)
-Reducer 28 <- Map 25 (SIMPLE_EDGE)
-Reducer 29 <- Reducer 28 (CUSTOM_SIMPLE_EDGE), Reducer 31 (CUSTOM_SIMPLE_EDGE)
-Reducer 3 <- Reducer 13 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
-Reducer 30 <- Map 25 (SIMPLE_EDGE)
-Reducer 31 <- Reducer 30 (CUSTOM_SIMPLE_EDGE)
-Reducer 4 <- Reducer 27 (CUSTOM_SIMPLE_EDGE), Reducer 3 (CUSTOM_SIMPLE_EDGE)
+Map 13 <- Union 14 (CONTAINS)
+Map 19 <- Union 14 (CONTAINS)
+Reducer 10 <- Reducer 9 (SIMPLE_EDGE)
+Reducer 11 <- Reducer 10 (SIMPLE_EDGE)
+Reducer 15 <- Map 20 (SIMPLE_EDGE), Union 14 (SIMPLE_EDGE)
+Reducer 16 <- Map 21 (SIMPLE_EDGE), Reducer 15 (SIMPLE_EDGE)
+Reducer 17 <- Map 22 (SIMPLE_EDGE), Reducer 16 (SIMPLE_EDGE)
+Reducer 18 <- Reducer 17 (SIMPLE_EDGE)
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 12 (SIMPLE_EDGE)
+Reducer 25 <- Map 24 (SIMPLE_EDGE)
+Reducer 26 <- Reducer 25 (CUSTOM_SIMPLE_EDGE)
+Reducer 27 <- Map 24 (SIMPLE_EDGE)
+Reducer 28 <- Reducer 27 (CUSTOM_SIMPLE_EDGE), Reducer 30 (CUSTOM_SIMPLE_EDGE)
+Reducer 29 <- Map 24 (SIMPLE_EDGE)
+Reducer 3 <- Reducer 18 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 30 <- Reducer 29 (CUSTOM_SIMPLE_EDGE)
+Reducer 4 <- Map 23 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
 Reducer 5 <- Reducer 26 (CUSTOM_SIMPLE_EDGE), Reducer 4 (CUSTOM_SIMPLE_EDGE)
-Reducer 6 <- Reducer 29 (CUSTOM_SIMPLE_EDGE), Reducer 5 (CUSTOM_SIMPLE_EDGE)
-Reducer 7 <- Reducer 6 (SIMPLE_EDGE)
-Reducer 8 <- Reducer 7 (SIMPLE_EDGE)
+Reducer 6 <- Map 31 (SIMPLE_EDGE), Reducer 5 (SIMPLE_EDGE)
+Reducer 7 <- Reducer 25 (CUSTOM_SIMPLE_EDGE), Reducer 6 (CUSTOM_SIMPLE_EDGE)
+Reducer 8 <- Reducer 28 (CUSTOM_SIMPLE_EDGE), Reducer 7 (CUSTOM_SIMPLE_EDGE)
 Reducer 9 <- Reducer 8 (SIMPLE_EDGE)
 
 Stage-0
   Fetch Operator
     limit:100
     Stage-1
-      Reducer 9 vectorized
-      File Output Operator [FS_259]
-        Limit [LIM_258] (rows=100 width=158)
+      Reducer 11 vectorized
+      File Output Operator [FS_265]
+        Limit [LIM_264] (rows=100 width=158)
           Number of rows:100
-          Select Operator [SEL_257] (rows=1614130953450400 width=158)
+          Select Operator [SEL_263] (rows=1614130953450400 width=158)
             Output:["_col0","_col1","_col2"]
-          <-Reducer 8 [SIMPLE_EDGE] vectorized
-            SHUFFLE [RS_256]
-              Select Operator [SEL_255] (rows=1614130953450400 width=158)
+          <-Reducer 10 [SIMPLE_EDGE] vectorized
+            SHUFFLE [RS_262]
+              Select Operator [SEL_261] (rows=1614130953450400 width=158)
                 Output:["_col0","_col1","_col2"]
-                Group By Operator [GBY_254] (rows=1614130953450400 width=158)
+                Group By Operator [GBY_260] (rows=1614130953450400 width=158)
                   Output:["_col0","_col1"],aggregations:["count(VALUE._col0)"],keys:KEY._col0
-                <-Reducer 7 [SIMPLE_EDGE] vectorized
-                  SHUFFLE [RS_253]
+                <-Reducer 9 [SIMPLE_EDGE] vectorized
+                  SHUFFLE [RS_259]
                     PartitionCols:_col0
-                    Group By Operator [GBY_252] (rows=3228261906900801 width=158)
+                    Group By Operator [GBY_258] (rows=3228261906900801 width=158)
                       Output:["_col0","_col1"],aggregations:["count()"],keys:_col0
-                      Select Operator [SEL_251] (rows=3228261906900801 width=158)
+                      Select Operator [SEL_257] (rows=3228261906900801 width=158)
                         Output:["_col0"]
-                        Group By Operator [GBY_250] (rows=3228261906900801 width=158)
+                        Group By Operator [GBY_256] (rows=3228261906900801 width=158)
                           Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0
-                        <-Reducer 6 [SIMPLE_EDGE]
-                          SHUFFLE [RS_119]
+                        <-Reducer 8 [SIMPLE_EDGE]
+                          SHUFFLE [RS_118]
                             PartitionCols:_col0
-                            Group By Operator [GBY_118] (rows=6456523813801603 width=158)
+                            Group By Operator [GBY_117] (rows=6456523813801603 width=158)
                               Output:["_col0","_col1"],aggregations:["sum(_col4)"],keys:_col0
-                              Select Operator [SEL_117] (rows=6456523813801603 width=158)
+                              Select Operator [SEL_116] (rows=6456523813801603 width=158)
                                 Output:["_col0","_col4"]
-                                Filter Operator [FIL_116] (rows=6456523813801603 width=158)
+                                Filter Operator [FIL_115] (rows=6456523813801603 width=158)
                                   predicate:_col11 BETWEEN _col13 AND _col15
-                                  Select Operator [SEL_115] (rows=58108714324214428 width=158)
+                                  Select Operator [SEL_114] (rows=58108714324214428 width=158)
                                     Output:["_col0","_col4","_col11","_col13","_col15"]
-                                    Merge Join Operator [MERGEJOIN_186] (rows=58108714324214428 width=158)
+                                    Merge Join Operator [MERGEJOIN_192] (rows=58108714324214428 width=158)
                                       Conds:(Inner),Output:["_col0","_col2","_col6","_col13","_col15"]
-                                    <-Reducer 29 [CUSTOM_SIMPLE_EDGE]
-                                      PARTITION_ONLY_SHUFFLE [RS_112]
-                                        Merge Join Operator [MERGEJOIN_183] (rows=9131 width=1128)
+                                    <-Reducer 28 [CUSTOM_SIMPLE_EDGE]
+                                      PARTITION_ONLY_SHUFFLE [RS_111]
+                                        Merge Join Operator [MERGEJOIN_191] (rows=9131 width=1128)
                                           Conds:(Right Outer),Output:["_col0"]
-                                        <-Reducer 28 [CUSTOM_SIMPLE_EDGE] vectorized
-                                          PARTITION_ONLY_SHUFFLE [RS_241]
-                                            Group By Operator [GBY_240] (rows=9131 width=1119)
+                                        <-Reducer 27 [CUSTOM_SIMPLE_EDGE] vectorized
+                                          PARTITION_ONLY_SHUFFLE [RS_247]
+                                            Group By Operator [GBY_246] (rows=9131 width=1119)
                                               Output:["_col0"],keys:KEY._col0
-                                            <-Map 25 [SIMPLE_EDGE] vectorized
-                                              SHUFFLE [RS_229]
+                                            <-Map 24 [SIMPLE_EDGE] vectorized
+                                              SHUFFLE [RS_232]
                                                 PartitionCols:_col0
-                                                Group By Operator [GBY_226] (rows=18262 width=1119)
+                                                Group By Operator [GBY_229] (rows=18262 width=1119)
                                                   Output:["_col0"],keys:_col0
-                                                  Select Operator [SEL_223] (rows=18262 width=1119)
+                                                  Select Operator [SEL_226] (rows=18262 width=1119)
                                                     Output:["_col0"]
-                                                    Filter Operator [FIL_221] (rows=18262 width=1119)
+                                                    Filter Operator [FIL_224] (rows=18262 width=1119)
                                                       predicate:((d_moy = 3) and (d_year = 1999))
-                                                      TableScan [TS_73] (rows=73049 width=1119)
+                                                      TableScan [TS_63] (rows=73049 width=1119)
                                                         default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_month_seq","d_year","d_moy"]
-                                        <-Reducer 31 [CUSTOM_SIMPLE_EDGE] vectorized
-                                          PARTITION_ONLY_SHUFFLE [RS_249]
-                                            Select Operator [SEL_248] (rows=1 width=8)
-                                              Filter Operator [FIL_247] (rows=1 width=8)
+                                        <-Reducer 30 [CUSTOM_SIMPLE_EDGE] vectorized
+                                          PARTITION_ONLY_SHUFFLE [RS_255]
+                                            Select Operator [SEL_254] (rows=1 width=8)
+                                              Filter Operator [FIL_253] (rows=1 width=8)
                                                 predicate:(sq_count_check(_col0) <= 1)
-                                                Group By Operator [GBY_246] (rows=1 width=8)
+                                                Group By Operator [GBY_252] (rows=1 width=8)
                                                   Output:["_col0"],aggregations:["count(VALUE._col0)"]
-                                                <-Reducer 30 [CUSTOM_SIMPLE_EDGE] vectorized
-                                                  PARTITION_ONLY_SHUFFLE [RS_245]
-                                                    Group By Operator [GBY_244] (rows=1 width=8)
+                                                <-Reducer 29 [CUSTOM_SIMPLE_EDGE] vectorized
+                                                  PARTITION_ONLY_SHUFFLE [RS_251]
+                                                    Group By Operator [GBY_250] (rows=1 width=8)
                                                       Output:["_col0"],aggregations:["count()"]
-                                                      Select Operator [SEL_243] (rows=9131 width=1119)
-                                                        Group By Operator [GBY_242] (rows=9131 width=1119)
+                                                      Select Operator [SEL_249] (rows=9131 width=1119)
+                                                        Group By Operator [GBY_248] (rows=9131 width=1119)
                                                           Output:["_col0"],keys:KEY._col0
-                                                        <-Map 25 [SIMPLE_EDGE] vectorized
-                                                          SHUFFLE [RS_230]
+                                                        <-Map 24 [SIMPLE_EDGE] vectorized
+                                                          SHUFFLE [RS_233]
                                                             PartitionCols:_col0
-                                                            Group By Operator [GBY_227] (rows=18262 width=1119)
+                                                            Group By Operator [GBY_230] (rows=18262 width=1119)
                                                               Output:["_col0"],keys:_col0
-                                                              Select Operator [SEL_224] (rows=18262 width=1119)
+                                                              Select Operator [SEL_227] (rows=18262 width=1119)
                                                                 Output:["_col0"]
-                                                                 Please refer to the previous Filter Operator [FIL_221]
-                                    <-Reducer 5 [CUSTOM_SIMPLE_EDGE]
-                                      PARTITION_ONLY_SHUFFLE [RS_113]
-                                        Select Operator [SEL_108] (rows=6363893803988 width=1217)
+                                                                 Please refer to the previous Filter Operator [FIL_224]
+                                    <-Reducer 7 [CUSTOM_SIMPLE_EDGE]
+                                      PARTITION_ONLY_SHUFFLE [RS_112]
+                                        Select Operator [SEL_107] (rows=6363893803988 width=1217)
                                           Output:["_col0","_col4","_col11","_col13"]
-                                          Merge Join Operator [MERGEJOIN_185] (rows=6363893803988 width=1217)
-                                            Conds:(Left Outer),Output:["_col2","_col4","_col10","_col13"]
-                                          <-Reducer 26 [CUSTOM_SIMPLE_EDGE] vectorized
-                                            PARTITION_ONLY_SHUFFLE [RS_233]
-                                              Group By Operator [GBY_231] (rows=9131 width=1119)
+                                          Merge Join Operator [MERGEJOIN_190] (rows=6363893803988 width=1217)
+                                            Conds:(Left Outer),Output:["_col5","_col9","_col12","_col13"]
+                                          <-Reducer 25 [CUSTOM_SIMPLE_EDGE] vectorized
+                                            PARTITION_ONLY_SHUFFLE [RS_236]
+                                              Group By Operator [GBY_234] (rows=9131 width=1119)
                                                 Output:["_col0"],keys:KEY._col0
-                                              <-Map 25 [SIMPLE_EDGE] vectorized
-                                                SHUFFLE [RS_228]
+                                              <-Map 24 [SIMPLE_EDGE] vectorized
+                                                SHUFFLE [RS_231]
                                                   PartitionCols:_col0
-                                                  Group By Operator [GBY_225] (rows=18262 width=1119)
+                                                  Group By Operator [GBY_228] (rows=18262 width=1119)
                                                     Output:["_col0"],keys:_col0
-                                                    Select Operator [SEL_222] (rows=18262 width=1119)
+                                                    Select Operator [SEL_225] (rows=18262 width=1119)
                                                       Output:["_col0"]
-                                                       Please refer to the previous Filter Operator [FIL_221]
-                                          <-Reducer 4 [CUSTOM_SIMPLE_EDGE]
-                                            PARTITION_ONLY_SHUFFLE [RS_105]
-                                              Merge Join Operator [MERGEJOIN_184] (rows=696954748 width=97)
-                                                Conds:(Inner),Output:["_col2","_col4","_col10"]
-                                              <-Reducer 27 [CUSTOM_SIMPLE_EDGE] vectorized
-                                                PARTITION_ONLY_SHUFFLE [RS_239]
-                                                  Select Operator [SEL_238] (rows=1 width=8)
-                                                    Filter Operator [FIL_237] (rows=1 width=8)
-                                                      predicate:(sq_count_check(_col0) <= 1)
-                                                      Group By Operator [GBY_236] (rows=1 width=8)
-                                                        Output:["_col0"],aggregations:["count(VALUE._col0)"]
-                                                      <-Reducer 26 [CUSTOM_SIMPLE_EDGE] vectorized
-                                                        PARTITION_ONLY_SHUFFLE [RS_235]
-                                                          Group By Operator [GBY_234] (rows=1 width=8)
-                                                            Output:["_col0"],aggregations:["count()"]
-                                                            Select Operator [SEL_232] (rows=9131 width=1119)
-                                                               Please refer to the previous Group By Operator [GBY_231]
-                                              <-Reducer 3 [CUSTOM_SIMPLE_EDGE]
-                                                PARTITION_ONLY_SHUFFLE [RS_102]
-                                                  Merge Join Operator [MERGEJOIN_182] (rows=696954748 width=88)
-                                                    Conds:RS_99._col1=RS_100._col5(Inner),Output:["_col2","_col4","_col10"]
-                                                  <-Reducer 13 [SIMPLE_EDGE]
-                                                    SHUFFLE [RS_100]
-                                                      PartitionCols:_col5
-                                                      Merge Join Operator [MERGEJOIN_181] (rows=316240138 width=135)
-                                                        Conds:RS_69._col0=RS_220._col1(Inner),Output:["_col5"]
-                                                      <-Reducer 12 [SIMPLE_EDGE]
-                                                        SHUFFLE [RS_69]
-                                                          PartitionCols:_col0
-                                                          Merge Join Operator [MERGEJOIN_177] (rows=44000000 width=1014)
-                                                            Conds:RS_205._col1, _col2=RS_208._col0, _col1(Inner),Output:["_col0"]
-                                                          <-Map 11 [SIMPLE_EDGE] vectorized
-                                                            SHUFFLE [RS_205]
-                                                              PartitionCols:_col1, _col2
-                                                              Select Operator [SEL_204] (rows=40000000 width=1014)
-                                                                Output:["_col0","_col1","_col2"]
-                                                                Filter Operator [FIL_203] (rows=40000000 width=1014)
-                                                                  predicate:(ca_address_sk is not null and ca_county is not null and ca_state is not null)
-                                                                  TableScan [TS_29] (rows=40000000 width=1014)
-                                                                    default@customer_address,customer_address,Tbl:COMPLETE,Col:NONE,Output:["ca_address_sk","ca_county","ca_state"]
-                                                          <-Map 14 [SIMPLE_EDGE] vectorized
-                                                            SHUFFLE [RS_208]
-                                                              PartitionCols:_col0, _col1
-                                                              Select Operator [SEL_207] (rows=1704 width=1910)
-                                                                Output:["_col0","_col1"]
-                                                                Filter Operator [FIL_206] (rows=1704 width=1910)
-                                                                  predicate:(s_county is not null and s_state is not null)
-                                                                  TableScan [TS_32] (rows=1704 width=1910)
-                                                                    default@store,store,Tbl:COMPLETE,Col:NONE,Output:["s_county","s_state"]
-                                                      <-Reducer 20 [SIMPLE_EDGE] vectorized
-                                                        SHUFFLE [RS_220]
+                                                       Please refer to the previous Filter Operator [FIL_224]
+                                          <-Reducer 6 [CUSTOM_SIMPLE_EDGE]
+                                            PARTITION_ONLY_SHUFFLE [RS_104]
+                                              Merge Join Operator [MERGEJOIN_189] (rows=696954748 width=97)
+                                                Conds:RS_101._col7=RS_245._col0(Inner),Output:["_col5","_col9","_col12"]
+                                              <-Map 31 [SIMPLE_EDGE] vectorized
+                                                SHUFFLE [RS_245]
+                                                  PartitionCols:_col0
+                                                  Select Operator [SEL_244] (rows=73049 width=1119)
+                                                    Output:["_col0","_col1"]
+                                                    Filter Operator [FIL_243] (rows=73049 width=1119)
+                                                      predicate:d_date_sk is not null
+                                                      TableScan [TS_78] (rows=73049 width=1119)
+                                                        default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_month_seq"]
+                                              <-Reducer 5 [SIMPLE_EDGE]
+                                                SHUFFLE [RS_101]
+                                                  PartitionCols:_col7
+                                                  Merge Join Operator [MERGEJOIN_188] (rows=633595212 width=97)
+                                                    Conds:(Inner),Output:["_col5","_col7","_col9"]
+                                                  <-Reducer 26 [CUSTOM_SIMPLE_EDGE] vectorized
+                                                    PARTITION_ONLY_SHUFFLE [RS_242]
+                                                      Select Operator [SEL_241] (rows=1 width=8)
+                                                        Filter Operator [FIL_240] (rows=1 width=8)
+                                                          predicate:(sq_count_check(_col0) <= 1)
+                                                          Group By Operator [GBY_239] (rows=1 width=8)
+                                                            Output:["_col0"],aggregations:["count(VALUE._col0)"]
+                                                          <-Reducer 25 [CUSTOM_SIMPLE_EDGE] vectorized
+                                                            PARTITION_ONLY_SHUFFLE [RS_238]
+                                                              Group By Operator [GBY_237] (rows=1 width=8)
+                                                                Output:["_col0"],aggregations:["count()"]
+                                                                Select Operator [SEL_235] (rows=9131 width=1119)
+                                                                   Please refer to the previous Group By Operator [GBY_234]
+                                                  <-Reducer 4 [CUSTOM_SIMPLE_EDGE]
+                                                    PARTITION_ONLY_SHUFFLE [RS_98]
+                                                      Merge Join Operator [MERGEJOIN_187] (rows=633595212 width=88)
+                                                        Conds:RS_95._col5=RS_223._col1(Inner),Output:["_col5","_col7","_col9"]
+                                                      <-Map 23 [SIMPLE_EDGE] vectorized
+                                                        SHUFFLE [RS_223]
                                                           PartitionCols:_col1
-                                                          Select Operator [SEL_219] (rows=287491029 width=135)
-                                                            Output:["_col0","_col1"]
-                                                            Group By Operator [GBY_218] (rows=287491029 width=135)
-                                                              Output:["_col0","_col1"],keys:KEY._col0, KEY._col1
-                                                            <-Reducer 19 [SIMPLE_EDGE]
-                                                              SHUFFLE [RS_63]
-                                                                PartitionCols:_col0, _col1
-                                                                Group By Operator [GBY_62] (rows=574982058 width=135)
-                                                                  Output:["_col0","_col1"],keys:_col10, _col9
-                                                                  Merge Join Operator [MERGEJOIN_180] (rows=574982058 width=135)
-                                                                    Conds:RS_58._col1=RS_217._col0(Inner),Output:["_col9","_col10"]
-                                                                  <-Map 24 [SIMPLE_EDGE] vectorized
-                                                                    SHUFFLE [RS_217]
-                                                                      PartitionCols:_col0
-                                                                      Select Operator [SEL_216] (rows=80000000 width=860)
-                                                                        Output:["_col0","_col1"]
-                                                                        Filter Operator [FIL_215] (rows=80000000 width=860)
-                                                                          predicate:(c_current_addr_sk is not null and c_customer_sk is not null)
-                                                                          TableScan [TS_49] (rows=80000000 width=860)
-                                                                            default@customer,customer,Tbl:COMPLETE,Col:NONE,Output:["c_customer_sk","c_current_addr_sk"]
-                                                                  <-Reducer 18 [SIMPLE_EDGE]
-                                                                    SHUFFLE [RS_58]
-                                                                      PartitionCols:_col1
-                                                                      Merge Join Operator [MERGEJOIN_179] (rows=522710951 width=135)
-                                                                        Conds:RS_55._col2=RS_214._col0(Inner),Output:["_col1"]
-                                                                      <-Map 23 [SIMPLE_EDGE] vectorized
-                                                                        SHUFFLE [RS_214]
-                                                                          PartitionCols:_col0
-                                                                          Select Operator [SEL_213] (rows=115500 width=1436)
-                                                                            Output:["_col0"]
-                                                                            Filter Operator [FIL_212] (rows=115500 width=1436)
-                                                                              predicate:((i_category = 'Jewelry') and (i_class = 'consignment') and i_item_sk is not null)
-                                                                              TableScan [TS_46] (rows=462000 width=1436)
-                                                                                default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_class","i_category"]
-                                                                      <-Reducer 17 [SIMPLE_EDGE]
-                                                                        SHUFFLE [RS_55]
-                                                                          PartitionCols:_col2
-                                                                          Merge Join Operator [MERGEJOIN_178] (rows=475191764 width=135)
-                                                                            Conds:Union 16._col0=RS_211._col0(Inner),Output:["_col1","_col2"]
-                                                                          <-Map 22 [SIMPLE_EDGE] vectorized
-                                                                            SHUFFLE [RS_211]
-                                                                              PartitionCols:_col0
-                                                                              Select Operator [SEL_210] (rows=18262 width=1119)
-                                                                                Output:["_col0"]
-                                                                                Filter Operator [FIL_209] (rows=18262 width=1119)
-                                                                                  predicate:((d_moy = 3) and (d_year = 1999) and d_date_sk is not null)
-                                                                                  TableScan [TS_43] (rows=73049 width=1119)
-                                                                                    default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_moy"]
-                                                                          <-Union 16 [SIMPLE_EDGE]
-                                                                            <-Map 15 [CONTAINS] vectorized
-                                                                              Reduce Output Operator [RS_262]
-                                                                                PartitionCols:_col0
-                                                                                Select Operator [SEL_261] (rows=287989836 width=135)
-                                                                                  Output:["_col0","_col1","_col2"]
-                                                                                  Filter Operator [FIL_260] (rows=287989836 width=135)
-                                                                                    predicate:(cs_bill_customer_sk is not null and cs_item_sk is not null and cs_sold_date_sk is not null)
-                                                                                    TableScan [TS_187] (rows=287989836 width=135)
-                                                                                      Output:["cs_sold_date_sk","cs_bill_customer_sk","cs_item_sk"]
-                                                                            <-Map 21 [CONTAINS] vectorized
-                                                                              Reduce Output Operator [RS_265]
-                                                                                PartitionCols:_col0
-                                                                                Select Operator [SEL_264] (rows=144002668 width=135)
-                                                                                  Output:["_col0","_col1","_col2"]
-                                                                                  Filter Operator [FIL_263] (rows=144002668 width=135)
-                                                                                    predicate:(ws_bill_customer_sk is not null and ws_item_sk is not null and ws_sold_date_sk is not null)
-                                                                                    TableScan [TS_192] (rows=144002668 width=135)
-                                                                                      Output:["ws_sold_date_sk","ws_item_sk","ws_bill_customer_sk"]
-                                                  <-Reducer 2 [SIMPLE_EDGE]
-                                                    SHUFFLE [RS_99]
-                                                      PartitionCols:_col1
-                                                      Merge Join Operator [MERGEJOIN_176] (rows=633595212 width=88)
-                                                        Conds:RS_199._col0=RS_202._col0(Inner),Output:["_col1","_col2","_col4"]
-                                                      <-Map 1 [SIMPLE_EDGE] vectorized
-                                                        SHUFFLE [RS_199]
-                                                          PartitionCols:_col0
-                                                          Select Operator [SEL_198] (rows=575995635 width=88)
+                                                          Select Operator [SEL_222] (rows=575995635 width=88)
                                                             Output:["_col0","_col1","_col2"]
-                                                            Filter Operator [FIL_197] (rows=575995635 width=88)
+                                                            Filter Operator [FIL_221] (rows=575995635 width=88)
                                                               predicate:(ss_customer_sk is not null and ss_sold_date_sk is not null)
-                                                              TableScan [TS_23] (rows=575995635 width=88)
+                                                              TableScan [TS_60] (rows=575995635 width=88)
                                                                 default@store_sales,store_sales,Tbl:COMPLETE,Col:NONE,Output:["ss_sold_date_sk","ss_customer_sk","ss_ext_sales_price"]
-                                                      <-Map 10 [SIMPLE_EDGE] vectorized
-                                                        SHUFFLE [RS_202]
-                                                          PartitionCols:_col0
-                                                          Select Operator [SEL_201] (rows=73049 width=1119)
-                                                            Output:["_col0","_col1"]
-                                                            Filter Operator [FIL_200] (rows=73049 width=1119)
-                                                              predicate:d_date_sk is not null
-                                                              TableScan [TS_26] (rows=73049 width=1119)
-                                                                default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_month_seq"]
+                                                      <-Reducer 3 [SIMPLE_EDGE]
+                                                        SHUFFLE [RS_95]
+                                                          PartitionCols:_col5
+                                                          Merge Join Operator [MERGEJOIN_186] (rows=316240138 width=135)
+                                                            Conds:RS_92._col0=RS_220._col1(Inner),Output:["_col5"]
+                                                          <-Reducer 18 [SIMPLE_EDGE] vectorized
+                                                            SHUFFLE [RS_220]
+                                                              PartitionCols:_col1
+                                                              Select Operator [SEL_219] (rows=287491029 width=135)
+                                                                Output:["_col0","_col1"]
+                                                                Group By Operator [GBY_218] (rows=287491029 width=135)
+                                                                  Output:["_col0","_col1"],keys:KEY._col0, KEY._col1
+                                                                <-Reducer 17 [SIMPLE_EDGE]
+                                                                  SHUFFLE [RS_57]
+                                                                    PartitionCols:_col0, _col1
+                                                                    Group By Operator [GBY_56] (rows=574982058 width=135)
+                                                                      Output:["_col0","_col1"],keys:_col10, _col9
+                                                                      Merge Join Operator [MERGEJOIN_185] (rows=574982058 width=135)
+                                                                        Conds:RS_52._col1=RS_217._col0(Inner),Output:["_col9","_col10"]
+                                                                      <-Map 22 [SIMPLE_EDGE] vectorized
+                                                                        SHUFFLE [RS_217]
+                                                                          PartitionCols:_col0
+                                                                          Select Operator [SEL_216] (rows=80000000 width=860)
+                                                                            Output:["_col0","_col1"]
+                                                                            Filter Operator [FIL_215] (rows=80000000 width=860)
+                                                                              predicate:(c_current_addr_sk is not null and c_customer_sk is not null)
+                                                                              TableScan [TS_43] (rows=80000000 width=860)
+                                                                                default@customer,customer,Tbl:COMPLETE,Col:NONE,Output:["c_customer_sk","c_current_addr_sk"]
+                                                                      <-Reducer 16 [SIMPLE_EDGE]
+                                                                        SHUFFLE [RS_52]
+                                                                          PartitionCols:_col1
+                                                                          Merge Join Operator [MERGEJOIN_184] (rows=522710951 width=135)
+                                                                            Conds:RS_49._col2=RS_214._col0(Inner),Output:["_col1"]
+                                                                          <-Map 21 [SIMPLE_EDGE] vectorized
+                                                                            SHUFFLE [RS_214]
+                                                                              PartitionCols:_col0
+                                                                              Select Operator [SEL_213] (rows=115500 width=1436)
+                                                                                Output:["_col0"]
+                                                                                Filter Operator [FIL_212] (rows=115500 width=1436)
+                                                                                  predicate:((i_category = 'Jewelry') and (i_class = 'consignment') and i_item_sk is not null)
+                                                                                  TableScan [TS_40] (rows=462000 width=1436)
+                                                                                    default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_class","i_category"]
+                                                                          <-Reducer 15 [SIMPLE_EDGE]
+                                                                            SHUFFLE [RS_49]
+                                                                              PartitionCols:_col2
+                                                                              Merge Join Operator [MERGEJOIN_183] (rows=475191764 width=135)
+                                                                                Conds:Union 14._col0=RS_211._col0(Inner),Output:["_col1","_col2"]
+                                                                              <-Map 20 [SIMPLE_EDGE] vectorized
+                                                                                SHUFFLE [RS_211]
+                                                                                  PartitionCols:_col0
+                                                                                  Select Operator [SEL_210] (rows=18262 width=1119)
+                                                                                    Output:["_col0"]
+                                                                                    Filter Operator [FIL_209] (rows=18262 width=1119)
+                                                                                      predicate:((d_moy = 3) and (d_year = 1999) and d_date_sk is not null)
+                                                                                      TableScan [TS_37] (rows=73049 width=1119)
+                                                                                        default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_moy"]
+                                                                              <-Union 14 [SIMPLE_EDGE]
+                                                                                <-Map 13 [CONTAINS] vectorized
+                                                                                  Reduce Output Operator [RS_268]
+                                                                                    PartitionCols:_col0
+                                                                                    Select Operator [SEL_267] (rows=287989836 width=135)
+                                                                                      Output:["_col0","_col1","_col2"]
+                                                                                      Filter Operator [FIL_266] (rows=287989836 width=135)
+                                                                                        predicate:(cs_bill_customer_sk is not null and cs_item_sk is not null and cs_sold_date_sk is not null)
+                                                                                        TableScan [TS_193] (rows=287989836 width=135)
+                                                                                          Output:["cs_sold_date_sk","cs_bill_customer_sk","cs_item_sk"]
+                                                                                <-Map 19 [CONTAINS] vectorized
+                                                                                  Reduce Output Operator [RS_271]
+                                                                                    PartitionCols:_col0
+                                                                                    Select Operator [SEL_270] (rows=144002668 width=135)
+                                                                                      Output:["_col0","_col1","_col2"]
+                                                                                      Filter Operator [FIL_269] (rows=144002668 width=135)
+                                                                                        predicate:(ws_bill_customer_sk is not null and ws_item_sk is not null and ws_sold_date_sk is not null)
+                                                                                        TableScan [TS_198] (rows=144002668 width=135)
+                                                                                          Output:["ws_sold_date_sk","ws_item_sk","ws_bill_customer_sk"]
+                                                          <-Reducer 2 [SIMPLE_EDGE]
+                                                            SHUFFLE [RS_92]
+                                                              PartitionCols:_col0
+                                                              Merge Join Operator [MERGEJOIN_182] (rows=44000000 width=1014)
+                                                                Conds:RS_205._col1, _col2=RS_208._col0, _col1(Inner),Output:["_col0"]
+                                                              <-Map 1 [SIMPLE_EDGE] vectorized
+                                                                SHUFFLE [RS_205]
+                                                                  PartitionCols:_col1, _col2
+                                                                  Select Operator [SEL_204] (rows=40000000 width=1014)
+                                                                    Output:["_col0","_col1","_col2"]
+                                                                    Filter Operator [FIL_203] (rows=40000000 width=1014)
+                                                                      predicate:(ca_address_sk is not null and ca_county is not null and ca_state is not null)
+                                                                      TableScan [TS_23] (rows=40000000 width=1014)
+                                                                        default@customer_address,customer_address,Tbl:COMPLETE,Col:NONE,Output:["ca_address_sk","ca_county","ca_state"]
+                                                              <-Map 12 [SIMPLE_EDGE] vectorized
+                                                                SHUFFLE [RS_208]
+                                                                  PartitionCols:_col0, _col1
+                                                                  Select Operator [SEL_207] (rows=1704 width=1910)
+                                                                    Output:["_col0","_col1"]
+                                                                    Filter Operator [FIL_206] (rows=1704 width=1910)
+                                                                      predicate:(s_county is not null and s_state is not null)
+                                                                      TableScan [TS_26] (rows=1704 width=1910)
+                                                                        default@store,store,Tbl:COMPLETE,Col:NONE,Output:["s_county","s_state"]