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/07/19 21:24:16 UTC

[03/13] hive git commit: HIVE-17896: TopNKey: Create a standalone vectorizable TopNKey operator (Teddy Choi, reviewed by Jesus Camacho Rodriguez)

http://git-wip-us.apache.org/repos/asf/hive/blob/cc294d32/ql/src/test/results/clientpositive/perf/tez/query76.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/tez/query76.q.out b/ql/src/test/results/clientpositive/perf/tez/query76.q.out
index fca3bd7..c65332e 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query76.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query76.q.out
@@ -61,127 +61,133 @@ Stage-0
     limit:100
     Stage-1
       Reducer 6 vectorized
-      File Output Operator [FS_119]
-        Limit [LIM_118] (rows=100 width=108)
+      File Output Operator [FS_123]
+        Limit [LIM_122] (rows=100 width=108)
           Number of rows:100
-          Select Operator [SEL_117] (rows=304916424 width=108)
+          Select Operator [SEL_121] (rows=304916424 width=108)
             Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
           <-Reducer 5 [SIMPLE_EDGE] vectorized
-            SHUFFLE [RS_116]
-              Group By Operator [GBY_115] (rows=304916424 width=108)
+            SHUFFLE [RS_120]
+              Group By Operator [GBY_119] (rows=304916424 width=108)
                 Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"],aggregations:["count(VALUE._col0)","sum(VALUE._col1)"],keys:KEY._col0, KEY._col1, KEY._col2, KEY._col3, KEY._col4
               <-Union 4 [SIMPLE_EDGE]
                 <-Reducer 10 [CONTAINS]
-                  Reduce Output Operator [RS_103]
+                  Reduce Output Operator [RS_107]
                     PartitionCols:_col0, _col1, _col2, _col3, _col4
-                    Group By Operator [GBY_102] (rows=609832848 width=108)
+                    Group By Operator [GBY_106] (rows=609832848 width=108)
                       Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"],aggregations:["count()","sum(_col5)"],keys:_col0, _col1, _col2, _col3, _col4
-                      Select Operator [SEL_100] (rows=174233858 width=135)
-                        Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
-                        Merge Join Operator [MERGEJOIN_99] (rows=174233858 width=135)
-                          Conds:RS_45._col0=RS_131._col0(Inner),Output:["_col3","_col5","_col7","_col8"]
-                        <-Map 16 [SIMPLE_EDGE] vectorized
-                          SHUFFLE [RS_131]
-                            PartitionCols:_col0
-                            Select Operator [SEL_130] (rows=73049 width=1119)
-                              Output:["_col0","_col1","_col2"]
-                              Filter Operator [FIL_129] (rows=73049 width=1119)
-                                predicate:d_date_sk is not null
-                                TableScan [TS_39] (rows=73049 width=1119)
-                                  default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_qoy"]
-                        <-Reducer 9 [SIMPLE_EDGE]
-                          SHUFFLE [RS_45]
-                            PartitionCols:_col0
-                            Merge Join Operator [MERGEJOIN_87] (rows=158394413 width=135)
-                              Conds:RS_128._col2=RS_108._col0(Inner),Output:["_col0","_col3","_col5"]
-                            <-Map 1 [SIMPLE_EDGE] vectorized
-                              SHUFFLE [RS_108]
-                                PartitionCols:_col0
-                                Select Operator [SEL_105] (rows=462000 width=1436)
-                                  Output:["_col0","_col1"]
-                                  Filter Operator [FIL_104] (rows=462000 width=1436)
-                                    predicate:i_item_sk is not null
-                                    TableScan [TS_0] (rows=462000 width=1436)
-                                      default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_category"]
-                            <-Map 15 [SIMPLE_EDGE] vectorized
-                              SHUFFLE [RS_128]
-                                PartitionCols:_col2
-                                Select Operator [SEL_127] (rows=143994918 width=135)
-                                  Output:["_col0","_col2","_col3"]
-                                  Filter Operator [FIL_126] (rows=143994918 width=135)
-                                    predicate:(cs_item_sk is not null and cs_sold_date_sk is not null and cs_warehouse_sk is null)
-                                    TableScan [TS_33] (rows=287989836 width=135)
-                                      default@catalog_sales,catalog_sales,Tbl:COMPLETE,Col:NONE,Output:["cs_sold_date_sk","cs_warehouse_sk","cs_item_sk","cs_ext_sales_price"]
+                      Top N Key Operator [TNK_105] (rows=609832848 width=108)
+                        keys:_col0, _col1, _col2, _col3, _col4,sort order:+++++,top n:100
+                        Select Operator [SEL_103] (rows=174233858 width=135)
+                          Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
+                          Merge Join Operator [MERGEJOIN_102] (rows=174233858 width=135)
+                            Conds:RS_45._col0=RS_135._col0(Inner),Output:["_col3","_col5","_col7","_col8"]
+                          <-Map 16 [SIMPLE_EDGE] vectorized
+                            SHUFFLE [RS_135]
+                              PartitionCols:_col0
+                              Select Operator [SEL_134] (rows=73049 width=1119)
+                                Output:["_col0","_col1","_col2"]
+                                Filter Operator [FIL_133] (rows=73049 width=1119)
+                                  predicate:d_date_sk is not null
+                                  TableScan [TS_39] (rows=73049 width=1119)
+                                    default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_qoy"]
+                          <-Reducer 9 [SIMPLE_EDGE]
+                            SHUFFLE [RS_45]
+                              PartitionCols:_col0
+                              Merge Join Operator [MERGEJOIN_88] (rows=158394413 width=135)
+                                Conds:RS_132._col2=RS_112._col0(Inner),Output:["_col0","_col3","_col5"]
+                              <-Map 1 [SIMPLE_EDGE] vectorized
+                                SHUFFLE [RS_112]
+                                  PartitionCols:_col0
+                                  Select Operator [SEL_109] (rows=462000 width=1436)
+                                    Output:["_col0","_col1"]
+                                    Filter Operator [FIL_108] (rows=462000 width=1436)
+                                      predicate:i_item_sk is not null
+                                      TableScan [TS_0] (rows=462000 width=1436)
+                                        default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_category"]
+                              <-Map 15 [SIMPLE_EDGE] vectorized
+                                SHUFFLE [RS_132]
+                                  PartitionCols:_col2
+                                  Select Operator [SEL_131] (rows=143994918 width=135)
+                                    Output:["_col0","_col2","_col3"]
+                                    Filter Operator [FIL_130] (rows=143994918 width=135)
+                                      predicate:(cs_item_sk is not null and cs_sold_date_sk is not null and cs_warehouse_sk is null)
+                                      TableScan [TS_33] (rows=287989836 width=135)
+                                        default@catalog_sales,catalog_sales,Tbl:COMPLETE,Col:NONE,Output:["cs_sold_date_sk","cs_warehouse_sk","cs_item_sk","cs_ext_sales_price"]
                 <-Reducer 3 [CONTAINS]
-                  Reduce Output Operator [RS_93]
+                  Reduce Output Operator [RS_95]
                     PartitionCols:_col0, _col1, _col2, _col3, _col4
-                    Group By Operator [GBY_92] (rows=609832848 width=108)
+                    Group By Operator [GBY_94] (rows=609832848 width=108)
                       Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"],aggregations:["count()","sum(_col5)"],keys:_col0, _col1, _col2, _col3, _col4
