You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by se...@apache.org on 2018/07/19 21:44:42 UTC

[04/54] [abbrv] 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/851c8aba/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 b32d7e4..c1d7b97 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query76.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query76.q.out
@@ -70,193 +70,199 @@ Stage-0
     limit:100
     Stage-1
       Reducer 6 vectorized
-      File Output Operator [FS_195]
-        Limit [LIM_194] (rows=100 width=108)
+      File Output Operator [FS_199]
+        Limit [LIM_198] (rows=100 width=108)
           Number of rows:100
-          Select Operator [SEL_193] (rows=304916424 width=108)
+          Select Operator [SEL_197] (rows=304916424 width=108)
             Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
           <-Reducer 5 [SIMPLE_EDGE] vectorized
-            SHUFFLE [RS_192]
-              Group By Operator [GBY_191] (rows=304916424 width=108)
+            SHUFFLE [RS_196]
+              Group By Operator [GBY_195] (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 12 [CONTAINS]
-                  Reduce Output Operator [RS_163]
+                  Reduce Output Operator [RS_167]
                     PartitionCols:_col0, _col1, _col2, _col3, _col4
-                    Group By Operator [GBY_162] (rows=609832848 width=108)
+                    Group By Operator [GBY_166] (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_160] (rows=174233858 width=135)
-                        Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
-                        Merge Join Operator [MERGEJOIN_159] (rows=174233858 width=135)
-                          Conds:RS_45._col0=RS_213._col0(Inner),Output:["_col3","_col5","_col7","_col8"]
-                        <-Map 21 [SIMPLE_EDGE] vectorized
-                          PARTITION_ONLY_SHUFFLE [RS_213]
-                            PartitionCols:_col0
-                            Select Operator [SEL_212] (rows=73049 width=1119)
-                              Output:["_col0","_col1","_col2"]
-                              Filter Operator [FIL_211] (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 11 [SIMPLE_EDGE]
-                          SHUFFLE [RS_45]
-                            PartitionCols:_col0
-                            Merge Join Operator [MERGEJOIN_147] (rows=158394413 width=135)
-                              Conds:RS_221._col2=RS_170._col0(Inner),Output:["_col0","_col3","_col5"]
-                            <-Map 1 [SIMPLE_EDGE] vectorized
-                              SHUFFLE [RS_170]
-                                PartitionCols:_col0
-                                Select Operator [SEL_165] (rows=462000 width=1436)
-                                  Output:["_col0","_col1"]
-                                  Filter Operator [FIL_164] (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 20 [SIMPLE_EDGE] vectorized
-                              SHUFFLE [RS_221]
-                                PartitionCols:_col2
-                                Select Operator [SEL_220] (rows=143994918 width=135)
-                                  Output:["_col0","_col2","_col3"]
-                                  Filter Operator [FIL_219] (rows=143994918 width=135)
-                                    predicate:((cs_item_sk BETWEEN DynamicValue(RS_43_item_i_item_sk_min) AND DynamicValue(RS_43_item_i_item_sk_max) and in_bloom_filter(cs_item_sk, DynamicValue(RS_43_item_i_item_sk_bloom_filter))) and (cs_sold_date_sk BETWEEN DynamicValue(RS_46_date_dim_d_date_sk_min) AND DynamicValue(RS_46_date_dim_d_date_sk_max) and in_bloom_filter(cs_sold_date_sk, DynamicValue(RS_46_date_dim_d_date_sk_bloom_filter))) and 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 13 [BROADCAST_EDGE] vectorized
-                                      BROADCAST [RS_210]
-                                        Group By Operator [GBY_209] (rows=1 width=12)
-                                          Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"]
-                                        <-Map 1 [CUSTOM_SIMPLE_EDGE] vectorized
-                                          SHUFFLE [RS_177]
-                                            Group By Operator [GBY_174] (rows=1 width=12)
-                                              Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"]
-                                              Select Operator [SEL_171] (rows=462000 width=1436)
-                                                Output:["_col0"]
-                                                 Please refer to the previous Select Operator [SEL_165]
-                                    <-Reducer 22 [BROADCAST_EDGE] vectorized
-                                      BROADCAST [RS_218]
-                                        Group By Operator [GBY_217] (rows=1 width=12)
-                                          Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"]
-                                        <-Map 21 [CUSTOM_SIMPLE_EDGE] vectorized
-                                          PARTITION_ONLY_SHUFFLE [RS_216]
-                                            Group By Operator [GBY_215] (rows=1 width=12)
-                                              Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"]
-                                              Select Operator [SEL_214] (rows=73049 width=1119)
-                                                Output:["_col0"]
-                                                 Please refer to the previous Select Operator [SEL_212]
+                      Top N Key Operator [TNK_165] (rows=609832848 width=108)
+                        keys:_col0, _col1, _col2, _col3, _col4,sort order:+++++,top n:100
+                        Select Operator [SEL_163] (rows=174233858 width=135)
+                          Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
+                          Merge Join Operator [MERGEJOIN_162] (rows=174233858 width=135)
+                            Conds:RS_45._col0=RS_217._col0(Inner),Output:["_col3","_col5","_col7","_col8"]
+                          <-Map 21 [SIMPLE_EDGE] vectorized
+                            PARTITION_ONLY_SHUFFLE [RS_217]
+                              PartitionCols:_col0
+                              Select Operator [SEL_216] (rows=73049 width=1119)
+                                Output:["_col0","_col1","_col2"]
+                                Filter Operator [FIL_215] (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 11 [SIMPLE_EDGE]
+                            SHUFFLE [RS_45]
+                              PartitionCols:_col0
+                              Merge Join Operator [MERGEJOIN_148] (rows=158394413 width=135)
+                                Conds:RS_225._col2=RS_174._col0(Inner),Output:["_col0","_col3","_col5"]
+                              <-Map 1 [SIMPLE_EDGE] vectorized
+                                SHUFFLE [RS_174]
+                                  PartitionCols:_col0
+                                  Select Operator [SEL_169] (rows=462000 width=1436)
+                                    Output:["_col0","_col1"]
+                                    Filter Operator [FIL_168] (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 20 [SIMPLE_EDGE] vectorized
+                                SHUFFLE [RS_225]
+                                  PartitionCols:_col2
+                                  Select Operator [SEL_224] (rows=143994918 width=135)
+                                    Output:["_col0","_col2","_col3"]
+                                    Filter Operator [FIL_223] (rows=143994918 width=135)
+                                      predicate:((cs_item_sk BETWEEN DynamicValue(RS_43_item_i_item_sk_min) AND DynamicValue(RS_43_item_i_item_sk_max) and in_bloom_filter(cs_item_sk, DynamicValue(RS_43_item_i_item_sk_bloom_filter))) and (cs_sold_date_sk BETWEEN DynamicValue(RS_46_date_dim_d_date_sk_min) AND DynamicValue(RS_46_date_dim_d_date_sk_max) and in_bloom_filter(cs_sold_date_sk, DynamicValue(RS_46_date_dim_d_date_sk_bloom_filter))) and 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 13 [BROADCAST_EDGE] vectorized
+                                        BROADCAST [RS_214]
+                                          Group By Operator [GBY_213] (rows=1 width=12)
+                                            Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"]
+                                          <-Map 1 [CUSTOM_SIMPLE_EDGE] vectorized
+                                            SHUFFLE [RS_181]
+                                              Group By Operator [GBY_178] (rows=1 width=12)
+                                                Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"]
+                                                Select Operator [SEL_175] (rows=462000 width=1436)
+                                                  Output:["_col0"]
+                                                   Please refer to the previous Select Operator [SEL_169]
+                                      <-Reducer 22 [BROADCAST_EDGE] vectorized
+                                        BROADCAST [RS_222]
+                                          Group By Operator [GBY_221] (rows=1 width=12)
+                                            Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"]
+                                          <-Map 21 [CUSTOM_SIMPLE_EDGE] vectorized
+                                            PARTITION_ONLY_SHUFFLE [RS_220]
+                                              Group By Operator [GBY_219] (rows=1 width=12)
+                                                Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"]
+                                                Select Operator [SEL_218] (rows=73049 width=1119)
+                                                  Output:["_col0"]
+                                                   Please refer to the previous Select Operator [SEL_216]
                 <-Reducer 3 [CONTAINS]
-                  Reduce Output Operator [RS_153]
+                  Reduce Output Operator [RS_155]
                     PartitionCols:_col0, _col1, _col2, _col3, _col4
-                    Group By Operator [GBY_152] (rows=609832848 width=108)
+                    Group By Operator [GBY_154] (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_150] (rows=348477373 width=88)
-                        Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
-                        Merge Join Operator [MERGEJOIN_149] (rows=348477373 width=88)
-                          Conds:RS_12._col2=RS_182._col0(Inner),Output:["_col1","_col5","_col7","_col8"]
-                        <-Map 15 [SIMPLE_EDGE] vectorized
-                          SHUFFLE [RS_182]
-                            PartitionCols:_col0
-                            Select Operator [SEL_181] (rows=73049 width=1119)
-                              Output:["_col0","_col1","_col2"]
-                              Filter Operator [FIL_180] (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_143] (rows=316797605 width=88)
-                              Conds:RS_166._col0=RS_190._col1(Inner),Output:["_col1","_col2","_col5"]
-                            <-Map 1 [SIMPLE_EDGE] vectorized
-                              SHUFFLE [RS_166]
-                                PartitionCols:_col0
-                                 Please refer to the previous Select Operator [SEL_165]
-                            <-Map 14 [SIMPLE_EDGE] vectorized
-                              SHUFFLE [RS_190]
-                                PartitionCols:_col1
-                                Select Operator [SEL_189] (rows=287997817 width=88)
-                                  Output:["_col0","_col1","_col3"]
-                                  Filter Operator [FIL_188] (rows=287997817 width=88)
-                                    predicate:((ss_item_sk BETWEEN DynamicValue(RS_9_item_i_item_sk_min) AND DynamicValue(RS_9_item_i_item_sk_max) and in_bloom_filter(ss_item_sk, DynamicValue(RS_9_item_i_item_sk_bloom_filter))) and (ss_sold_date_sk BETWEEN DynamicValue(RS_13_date_dim_d_date_sk_min) AND DynamicValue(RS_13_date_dim_d_date_sk_max) and in_bloom_filter(ss_sold_date_sk, DynamicValue(RS_13_date_dim_d_date_sk_bloom_filter))) and 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 16 [BROADCAST_EDGE] vectorized
-                                      BROADCAST [RS_187]
-                                        Group By Operator [GBY_186] (rows=1 width=12)
-                                          Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"]
-                                        <-Map 15 [CUSTOM_SIMPLE_EDGE] vectorized
-                                          SHUFFLE [RS_185]
-                                            Group By Operator [GBY_184] (rows=1 width=12)
-                                              Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"]
-                                              Select Operator [SEL_183] (rows=73049 width=1119)
-                                                Output:["_col0"]
-                                                 Please refer to the previous Select Operator [SEL_181]
-                                    <-Reducer 7 [BROADCAST_EDGE] vectorized
-                                      BROADCAST [RS_179]
-                                        Group By Operator [GBY_178] (rows=1 width=12)
-                                          Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"]
-                                        <-Map 1 [CUSTOM_SIMPLE_EDGE] vectorized
-                                          SHUFFLE [RS_175]
-                                            Group By Operator [GBY_172] (rows=1 width=12)
-                                              Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"]
-                                              Select Operator [SEL_167] (rows=462000 width=1436)
-                                                Output:["_col0"]
-                                                 Please refer to the previous Select Operator [SEL_165]
+                      Top N Key Operator [TNK_153] (rows=609832848 width=108)
+                        keys:_col0, _col1, _col2, _col3, _col4,sort order:+++++,top n:100
+                        Select Operator [SEL_151] (rows=348477373 width=88)
+                          Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
+                          Merge Join Operator [MERGEJOIN_150] (rows=348477373 width=88)
+                            Conds:RS_12._col2=RS_186._col0(Inner),Output:["_col1","_col5","_col7","_col8"]
+                          <-Map 15 [SIMPLE_EDGE] vectorized
+                            SHUFFLE [RS_186]
+                              PartitionCols:_col0
+                              Select Operator [SEL_185] (rows=73049 width=1119)
+                                Output:["_col0","_col1","_col2"]
+                                Filter Operator [FIL_184] (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_144] (rows=316797605 width=88)
+                                Conds:RS_170._col0=RS_194._col1(Inner),Output:["_col1","_col2","_col5"]
+                              <-Map 1 [SIMPLE_EDGE] vectorized
+                                SHUFFLE [RS_170]
+                                  PartitionCols:_col0
+                                   Please refer to the previous Select Operator [SEL_169]
+                              <-Map 14 [SIMPLE_EDGE] vectorized
+                                SHUFFLE [RS_194]
+                                  PartitionCols:_col1
+                                  Select Operator [SEL_193] (rows=287997817 width=88)
+                                    Output:["_col0","_col1","_col3"]
+                                    Filter Operator [FIL_192] (rows=287997817 width=88)
+                                      predicate:((ss_item_sk BETWEEN DynamicValue(RS_9_item_i_item_sk_min) AND DynamicValue(RS_9_item_i_item_sk_max) and in_bloom_filter(ss_item_sk, DynamicValue(RS_9_item_i_item_sk_bloom_filter))) and (ss_sold_date_sk BETWEEN DynamicValue(RS_13_date_dim_d_date_sk_min) AND DynamicValue(RS_13_date_dim_d_date_sk_max) and in_bloom_filter(ss_sold_date_sk, DynamicValue(RS_13_date_dim_d_date_sk_bloom_filter))) and 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 16 [BROADCAST_EDGE] vectorized
+                                        BROADCAST [RS_191]
+                                          Group By Operator [GBY_190] (rows=1 width=12)
+                                            Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"]
+                                          <-Map 15 [CUSTOM_SIMPLE_EDGE] vectorized
+                                            SHUFFLE [RS_189]
+                                              Group By Operator [GBY_188] (rows=1 width=12)
+                                                Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"]
+                                                Select Operator [SEL_187] (rows=73049 width=1119)
+                                                  Output:["_col0"]
+                                                   Please refer to the previous Select Operator [SEL_185]
+                                      <-Reducer 7 [BROADCAST_EDGE] vectorized
+                                        BROADCAST [RS_183]
+                                          Group By Operator [GBY_182] (rows=1 width=12)
+                                            Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"]
+                                          <-Map 1 [CUSTOM_SIMPLE_EDGE] vectorized
+                                            SHUFFLE [RS_179]
+                                              Group By Operator [GBY_176] (rows=1 width=12)
+                                                Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"]
+                                                Select Operator [SEL_171] (rows=462000 width=1436)
+                                                  Output:["_col0"]
+                                                   Please refer to the previous Select Operator [SEL_169]
                 <-Reducer 9 [CONTAINS]
-                  Reduce Output Operator [RS_158]
+                  Reduce Output Operator [RS_161]
                     PartitionCols:_col0, _col1, _col2, _col3, _col4
-                    Group By Operator [GBY_157] (rows=609832848 width=108)
+                    Group By Operator [GBY_160] (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_155] (rows=87121617 width=135)
-                        Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
-                        Merge Join Operator [MERGEJOIN_154] (rows=87121617 width=135)
-                          Conds:RS_28._col0=RS_200._col0(Inner),Output:["_col3","_col5","_col7","_col8"]
-                        <-Map 18 [SIMPLE_EDGE] vectorized
-                          SHUFFLE [RS_200]
-                            PartitionCols:_col0
-                            Select Operator [SEL_199] (rows=73049 width=1119)
-                              Output:["_col0","_col1","_col2"]
-                              Filter Operator [FIL_198] (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 8 [SIMPLE_EDGE]
-                          SHUFFLE [RS_28]
-                            PartitionCols:_col0
-                            Merge Join Operator [MERGEJOIN_145] (rows=79201469 width=135)
-                              Conds:RS_208._col1=RS_168._col0(Inner),Output:["_col0","_col3","_col5"]
-                            <-Map 1 [SIMPLE_EDGE] vectorized
-                              SHUFFLE [RS_168]
-                                PartitionCols:_col0
-                                 Please refer to the previous Select Operator [SEL_165]
-                            <-Map 17 [SIMPLE_EDGE] vectorized
-                              SHUFFLE [RS_208]
-                                PartitionCols:_col1
-                                Select Operator [SEL_207] (rows=72001334 width=135)
-                                  Output:["_col0","_col1","_col3"]
-                                  Filter Operator [FIL_206] (rows=72001334 width=135)
-                                    predicate:((ws_item_sk BETWEEN DynamicValue(RS_26_item_i_item_sk_min) AND DynamicValue(RS_26_item_i_item_sk_max) and in_bloom_filter(ws_item_sk, DynamicValue(RS_26_item_i_item_sk_bloom_filter))) and (ws_sold_date_sk BETWEEN DynamicValue(RS_29_date_dim_d_date_sk_min) AND DynamicValue(RS_29_date_dim_d_date_sk_max) and in_bloom_filter(ws_sold_date_sk, DynamicValue(RS_29_date_dim_d_date_sk_bloom_filter))) and 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"]
-                                    <-Reducer 10 [BROADCAST_EDGE] vectorized
-                                      BROADCAST [RS_197]
-                                        Group By Operator [GBY_196] (rows=1 width=12)
-                                          Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"]
-                                        <-Map 1 [CUSTOM_SIMPLE_EDGE] vectorized
-                                          SHUFFLE [RS_176]
-                                            Group By Operator [GBY_173] (rows=1 width=12)
-                                              Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"]
-                                              Select Operator [SEL_169] (rows=462000 width=1436)
-                                                Output:["_col0"]
-                                                 Please refer to the previous Select Operator [SEL_165]
-                                    <-Reducer 19 [BROADCAST_EDGE] vectorized
-                                      BROADCAST [RS_205]
-                                        Group By Operator [GBY_204] (rows=1 width=12)
-                                          Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"]
-                                        <-Map 18 [CUSTOM_SIMPLE_EDGE] vectorized
-                                          SHUFFLE [RS_203]
-                                            Group By Operator [GBY_202] (rows=1 width=12)
-                                              Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"]
-                                              Select Operator [SEL_201] (rows=73049 width=1119)
-                                                Output:["_col0"]
-                                                 Please refer to the previous Select Operator [SEL_199]
+                      Top N Key Operator [TNK_159] (rows=609832848 width=108)
+                        keys:_col0, _col1, _col2, _col3, _col4,sort order:+++++,top n:100
+                        Select Operator [SEL_157] (rows=87121617 width=135)
+                          Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
+                          Merge Join Operator [MERGEJOIN_156] (rows=87121617 width=135)
+                            Conds:RS_28._col0=RS_204._col0(Inner),Output:["_col3","_col5","_col7","_col8"]
+                          <-Map 18 [SIMPLE_EDGE] vectorized
+                            SHUFFLE [RS_204]
+                              PartitionCols:_col0
+                              Select Operator [SEL_203] (rows=73049 width=1119)
+                                Output:["_col0","_col1","_col2"]
+                                Filter Operator [FIL_202] (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 8 [SIMPLE_EDGE]
+                            SHUFFLE [RS_28]
+                              PartitionCols:_col0
+                              Merge Join Operator [MERGEJOIN_146] (rows=79201469 width=135)
+                                Conds:RS_212._col1=RS_172._col0(Inner),Output:["_col0","_col3","_col5"]
+                              <-Map 1 [SIMPLE_EDGE] vectorized
+                                SHUFFLE [RS_172]
+                                  PartitionCols:_col0
+                                   Please refer to the previous Select Operator [SEL_169]
+                              <-Map 17 [SIMPLE_EDGE] vectorized
+                                SHUFFLE [RS_212]
+                                  PartitionCols:_col1
+                                  Select Operator [SEL_211] (rows=72001334 width=135)
+                                    Output:["_col0","_col1","_col3"]
+                                    Filter Operator [FIL_210] (rows=72001334 width=135)
+                                      predicate:((ws_item_sk BETWEEN DynamicValue(RS_26_item_i_item_sk_min) AND DynamicValue(RS_26_item_i_item_sk_max) and in_bloom_filter(ws_item_sk, DynamicValue(RS_26_item_i_item_sk_bloom_filter))) and (ws_sold_date_sk BETWEEN DynamicValue(RS_29_date_dim_d_date_sk_min) AND DynamicValue(RS_29_date_dim_d_date_sk_max) and in_bloom_filter(ws_sold_date_sk, DynamicValue(RS_29_date_dim_d_date_sk_bloom_filter))) and 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"]
+                                      <-Reducer 10 [BROADCAST_EDGE] vectorized
+                                        BROADCAST [RS_201]
+                                          Group By Operator [GBY_200] (rows=1 width=12)
+                                            Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"]
+                                          <-Map 1 [CUSTOM_SIMPLE_EDGE] vectorized
+                                            SHUFFLE [RS_180]
+                                              Group By Operator [GBY_177] (rows=1 width=12)
+                                                Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"]
+                                                Select Operator [SEL_173] (rows=462000 width=1436)
+                                                  Output:["_col0"]
+                                                   Please refer to the previous Select Operator [SEL_169]
+                                      <-Reducer 19 [BROADCAST_EDGE] vectorized
+                                        BROADCAST [RS_209]
+                                          Group By Operator [GBY_208] (rows=1 width=12)
+                                            Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"]
+                                          <-Map 18 [CUSTOM_SIMPLE_EDGE] vectorized
+                                            SHUFFLE [RS_207]
+                                              Group By Operator [GBY_206] (rows=1 width=12)
+                                                Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"]
+                                                Select Operator [SEL_205] (rows=73049 width=1119)
+                                                  Output:["_col0"]
+                                                   Please refer to the previous Select Operator [SEL_203]
 

http://git-wip-us.apache.org/repos/asf/hive/blob/851c8aba/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 915d4fd..617a473 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[315][tables = [$hdt$_0, $hdt$_1]] in Stage 'Reducer 16' is a cross product
+Warning: Shuffle Join MERGEJOIN[317][tables = [$hdt$_0, $hdt$_1]] in Stage 'Reducer 16' is a cross product
 PREHOOK: query: explain
 with ss as
  (select s_store_sk,
@@ -249,296 +249,302 @@ Stage-0
     limit:100
     Stage-1
       Reducer 8 vectorized
-      File Output Operator [FS_368]
-        Limit [LIM_367] (rows=100 width=163)
+      File Output Operator [FS_372]
+        Limit [LIM_371] (rows=100 width=163)
           Number of rows:100
-          Select Operator [SEL_366] (rows=956329968 width=163)
+          Select Operator [SEL_370] (rows=956329968 width=163)
             Output:["_col0","_col1","_col2","_col3","_col4"]
           <-Reducer 7 [SIMPLE_EDGE] vectorized
-            SHUFFLE [RS_365]
-              Select Operator [SEL_364] (rows=956329968 width=163)
+            SHUFFLE [RS_369]
+              Select Operator [SEL_368] (rows=956329968 width=163)
                 Output:["_col0","_col1","_col2","_col3","_col4"]
-                Group By Operator [GBY_363] (rows=956329968 width=163)
+                Group By Operator [GBY_367] (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 16 [CONTAINS]
-                    Reduce Output Operator [RS_319]
+                    Reduce Output Operator [RS_322]
                       PartitionCols:_col0, _col1, _col2
-                      Group By Operator [GBY_318] (rows=1912659936 width=163)
+                      Group By Operator [GBY_321] (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_316] (rows=158394413 width=360)
-                          Output:["_col0","_col1","_col2","_col3","_col4"]
-                          Merge Join Operator [MERGEJOIN_315] (rows=158394413 width=360)
-                            Conds:(Inner),Output:["_col0","_col1","_col2","_col3","_col4"]
-                          <-Reducer 15 [CUSTOM_SIMPLE_EDGE] vectorized
-                            PARTITION_ONLY_SHUFFLE [RS_375]
-                              Group By Operator [GBY_374] (rows=158394413 width=135)
-                                Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"],keys:KEY._col0
-                              <-Reducer 14 [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_301] (rows=316788826 width=135)
-                                      Conds:RS_373._col0=RS_330._col0(Inner),Output:["_col1","_col2","_col3"]
-                                    <-Map 9 [SIMPLE_EDGE] vectorized
-                                      SHUFFLE [RS_330]
-                                        PartitionCols:_col0
-                                        Select Operator [SEL_326] (rows=8116 width=1119)
-                                          Output:["_col0"]
-                                          Filter Operator [FIL_325] (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 31 [SIMPLE_EDGE] vectorized
-                                      SHUFFLE [RS_373]
-                                        PartitionCols:_col0
-                                        Select Operator [SEL_372] (rows=287989836 width=135)
-                                          Output:["_col0","_col1","_col2","_col3"]
-                                          Filter Operator [FIL_371] (rows=287989836 width=135)
-                                            predicate:((cs_sold_date_sk BETWEEN DynamicValue(RS_51_date_dim_d_date_sk_min) AND DynamicValue(RS_51_date_dim_d_date_sk_max) and in_bloom_filter(cs_sold_date_sk, DynamicValue(RS_51_date_dim_d_date_sk_bloom_filter))) and 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 [BROADCAST_EDGE] vectorized
-                                              BROADCAST [RS_370]
-                                                Group By Operator [GBY_369] (rows=1 width=12)
-                                                  Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"]
-                                                <-Map 9 [CUSTOM_SIMPLE_EDGE] vectorized
-                                                  SHUFFLE [RS_340]
-                                                    Group By Operator [GBY_337] (rows=1 width=12)
-                                                      Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"]
-                                                      Select Operator [SEL_331] (rows=8116 width=1119)
-                                                        Output:["_col0"]
-                                                         Please refer to the previous Select Operator [SEL_326]
-                          <-Reducer 19 [CUSTOM_SIMPLE_EDGE] vectorized
-                            PARTITION_ONLY_SHUFFLE [RS_380]
-                              Group By Operator [GBY_379] (rows=1 width=224)
-                                Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"]
-                              <-Reducer 18 [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_302] (rows=31678769 width=106)
-                                      Conds:RS_378._col0=RS_332._col0(Inner),Output:["_col1","_col2"]
-                                    <-Map 9 [SIMPLE_EDGE] vectorized
-                                      SHUFFLE [RS_332]
-                                        PartitionCols:_col0
-                                         Please refer to the previous Select Operator [SEL_326]
-                                    <-Map 32 [SIMPLE_EDGE] vectorized
-                                      SHUFFLE [RS_378]
-                                        PartitionCols:_col0
-                                        Select Operator [SEL_377] (rows=28798881 width=106)
-                                          Output:["_col0","_col1","_col2"]
-                                          Filter Operator [FIL_376] (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_320] (rows=637553312 width=163)
+                          keys:_col0, _col1, 0L,sort order:+++,top n:100
+                          Select Operator [SEL_318] (rows=158394413 width=360)
+                            Output:["_col0","_col1","_col2","_col3","_col4"]
+                            Merge Join Operator [MERGEJOIN_317] (rows=158394413 width=360)
+                              Conds:(Inner),Output:["_col0","_col1","_col2","_col3","_col4"]
+                            <-Reducer 15 [CUSTOM_SIMPLE_EDGE] vectorized
+                              PARTITION_ONLY_SHUFFLE [RS_379]
+                                Group By Operator [GBY_378] (rows=158394413 width=135)
+                                  Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"],keys:KEY._col0
+                                <-Reducer 14 [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_302] (rows=316788826 width=135)
+                                        Conds:RS_377._col0=RS_334._col0(Inner),Output:["_col1","_col2","_col3"]
+                                      <-Map 9 [SIMPLE_EDGE] vectorized
+                                        SHUFFLE [RS_334]
+                                          PartitionCols:_col0
+                                          Select Operator [SEL_330] (rows=8116 width=1119)
+                                            Output:["_col0"]
+                                            Filter Operator [FIL_329] (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 31 [SIMPLE_EDGE] vectorized
+                                        SHUFFLE [RS_377]
+                                          PartitionCols:_col0
+                                          Select Operator [SEL_376] (rows=287989836 width=135)
+                                            Output:["_col0","_col1","_col2","_col3"]
+                                            Filter Operator [FIL_375] (rows=287989836 width=135)
+                                              predicate:((cs_sold_date_sk BETWEEN DynamicValue(RS_51_date_dim_d_date_sk_min) AND DynamicValue(RS_51_date_dim_d_date_sk_max) and in_bloom_filter(cs_sold_date_sk, DynamicValue(RS_51_date_dim_d_date_sk_bloom_filter))) and 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 [BROADCAST_EDGE] vectorized
+                                                BROADCAST [RS_374]
+                                                  Group By Operator [GBY_373] (rows=1 width=12)
+                                                    Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"]
+                                                  <-Map 9 [CUSTOM_SIMPLE_EDGE] vectorized
+                                                    SHUFFLE [RS_344]
+                                                      Group By Operator [GBY_341] (rows=1 width=12)
+                                                        Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"]
+                                                        Select Operator [SEL_335] (rows=8116 width=1119)
+                                                          Output:["_col0"]
+                                                           Please refer to the previous Select Operator [SEL_330]
+                            <-Reducer 19 [CUSTOM_SIMPLE_EDGE] vectorized
+                              PARTITION_ONLY_SHUFFLE [RS_384]
+                                Group By Operator [GBY_383] (rows=1 width=224)
+                                  Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"]
+                                <-Reducer 18 [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_303] (rows=31678769 width=106)
+                                        Conds:RS_382._col0=RS_336._col0(Inner),Output:["_col1","_col2"]
+                                      <-Map 9 [SIMPLE_EDGE] vectorized
+                                        SHUFFLE [RS_336]
+                                          PartitionCols:_col0
+                                           Please refer to the previous Select Operator [SEL_330]
+                                      <-Map 32 [SIMPLE_EDGE] vectorized
+                                        SHUFFLE [RS_382]
+                                          PartitionCols:_col0
+                                          Select Operator [SEL_381] (rows=28798881 width=106)
+                                            Output:["_col0","_col1","_col2"]
+                                            Filter Operator [FIL_380] (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 23 [CONTAINS]
-                    Reduce Output Operator [RS_324]
+                    Reduce Output Operator [RS_328]
                       PartitionCols:_col0, _col1, _col2
-                      Group By Operator [GBY_323] (rows=1912659936 width=163)
+                      Group By Operator [GBY_327] (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_321] (rows=95833780 width=135)
-                          Output:["_col0","_col1","_col2","_col3","_col4"]
-                          Merge Join Operator [MERGEJOIN_320] (rows=95833780 width=135)
-                            Conds:RS_396._col0=RS_401._col0(Left Outer),Output:["_col0","_col1","_col2","_col4","_col5"]
-                          <-Reducer 22 [ONE_TO_ONE_EDGE] vectorized
-                            FORWARD [RS_396]
-                              PartitionCols:_col0
-                              Group By Operator [GBY_395] (rows=87121617 width=135)
-                                Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"],keys:KEY._col0
-                              <-Reducer 21 [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_304] (rows=174243235 width=135)
-                                      Conds:RS_89._col1=RS_385._col0(Inner),Output:["_col2","_col3","_col6"]
-                                    <-Map 34 [SIMPLE_EDGE] vectorized
-                                      PARTITION_ONLY_SHUFFLE [RS_385]
-                                        PartitionCols:_col0
-                                        Select Operator [SEL_384] (rows=4602 width=585)
-                                          Output:["_col0"]
-                                          Filter Operator [FIL_383] (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 20 [SIMPLE_EDGE]
-                                      SHUFFLE [RS_89]
-                                        PartitionCols:_col1
-                                        Merge Join Operator [MERGEJOIN_303] (rows=158402938 width=135)
-                                          Conds:RS_394._col0=RS_333._col0(Inner),Output:["_col1","_col2","_col3"]
-                                        <-Map 9 [SIMPLE_EDGE] vectorized
-                                          SHUFFLE [RS_333]
-                                            PartitionCols:_col0
-                                             Please refer to the previous Select Operator [SEL_326]
-                                        <-Map 33 [SIMPLE_EDGE] vectorized
-                                          SHUFFLE [RS_394]
-                                            PartitionCols:_col0
-                                            Select Operator [SEL_393] (rows=144002668 width=135)
-                                              Output:["_col0","_col1","_col2","_col3"]
-                                              Filter Operator [FIL_392] (rows=144002668 width=135)
-                                                predicate:((ws_sold_date_sk BETWEEN DynamicValue(RS_87_date_dim_d_date_sk_min) AND DynamicValue(RS_87_date_dim_d_date_sk_max) and in_bloom_filter(ws_sold_date_sk, DynamicValue(RS_87_date_dim_d_date_sk_bloom_filter))) and (ws_web_page_sk BETWEEN DynamicValue(RS_90_web_page_wp_web_page_sk_min) AND DynamicValue(RS_90_web_page_wp_web_page_sk_max) and in_bloom_filter(ws_web_page_sk, DynamicValue(RS_90_web_page_wp_web_page_sk_bloom_filter))) and 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 [BROADCAST_EDGE] vectorized
-                                                  BROADCAST [RS_382]
-                                                    Group By Operator [GBY_381] (rows=1 width=12)
-                                                      Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"]
-                                                    <-Map 9 [CUSTOM_SIMPLE_EDGE] vectorized
-                                                      SHUFFLE [RS_341]
-                                                        Group By Operator [GBY_338] (rows=1 width=12)
-                                                          Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"]
-                                                          Select Operator [SEL_334] (rows=8116 width=1119)
-                                                            Output:["_col0"]
-                                                             Please refer to the previous Select Operator [SEL_326]
-                                                <-Reducer 35 [BROADCAST_EDGE] vectorized
-                                                  BROADCAST [RS_391]
-                                                    Group By Operator [GBY_390] (rows=1 width=12)
-                                                      Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"]
-                                                    <-Map 34 [CUSTOM_SIMPLE_EDGE] vectorized
-                                                      PARTITION_ONLY_SHUFFLE [RS_389]
-                                                        Group By Operator [GBY_388] (rows=1 width=12)
-                                                          Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"]
-                                                          Select Operator [SEL_386] (rows=4602 width=585)
-                                                            Output:["_col0"]
-                                                             Please refer to the previous Select Operator [SEL_384]
-                          <-Reducer 27 [ONE_TO_ONE_EDGE] vectorized
-                            FORWARD [RS_401]
-                              PartitionCols:_col0
-                              Group By Operator [GBY_400] (rows=8711072 width=92)
-                                Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"],keys:KEY._col0
-                              <-Reducer 26 [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_306] (rows=17422145 width=92)
-                                      Conds:RS_109._col1=RS_387._col0(Inner),Output:["_col2","_col3","_col6"]
-                                    <-Map 34 [SIMPLE_EDGE] vectorized
-                                      PARTITION_ONLY_SHUFFLE [RS_387]
-                                        PartitionCols:_col0
-                                         Please refer to the previous Select Operator [SEL_384]
-                                    <-Reducer 25 [SIMPLE_EDGE]
-                                      SHUFFLE [RS_109]
-                                        PartitionCols:_col1
-                                        Merge Join Operator [MERGEJOIN_305] (rows=15838314 width=92)
-                                          Conds:RS_399._col0=RS_335._col0(Inner),Output:["_col1","_col2","_col3"]
-                                        <-Map 9 [SIMPLE_EDGE] vectorized
-                                          SHUFFLE [RS_335]
-                                            PartitionCols:_col0
-                                             Please refer to the previous Select Operator [SEL_326]
-                                        <-Map 36 [SIMPLE_EDGE] vectorized
-                                          SHUFFLE [RS_399]
-                                            PartitionCols:_col0
-                                            Select Operator [SEL_398] (rows=14398467 width=92)
-                                              Output:["_col0","_col1","_col2","_col3"]
-                                              Filter Operator [FIL_397] (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_326] (rows=637553312 width=163)
+                          keys:_col0, _col1, 0L,sort order:+++,top n:100
+                          Select Operator [SEL_324] (rows=95833780 width=135)
+                            Output:["_col0","_col1","_col2","_col3","_col4"]
+                            Merge Join Operator [MERGEJOIN_323] (rows=95833780 width=135)
+                              Conds:RS_400._col0=RS_405._col0(Left Outer),Output:["_col0","_col1","_col2","_col4","_col5"]
+                            <-Reducer 22 [ONE_TO_ONE_EDGE] vectorized
+                              FORWARD [RS_400]
+                                PartitionCols:_col0
+                                Group By Operator [GBY_399] (rows=87121617 width=135)
+                                  Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"],keys:KEY._col0
+                                <-Reducer 21 [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_305] (rows=174243235 width=135)
+                                        Conds:RS_89._col1=RS_389._col0(Inner),Output:["_col2","_col3","_col6"]
+                                      <-Map 34 [SIMPLE_EDGE] vectorized
+                                        PARTITION_ONLY_SHUFFLE [RS_389]
+                                          PartitionCols:_col0
+                                          Select Operator [SEL_388] (rows=4602 width=585)
+                                            Output:["_col0"]
+                                            Filter Operator [FIL_387] (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 20 [SIMPLE_EDGE]
+                                        SHUFFLE [RS_89]
+                                          PartitionCols:_col1
+                                          Merge Join Operator [MERGEJOIN_304] (rows=158402938 width=135)
+                                            Conds:RS_398._col0=RS_337._col0(Inner),Output:["_col1","_col2","_col3"]
+                                          <-Map 9 [SIMPLE_EDGE] vectorized
+                                            SHUFFLE [RS_337]
+                                              PartitionCols:_col0
+                                               Please refer to the previous Select Operator [SEL_330]
+                                          <-Map 33 [SIMPLE_EDGE] vectorized
+                                            SHUFFLE [RS_398]
+                                              PartitionCols:_col0
+                                              Select Operator [SEL_397] (rows=144002668 width=135)
+                                                Output:["_col0","_col1","_col2","_col3"]
+                                                Filter Operator [FIL_396] (rows=144002668 width=135)
+                                                  predicate:((ws_sold_date_sk BETWEEN DynamicValue(RS_87_date_dim_d_date_sk_min) AND DynamicValue(RS_87_date_dim_d_date_sk_max) and in_bloom_filter(ws_sold_date_sk, DynamicValue(RS_87_date_dim_d_date_sk_bloom_filter))) and (ws_web_page_sk BETWEEN DynamicValue(RS_90_web_page_wp_web_page_sk_min) AND DynamicValue(RS_90_web_page_wp_web_page_sk_max) and in_bloom_filter(ws_web_page_sk, DynamicValue(RS_90_web_page_wp_web_page_sk_bloom_filter))) and 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 [BROADCAST_EDGE] vectorized
+                                                    BROADCAST [RS_386]
+                                                      Group By Operator [GBY_385] (rows=1 width=12)
+                                                        Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"]
+                                                      <-Map 9 [CUSTOM_SIMPLE_EDGE] vectorized
+                                                        SHUFFLE [RS_345]
+                                                          Group By Operator [GBY_342] (rows=1 width=12)
+                                                            Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"]
+                                                            Select Operator [SEL_338] (rows=8116 width=1119)
+                                                              Output:["_col0"]
+                                                               Please refer to the previous Select Operator [SEL_330]
+                                                  <-Reducer 35 [BROADCAST_EDGE] vectorized
+                                                    BROADCAST [RS_395]
+                                                      Group By Operator [GBY_394] (rows=1 width=12)
+                                                        Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"]
+                                                      <-Map 34 [CUSTOM_SIMPLE_EDGE] vectorized
+                                                        PARTITION_ONLY_SHUFFLE [RS_393]
+                                                          Group By Operator [GBY_392] (rows=1 width=12)
+                                                            Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"]
+                                                            Select Operator [SEL_390] (rows=4602 width=585)
+                                                              Output:["_col0"]
+                                                               Please refer to the previous Select Operator [SEL_388]
+                            <-Reducer 27 [ONE_TO_ONE_EDGE] vectorized
+                              FORWARD [RS_405]
+                                PartitionCols:_col0
+                                Group By Operator [GBY_404] (rows=8711072 width=92)
+                                  Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"],keys:KEY._col0
+                                <-Reducer 26 [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_307] (rows=17422145 width=92)
+                                        Conds:RS_109._col1=RS_391._col0(Inner),Output:["_col2","_col3","_col6"]
+                                      <-Map 34 [SIMPLE_EDGE] vectorized
+                                        PARTITION_ONLY_SHUFFLE [RS_391]
+                                          PartitionCols:_col0
+                                           Please refer to the previous Select Operator [SEL_388]
+                                      <-Reducer 25 [SIMPLE_EDGE]
+                                        SHUFFLE [RS_109]
+                                          PartitionCols:_col1
+                                          Merge Join Operator [MERGEJOIN_306] (rows=15838314 width=92)
+                                            Conds:RS_403._col0=RS_339._col0(Inner),Output:["_col1","_col2","_col3"]
+                                          <-Map 9 [SIMPLE_EDGE] vectorized
+                                            SHUFFLE [RS_339]
+                                              PartitionCols:_col0
+                                               Please refer to the previous Select Operator [SEL_330]
+                                          <-Map 36 [SIMPLE_EDGE] vectorized
+                                            SHUFFLE [RS_403]
+                                              PartitionCols:_col0
+                                              Select Operator [SEL_402] (rows=14398467 width=92)
+                                                Output:["_col0","_col1","_col2","_col3"]
+                                                Filter Operator [FIL_401] (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_314]
+                    Reduce Output Operator [RS_316]
                       PartitionCols:_col0, _col1, _col2
-                      Group By Operator [GBY_313] (rows=1912659936 width=163)
+                      Group By Operator [GBY_315] (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_311] (rows=383325119 width=88)
-                          Output:["_col0","_col1","_col2","_col3","_col4"]
-                          Merge Join Operator [MERGEJOIN_310] (rows=383325119 width=88)
-                            Conds:RS_357._col0=RS_362._col0(Left Outer),Output:["_col0","_col1","_col2","_col4","_col5"]
-                          <-Reducer 13 [ONE_TO_ONE_EDGE] vectorized
-                            FORWARD [RS_362]
-                              PartitionCols:_col0
-                              Group By Operator [GBY_361] (rows=34842647 width=77)
-                                Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"],keys:KEY._col0
-                              <-Reducer 12 [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_300] (rows=69685294 width=77)
-                                      Conds:RS_32._col1=RS_348._col0(Inner),Output:["_col2","_col3","_col6"]
-                                    <-Map 28 [SIMPLE_EDGE] vectorized
-                                      SHUFFLE [RS_348]
-                                        PartitionCols:_col0
-                                        Select Operator [SEL_345] (rows=1704 width=1910)
-                                          Output:["_col0"]
-                                          Filter Operator [FIL_344] (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 11 [SIMPLE_EDGE]
-                                      SHUFFLE [RS_32]
-                                        PartitionCols:_col1
-                                        Merge Join Operator [MERGEJOIN_299] (rows=63350266 width=77)
-                                          Conds:RS_360._col0=RS_329._col0(Inner),Output:["_col1","_col2","_col3"]
-                                        <-Map 9 [SIMPLE_EDGE] vectorized
-                                          SHUFFLE [RS_329]
-                                            PartitionCols:_col0
-                                             Please refer to the previous Select Operator [SEL_326]
-                                        <-Map 30 [SIMPLE_EDGE] vectorized
-                                          SHUFFLE [RS_360]
-                                            PartitionCols:_col0
-                                            Select Operator [SEL_359] (rows=57591150 width=77)
-                                              Output:["_col0","_col1","_col2","_col3"]
-                                              Filter Operator [FIL_358] (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_357]
-                              PartitionCols:_col0
-                              Group By Operator [GBY_356] (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_298] (rows=696954748 width=88)
-                                      Conds:RS_12._col1=RS_346._col0(Inner),Output:["_col2","_col3","_col6"]
-                                    <-Map 28 [SIMPLE_EDGE] vectorized
-                                      SHUFFLE [RS_346]
-                                        PartitionCols:_col0
-                                         Please refer to the previous Select Operator [SEL_345]
-                                    <-Reducer 2 [SIMPLE_EDGE]
-                                      SHUFFLE [RS_12]
-                                        PartitionCols:_col1
-                                        Merge Join Operator [MERGEJOIN_297] (rows=633595212 width=88)
-                                          Conds:RS_355._col0=RS_327._col0(Inner),Output:["_col1","_col2","_col3"]
-                                        <-Map 9 [SIMPLE_EDGE] vectorized
-                                          SHUFFLE [RS_327]
-                                            PartitionCols:_col0
-                                             Please refer to the previous Select Operator [SEL_326]
-                                        <-Map 1 [SIMPLE_EDGE] vectorized
-                                          SHUFFLE [RS_355]
-                                            PartitionCols:_col0
-                                            Select Operator [SEL_354] (rows=575995635 width=88)
-                                              Output:["_col0","_col1","_col2","_col3"]
-                                              Filter Operator [FIL_353] (rows=575995635 width=88)
-                                                predicate:((ss_sold_date_sk BETWEEN DynamicValue(RS_10_date_dim_d_date_sk_min) AND DynamicValue(RS_10_date_dim_d_date_sk_max) and in_bloom_filter(ss_sold_date_sk, DynamicValue(RS_10_date_dim_d_date_sk_bloom_filter))) and (ss_store_sk BETWEEN DynamicValue(RS_13_store_s_store_sk_min) AND DynamicValue(RS_13_store_s_store_sk_max) and in_bloom_filter(ss_store_sk, DynamicValue(RS_13_store_s_store_sk_bloom_filter))) and 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"]
-                                                <-Reducer 10 [BROADCAST_EDGE] vectorized
-                                                  BROADCAST [RS_343]
-                                                    Group By Operator [GBY_342] (rows=1 width=12)
-                                                      Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"]
-                                                    <-Map 9 [CUSTOM_SIMPLE_EDGE] vectorized
-                                                      SHUFFLE [RS_339]
-                                                        Group By Operator [GBY_336] (rows=1 width=12)
-                                                          Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"]
-                                                          Select Operator [SEL_328] (rows=8116 width=1119)
-                                                            Output:["_col0"]
-                                                             Please refer to the previous Select Operator [SEL_326]
-                                                <-Reducer 29 [BROADCAST_EDGE] vectorized
-                                                  BROADCAST [RS_352]
-                                                    Group By Operator [GBY_351] (rows=1 width=12)
-                                                      Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"]
-                                                    <-Map 28 [CUSTOM_SIMPLE_EDGE] vectorized
-                                                      SHUFFLE [RS_350]
-                                                        Group By Operator [GBY_349] (rows=1 width=12)
-                                                          Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"]
-                                                          Select Operator [SEL_347] (rows=1704 width=1910)
-                                                            Output:["_col0"]
-                                                             Please refer to the previous Select Operator [SEL_345]
+                        Top N Key Operator [TNK_314] (rows=637553312 width=163)
+                          keys:_col0, _col1, 0L,sort order:+++,top n:100
+                          Select Operator [SEL_312] (rows=383325119 width=88)
+                            Output:["_col0","_col1","_col2","_col3","_col4"]
+                            Merge Join Operator [MERGEJOIN_311] (rows=383325119 width=88)
+                              Conds:RS_361._col0=RS_366._col0(Left Outer),Output:["_col0","_col1","_col2","_col4","_col5"]
+                            <-Reducer 13 [ONE_TO_ONE_EDGE] vectorized
+                              FORWARD [RS_366]
+                                PartitionCols:_col0
+                                Group By Operator [GBY_365] (rows=34842647 width=77)
+                                  Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"],keys:KEY._col0
+                                <-Reducer 12 [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_301] (rows=69685294 width=77)
+                                        Conds:RS_32._col1=RS_352._col0(Inner),Output:["_col2","_col3","_col6"]
+                                      <-Map 28 [SIMPLE_EDGE] vectorized
+                                        SHUFFLE [RS_352]
+                                          PartitionCols:_col0
+                                          Select Operator [SEL_349] (rows=1704 width=1910)
+                                            Output:["_col0"]
+                                            Filter Operator [FIL_348] (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 11 [SIMPLE_EDGE]
+                                        SHUFFLE [RS_32]
+                                          PartitionCols:_col1
+                                          Merge Join Operator [MERGEJOIN_300] (rows=63350266 width=77)
+                                            Conds:RS_364._col0=RS_333._col0(Inner),Output:["_col1","_col2","_col3"]
+                                          <-Map 9 [SIMPLE_EDGE] vectorized
+                                            SHUFFLE [RS_333]
+                                              PartitionCols:_col0
+                                               Please refer to the previous Select Operator [SEL_330]
+                                          <-Map 30 [SIMPLE_EDGE] vectorized
+                                            SHUFFLE [RS_364]
+                                              PartitionCols:_col0
+                                              Select Operator [SEL_363] (rows=57591150 width=77)
+                                                Output:["_col0","_col1","_col2","_col3"]
+                                                Filter Operator [FIL_362] (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_361]
+                                PartitionCols:_col0
+                                Group By Operator [GBY_360] (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_299] (rows=696954748 width=88)
+                                        Conds:RS_12._col1=RS_350._col0(Inner),Output:["_col2","_col3","_col6"]
+                                      <-Map 28 [SIMPLE_EDGE] vectorized
+                                        SHUFFLE [RS_350]
+                                          PartitionCols:_col0
+                                           Please refer to the previous Select Operator [SEL_349]
+                                      <-Reducer 2 [SIMPLE_EDGE]
+                                        SHUFFLE [RS_12]
+                                          PartitionCols:_col1
+                                          Merge Join Operator [MERGEJOIN_298] (rows=633595212 width=88)
+                                            Conds:RS_359._col0=RS_331._col0(Inner),Output:["_col1","_col2","_col3"]
+                                          <-Map 9 [SIMPLE_EDGE] vectorized
+                                            SHUFFLE [RS_331]
+                                              PartitionCols:_col0
+                                               Please refer to the previous Select Operator [SEL_330]
+                                          <-Map 1 [SIMPLE_EDGE] vectorized
+                                            SHUFFLE [RS_359]
+                                              PartitionCols:_col0
+                                              Select Operator [SEL_358] (rows=575995635 width=88)
+                                                Output:["_col0","_col1","_col2","_col3"]
+                                                Filter Operator [FIL_357] (rows=575995635 width=88)
+                                                  predicate:((ss_sold_date_sk BETWEEN DynamicValue(RS_10_date_dim_d_date_sk_min) AND DynamicValue(RS_10_date_dim_d_date_sk_max) and in_bloom_filter(ss_sold_date_sk, DynamicValue(RS_10_date_dim_d_date_sk_bloom_filter))) and (ss_store_sk BETWEEN DynamicValue(RS_13_store_s_store_sk_min) AND DynamicValue(RS_13_store_s_store_sk_max) and in_bloom_filter(ss_store_sk, DynamicValue(RS_13_store_s_store_sk_bloom_filter))) and 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"]
+                                                  <-Reducer 10 [BROADCAST_EDGE] vectorized
+                                                    BROADCAST [RS_347]
+                                                      Group By Operator [GBY_346] (rows=1 width=12)
+                                                        Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"]
+                                                      <-Map 9 [CUSTOM_SIMPLE_EDGE] vectorized
+                                                        SHUFFLE [RS_343]
+                                                          Group By Operator [GBY_340] (rows=1 width=12)
+                                                            Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"]
+                                                            Select Operator [SEL_332] (rows=8116 width=1119)
+                                                              Output:["_col0"]
+                                                               Please refer to the previous Select Operator [SEL_330]
+                                                  <-Reducer 29 [BROADCAST_EDGE] vectorized
+                                                    BROADCAST [RS_356]
+                                                      Group By Operator [GBY_355] (rows=1 width=12)
+                                                        Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"]
+                                                      <-Map 28 [CUSTOM_SIMPLE_EDGE] vectorized
+                                                        SHUFFLE [RS_354]
+                                                          Group By Operator [GBY_353] (rows=1 width=12)
+                                                            Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"]
+                                                            Select Operator [SEL_351] (rows=1704 width=1910)
+                                                              Output:["_col0"]
+                                                               Please refer to the previous Select Operator [SEL_349]