-                      Select Operator [SEL_90] (rows=348477373 width=88)
-                        Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
-                        Merge Join Operator [MERGEJOIN_89] (rows=348477373 width=88)
-                          Conds:RS_12._col2=RS_114._col0(Inner),Output:["_col1","_col5","_col7","_col8"]
-                        <-Map 12 [SIMPLE_EDGE] vectorized
-                          SHUFFLE [RS_114]
-                            PartitionCols:_col0
-                            Select Operator [SEL_113] (rows=73049 width=1119)
-                              Output:["_col0","_col1","_col2"]
-                              Filter Operator [FIL_112] (rows=73049 width=1119)
-                                predicate: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_year","d_qoy"]
-                        <-Reducer 2 [SIMPLE_EDGE]
-                          SHUFFLE [RS_12]
-                            PartitionCols:_col2
-                            Merge Join Operator [MERGEJOIN_83] (rows=316797605 width=88)
-                              Conds:RS_106._col0=RS_111._col1(Inner),Output:["_col1","_col2","_col5"]
-                            <-Map 1 [SIMPLE_EDGE] vectorized
-                              SHUFFLE [RS_106]
-                                PartitionCols:_col0
-                                 Please refer to the previous Select Operator [SEL_105]
-                            <-Map 11 [SIMPLE_EDGE] vectorized
-                              SHUFFLE [RS_111]
-                                PartitionCols:_col1
-                                Select Operator [SEL_110] (rows=287997817 width=88)
-                                  Output:["_col0","_col1","_col3"]
-                                  Filter Operator [FIL_109] (rows=287997817 width=88)
-                                    predicate:(ss_addr_sk is null and ss_item_sk is not null and ss_sold_date_sk is not null)
-                                    TableScan [TS_3] (rows=575995635 width=88)
-                                      default@store_sales,store_sales,Tbl:COMPLETE,Col:NONE,Output:["ss_sold_date_sk","ss_item_sk","ss_addr_sk","ss_ext_sales_price"]
+                      Top N Key Operator [TNK_93] (rows=609832848 width=108)
+                        keys:_col0, _col1, _col2, _col3, _col4,sort order:+++++,top n:100
+                        Select Operator [SEL_91] (rows=348477373 width=88)
+                          Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
+                          Merge Join Operator [MERGEJOIN_90] (rows=348477373 width=88)
+                            Conds:RS_12._col2=RS_118._col0(Inner),Output:["_col1","_col5","_col7","_col8"]
+                          <-Map 12 [SIMPLE_EDGE] vectorized
+                            SHUFFLE [RS_118]
+                              PartitionCols:_col0
+                              Select Operator [SEL_117] (rows=73049 width=1119)
+                                Output:["_col0","_col1","_col2"]
+                                Filter Operator [FIL_116] (rows=73049 width=1119)
+                                  predicate: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_year","d_qoy"]
+                          <-Reducer 2 [SIMPLE_EDGE]
+                            SHUFFLE [RS_12]
+                              PartitionCols:_col2
+                              Merge Join Operator [MERGEJOIN_84] (rows=316797605 width=88)
+                                Conds:RS_110._col0=RS_115._col1(Inner),Output:["_col1","_col2","_col5"]
+                              <-Map 1 [SIMPLE_EDGE] vectorized
+                                SHUFFLE [RS_110]
+                                  PartitionCols:_col0
+                                   Please refer to the previous Select Operator [SEL_109]
+                              <-Map 11 [SIMPLE_EDGE] vectorized
+                                SHUFFLE [RS_115]
+                                  PartitionCols:_col1
+                                  Select Operator [SEL_114] (rows=287997817 width=88)
+                                    Output:["_col0","_col1","_col3"]
+                                    Filter Operator [FIL_113] (rows=287997817 width=88)
+                                      predicate:(ss_addr_sk is null and ss_item_sk is not null and ss_sold_date_sk is not null)
+                                      TableScan [TS_3] (rows=575995635 width=88)
+                                        default@store_sales,store_sales,Tbl:COMPLETE,Col:NONE,Output:["ss_sold_date_sk","ss_item_sk","ss_addr_sk","ss_ext_sales_price"]
                 <-Reducer 8 [CONTAINS]
-                  Reduce Output Operator [RS_98]
+                  Reduce Output Operator [RS_101]
                     PartitionCols:_col0, _col1, _col2, _col3, _col4
-                    Group By Operator [GBY_97] (rows=609832848 width=108)
+                    Group By Operator [GBY_100] (rows=609832848 width=108)
                       Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"],aggregations:["count()","sum(_col5)"],keys:_col0, _col1, _col2, _col3, _col4
-                      Select Operator [SEL_95] (rows=87121617 width=135)
-                        Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
-                        Merge Join Operator [MERGEJOIN_94] (rows=87121617 width=135)
-                          Conds:RS_28._col0=RS_125._col0(Inner),Output:["_col3","_col5","_col7","_col8"]
-                        <-Map 14 [SIMPLE_EDGE] vectorized
-                          SHUFFLE [RS_125]
-                            PartitionCols:_col0
-                            Select Operator [SEL_124] (rows=73049 width=1119)
-                              Output:["_col0","_col1","_col2"]
-                              Filter Operator [FIL_123] (rows=73049 width=1119)
-                                predicate:d_date_sk is not null
-                                TableScan [TS_22] (rows=73049 width=1119)
-                                  default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_qoy"]
-                        <-Reducer 7 [SIMPLE_EDGE]
-                          SHUFFLE [RS_28]
-                            PartitionCols:_col0
-                            Merge Join Operator [MERGEJOIN_85] (rows=79201469 width=135)
-                              Conds:RS_122._col1=RS_107._col0(Inner),Output:["_col0","_col3","_col5"]
-                            <-Map 1 [SIMPLE_EDGE] vectorized
-                              SHUFFLE [RS_107]
-                                PartitionCols:_col0
-                                 Please refer to the previous Select Operator [SEL_105]
-                            <-Map 13 [SIMPLE_EDGE] vectorized
-                              SHUFFLE [RS_122]
-                                PartitionCols:_col1
-                                Select Operator [SEL_121] (rows=72001334 width=135)
-                                  Output:["_col0","_col1","_col3"]
-                                  Filter Operator [FIL_120] (rows=72001334 width=135)
-                                    predicate:(ws_item_sk is not null and ws_sold_date_sk is not null and ws_web_page_sk is null)
-                                    TableScan [TS_16] (rows=144002668 width=135)
-                                      default@web_sales,web_sales,Tbl:COMPLETE,Col:NONE,Output:["ws_sold_date_sk","ws_item_sk","ws_web_page_sk","ws_ext_sales_price"]
+                      Top N Key Operator [TNK_99] (rows=609832848 width=108)
+                        keys:_col0, _col1, _col2, _col3, _col4,sort order:+++++,top n:100
+                        Select Operator [SEL_97] (rows=87121617 width=135)
+                          Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
+                          Merge Join Operator [MERGEJOIN_96] (rows=87121617 width=135)
+                            Conds:RS_28._col0=RS_129._col0(Inner),Output:["_col3","_col5","_col7","_col8"]
+                          <-Map 14 [SIMPLE_EDGE] vectorized
+                            SHUFFLE [RS_129]
+                              PartitionCols:_col0
+                              Select Operator [SEL_128] (rows=73049 width=1119)
+                                Output:["_col0","_col1","_col2"]
+                                Filter Operator [FIL_127] (rows=73049 width=1119)
+                                  predicate:d_date_sk is not null
+                                  TableScan [TS_22] (rows=73049 width=1119)
+                                    default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_qoy"]
+                          <-Reducer 7 [SIMPLE_EDGE]
+                            SHUFFLE [RS_28]
+                              PartitionCols:_col0
+                              Merge Join Operator [MERGEJOIN_86] (rows=79201469 width=135)
+                                Conds:RS_126._col1=RS_111._col0(Inner),Output:["_col0","_col3","_col5"]
+                              <-Map 1 [SIMPLE_EDGE] vectorized
+                                SHUFFLE [RS_111]
+                                  PartitionCols:_col0
+                                   Please refer to the previous Select Operator [SEL_109]
+                              <-Map 13 [SIMPLE_EDGE] vectorized
+                                SHUFFLE [RS_126]
+                                  PartitionCols:_col1
+                                  Select Operator [SEL_125] (rows=72001334 width=135)
+                                    Output:["_col0","_col1","_col3"]
+                                    Filter Operator [FIL_124] (rows=72001334 width=135)
+                                      predicate:(ws_item_sk is not null and ws_sold_date_sk is not null and ws_web_page_sk is null)
+                                      TableScan [TS_16] (rows=144002668 width=135)
+                                        default@web_sales,web_sales,Tbl:COMPLETE,Col:NONE,Output:["ws_sold_date_sk","ws_item_sk","ws_web_page_sk","ws_ext_sales_price"]
 

http://git-wip-us.apache.org/repos/asf/hive/blob/cc294d32/ql/src/test/results/clientpositive/perf/tez/query77.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/tez/query77.q.out b/ql/src/test/results/clientpositive/perf/tez/query77.q.out
index d8e8d17..e91eb58 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query77.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query77.q.out
@@ -1,4 +1,4 @@
-Warning: Shuffle Join MERGEJOIN[195][tables = [$hdt$_0, $hdt$_1]] in Stage 'Reducer 15' is a cross product
+Warning: Shuffle Join MERGEJOIN[197][tables = [$hdt$_0, $hdt$_1]] in Stage 'Reducer 15' is a cross product
 PREHOOK: query: explain
 with ss as
  (select s_store_sk,
@@ -241,241 +241,247 @@ Stage-0
     limit:100
     Stage-1
       Reducer 8 vectorized
-      File Output Operator [FS_232]
-        Limit [LIM_231] (rows=100 width=163)
+      File Output Operator [FS_236]
+        Limit [LIM_235] (rows=100 width=163)
           Number of rows:100
-          Select Operator [SEL_230] (rows=956329968 width=163)
+          Select Operator [SEL_234] (rows=956329968 width=163)
             Output:["_col0","_col1","_col2","_col3","_col4"]
           <-Reducer 7 [SIMPLE_EDGE] vectorized
-            SHUFFLE [RS_229]
-              Select Operator [SEL_228] (rows=956329968 width=163)
+            SHUFFLE [RS_233]
+              Select Operator [SEL_232] (rows=956329968 width=163)
                 Output:["_col0","_col1","_col2","_col3","_col4"]
-                Group By Operator [GBY_227] (rows=956329968 width=163)
+                Group By Operator [GBY_231] (rows=956329968 width=163)
                   Output:["_col0","_col1","_col3","_col4","_col5"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)"],keys:KEY._col0, KEY._col1, KEY._col2
                 <-Union 6 [SIMPLE_EDGE]
                   <-Reducer 15 [CONTAINS]
-                    Reduce Output Operator [RS_199]
+                    Reduce Output Operator [RS_202]
                       PartitionCols:_col0, _col1, _col2
-                      Group By Operator [GBY_198] (rows=1912659936 width=163)
+                      Group By Operator [GBY_201] (rows=1912659936 width=163)
                         Output:["_col0","_col1","_col2","_col3","_col4","_col5"],aggregations:["sum(_col2)","sum(_col3)","sum(_col4)"],keys:_col0, _col1, 0L
-                        Select Operator [SEL_196] (rows=158394413 width=360)
-                          Output:["_col0","_col1","_col2","_col3","_col4"]
-                          Merge Join Operator [MERGEJOIN_195] (rows=158394413 width=360)
-                            Conds:(Inner),Output:["_col0","_col1","_col2","_col3","_col4"]
-                          <-Reducer 14 [CUSTOM_SIMPLE_EDGE] vectorized
-                            PARTITION_ONLY_SHUFFLE [RS_237]
-                              Group By Operator [GBY_236] (rows=158394413 width=135)
-                                Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"],keys:KEY._col0
-                              <-Reducer 13 [SIMPLE_EDGE]
-                                SHUFFLE [RS_55]
-                                  PartitionCols:_col0
-                                  Group By Operator [GBY_54] (rows=316788826 width=135)
-                                    Output:["_col0","_col1","_col2"],aggregations:["sum(_col2)","sum(_col3)"],keys:_col1
-                                    Merge Join Operator [MERGEJOIN_181] (rows=316788826 width=135)
-                                      Conds:RS_235._col0=RS_212._col0(Inner),Output:["_col1","_col2","_col3"]
-                                    <-Map 9 [SIMPLE_EDGE] vectorized
-                                      SHUFFLE [RS_212]
-                                        PartitionCols:_col0
-                                        Select Operator [SEL_209] (rows=8116 width=1119)
-                                          Output:["_col0"]
-                                          Filter Operator [FIL_208] (rows=8116 width=1119)
-                                            predicate:(CAST( d_date AS TIMESTAMP) BETWEEN TIMESTAMP'1998-08-04 00:00:00' AND TIMESTAMP'1998-09-03 00:00:00' 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"]
-                                    <-Map 27 [SIMPLE_EDGE] vectorized
-                                      SHUFFLE [RS_235]
-                                        PartitionCols:_col0
-                                        Select Operator [SEL_234] (rows=287989836 width=135)
-                                          Output:["_col0","_col1","_col2","_col3"]
-                                          Filter Operator [FIL_233] (rows=287989836 width=135)
-                                            predicate:cs_sold_date_sk is not null
-                                            TableScan [TS_44] (rows=287989836 width=135)
-                                              default@catalog_sales,catalog_sales,Tbl:COMPLETE,Col:NONE,Output:["cs_sold_date_sk","cs_call_center_sk","cs_ext_sales_price","cs_net_profit"]
-                          <-Reducer 17 [CUSTOM_SIMPLE_EDGE] vectorized
-                            PARTITION_ONLY_SHUFFLE [RS_242]
-                              Group By Operator [GBY_241] (rows=1 width=224)
-                                Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"]
-                              <-Reducer 16 [CUSTOM_SIMPLE_EDGE]
-                                PARTITION_ONLY_SHUFFLE [RS_69]
-                                  Group By Operator [GBY_68] (rows=1 width=224)
-                                    Output:["_col0","_col1"],aggregations:["sum(_col1)","sum(_col2)"]
-                                    Merge Join Operator [MERGEJOIN_182] (rows=31678769 width=106)
-                                      Conds:RS_240._col0=RS_213._col0(Inner),Output:["_col1","_col2"]
-                                    <-Map 9 [SIMPLE_EDGE] vectorized
-                                      SHUFFLE [RS_213]
-                                        PartitionCols:_col0
-                                         Please refer to the previous Select Operator [SEL_209]
-                                    <-Map 28 [SIMPLE_EDGE] vectorized
-                                      SHUFFLE [RS_240]
-                                        PartitionCols:_col0
-                                        Select Operator [SEL_239] (rows=28798881 width=106)
-                                          Output:["_col0","_col1","_col2"]
-                                          Filter Operator [FIL_238] (rows=28798881 width=106)
-                                            predicate:cr_returned_date_sk is not null
-                                            TableScan [TS_58] (rows=28798881 width=106)
-                                              default@catalog_returns,catalog_returns,Tbl:COMPLETE,Col:NONE,Output:["cr_returned_date_sk","cr_return_amount","cr_net_loss"]
+                        Top N Key Operator [TNK_200] (rows=637553312 width=163)
+                          keys:_col0, _col1, 0L,sort order:+++,top n:100
+                          Select Operator [SEL_198] (rows=158394413 width=360)
+                            Output:["_col0","_col1","_col2","_col3","_col4"]
+                            Merge Join Operator [MERGEJOIN_197] (rows=158394413 width=360)
+                              Conds:(Inner),Output:["_col0","_col1","_col2","_col3","_col4"]
+                            <-Reducer 14 [CUSTOM_SIMPLE_EDGE] vectorized
+                              PARTITION_ONLY_SHUFFLE [RS_241]
+                                Group By Operator [GBY_240] (rows=158394413 width=135)
+                                  Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"],keys:KEY._col0
+                                <-Reducer 13 [SIMPLE_EDGE]
+                                  SHUFFLE [RS_55]
+                                    PartitionCols:_col0
+                                    Group By Operator [GBY_54] (rows=316788826 width=135)
+                                      Output:["_col0","_col1","_col2"],aggregations:["sum(_col2)","sum(_col3)"],keys:_col1
+                                      Merge Join Operator [MERGEJOIN_182] (rows=316788826 width=135)
+                                        Conds:RS_239._col0=RS_216._col0(Inner),Output:["_col1","_col2","_col3"]
+                                      <-Map 9 [SIMPLE_EDGE] vectorized
+                                        SHUFFLE [RS_216]
+                                          PartitionCols:_col0
+                                          Select Operator [SEL_213] (rows=8116 width=1119)
+                                            Output:["_col0"]
+                                            Filter Operator [FIL_212] (rows=8116 width=1119)
+                                              predicate:(CAST( d_date AS TIMESTAMP) BETWEEN TIMESTAMP'1998-08-04 00:00:00' AND TIMESTAMP'1998-09-03 00:00:00' 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"]
+                                      <-Map 27 [SIMPLE_EDGE] vectorized
+                                        SHUFFLE [RS_239]
+                                          PartitionCols:_col0
+                                          Select Operator [SEL_238] (rows=287989836 width=135)
+                                            Output:["_col0","_col1","_col2","_col3"]
+                                            Filter Operator [FIL_237] (rows=287989836 width=135)
+                                              predicate:cs_sold_date_sk is not null
+                                              TableScan [TS_44] (rows=287989836 width=135)
+                                                default@catalog_sales,catalog_sales,Tbl:COMPLETE,Col:NONE,Output:["cs_sold_date_sk","cs_call_center_sk","cs_ext_sales_price","cs_net_profit"]
+                            <-Reducer 17 [CUSTOM_SIMPLE_EDGE] vectorized
+                              PARTITION_ONLY_SHUFFLE [RS_246]
+                                Group By Operator [GBY_245] (rows=1 width=224)
+                                  Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"]
+                                <-Reducer 16 [CUSTOM_SIMPLE_EDGE]
+                                  PARTITION_ONLY_SHUFFLE [RS_69]
+                                    Group By Operator [GBY_68] (rows=1 width=224)
+                                      Output:["_col0","_col1"],aggregations:["sum(_col1)","sum(_col2)"]
+                                      Merge Join Operator [MERGEJOIN_183] (rows=31678769 width=106)
+                                        Conds:RS_244._col0=RS_217._col0(Inner),Output:["_col1","_col2"]
+                                      <-Map 9 [SIMPLE_EDGE] vectorized
+                                        SHUFFLE [RS_217]
+                                          PartitionCols:_col0
+                                           Please refer to the previous Select Operator [SEL_213]
+                                      <-Map 28 [SIMPLE_EDGE] vectorized
+                                        SHUFFLE [RS_244]
+                                          PartitionCols:_col0
+                                          Select Operator [SEL_243] (rows=28798881 width=106)
+                                            Output:["_col0","_col1","_col2"]
+                                            Filter Operator [FIL_242] (rows=28798881 width=106)
+                                              predicate:cr_returned_date_sk is not null
+                                              TableScan [TS_58] (rows=28798881 width=106)
+                                                default@catalog_returns,catalog_returns,Tbl:COMPLETE,Col:NONE,Output:["cr_returned_date_sk","cr_return_amount","cr_net_loss"]
                   <-Reducer 21 [CONTAINS]
-                    Reduce Output Operator [RS_204]
+                    Reduce Output Operator [RS_208]
                       PartitionCols:_col0, _col1, _col2
-                      Group By Operator [GBY_203] (rows=1912659936 width=163)
+                      Group By Operator [GBY_207] (rows=1912659936 width=163)
                         Output:["_col0","_col1","_col2","_col3","_col4","_col5"],aggregations:["sum(_col2)","sum(_col3)","sum(_col4)"],keys:_col0, _col1, 0L
-                        Select Operator [SEL_201] (rows=95833780 width=135)
-                          Output:["_col0","_col1","_col2","_col3","_col4"]
-                          Merge Join Operator [MERGEJOIN_200] (rows=95833780 width=135)
-                            Conds:RS_251._col0=RS_256._col0(Left Outer),Output:["_col0","_col1","_col2","_col4","_col5"]
-                          <-Reducer 20 [ONE_TO_ONE_EDGE] vectorized
-                            FORWARD [RS_251]
-                              PartitionCols:_col0
-                              Group By Operator [GBY_250] (rows=87121617 width=135)
-                                Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"],keys:KEY._col0
-                              <-Reducer 19 [SIMPLE_EDGE]
-                                SHUFFLE [RS_94]
-                                  PartitionCols:_col0
-                                  Group By Operator [GBY_93] (rows=174243235 width=135)
-                                    Output:["_col0","_col1","_col2"],aggregations:["sum(_col2)","sum(_col3)"],keys:_col6
-                                    Merge Join Operator [MERGEJOIN_184] (rows=174243235 width=135)
-                                      Conds:RS_89._col1=RS_248._col0(Inner),Output:["_col2","_col3","_col6"]
-                                    <-Map 30 [SIMPLE_EDGE] vectorized
-                                      SHUFFLE [RS_248]
-                                        PartitionCols:_col0
-                                        Select Operator [SEL_247] (rows=4602 width=585)
-                                          Output:["_col0"]
-                                          Filter Operator [FIL_246] (rows=4602 width=585)
-                                            predicate:wp_web_page_sk is not null
-                                            TableScan [TS_83] (rows=4602 width=585)
-                                              default@web_page,web_page,Tbl:COMPLETE,Col:NONE,Output:["wp_web_page_sk"]
-                                    <-Reducer 18 [SIMPLE_EDGE]
-                                      SHUFFLE [RS_89]
-                                        PartitionCols:_col1
-                                        Merge Join Operator [MERGEJOIN_183] (rows=158402938 width=135)
-                                          Conds:RS_245._col0=RS_214._col0(Inner),Output:["_col1","_col2","_col3"]
-                                        <-Map 9 [SIMPLE_EDGE] vectorized
-                                          SHUFFLE [RS_214]
-                                            PartitionCols:_col0
-                                             Please refer to the previous Select Operator [SEL_209]
-                                        <-Map 29 [SIMPLE_EDGE] vectorized
-                                          SHUFFLE [RS_245]
-                                            PartitionCols:_col0
-                                            Select Operator [SEL_244] (rows=144002668 width=135)
-                                              Output:["_col0","_col1","_col2","_col3"]
-                                              Filter Operator [FIL_243] (rows=144002668 width=135)
-                                                predicate:(ws_sold_date_sk is not null and ws_web_page_sk is not null)
-                                                TableScan [TS_77] (rows=144002668 width=135)
-                                                  default@web_sales,web_sales,Tbl:COMPLETE,Col:NONE,Output:["ws_sold_date_sk","ws_web_page_sk","ws_ext_sales_price","ws_net_profit"]
-                          <-Reducer 24 [ONE_TO_ONE_EDGE] vectorized
-                            FORWARD [RS_256]
-                              PartitionCols:_col0
-                              Group By Operator [GBY_255] (rows=8711072 width=92)
-                                Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"],keys:KEY._col0
-                              <-Reducer 23 [SIMPLE_EDGE]
-                                SHUFFLE [RS_114]
-                                  PartitionCols:_col0
-                                  Group By Operator [GBY_113] (rows=17422145 width=92)
-                                    Output:["_col0","_col1","_col2"],aggregations:["sum(_col2)","sum(_col3)"],keys:_col6
-                                    Merge Join Operator [MERGEJOIN_186] (rows=17422145 width=92)
-                                      Conds:RS_109._col1=RS_249._col0(Inner),Output:["_col2","_col3","_col6"]
-                                    <-Map 30 [SIMPLE_EDGE] vectorized
-                                      SHUFFLE [RS_249]
-                                        PartitionCols:_col0
-                                         Please refer to the previous Select Operator [SEL_247]
-                                    <-Reducer 22 [SIMPLE_EDGE]
-                                      SHUFFLE [RS_109]
-                                        PartitionCols:_col1
-                                        Merge Join Operator [MERGEJOIN_185] (rows=15838314 width=92)
-                                          Conds:RS_254._col0=RS_215._col0(Inner),Output:["_col1","_col2","_col3"]
-                                        <-Map 9 [SIMPLE_EDGE] vectorized
-                                          SHUFFLE [RS_215]
-                                            PartitionCols:_col0
-                                             Please refer to the previous Select Operator [SEL_209]
-                                        <-Map 31 [SIMPLE_EDGE] vectorized
-                                          SHUFFLE [RS_254]
-                                            PartitionCols:_col0
-                                            Select Operator [SEL_253] (rows=14398467 width=92)
-                                              Output:["_col0","_col1","_col2","_col3"]
-                                              Filter Operator [FIL_252] (rows=14398467 width=92)
-                                                predicate:(wr_returned_date_sk is not null and wr_web_page_sk is not null)
-                                                TableScan [TS_97] (rows=14398467 width=92)
-                                                  default@web_returns,web_returns,Tbl:COMPLETE,Col:NONE,Output:["wr_returned_date_sk","wr_web_page_sk","wr_return_amt","wr_net_loss"]
+                        Top N Key Operator [TNK_206] (rows=637553312 width=163)
+                          keys:_col0, _col1, 0L,sort order:+++,top n:100
+                          Select Operator [SEL_204] (rows=95833780 width=135)
+                            Output:["_col0","_col1","_col2","_col3","_col4"]
+                            Merge Join Operator [MERGEJOIN_203] (rows=95833780 width=135)
+                              Conds:RS_255._col0=RS_260._col0(Left Outer),Output:["_col0","_col1","_col2","_col4","_col5"]
+                            <-Reducer 20 [ONE_TO_ONE_EDGE] vectorized
+                              FORWARD [RS_255]
+                                PartitionCols:_col0
+                                Group By Operator [GBY_254] (rows=87121617 width=135)
+                                  Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"],keys:KEY._col0
+                                <-Reducer 19 [SIMPLE_EDGE]
+                                  SHUFFLE [RS_94]
+                                    PartitionCols:_col0
+                                    Group By Operator [GBY_93] (rows=174243235 width=135)
+                                      Output:["_col0","_col1","_col2"],aggregations:["sum(_col2)","sum(_col3)"],keys:_col6
+                                      Merge Join Operator [MERGEJOIN_185] (rows=174243235 width=135)
+                                        Conds:RS_89._col1=RS_252._col0(Inner),Output:["_col2","_col3","_col6"]
+                                      <-Map 30 [SIMPLE_EDGE] vectorized
+                                        SHUFFLE [RS_252]
+                                          PartitionCols:_col0
+                                          Select Operator [SEL_251] (rows=4602 width=585)
+                                            Output:["_col0"]
+                                            Filter Operator [FIL_250] (rows=4602 width=585)
+                                              predicate:wp_web_page_sk is not null
+                                              TableScan [TS_83] (rows=4602 width=585)
+                                                default@web_page,web_page,Tbl:COMPLETE,Col:NONE,Output:["wp_web_page_sk"]
+                                      <-Reducer 18 [SIMPLE_EDGE]
+                                        SHUFFLE [RS_89]
+                                          PartitionCols:_col1
+                                          Merge Join Operator [MERGEJOIN_184] (rows=158402938 width=135)
+                                            Conds:RS_249._col0=RS_218._col0(Inner),Output:["_col1","_col2","_col3"]
+                                          <-Map 9 [SIMPLE_EDGE] vectorized
+                                            SHUFFLE [RS_218]
+                                              PartitionCols:_col0
+                                               Please refer to the previous Select Operator [SEL_213]
+                                          <-Map 29 [SIMPLE_EDGE] vectorized
+                                            SHUFFLE [RS_249]
+                                              PartitionCols:_col0
+                                              Select Operator [SEL_248] (rows=144002668 width=135)
+                                                Output:["_col0","_col1","_col2","_col3"]
+                                                Filter Operator [FIL_247] (rows=144002668 width=135)
+                                                  predicate:(ws_sold_date_sk is not null and ws_web_page_sk is not null)
+                                                  TableScan [TS_77] (rows=144002668 width=135)
+                                                    default@web_sales,web_sales,Tbl:COMPLETE,Col:NONE,Output:["ws_sold_date_sk","ws_web_page_sk","ws_ext_sales_price","ws_net_profit"]
+                            <-Reducer 24 [ONE_TO_ONE_EDGE] vectorized
+                              FORWARD [RS_260]
+                                PartitionCols:_col0
+                                Group By Operator [GBY_259] (rows=8711072 width=92)
+                                  Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"],keys:KEY._col0
+                                <-Reducer 23 [SIMPLE_EDGE]
+                                  SHUFFLE [RS_114]
+                                    PartitionCols:_col0
+                                    Group By Operator [GBY_113] (rows=17422145 width=92)
+                                      Output:["_col0","_col1","_col2"],aggregations:["sum(_col2)","sum(_col3)"],keys:_col6
+                                      Merge Join Operator [MERGEJOIN_187] (rows=17422145 width=92)
+                                        Conds:RS_109._col1=RS_253._col0(Inner),Output:["_col2","_col3","_col6"]
+                                      <-Map 30 [SIMPLE_EDGE] vectorized
+                                        SHUFFLE [RS_253]
+                                          PartitionCols:_col0
+                                           Please refer to the previous Select Operator [SEL_251]
+                                      <-Reducer 22 [SIMPLE_EDGE]
+                                        SHUFFLE [RS_109]
+                                          PartitionCols:_col1
+                                          Merge Join Operator [MERGEJOIN_186] (rows=15838314 width=92)
+                                            Conds:RS_258._col0=RS_219._col0(Inner),Output:["_col1","_col2","_col3"]
+                                          <-Map 9 [SIMPLE_EDGE] vectorized
+                                            SHUFFLE [RS_219]
+                                              PartitionCols:_col0
+                                               Please refer to the previous Select Operator [SEL_213]
+                                          <-Map 31 [SIMPLE_EDGE] vectorized
+                                            SHUFFLE [RS_258]
+                                              PartitionCols:_col0
+                                              Select Operator [SEL_257] (rows=14398467 width=92)
+                                                Output:["_col0","_col1","_col2","_col3"]
+                                                Filter Operator [FIL_256] (rows=14398467 width=92)
+                                                  predicate:(wr_returned_date_sk is not null and wr_web_page_sk is not null)
+                                                  TableScan [TS_97] (rows=14398467 width=92)
+                                                    default@web_returns,web_returns,Tbl:COMPLETE,Col:NONE,Output:["wr_returned_date_sk","wr_web_page_sk","wr_return_amt","wr_net_loss"]
                   <-Reducer 5 [CONTAINS]
-                    Reduce Output Operator [RS_194]
+                    Reduce Output Operator [RS_196]
                       PartitionCols:_col0, _col1, _col2
-                      Group By Operator [GBY_193] (rows=1912659936 width=163)
+                      Group By Operator [GBY_195] (rows=1912659936 width=163)
                         Output:["_col0","_col1","_col2","_col3","_col4","_col5"],aggregations:["sum(_col2)","sum(_col3)","sum(_col4)"],keys:_col0, _col1, 0L
-                        Select Operator [SEL_191] (rows=383325119 width=88)
-                          Output:["_col0","_col1","_col2","_col3","_col4"]
-                          Merge Join Operator [MERGEJOIN_190] (rows=383325119 width=88)
-                            Conds:RS_221._col0=RS_226._col0(Left Outer),Output:["_col0","_col1","_col2","_col4","_col5"]
-                          <-Reducer 12 [ONE_TO_ONE_EDGE] vectorized
-                            FORWARD [RS_226]
-                              PartitionCols:_col0
-                              Group By Operator [GBY_225] (rows=34842647 width=77)
-                                Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"],keys:KEY._col0
-                              <-Reducer 11 [SIMPLE_EDGE]
-                                SHUFFLE [RS_37]
-                                  PartitionCols:_col0
-                                  Group By Operator [GBY_36] (rows=69685294 width=77)
-                                    Output:["_col0","_col1","_col2"],aggregations:["sum(_col2)","sum(_col3)"],keys:_col6
-                                    Merge Join Operator [MERGEJOIN_180] (rows=69685294 width=77)
-                                      Conds:RS_32._col1=RS_219._col0(Inner),Output:["_col2","_col3","_col6"]
-                                    <-Map 25 [SIMPLE_EDGE] vectorized
-                                      SHUFFLE [RS_219]
-                                        PartitionCols:_col0
-                                        Select Operator [SEL_217] (rows=1704 width=1910)
-                                          Output:["_col0"]
-                                          Filter Operator [FIL_216] (rows=1704 width=1910)
-                                            predicate:s_store_sk is not null
-                                            TableScan [TS_6] (rows=1704 width=1910)
-                                              default@store,store,Tbl:COMPLETE,Col:NONE,Output:["s_store_sk"]
-                                    <-Reducer 10 [SIMPLE_EDGE]
-                                      SHUFFLE [RS_32]
-                                        PartitionCols:_col1
-                                        Merge Join Operator [MERGEJOIN_179] (rows=63350266 width=77)
-                                          Conds:RS_224._col0=RS_211._col0(Inner),Output:["_col1","_col2","_col3"]
-                                        <-Map 9 [SIMPLE_EDGE] vectorized
-                                          SHUFFLE [RS_211]
-                                            PartitionCols:_col0
-                                             Please refer to the previous Select Operator [SEL_209]
-                                        <-Map 26 [SIMPLE_EDGE] vectorized
-                                          SHUFFLE [RS_224]
-                                            PartitionCols:_col0
-                                            Select Operator [SEL_223] (rows=57591150 width=77)
-                                              Output:["_col0","_col1","_col2","_col3"]
-                                              Filter Operator [FIL_222] (rows=57591150 width=77)
-                                                predicate:(sr_returned_date_sk is not null and sr_store_sk is not null)
-                                                TableScan [TS_20] (rows=57591150 width=77)
-                                                  default@store_returns,store_returns,Tbl:COMPLETE,Col:NONE,Output:["sr_returned_date_sk","sr_store_sk","sr_return_amt","sr_net_loss"]
-                          <-Reducer 4 [ONE_TO_ONE_EDGE] vectorized
-                            FORWARD [RS_221]
-                              PartitionCols:_col0
-                              Group By Operator [GBY_220] (rows=348477374 width=88)
-                                Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"],keys:KEY._col0
-                              <-Reducer 3 [SIMPLE_EDGE]
-                                SHUFFLE [RS_17]
-                                  PartitionCols:_col0
-                                  Group By Operator [GBY_16] (rows=696954748 width=88)
-                                    Output:["_col0","_col1","_col2"],aggregations:["sum(_col2)","sum(_col3)"],keys:_col6
-                                    Merge Join Operator [MERGEJOIN_178] (rows=696954748 width=88)
-                                      Conds:RS_12._col1=RS_218._col0(Inner),Output:["_col2","_col3","_col6"]
-                                    <-Map 25 [SIMPLE_EDGE] vectorized
-                                      SHUFFLE [RS_218]
-                                        PartitionCols:_col0
-                                         Please refer to the previous Select Operator [SEL_217]
-                                    <-Reducer 2 [SIMPLE_EDGE]
-                                      SHUFFLE [RS_12]
-                                        PartitionCols:_col1
-                                        Merge Join Operator [MERGEJOIN_177] (rows=633595212 width=88)
-                                          Conds:RS_207._col0=RS_210._col0(Inner),Output:["_col1","_col2","_col3"]
-                                        <-Map 9 [SIMPLE_EDGE] vectorized
-                                          SHUFFLE [RS_210]
-                                            PartitionCols:_col0
-                                             Please refer to the previous Select Operator [SEL_209]
-                                        <-Map 1 [SIMPLE_EDGE] vectorized
-                                          SHUFFLE [RS_207]
-                                            PartitionCols:_col0
-                                            Select Operator [SEL_206] (rows=575995635 width=88)
-                                              Output:["_col0","_col1","_col2","_col3"]
-                                              Filter Operator [FIL_205] (rows=575995635 width=88)
-                                                predicate:(ss_sold_date_sk is not null and ss_store_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_store_sk","ss_ext_sales_price","ss_net_profit"]
+                        Top N Key Operator [TNK_194] (rows=637553312 width=163)
+                          keys:_col0, _col1, 0L,sort order:+++,top n:100
+                          Select Operator [SEL_192] (rows=383325119 width=88)
+                            Output:["_col0","_col1","_col2","_col3","_col4"]
+                            Merge Join Operator [MERGEJOIN_191] (rows=383325119 width=88)
+                              Conds:RS_225._col0=RS_230._col0(Left Outer),Output:["_col0","_col1","_col2","_col4","_col5"]
+                            <-Reducer 12 [ONE_TO_ONE_EDGE] vectorized
+                              FORWARD [RS_230]
+                                PartitionCols:_col0
+                                Group By Operator [GBY_229] (rows=34842647 width=77)
+                                  Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"],keys:KEY._col0
+                                <-Reducer 11 [SIMPLE_EDGE]
+                                  SHUFFLE [RS_37]
+                                    PartitionCols:_col0
+                                    Group By Operator [GBY_36] (rows=69685294 width=77)
+                                      Output:["_col0","_col1","_col2"],aggregations:["sum(_col2)","sum(_col3)"],keys:_col6
+                                      Merge Join Operator [MERGEJOIN_181] (rows=69685294 width=77)
+                                        Conds:RS_32._col1=RS_223._col0(Inner),Output:["_col2","_col3","_col6"]
+                                      <-Map 25 [SIMPLE_EDGE] vectorized
+                                        SHUFFLE [RS_223]
+                                          PartitionCols:_col0
+                                          Select Operator [SEL_221] (rows=1704 width=1910)
+                                            Output:["_col0"]
+                                            Filter Operator [FIL_220] (rows=1704 width=1910)
+                                              predicate:s_store_sk is not null
+                                              TableScan [TS_6] (rows=1704 width=1910)
+                                                default@store,store,Tbl:COMPLETE,Col:NONE,Output:["s_store_sk"]
+                                      <-Reducer 10 [SIMPLE_EDGE]
+                                        SHUFFLE [RS_32]
+                                          PartitionCols:_col1
+                                          Merge Join Operator [MERGEJOIN_180] (rows=63350266 width=77)
+                                            Conds:RS_228._col0=RS_215._col0(Inner),Output:["_col1","_col2","_col3"]
+                                          <-Map 9 [SIMPLE_EDGE] vectorized
+                                            SHUFFLE [RS_215]
+                                              PartitionCols:_col0
+                                               Please refer to the previous Select Operator [SEL_213]
+                                          <-Map 26 [SIMPLE_EDGE] vectorized
+                                            SHUFFLE [RS_228]
+                                              PartitionCols:_col0
+                                              Select Operator [SEL_227] (rows=57591150 width=77)
+                                                Output:["_col0","_col1","_col2","_col3"]
+                                                Filter Operator [FIL_226] (rows=57591150 width=77)
+                                                  predicate:(sr_returned_date_sk is not null and sr_store_sk is not null)
+                                                  TableScan [TS_20] (rows=57591150 width=77)
+                                                    default@store_returns,store_returns,Tbl:COMPLETE,Col:NONE,Output:["sr_returned_date_sk","sr_store_sk","sr_return_amt","sr_net_loss"]
+                            <-Reducer 4 [ONE_TO_ONE_EDGE] vectorized
+                              FORWARD [RS_225]
+                                PartitionCols:_col0
+                                Group By Operator [GBY_224] (rows=348477374 width=88)
+                                  Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"],keys:KEY._col0
+                                <-Reducer 3 [SIMPLE_EDGE]
+                                  SHUFFLE [RS_17]
+                                    PartitionCols:_col0
+                                    Group By Operator [GBY_16] (rows=696954748 width=88)
+                                      Output:["_col0","_col1","_col2"],aggregations:["sum(_col2)","sum(_col3)"],keys:_col6
+                                      Merge Join Operator [MERGEJOIN_179] (rows=696954748 width=88)
+                                        Conds:RS_12._col1=RS_222._col0(Inner),Output:["_col2","_col3","_col6"]
+                                      <-Map 25 [SIMPLE_EDGE] vectorized
+                                        SHUFFLE [RS_222]
+                                          PartitionCols:_col0
+                                           Please refer to the previous Select Operator [SEL_221]
+                                      <-Reducer 2 [SIMPLE_EDGE]
+                                        SHUFFLE [RS_12]
+                                          PartitionCols:_col1
+                                          Merge Join Operator [MERGEJOIN_178] (rows=633595212 width=88)
+                                            Conds:RS_211._col0=RS_214._col0(Inner),Output:["_col1","_col2","_col3"]
+                                          <-Map 9 [SIMPLE_EDGE] vectorized
+                                            SHUFFLE [RS_214]
+                                              PartitionCols:_col0
+                                               Please refer to the previous Select Operator [SEL_213]
+                                          <-Map 1 [SIMPLE_EDGE] vectorized
+                                            SHUFFLE [RS_211]
+                                              PartitionCols:_col0
+                                              Select Operator [SEL_210] (rows=575995635 width=88)
+                                                Output:["_col0","_col1","_col2","_col3"]
+                                                Filter Operator [FIL_209] (rows=575995635 width=88)
+                                                  predicate:(ss_sold_date_sk is not null and ss_store_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_store_sk","ss_ext_sales_price","ss_net_profit"]
 

http://git-wip-us.apache.org/repos/asf/hive/blob/cc294d32/ql/src/test/results/clientpositive/perf/tez/query8.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/tez/query8.q.out b/ql/src/test/results/clientpositive/perf/tez/query8.q.out
index e0742f2..b468748 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query8.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query8.q.out
@@ -231,128 +231,130 @@ Stage-0
     limit:100
     Stage-1
       Reducer 5 vectorized
-      File Output Operator [FS_115]
-        Limit [LIM_114] (rows=100 width=88)
+      File Output Operator [FS_116]
+        Limit [LIM_115] (rows=100 width=88)
           Number of rows:100
-          Select Operator [SEL_113] (rows=348477374 width=88)
+          Select Operator [SEL_114] (rows=348477374 width=88)
             Output:["_col0","_col1"]
           <-Reducer 4 [SIMPLE_EDGE] vectorized
-            SHUFFLE [RS_112]
-              Group By Operator [GBY_111] (rows=348477374 width=88)
+            SHUFFLE [RS_113]
+              Group By Operator [GBY_112] (rows=348477374 width=88)
                 Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0
               <-Reducer 3 [SIMPLE_EDGE]
                 SHUFFLE [RS_57]
                   PartitionCols:_col0
                   Group By Operator [GBY_56] (rows=696954748 width=88)
                     Output:["_col0","_col1"],aggregations:["sum(_col2)"],keys:_col8
-                    Merge Join Operator [MERGEJOIN_89] (rows=696954748 width=88)
-                      Conds:RS_52._col1=RS_53._col1(Inner),Output:["_col2","_col8"]
-                    <-Reducer 11 [SIMPLE_EDGE]
-                      SHUFFLE [RS_53]
-                        PartitionCols:_col1
-                        Merge Join Operator [MERGEJOIN_88] (rows=1874 width=1911)
-                          Conds:RS_107.substr(_col0, 1, 2)=RS_110.substr(_col2, 1, 2)(Inner),Output:["_col1","_col2"]
-                        <-Map 17 [SIMPLE_EDGE] vectorized
-                          SHUFFLE [RS_110]
-                            PartitionCols:substr(_col2, 1, 2)
-                            Select Operator [SEL_109] (rows=1704 width=1910)
-                              Output:["_col0","_col1","_col2"]
-                              Filter Operator [FIL_108] (rows=1704 width=1910)
-                                predicate:(s_store_sk is not null and substr(s_zip, 1, 2) is not null)
-                                TableScan [TS_42] (rows=1704 width=1910)
-                                  default@store,store,Tbl:COMPLETE,Col:NONE,Output:["s_store_sk","s_store_name","s_zip"]
-                        <-Reducer 10 [SIMPLE_EDGE] vectorized
-                          SHUFFLE [RS_107]
-                            PartitionCols:substr(_col0, 1, 2)
-                            Select Operator [SEL_106] (rows=1 width=1014)
-                              Output:["_col0"]
-                              Filter Operator [FIL_105] (rows=1 width=1014)
-                                predicate:(_col1 = 2L)
-                                Group By Operator [GBY_104] (rows=6833333 width=1014)
-                                  Output:["_col0","_col1"],aggregations:["count(VALUE._col0)"],keys:KEY._col0
-                                <-Union 9 [SIMPLE_EDGE]
-                                  <-Reducer 15 [CONTAINS] vectorized
-                                    Reduce Output Operator [RS_136]
-                                      PartitionCols:_col0
-                                      Group By Operator [GBY_135] (rows=13666666 width=1014)
-                                        Output:["_col0","_col1"],aggregations:["count(_col1)"],keys:_col0
-                                        Group By Operator [GBY_134] (rows=3666666 width=1014)
-                                          Output:["_col0","_col1"],aggregations:["count(VALUE._col0)"],keys:KEY._col0
-                                        <-Reducer 14 [SIMPLE_EDGE] vectorized
-                                          SHUFFLE [RS_133]
-                                            PartitionCols:_col0
-                                            Group By Operator [GBY_132] (rows=7333333 width=1014)
-                                              Output:["_col0","_col1"],aggregations:["count()"],keys:_col0
-                                              Select Operator [SEL_131] (rows=7333333 width=1014)
-                                                Output:["_col0"]
-                                                Filter Operator [FIL_130] (rows=7333333 width=1014)
-                                                  predicate:(_col1 > 10L)
-                                                  Group By Operator [GBY_129] (rows=22000000 width=1014)
-                                                    Output:["_col0","_col1"],aggregations:["count(VALUE._col0)"],keys:KEY._col0
-                                                  <-Reducer 13 [SIMPLE_EDGE]
-                                                    SHUFFLE [RS_25]
-                                                      PartitionCols:_col0
-                                                      Group By Operator [GBY_24] (rows=44000000 width=1014)
-                                                        Output:["_col0","_col1"],aggregations:["count()"],keys:_col1
-                                                        Merge Join Operator [MERGEJOIN_87] (rows=44000000 width=1014)
-                                                          Conds:RS_125._col0=RS_128._col0(Inner),Output:["_col1"]
-                                                        <-Map 12 [SIMPLE_EDGE] vectorized
-                                                          SHUFFLE [RS_125]
-                                                            PartitionCols:_col0
-                                                            Select Operator [SEL_124] (rows=40000000 width=1014)
-                                                              Output:["_col0","_col1"]
-                                                              Filter Operator [FIL_123] (rows=40000000 width=1014)
-                                                                predicate:(ca_address_sk is not null and substr(substr(ca_zip, 1, 5), 1, 2) is not null)
-                                                                TableScan [TS_14] (rows=40000000 width=1014)
-                                                                  default@customer_address,customer_address,Tbl:COMPLETE,Col:NONE,Output:["ca_address_sk","ca_zip"]
-                                                        <-Map 16 [SIMPLE_EDGE] vectorized
-                                                          SHUFFLE [RS_128]
-                                                            PartitionCols:_col0
-                                                            Select Operator [SEL_127] (rows=40000000 width=860)
-                                                              Output:["_col0"]
-                                                              Filter Operator [FIL_126] (rows=40000000 width=860)
-                                                                predicate:((c_preferred_cust_flag = 'Y') and c_current_addr_sk is not null)
-                                                                TableScan [TS_17] (rows=80000000 width=860)
-                                                                  default@customer,customer,Tbl:COMPLETE,Col:NONE,Output:["c_current_addr_sk","c_preferred_cust_flag"]
-                                  <-Reducer 8 [CONTAINS] vectorized
-                                    Reduce Output Operator [RS_122]
-                                      PartitionCols:_col0
-                                      Group By Operator [GBY_121] (rows=13666666 width=1014)
-                                        Output:["_col0","_col1"],aggregations:["count(_col1)"],keys:_col0
-                                        Group By Operator [GBY_120] (rows=10000000 width=1014)
-                                          Output:["_col0","_col1"],aggregations:["count(VALUE._col0)"],keys:KEY._col0
-                                        <-Map 7 [SIMPLE_EDGE] vectorized
-                                          SHUFFLE [RS_119]
-                                            PartitionCols:_col0
-                                            Group By Operator [GBY_118] (rows=20000000 width=1014)
-                                              Output:["_col0","_col1"],aggregations:["count()"],keys:_col0
-                                              Select Operator [SEL_117] (rows=20000000 width=1014)
-                                                Output:["_col0"]
-                                                Filter Operator [FIL_116] (rows=20000000 width=1014)
-                                                  predicate:((substr(ca_zip, 1, 5)) IN ('89436', '30868', '65085', '22977', '83927', '77557', '58429', '40697', '80614', '10502', '32779', '91137', '61265', '98294', '17921', '18427', '21203', '59362', '87291', '84093', '21505', '17184', '10866', '67898', '25797', '28055', '18377', '80332', '74535', '21757', '29742', '90885', '29898', '17819', '40811', '25990', '47513', '89531', '91068', '10391', '18846', '99223', '82637', '41368', '83658', '86199', '81625', '26696', '89338', '88425', '32200', '81427', '19053', '77471', '36610', '99823', '43276', '41249', '48584', '83550', '82276', '18842', '78890', '14090', '38123', '40936', '34425', '19850', '43286', '80072', '79188', '54191', '11395', '50497', '84861', '90733', '21068', '57666', '37119', '25004', '57835', '70067', '62878', '95806', '19303', '18840', '19124', '29785', '16737', '16022', '49613', '89977', '68310', '60069', '98360', '48649', '39050', '41793', '25002', '27413', '39736', 
 '47208', '16515', '94808', '57648', '15009', '80015', '42961', '63982', '21744', '71853', '81087', '67468', '34175', '64008', '20261', '11201', '51799', '48043', '45645', '61163', '48375', '36447', '57042', '21218', '41100', '89951', '22745', '35851', '83326', '61125', '78298', '80752', '49858', '52940', '96976', '63792', '11376', '53582', '18717', '90226', '50530', '94203', '99447', '27670', '96577', '57856', '56372', '16165', '23427', '54561', '28806', '44439', '22926', '30123', '61451', '92397', '56979', '92309', '70873', '13355', '21801', '46346', '37562', '56458', '28286', '47306', '99555', '69399', '26234', '47546', '49661', '88601', '35943', '39936', '25632', '24611', '44166', '56648', '30379', '59785', '11110', '14329', '93815', '52226', '71381', '13842', '25612', '63294', '14664', '21077', '82626', '18799', '60915', '81020', '56447', '76619', '11433', '13414', '42548', '92713', '70467', '30884', '47484', '16072', '38936', '13036', '88376', '45539', '35901', '19506', '65690'
 , '73957', '71850', '49231', '14276', '20005', '18384', '76615', '11635', '38177', '55607', '41369', '95447', '58581', '58149', '91946', '33790', '76232', '75692', '95464', '22246', '51061', '56692', '53121', '77209', '15482', '10688', '14868', '45907', '73520', '72666', '25734', '17959', '24677', '66446', '94627', '53535', '15560', '41967', '69297', '11929', '59403', '33283', '52232', '57350', '43933', '40921', '36635', '10827', '71286', '19736', '80619', '25251', '95042', '15526', '36496', '55854', '49124', '81980', '35375', '49157', '63512', '28944', '14946', '36503', '54010', '18767', '23969', '43905', '66979', '33113', '21286', '58471', '59080', '13395', '79144', '70373', '67031', '38360', '26705', '50906', '52406', '26066', '73146', '15884', '31897', '30045', '61068', '45550', '92454', '13376', '14354', '19770', '22928', '97790', '50723', '46081', '30202', '14410', '20223', '88500', '67298', '13261', '14172', '81410', '93578', '83583', '46047', '94167', '82564', '21156', '1579
 9', '86709', '37931', '74703', '83103', '23054', '70470', '72008', '49247', '91911', '69998', '20961', '70070', '63197', '54853', '88191', '91830', '49521', '19454', '81450', '89091', '62378', '25683', '61869', '51744', '36580', '85778', '36871', '48121', '28810', '83712', '45486', '67393', '26935', '42393', '20132', '55349', '86057', '21309', '80218', '10094', '11357', '48819', '39734', '40758', '30432', '21204', '29467', '30214', '61024', '55307', '74621', '11622', '68908', '33032', '52868', '99194', '99900', '84936', '69036', '99149', '45013', '32895', '59004', '32322', '14933', '32936', '33562', '72550', '27385', '58049', '58200', '16808', '21360', '32961', '18586', '79307', '15492') and substr(substr(ca_zip, 1, 5), 1, 2) is not null)
-                                                  TableScan [TS_6] (rows=40000000 width=1014)
-                                                    default@customer_address,customer_address,Tbl:COMPLETE,Col:NONE,Output:["ca_zip"]
-                    <-Reducer 2 [SIMPLE_EDGE]
-                      SHUFFLE [RS_52]
-                        PartitionCols:_col1
-                        Merge Join Operator [MERGEJOIN_86] (rows=633595212 width=88)
-                          Conds:RS_100._col0=RS_103._col0(Inner),Output:["_col1","_col2"]
-                        <-Map 1 [SIMPLE_EDGE] vectorized
-                          SHUFFLE [RS_100]
-                            PartitionCols:_col0
-                            Select Operator [SEL_99] (rows=575995635 width=88)
-                              Output:["_col0","_col1","_col2"]
-                              Filter Operator [FIL_98] (rows=575995635 width=88)
-                                predicate:(ss_sold_date_sk is not null and ss_store_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_store_sk","ss_net_profit"]
-                        <-Map 6 [SIMPLE_EDGE] vectorized
-                          SHUFFLE [RS_103]
-                            PartitionCols:_col0
-                            Select Operator [SEL_102] (rows=18262 width=1119)
-                              Output:["_col0"]
-                              Filter Operator [FIL_101] (rows=18262 width=1119)
-                                predicate:((d_qoy = 1) and (d_year = 2002) and d_date_sk is not null)
-                                TableScan [TS_3] (rows=73049 width=1119)
-                                  default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_qoy"]
+                    Top N Key Operator [TNK_86] (rows=696954748 width=88)
+                      keys:_col8,sort order:+,top n:100
+                      Merge Join Operator [MERGEJOIN_90] (rows=696954748 width=88)
+                        Conds:RS_52._col1=RS_53._col1(Inner),Output:["_col2","_col8"]
+                      <-Reducer 11 [SIMPLE_EDGE]
+                        SHUFFLE [RS_53]
+                          PartitionCols:_col1
+                          Merge Join Operator [MERGEJOIN_89] (rows=1874 width=1911)
+                            Conds:RS_108.substr(_col0, 1, 2)=RS_111.substr(_col2, 1, 2)(Inner),Output:["_col1","_col2"]
+                          <-Map 17 [SIMPLE_EDGE] vectorized
+                            SHUFFLE [RS_111]
+                              PartitionCols:substr(_col2, 1, 2)
+                              Select Operator [SEL_110] (rows=1704 width=1910)
+                                Output:["_col0","_col1","_col2"]
+                                Filter Operator [FIL_109] (rows=1704 width=1910)
+                                  predicate:(s_store_sk is not null and substr(s_zip, 1, 2) is not null)
+                                  TableScan [TS_42] (rows=1704 width=1910)
+                                    default@store,store,Tbl:COMPLETE,Col:NONE,Output:["s_store_sk","s_store_name","s_zip"]
+                          <-Reducer 10 [SIMPLE_EDGE] vectorized
+                            SHUFFLE [RS_108]
+                              PartitionCols:substr(_col0, 1, 2)
+                              Select Operator [SEL_107] (rows=1 width=1014)
+                                Output:["_col0"]
+                                Filter Operator [FIL_106] (rows=1 width=1014)
+                                  predicate:(_col1 = 2L)
+                                  Group By Operator [GBY_105] (rows=6833333 width=1014)
+                                    Output:["_col0","_col1"],aggregations:["count(VALUE._col0)"],keys:KEY._col0
+                                  <-Union 9 [SIMPLE_EDGE]
+                                    <-Reducer 15 [CONTAINS] vectorized
+                                      Reduce Output Operator [RS_137]
+                                        PartitionCols:_col0
+                                        Group By Operator [GBY_136] (rows=13666666 width=1014)
+                                          Output:["_col0","_col1"],aggregations:["count(_col1)"],keys:_col0
+                                          Group By Operator [GBY_135] (rows=3666666 width=1014)
+                                            Output:["_col0","_col1"],aggregations:["count(VALUE._col0)"],keys:KEY._col0
+                                          <-Reducer 14 [SIMPLE_EDGE] vectorized
+                                            SHUFFLE [RS_134]
+                                              PartitionCols:_col0
+                                              Group By Operator [GBY_133] (rows=7333333 width=1014)
+                                                Output:["_col0","_col1"],aggregations:["count()"],keys:_col0
+                                                Select Operator [SEL_132] (rows=7333333 width=1014)
+                                                  Output:["_col0"]
+                                                  Filter Operator [FIL_131] (rows=7333333 width=1014)
+                                                    predicate:(_col1 > 10L)
+                                                    Group By Operator [GBY_130] (rows=22000000 width=1014)
+                                                      Output:["_col0","_col1"],aggregations:["count(VALUE._col0)"],keys:KEY._col0
+                                                    <-Reducer 13 [SIMPLE_EDGE]
+                                                      SHUFFLE [RS_25]
+                                                        PartitionCols:_col0
+                                                        Group By Operator [GBY_24] (rows=44000000 width=1014)
+                                                          Output:["_col0","_col1"],aggregations:["count()"],keys:_col1
+                                                          Merge Join Operator [MERGEJOIN_88] (rows=44000000 width=1014)
+                                                            Conds:RS_126._col0=RS_129._col0(Inner),Output:["_col1"]
+                                                          <-Map 12 [SIMPLE_EDGE] vectorized
+                                                            SHUFFLE [RS_126]
+                                                              PartitionCols:_col0
+                                                              Select Operator [SEL_125] (rows=40000000 width=1014)
+                                                                Output:["_col0","_col1"]
+                                                                Filter Operator [FIL_124] (rows=40000000 width=1014)
+                                                                  predicate:(ca_address_sk is not null and substr(substr(ca_zip, 1, 5), 1, 2) is not null)
+                                                                  TableScan [TS_14] (rows=40000000 width=1014)
+                                                                    default@customer_address,customer_address,Tbl:COMPLETE,Col:NONE,Output:["ca_address_sk","ca_zip"]
+                                                          <-Map 16 [SIMPLE_EDGE] vectorized
+                                                            SHUFFLE [RS_129]
+                                                              PartitionCols:_col0
+                                                              Select Operator [SEL_128] (rows=40000000 width=860)
+                                                                Output:["_col0"]
+                                                                Filter Operator [FIL_127] (rows=40000000 width=860)
+                                                                  predicate:((c_preferred_cust_flag = 'Y') and c_current_addr_sk is not null)
+                                                                  TableScan [TS_17] (rows=80000000 width=860)
+                                                                    default@customer,customer,Tbl:COMPLETE,Col:NONE,Output:["c_current_addr_sk","c_preferred_cust_flag"]
+                                    <-Reducer 8 [CONTAINS] vectorized
+                                      Reduce Output Operator [RS_123]
+                                        PartitionCols:_col0
+                                        Group By Operator [GBY_122] (rows=13666666 width=1014)
+                                          Output:["_col0","_col1"],aggregations:["count(_col1)"],keys:_col0
+                                          Group By Operator [GBY_121] (rows=10000000 width=1014)
+                                            Output:["_col0","_col1"],aggregations:["count(VALUE._col0)"],keys:KEY._col0
+                                          <-Map 7 [SIMPLE_EDGE] vectorized
+                                            SHUFFLE [RS_120]
+                                              PartitionCols:_col0
+                                              Group By Operator [GBY_119] (rows=20000000 width=1014)
+                                                Output:["_col0","_col1"],aggregations:["count()"],keys:_col0
+                                                Select Operator [SEL_118] (rows=20000000 width=1014)
+                                                  Output:["_col0"]
+                                                  Filter Operator [FIL_117] (rows=20000000 width=1014)
+                                                    predicate:((substr(ca_zip, 1, 5)) IN ('89436', '30868', '65085', '22977', '83927', '77557', '58429', '40697', '80614', '10502', '32779', '91137', '61265', '98294', '17921', '18427', '21203', '59362', '87291', '84093', '21505', '17184', '10866', '67898', '25797', '28055', '18377', '80332', '74535', '21757', '29742', '90885', '29898', '17819', '40811', '25990', '47513', '89531', '91068', '10391', '18846', '99223', '82637', '41368', '83658', '86199', '81625', '26696', '89338', '88425', '32200', '81427', '19053', '77471', '36610', '99823', '43276', '41249', '48584', '83550', '82276', '18842', '78890', '14090', '38123', '40936', '34425', '19850', '43286', '80072', '79188', '54191', '11395', '50497', '84861', '90733', '21068', '57666', '37119', '25004', '57835', '70067', '62878', '95806', '19303', '18840', '19124', '29785', '16737', '16022', '49613', '89977', '68310', '60069', '98360', '48649', '39050', '41793', '25002', '27413', '39736'
 , '47208', '16515', '94808', '57648', '15009', '80015', '42961', '63982', '21744', '71853', '81087', '67468', '34175', '64008', '20261', '11201', '51799', '48043', '45645', '61163', '48375', '36447', '57042', '21218', '41100', '89951', '22745', '35851', '83326', '61125', '78298', '80752', '49858', '52940', '96976', '63792', '11376', '53582', '18717', '90226', '50530', '94203', '99447', '27670', '96577', '57856', '56372', '16165', '23427', '54561', '28806', '44439', '22926', '30123', '61451', '92397', '56979', '92309', '70873', '13355', '21801', '46346', '37562', '56458', '28286', '47306', '99555', '69399', '26234', '47546', '49661', '88601', '35943', '39936', '25632', '24611', '44166', '56648', '30379', '59785', '11110', '14329', '93815', '52226', '71381', '13842', '25612', '63294', '14664', '21077', '82626', '18799', '60915', '81020', '56447', '76619', '11433', '13414', '42548', '92713', '70467', '30884', '47484', '16072', '38936', '13036', '88376', '45539', '35901', '19506', '6569
 0', '73957', '71850', '49231', '14276', '20005', '18384', '76615', '11635', '38177', '55607', '41369', '95447', '58581', '58149', '91946', '33790', '76232', '75692', '95464', '22246', '51061', '56692', '53121', '77209', '15482', '10688', '14868', '45907', '73520', '72666', '25734', '17959', '24677', '66446', '94627', '53535', '15560', '41967', '69297', '11929', '59403', '33283', '52232', '57350', '43933', '40921', '36635', '10827', '71286', '19736', '80619', '25251', '95042', '15526', '36496', '55854', '49124', '81980', '35375', '49157', '63512', '28944', '14946', '36503', '54010', '18767', '23969', '43905', '66979', '33113', '21286', '58471', '59080', '13395', '79144', '70373', '67031', '38360', '26705', '50906', '52406', '26066', '73146', '15884', '31897', '30045', '61068', '45550', '92454', '13376', '14354', '19770', '22928', '97790', '50723', '46081', '30202', '14410', '20223', '88500', '67298', '13261', '14172', '81410', '93578', '83583', '46047', '94167', '82564', '21156', '15
 799', '86709', '37931', '74703', '83103', '23054', '70470', '72008', '49247', '91911', '69998', '20961', '70070', '63197', '54853', '88191', '91830', '49521', '19454', '81450', '89091', '62378', '25683', '61869', '51744', '36580', '85778', '36871', '48121', '28810', '83712', '45486', '67393', '26935', '42393', '20132', '55349', '86057', '21309', '80218', '10094', '11357', '48819', '39734', '40758', '30432', '21204', '29467', '30214', '61024', '55307', '74621', '11622', '68908', '33032', '52868', '99194', '99900', '84936', '69036', '99149', '45013', '32895', '59004', '32322', '14933', '32936', '33562', '72550', '27385', '58049', '58200', '16808', '21360', '32961', '18586', '79307', '15492') and substr(substr(ca_zip, 1, 5), 1, 2) is not null)
+                                                    TableScan [TS_6] (rows=40000000 width=1014)
+                                                      default@customer_address,customer_address,Tbl:COMPLETE,Col:NONE,Output:["ca_zip"]
+                      <-Reducer 2 [SIMPLE_EDGE]
+                        SHUFFLE [RS_52]
+                          PartitionCols:_col1
+                          Merge Join Operator [MERGEJOIN_87] (rows=633595212 width=88)
+                            Conds:RS_101._col0=RS_104._col0(Inner),Output:["_col1","_col2"]
+                          <-Map 1 [SIMPLE_EDGE] vectorized
+                            SHUFFLE [RS_101]
+                              PartitionCols:_col0
+                              Select Operator [SEL_100] (rows=575995635 width=88)
+                                Output:["_col0","_col1","_col2"]
+                                Filter Operator [FIL_99] (rows=575995635 width=88)
+                                  predicate:(ss_sold_date_sk is not null and ss_store_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_store_sk","ss_net_profit"]
+                          <-Map 6 [SIMPLE_EDGE] vectorized
+                            SHUFFLE [RS_104]
+                              PartitionCols:_col0
+                              Select Operator [SEL_103] (rows=18262 width=1119)
+                                Output:["_col0"]
+                                Filter Operator [FIL_102] (rows=18262 width=1119)
+                                  predicate:((d_qoy = 1) and (d_year = 2002) and d_date_sk is not null)
+                                  TableScan [TS_3] (rows=73049 width=1119)
+                                    default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_qoy"]