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/11/11 06:03:24 UTC

[5/6] hive git commit: HIVE-20744: Use SQL constraints to improve join reordering algorithm (Jesus Camacho Rodriguez, reviewed by Ashutosh Chauhan)

http://git-wip-us.apache.org/repos/asf/hive/blob/f8b4c869/ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query64.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query64.q.out b/ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query64.q.out
index 60c4325..103b671 100644
--- a/ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query64.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query64.q.out
@@ -267,124 +267,124 @@ HiveProject(product_name=[$0], store_name=[$1], store_zip=[$2], b_street_number=
   HiveSortLimit(sort0=[$0], sort1=[$1], sort2=[$18], dir0=[ASC], dir1=[ASC], dir2=[ASC])
     HiveProject(product_name=[$0], store_name=[$2], store_zip=[$3], b_street_number=[$4], b_streen_name=[$5], b_city=[$6], b_zip=[$7], c_street_number=[$8], c_street_name=[$9], c_city=[$10], c_zip=[$11], cnt=[$12], s1=[$13], s2=[$14], s3=[$15], s11=[$20], s21=[$21], s31=[$22], cnt1=[$19])
       HiveJoin(condition=[AND(AND(AND(=($1, $16), <=($19, $12)), =($2, $17)), =($3, $18))], joinType=[inner], algorithm=[none], cost=[not available])
-        HiveProject($f0=[$13], $f1=[$12], $f2=[$10], $f3=[$11], $f4=[$6], $f5=[$7], $f6=[$8], $f7=[$9], $f8=[$0], $f9=[$1], $f10=[$2], $f11=[$3], $f15=[$14], $f16=[$15], $f17=[$16], $f18=[$17])
-          HiveAggregate(group=[{9, 10, 11, 12, 15, 17, 23, 24, 25, 26, 28, 29, 42, 43}], agg#0=[count()], agg#1=[sum($39)], agg#2=[sum($40)], agg#3=[sum($41)])
-            HiveJoin(condition=[AND(<>($1, $19), =($34, $0))], joinType=[inner], algorithm=[none], cost=[not available])
-              HiveProject(cd_demo_sk=[$0], cd_marital_status=[$2])
-                HiveTableScan(table=[[default, customer_demographics]], table:alias=[cd1])
-              HiveJoin(condition=[=($31, $0)], joinType=[inner], algorithm=[none], cost=[not available])
-                HiveJoin(condition=[=($1, $16)], joinType=[inner], algorithm=[none], cost=[not available])
-                  HiveJoin(condition=[=($4, $14)], joinType=[inner], algorithm=[none], cost=[not available])
-                    HiveJoin(condition=[=($5, $12)], joinType=[inner], algorithm=[none], cost=[not available])
-                      HiveJoin(condition=[=($2, $11)], joinType=[inner], algorithm=[none], cost=[not available])
-                        HiveJoin(condition=[=($3, $6)], joinType=[inner], algorithm=[none], cost=[not available])
-                          HiveProject(c_customer_sk=[$0], c_current_cdemo_sk=[$2], c_current_hdemo_sk=[$3], c_current_addr_sk=[$4], c_first_shipto_date_sk=[$5], c_first_sales_date_sk=[$6])
-                            HiveFilter(condition=[AND(IS NOT NULL($6), IS NOT NULL($5), IS NOT NULL($2), IS NOT NULL($3), IS NOT NULL($4))])
-                              HiveTableScan(table=[[default, customer]], table:alias=[customer])
-                          HiveProject(ca_address_sk=[$0], ca_street_number=[$2], ca_street_name=[$3], ca_city=[$6], ca_zip=[$9])
-                            HiveTableScan(table=[[default, customer_address]], table:alias=[ad2])
-                        HiveProject(hd_demo_sk=[$0])
-                          HiveFilter(condition=[IS NOT NULL($1)])
-                            HiveTableScan(table=[[default, household_demographics]], table:alias=[hd2])
-                      HiveProject(d_date_sk=[$0], d_year=[$6])
-                        HiveTableScan(table=[[default, date_dim]], table:alias=[d2])
-                    HiveProject(d_date_sk=[$0], d_year=[$6])
-                      HiveTableScan(table=[[default, date_dim]], table:alias=[d3])
-                  HiveProject(cd_demo_sk=[$0], cd_marital_status=[$2])
-                    HiveTableScan(table=[[default, customer_demographics]], table:alias=[cd2])
-                HiveProject(sr_item_sk=[$0], sr_ticket_number=[$1], ca_address_sk=[$2], ca_street_number=[$3], ca_street_name=[$4], ca_city=[$5], ca_zip=[$6], s_store_sk=[$7], s_store_name=[$8], s_zip=[$9], hd_demo_sk=[$10], ss_sold_date_sk=[$11], ss_item_sk=[$12], ss_customer_sk=[$13], ss_cdemo_sk=[$14], ss_hdemo_sk=[$15], ss_addr_sk=[$16], ss_store_sk=[$17], ss_ticket_number=[$18], ss_wholesale_cost=[$19], ss_list_price=[$20], ss_coupon_amt=[$21], i_item_sk=[$22], i_product_name=[$23], d_date_sk=[$24], cs_item_sk=[$25])
-                  HiveJoin(condition=[AND(=($12, $0), =($18, $1))], joinType=[inner], algorithm=[none], cost=[not available])
-                    HiveProject(sr_item_sk=[$2], sr_ticket_number=[$9])
-                      HiveTableScan(table=[[default, store_returns]], table:alias=[store_returns])
-                    HiveJoin(condition=[=($14, $0)], joinType=[inner], algorithm=[none], cost=[not available])
-                      HiveProject(ca_address_sk=[$0], ca_street_number=[$2], ca_street_name=[$3], ca_city=[$6], ca_zip=[$9])
-                        HiveTableScan(table=[[default, customer_address]], table:alias=[ad1])
-                      HiveJoin(condition=[=($10, $0)], joinType=[inner], algorithm=[none], cost=[not available])
-                        HiveProject(s_store_sk=[$0], s_store_name=[$5], s_zip=[$25])
-                          HiveFilter(condition=[AND(IS NOT NULL($5), IS NOT NULL($25))])
-                            HiveTableScan(table=[[default, store]], table:alias=[store])
-                        HiveJoin(condition=[=($5, $0)], joinType=[inner], algorithm=[none], cost=[not available])
-                          HiveProject(hd_demo_sk=[$0])
-                            HiveFilter(condition=[IS NOT NULL($1)])
-                              HiveTableScan(table=[[default, household_demographics]], table:alias=[hd1])
-                          HiveJoin(condition=[=($1, $14)], joinType=[inner], algorithm=[none], cost=[not available])
-                            HiveJoin(condition=[=($0, $13)], joinType=[inner], algorithm=[none], cost=[not available])
-                              HiveJoin(condition=[=($1, $11)], joinType=[inner], algorithm=[none], cost=[not available])
-                                HiveProject(ss_sold_date_sk=[$0], ss_item_sk=[$2], ss_customer_sk=[$3], ss_cdemo_sk=[$4], ss_hdemo_sk=[$5], ss_addr_sk=[$6], ss_store_sk=[$7], ss_ticket_number=[$9], ss_wholesale_cost=[$11], ss_list_price=[$12], ss_coupon_amt=[$19])
-                                  HiveFilter(condition=[AND(IS NOT NULL($0), IS NOT NULL($7), IS NOT NULL($3), IS NOT NULL($4), IS NOT NULL($8), IS NOT NULL($5), IS NOT NULL($6))])
-                                    HiveTableScan(table=[[default, store_sales]], table:alias=[store_sales])
-                                HiveProject(i_item_sk=[$0], i_product_name=[$21])
-                                  HiveFilter(condition=[AND(IN($17, _UTF-16LE'maroon', _UTF-16LE'burnished', _UTF-16LE'dim', _UTF-16LE'steel', _UTF-16LE'navajo', _UTF-16LE'chocolate'), BETWEEN(false, $5, 35, 45), BETWEEN(false, $5, 36, 50))])
-                                    HiveTableScan(table=[[default, item]], table:alias=[item])
-                              HiveProject(d_date_sk=[$0])
-                                HiveFilter(condition=[=($6, 2000)])
-                                  HiveTableScan(table=[[default, date_dim]], table:alias=[d1])
-                            HiveProject(cs_item_sk=[$0])
-                              HiveFilter(condition=[>($1, *(2, $2))])
-                                HiveAggregate(group=[{0}], agg#0=[sum($2)], agg#1=[sum($5)])
-                                  HiveJoin(condition=[AND(=($0, $3), =($1, $4))], joinType=[inner], algorithm=[none], cost=[not available])
-                                    HiveProject(cs_item_sk=[$15], cs_order_number=[$17], cs_ext_list_price=[$25])
-                                      HiveTableScan(table=[[default, catalog_sales]], table:alias=[catalog_sales])
-                                    HiveProject(cr_item_sk=[$2], cr_order_number=[$16], +=[+(+($23, $24), $25)])
-                                      HiveTableScan(table=[[default, catalog_returns]], table:alias=[catalog_returns])
-        HiveProject($f1=[$12], $f2=[$10], $f3=[$11], $f15=[$14], $f16=[$15], $f17=[$16], $f18=[$17])
-          HiveAggregate(group=[{9, 10, 11, 12, 15, 17, 23, 24, 25, 26, 28, 29, 42, 43}], agg#0=[count()], agg#1=[sum($39)], agg#2=[sum($40)], agg#3=[sum($41)])
-            HiveJoin(condition=[AND(<>($1, $19), =($34, $0))], joinType=[inner], algorithm=[none], cost=[not available])
-              HiveProject(cd_demo_sk=[$0], cd_marital_status=[$2])
-                HiveTableScan(table=[[default, customer_demographics]], table:alias=[cd1])
-              HiveJoin(condition=[=($31, $0)], joinType=[inner], algorithm=[none], cost=[not available])
-                HiveJoin(condition=[=($1, $16)], joinType=[inner], algorithm=[none], cost=[not available])
-                  HiveJoin(condition=[=($4, $14)], joinType=[inner], algorithm=[none], cost=[not available])
-                    HiveJoin(condition=[=($5, $12)], joinType=[inner], algorithm=[none], cost=[not available])
-                      HiveJoin(condition=[=($2, $11)], joinType=[inner], algorithm=[none], cost=[not available])
-                        HiveJoin(condition=[=($3, $6)], joinType=[inner], algorithm=[none], cost=[not available])
-                          HiveProject(c_customer_sk=[$0], c_current_cdemo_sk=[$2], c_current_hdemo_sk=[$3], c_current_addr_sk=[$4], c_first_shipto_date_sk=[$5], c_first_sales_date_sk=[$6])
-                            HiveFilter(condition=[AND(IS NOT NULL($6), IS NOT NULL($5), IS NOT NULL($2), IS NOT NULL($3), IS NOT NULL($4))])
-                              HiveTableScan(table=[[default, customer]], table:alias=[customer])
-                          HiveProject(ca_address_sk=[$0], ca_street_number=[$2], ca_street_name=[$3], ca_city=[$6], ca_zip=[$9])
-                            HiveTableScan(table=[[default, customer_address]], table:alias=[ad2])
-                        HiveProject(hd_demo_sk=[$0])
-                          HiveFilter(condition=[IS NOT NULL($1)])
-                            HiveTableScan(table=[[default, household_demographics]], table:alias=[hd2])
-                      HiveProject(d_date_sk=[$0], d_year=[$6])
-                        HiveTableScan(table=[[default, date_dim]], table:alias=[d2])
-                    HiveProject(d_date_sk=[$0], d_year=[$6])
-                      HiveTableScan(table=[[default, date_dim]], table:alias=[d3])
-                  HiveProject(cd_demo_sk=[$0], cd_marital_status=[$2])
-                    HiveTableScan(table=[[default, customer_demographics]], table:alias=[cd2])
-                HiveProject(sr_item_sk=[$0], sr_ticket_number=[$1], ca_address_sk=[$2], ca_street_number=[$3], ca_street_name=[$4], ca_city=[$5], ca_zip=[$6], s_store_sk=[$7], s_store_name=[$8], s_zip=[$9], hd_demo_sk=[$10], ss_sold_date_sk=[$11], ss_item_sk=[$12], ss_customer_sk=[$13], ss_cdemo_sk=[$14], ss_hdemo_sk=[$15], ss_addr_sk=[$16], ss_store_sk=[$17], ss_ticket_number=[$18], ss_wholesale_cost=[$19], ss_list_price=[$20], ss_coupon_amt=[$21], i_item_sk=[$22], i_product_name=[$23], d_date_sk=[$24], cs_item_sk=[$25])
-                  HiveJoin(condition=[AND(=($12, $0), =($18, $1))], joinType=[inner], algorithm=[none], cost=[not available])
-                    HiveProject(sr_item_sk=[$2], sr_ticket_number=[$9])
-                      HiveTableScan(table=[[default, store_returns]], table:alias=[store_returns])
-                    HiveJoin(condition=[=($14, $0)], joinType=[inner], algorithm=[none], cost=[not available])
-                      HiveProject(ca_address_sk=[$0], ca_street_number=[$2], ca_street_name=[$3], ca_city=[$6], ca_zip=[$9])
-                        HiveTableScan(table=[[default, customer_address]], table:alias=[ad1])
-                      HiveJoin(condition=[=($10, $0)], joinType=[inner], algorithm=[none], cost=[not available])
-                        HiveProject(s_store_sk=[$0], s_store_name=[$5], s_zip=[$25])
-                          HiveFilter(condition=[AND(IS NOT NULL($5), IS NOT NULL($25))])
-                            HiveTableScan(table=[[default, store]], table:alias=[store])
-                        HiveJoin(condition=[=($5, $0)], joinType=[inner], algorithm=[none], cost=[not available])
-                          HiveProject(hd_demo_sk=[$0])
-                            HiveFilter(condition=[IS NOT NULL($1)])
-                              HiveTableScan(table=[[default, household_demographics]], table:alias=[hd1])
-                          HiveJoin(condition=[=($1, $14)], joinType=[inner], algorithm=[none], cost=[not available])
-                            HiveJoin(condition=[=($0, $13)], joinType=[inner], algorithm=[none], cost=[not available])
-                              HiveJoin(condition=[=($1, $11)], joinType=[inner], algorithm=[none], cost=[not available])
-                                HiveProject(ss_sold_date_sk=[$0], ss_item_sk=[$2], ss_customer_sk=[$3], ss_cdemo_sk=[$4], ss_hdemo_sk=[$5], ss_addr_sk=[$6], ss_store_sk=[$7], ss_ticket_number=[$9], ss_wholesale_cost=[$11], ss_list_price=[$12], ss_coupon_amt=[$19])
-                                  HiveFilter(condition=[AND(IS NOT NULL($0), IS NOT NULL($7), IS NOT NULL($3), IS NOT NULL($4), IS NOT NULL($8), IS NOT NULL($5), IS NOT NULL($6))])
-                                    HiveTableScan(table=[[default, store_sales]], table:alias=[store_sales])
-                                HiveProject(i_item_sk=[$0], i_product_name=[$21])
-                                  HiveFilter(condition=[AND(IN($17, _UTF-16LE'maroon', _UTF-16LE'burnished', _UTF-16LE'dim', _UTF-16LE'steel', _UTF-16LE'navajo', _UTF-16LE'chocolate'), BETWEEN(false, $5, 35, 45), BETWEEN(false, $5, 36, 50))])
-                                    HiveTableScan(table=[[default, item]], table:alias=[item])
-                              HiveProject(d_date_sk=[$0])
-                                HiveFilter(condition=[=($6, 2001)])
-                                  HiveTableScan(table=[[default, date_dim]], table:alias=[d1])
-                            HiveProject(cs_item_sk=[$0])
-                              HiveFilter(condition=[>($1, *(2, $2))])
-                                HiveAggregate(group=[{0}], agg#0=[sum($2)], agg#1=[sum($5)])
-                                  HiveJoin(condition=[AND(=($0, $3), =($1, $4))], joinType=[inner], algorithm=[none], cost=[not available])
-                                    HiveProject(cs_item_sk=[$15], cs_order_number=[$17], cs_ext_list_price=[$25])
-                                      HiveTableScan(table=[[default, catalog_sales]], table:alias=[catalog_sales])
-                                    HiveProject(cr_item_sk=[$2], cr_order_number=[$16], +=[+(+($23, $24), $25)])
-                                      HiveTableScan(table=[[default, catalog_returns]], table:alias=[catalog_returns])
+        HiveProject($f0=[$13], $f1=[$12], $f2=[$4], $f3=[$5], $f4=[$0], $f5=[$1], $f6=[$2], $f7=[$3], $f8=[$6], $f9=[$7], $f10=[$8], $f11=[$9], $f15=[$14], $f16=[$15], $f17=[$16], $f18=[$17])
+          HiveAggregate(group=[{3, 4, 5, 6, 8, 9, 20, 21, 22, 23, 26, 28, 42, 43}], agg#0=[count()], agg#1=[sum($39)], agg#2=[sum($40)], agg#3=[sum($41)])
+            HiveJoin(condition=[AND(=($32, $0), =($38, $1))], joinType=[inner], algorithm=[none], cost=[not available])
+              HiveProject(sr_item_sk=[$2], sr_ticket_number=[$9])
+                HiveTableScan(table=[[default, store_returns]], table:alias=[store_returns])
+              HiveJoin(condition=[=($34, $0)], joinType=[inner], algorithm=[none], cost=[not available])
+                HiveProject(ca_address_sk=[$0], ca_street_number=[$2], ca_street_name=[$3], ca_city=[$6], ca_zip=[$9])
+                  HiveTableScan(table=[[default, customer_address]], table:alias=[ad1])
+                HiveJoin(condition=[=($30, $0)], joinType=[inner], algorithm=[none], cost=[not available])
+                  HiveProject(s_store_sk=[$0], s_store_name=[$5], s_zip=[$25])
+                    HiveFilter(condition=[AND(IS NOT NULL($5), IS NOT NULL($25))])
+                      HiveTableScan(table=[[default, store]], table:alias=[store])
+                  HiveJoin(condition=[=($25, $0)], joinType=[inner], algorithm=[none], cost=[not available])
+                    HiveProject(hd_demo_sk=[$0])
+                      HiveFilter(condition=[IS NOT NULL($1)])
+                        HiveTableScan(table=[[default, household_demographics]], table:alias=[hd1])
+                    HiveJoin(condition=[=($21, $34)], joinType=[inner], algorithm=[none], cost=[not available])
+                      HiveJoin(condition=[AND(=($3, $0), <>($19, $1))], joinType=[inner], algorithm=[none], cost=[not available])
+                        HiveProject(cd_demo_sk=[$0], cd_marital_status=[$2])
+                          HiveTableScan(table=[[default, customer_demographics]], table:alias=[cd2])
+                        HiveJoin(condition=[=($20, $0)], joinType=[inner], algorithm=[none], cost=[not available])
+                          HiveJoin(condition=[=($4, $14)], joinType=[inner], algorithm=[none], cost=[not available])
+                            HiveJoin(condition=[=($5, $12)], joinType=[inner], algorithm=[none], cost=[not available])
+                              HiveJoin(condition=[=($2, $11)], joinType=[inner], algorithm=[none], cost=[not available])
+                                HiveJoin(condition=[=($3, $6)], joinType=[inner], algorithm=[none], cost=[not available])
+                                  HiveProject(c_customer_sk=[$0], c_current_cdemo_sk=[$2], c_current_hdemo_sk=[$3], c_current_addr_sk=[$4], c_first_shipto_date_sk=[$5], c_first_sales_date_sk=[$6])
+                                    HiveFilter(condition=[AND(IS NOT NULL($6), IS NOT NULL($5), IS NOT NULL($2), IS NOT NULL($3), IS NOT NULL($4))])
+                                      HiveTableScan(table=[[default, customer]], table:alias=[customer])
+                                  HiveProject(ca_address_sk=[$0], ca_street_number=[$2], ca_street_name=[$3], ca_city=[$6], ca_zip=[$9])
+                                    HiveTableScan(table=[[default, customer_address]], table:alias=[ad2])
+                                HiveProject(hd_demo_sk=[$0])
+                                  HiveFilter(condition=[IS NOT NULL($1)])
+                                    HiveTableScan(table=[[default, household_demographics]], table:alias=[hd2])
+                              HiveProject(d_date_sk=[$0], d_year=[$6])
+                                HiveTableScan(table=[[default, date_dim]], table:alias=[d2])
+                            HiveProject(d_date_sk=[$0], d_year=[$6])
+                              HiveTableScan(table=[[default, date_dim]], table:alias=[d3])
+                          HiveProject(cd_demo_sk=[$0], cd_marital_status=[$1], ss_sold_date_sk=[$2], ss_item_sk=[$3], ss_customer_sk=[$4], ss_cdemo_sk=[$5], ss_hdemo_sk=[$6], ss_addr_sk=[$7], ss_store_sk=[$8], ss_ticket_number=[$9], ss_wholesale_cost=[$10], ss_list_price=[$11], ss_coupon_amt=[$12], i_item_sk=[$13], i_product_name=[$14], d_date_sk=[$15])
+                            HiveJoin(condition=[=($5, $0)], joinType=[inner], algorithm=[none], cost=[not available])
+                              HiveProject(cd_demo_sk=[$0], cd_marital_status=[$2])
+                                HiveTableScan(table=[[default, customer_demographics]], table:alias=[cd1])
+                              HiveJoin(condition=[=($0, $13)], joinType=[inner], algorithm=[none], cost=[not available])
+                                HiveJoin(condition=[=($1, $11)], joinType=[inner], algorithm=[none], cost=[not available])
+                                  HiveProject(ss_sold_date_sk=[$0], ss_item_sk=[$2], ss_customer_sk=[$3], ss_cdemo_sk=[$4], ss_hdemo_sk=[$5], ss_addr_sk=[$6], ss_store_sk=[$7], ss_ticket_number=[$9], ss_wholesale_cost=[$11], ss_list_price=[$12], ss_coupon_amt=[$19])
+                                    HiveFilter(condition=[AND(IS NOT NULL($0), IS NOT NULL($7), IS NOT NULL($3), IS NOT NULL($4), IS NOT NULL($8), IS NOT NULL($5), IS NOT NULL($6))])
+                                      HiveTableScan(table=[[default, store_sales]], table:alias=[store_sales])
+                                  HiveProject(i_item_sk=[$0], i_product_name=[$21])
+                                    HiveFilter(condition=[AND(IN($17, _UTF-16LE'maroon', _UTF-16LE'burnished', _UTF-16LE'dim', _UTF-16LE'steel', _UTF-16LE'navajo', _UTF-16LE'chocolate'), BETWEEN(false, $5, 35, 45), BETWEEN(false, $5, 36, 50))])
+                                      HiveTableScan(table=[[default, item]], table:alias=[item])
+                                HiveProject(d_date_sk=[$0])
+                                  HiveFilter(condition=[=($6, 2000)])
+                                    HiveTableScan(table=[[default, date_dim]], table:alias=[d1])
+                      HiveProject(cs_item_sk=[$0])
+                        HiveFilter(condition=[>($1, *(2, $2))])
+                          HiveAggregate(group=[{0}], agg#0=[sum($2)], agg#1=[sum($5)])
+                            HiveJoin(condition=[AND(=($0, $3), =($1, $4))], joinType=[inner], algorithm=[none], cost=[not available])
+                              HiveProject(cs_item_sk=[$15], cs_order_number=[$17], cs_ext_list_price=[$25])
+                                HiveTableScan(table=[[default, catalog_sales]], table:alias=[catalog_sales])
+                              HiveProject(cr_item_sk=[$2], cr_order_number=[$16], +=[+(+($23, $24), $25)])
+                                HiveTableScan(table=[[default, catalog_returns]], table:alias=[catalog_returns])
+        HiveProject($f1=[$12], $f2=[$4], $f3=[$5], $f15=[$14], $f16=[$15], $f17=[$16], $f18=[$17])
+          HiveAggregate(group=[{3, 4, 5, 6, 8, 9, 20, 21, 22, 23, 26, 28, 42, 43}], agg#0=[count()], agg#1=[sum($39)], agg#2=[sum($40)], agg#3=[sum($41)])
+            HiveJoin(condition=[AND(=($32, $0), =($38, $1))], joinType=[inner], algorithm=[none], cost=[not available])
+              HiveProject(sr_item_sk=[$2], sr_ticket_number=[$9])
+                HiveTableScan(table=[[default, store_returns]], table:alias=[store_returns])
+              HiveJoin(condition=[=($34, $0)], joinType=[inner], algorithm=[none], cost=[not available])
+                HiveProject(ca_address_sk=[$0], ca_street_number=[$2], ca_street_name=[$3], ca_city=[$6], ca_zip=[$9])
+                  HiveTableScan(table=[[default, customer_address]], table:alias=[ad1])
+                HiveJoin(condition=[=($30, $0)], joinType=[inner], algorithm=[none], cost=[not available])
+                  HiveProject(s_store_sk=[$0], s_store_name=[$5], s_zip=[$25])
+                    HiveFilter(condition=[AND(IS NOT NULL($5), IS NOT NULL($25))])
+                      HiveTableScan(table=[[default, store]], table:alias=[store])
+                  HiveJoin(condition=[=($25, $0)], joinType=[inner], algorithm=[none], cost=[not available])
+                    HiveProject(hd_demo_sk=[$0])
+                      HiveFilter(condition=[IS NOT NULL($1)])
+                        HiveTableScan(table=[[default, household_demographics]], table:alias=[hd1])
+                    HiveJoin(condition=[=($21, $34)], joinType=[inner], algorithm=[none], cost=[not available])
+                      HiveJoin(condition=[AND(=($3, $0), <>($19, $1))], joinType=[inner], algorithm=[none], cost=[not available])
+                        HiveProject(cd_demo_sk=[$0], cd_marital_status=[$2])
+                          HiveTableScan(table=[[default, customer_demographics]], table:alias=[cd2])
+                        HiveJoin(condition=[=($20, $0)], joinType=[inner], algorithm=[none], cost=[not available])
+                          HiveJoin(condition=[=($4, $14)], joinType=[inner], algorithm=[none], cost=[not available])
+                            HiveJoin(condition=[=($5, $12)], joinType=[inner], algorithm=[none], cost=[not available])
+                              HiveJoin(condition=[=($2, $11)], joinType=[inner], algorithm=[none], cost=[not available])
+                                HiveJoin(condition=[=($3, $6)], joinType=[inner], algorithm=[none], cost=[not available])
+                                  HiveProject(c_customer_sk=[$0], c_current_cdemo_sk=[$2], c_current_hdemo_sk=[$3], c_current_addr_sk=[$4], c_first_shipto_date_sk=[$5], c_first_sales_date_sk=[$6])
+                                    HiveFilter(condition=[AND(IS NOT NULL($6), IS NOT NULL($5), IS NOT NULL($2), IS NOT NULL($3), IS NOT NULL($4))])
+                                      HiveTableScan(table=[[default, customer]], table:alias=[customer])
+                                  HiveProject(ca_address_sk=[$0], ca_street_number=[$2], ca_street_name=[$3], ca_city=[$6], ca_zip=[$9])
+                                    HiveTableScan(table=[[default, customer_address]], table:alias=[ad2])
+                                HiveProject(hd_demo_sk=[$0])
+                                  HiveFilter(condition=[IS NOT NULL($1)])
+                                    HiveTableScan(table=[[default, household_demographics]], table:alias=[hd2])
+                              HiveProject(d_date_sk=[$0], d_year=[$6])
+                                HiveTableScan(table=[[default, date_dim]], table:alias=[d2])
+                            HiveProject(d_date_sk=[$0], d_year=[$6])
+                              HiveTableScan(table=[[default, date_dim]], table:alias=[d3])
+                          HiveProject(cd_demo_sk=[$0], cd_marital_status=[$1], ss_sold_date_sk=[$2], ss_item_sk=[$3], ss_customer_sk=[$4], ss_cdemo_sk=[$5], ss_hdemo_sk=[$6], ss_addr_sk=[$7], ss_store_sk=[$8], ss_ticket_number=[$9], ss_wholesale_cost=[$10], ss_list_price=[$11], ss_coupon_amt=[$12], i_item_sk=[$13], i_product_name=[$14], d_date_sk=[$15])
+                            HiveJoin(condition=[=($5, $0)], joinType=[inner], algorithm=[none], cost=[not available])
+                              HiveProject(cd_demo_sk=[$0], cd_marital_status=[$2])
+                                HiveTableScan(table=[[default, customer_demographics]], table:alias=[cd1])
+                              HiveJoin(condition=[=($0, $13)], joinType=[inner], algorithm=[none], cost=[not available])
+                                HiveJoin(condition=[=($1, $11)], joinType=[inner], algorithm=[none], cost=[not available])
+                                  HiveProject(ss_sold_date_sk=[$0], ss_item_sk=[$2], ss_customer_sk=[$3], ss_cdemo_sk=[$4], ss_hdemo_sk=[$5], ss_addr_sk=[$6], ss_store_sk=[$7], ss_ticket_number=[$9], ss_wholesale_cost=[$11], ss_list_price=[$12], ss_coupon_amt=[$19])
+                                    HiveFilter(condition=[AND(IS NOT NULL($0), IS NOT NULL($7), IS NOT NULL($3), IS NOT NULL($4), IS NOT NULL($8), IS NOT NULL($5), IS NOT NULL($6))])
+                                      HiveTableScan(table=[[default, store_sales]], table:alias=[store_sales])
+                                  HiveProject(i_item_sk=[$0], i_product_name=[$21])
+                                    HiveFilter(condition=[AND(IN($17, _UTF-16LE'maroon', _UTF-16LE'burnished', _UTF-16LE'dim', _UTF-16LE'steel', _UTF-16LE'navajo', _UTF-16LE'chocolate'), BETWEEN(false, $5, 35, 45), BETWEEN(false, $5, 36, 50))])
+                                      HiveTableScan(table=[[default, item]], table:alias=[item])
+                                HiveProject(d_date_sk=[$0])
+                                  HiveFilter(condition=[=($6, 2001)])
+                                    HiveTableScan(table=[[default, date_dim]], table:alias=[d1])
+                      HiveProject(cs_item_sk=[$0])
+                        HiveFilter(condition=[>($1, *(2, $2))])
+                          HiveAggregate(group=[{0}], agg#0=[sum($2)], agg#1=[sum($5)])
+                            HiveJoin(condition=[AND(=($0, $3), =($1, $4))], joinType=[inner], algorithm=[none], cost=[not available])
+                              HiveProject(cs_item_sk=[$15], cs_order_number=[$17], cs_ext_list_price=[$25])
+                                HiveTableScan(table=[[default, catalog_sales]], table:alias=[catalog_sales])
+                              HiveProject(cr_item_sk=[$2], cr_order_number=[$16], +=[+(+($23, $24), $25)])
+                                HiveTableScan(table=[[default, catalog_returns]], table:alias=[catalog_returns])
 

http://git-wip-us.apache.org/repos/asf/hive/blob/f8b4c869/ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query72.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query72.q.out b/ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query72.q.out
index 5e6950f..c28c941 100644
--- a/ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query72.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query72.q.out
@@ -82,9 +82,11 @@ CBO PLAN:
 HiveSortLimit(sort0=[$5], sort1=[$0], sort2=[$1], sort3=[$2], dir0=[DESC-nulls-last], dir1=[ASC], dir2=[ASC], dir3=[ASC], fetch=[100])
   HiveProject($f0=[$0], $f1=[$1], $f2=[$2], $f3=[$3], $f4=[$4], $f5=[$5])
     HiveAggregate(group=[{0, 1, 2}], agg#0=[count($3)], agg#1=[count($4)], agg#2=[count()])
-      HiveProject($f0=[$15], $f1=[$13], $f2=[$19], $f3=[CASE(IS NULL($25), 1, 0)], $f4=[CASE(IS NOT NULL($25), 1, 0)])
-        HiveJoin(condition=[AND(=($26, $4), =($27, $6))], joinType=[left], algorithm=[none], cost=[not available])
-          HiveProject(cs_sold_date_sk=[$10], cs_ship_date_sk=[$11], cs_bill_cdemo_sk=[$12], cs_bill_hdemo_sk=[$13], cs_item_sk=[$14], cs_promo_sk=[$15], cs_order_number=[$16], cs_quantity=[$17], inv_date_sk=[$0], inv_item_sk=[$1], inv_warehouse_sk=[$2], inv_quantity_on_hand=[$3], w_warehouse_sk=[$4], w_warehouse_name=[$5], i_item_sk=[$8], i_item_desc=[$9], cd_demo_sk=[$21], hd_demo_sk=[$22], d_date_sk=[$18], d_week_seq=[$19], +=[$20], d_date_sk0=[$24], d_week_seq0=[$25], d_date_sk1=[$6], CAST=[$7], p_promo_sk=[$23])
+      HiveProject($f0=[$17], $f1=[$15], $f2=[$21], $f3=[CASE(IS NULL($27), 1, 0)], $f4=[CASE(IS NOT NULL($27), 1, 0)])
+        HiveJoin(condition=[AND(=($0, $6), =($1, $8))], joinType=[right], algorithm=[none], cost=[not available])
+          HiveProject(cr_item_sk=[$2], cr_order_number=[$16])
+            HiveTableScan(table=[[default, catalog_returns]], table:alias=[catalog_returns])
+          HiveProject(cs_sold_date_sk=[$10], cs_ship_date_sk=[$11], cs_bill_cdemo_sk=[$12], cs_bill_hdemo_sk=[$13], cs_item_sk=[$14], cs_promo_sk=[$15], cs_order_number=[$16], cs_quantity=[$17], inv_date_sk=[$0], inv_item_sk=[$1], inv_warehouse_sk=[$2], inv_quantity_on_hand=[$3], w_warehouse_sk=[$4], w_warehouse_name=[$5], i_item_sk=[$6], i_item_desc=[$7], cd_demo_sk=[$21], hd_demo_sk=[$22], d_date_sk=[$18], d_week_seq=[$19], +=[$20], d_date_sk0=[$24], d_week_seq0=[$25], d_date_sk1=[$8], CAST=[$9], p_promo_sk=[$23])
             HiveJoin(condition=[AND(=($0, $24), =($19, $25))], joinType=[inner], algorithm=[none], cost=[not available])
               HiveJoin(condition=[AND(=($14, $1), <($3, $17))], joinType=[inner], algorithm=[none], cost=[not available])
                 HiveJoin(condition=[=($4, $2)], joinType=[inner], algorithm=[none], cost=[not available])
@@ -92,14 +94,14 @@ HiveSortLimit(sort0=[$5], sort1=[$0], sort2=[$1], sort3=[$2], dir0=[DESC-nulls-l
                     HiveTableScan(table=[[default, inventory]], table:alias=[inventory])
                   HiveProject(w_warehouse_sk=[$0], w_warehouse_name=[$2])
                     HiveTableScan(table=[[default, warehouse]], table:alias=[warehouse])
-                HiveProject(d_date_sk=[$0], CAST=[$1], i_item_sk=[$2], i_item_desc=[$3], cs_sold_date_sk=[$4], cs_ship_date_sk=[$5], cs_bill_cdemo_sk=[$6], cs_bill_hdemo_sk=[$7], cs_item_sk=[$8], cs_promo_sk=[$9], cs_order_number=[$10], cs_quantity=[$11], d_date_sk0=[$12], d_week_seq=[$13], +=[$14], cd_demo_sk=[$15], hd_demo_sk=[$16], p_promo_sk=[$17])
-                  HiveJoin(condition=[AND(=($5, $0), >($1, $14))], joinType=[inner], algorithm=[none], cost=[not available])
-                    HiveProject(d_date_sk=[$0], CAST=[CAST($2):DOUBLE])
-                      HiveTableScan(table=[[default, date_dim]], table:alias=[d3])
-                    HiveJoin(condition=[=($0, $6)], joinType=[inner], algorithm=[none], cost=[not available])
-                      HiveProject(i_item_sk=[$0], i_item_desc=[$4])
-                        HiveTableScan(table=[[default, item]], table:alias=[item])
-                      HiveJoin(condition=[=($5, $13)], joinType=[left], algorithm=[none], cost=[not available])
+                HiveProject(i_item_sk=[$0], i_item_desc=[$1], d_date_sk=[$2], CAST=[$3], cs_sold_date_sk=[$4], cs_ship_date_sk=[$5], cs_bill_cdemo_sk=[$6], cs_bill_hdemo_sk=[$7], cs_item_sk=[$8], cs_promo_sk=[$9], cs_order_number=[$10], cs_quantity=[$11], d_date_sk0=[$12], d_week_seq=[$13], +=[$14], cd_demo_sk=[$15], hd_demo_sk=[$16], p_promo_sk=[$17])
+                  HiveJoin(condition=[=($0, $8)], joinType=[inner], algorithm=[none], cost=[not available])
+                    HiveProject(i_item_sk=[$0], i_item_desc=[$4])
+                      HiveTableScan(table=[[default, item]], table:alias=[item])
+                    HiveJoin(condition=[=($7, $15)], joinType=[left], algorithm=[none], cost=[not available])
+                      HiveJoin(condition=[AND(=($3, $0), >($1, $12))], joinType=[inner], algorithm=[none], cost=[not available])
+                        HiveProject(d_date_sk=[$0], CAST=[CAST($2):DOUBLE])
+                          HiveTableScan(table=[[default, date_dim]], table:alias=[d3])
                         HiveJoin(condition=[=($3, $12)], joinType=[inner], algorithm=[none], cost=[not available])
                           HiveJoin(condition=[=($2, $11)], joinType=[inner], algorithm=[none], cost=[not available])
                             HiveJoin(condition=[=($0, $8)], joinType=[inner], algorithm=[none], cost=[not available])
@@ -115,11 +117,9 @@ HiveSortLimit(sort0=[$5], sort1=[$0], sort2=[$1], sort3=[$2], dir0=[DESC-nulls-l
                           HiveProject(hd_demo_sk=[$0])
                             HiveFilter(condition=[=($2, _UTF-16LE'1001-5000')])
                               HiveTableScan(table=[[default, household_demographics]], table:alias=[household_demographics])
-                        HiveProject(p_promo_sk=[$0])
-                          HiveTableScan(table=[[default, promotion]], table:alias=[promotion])
+                      HiveProject(p_promo_sk=[$0])
+                        HiveTableScan(table=[[default, promotion]], table:alias=[promotion])
               HiveProject(d_date_sk=[$0], d_week_seq=[$4])
                 HiveFilter(condition=[IS NOT NULL($4)])
                   HiveTableScan(table=[[default, date_dim]], table:alias=[d2])
-          HiveProject(cr_item_sk=[$2], cr_order_number=[$16])
-            HiveTableScan(table=[[default, catalog_returns]], table:alias=[catalog_returns])
 

http://git-wip-us.apache.org/repos/asf/hive/blob/f8b4c869/ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query84.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query84.q.out b/ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query84.q.out
index 43ea953..d5974e2 100644
--- a/ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query84.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query84.q.out
@@ -56,15 +56,15 @@ CBO PLAN:
 HiveProject(customer_id=[$0], customername=[$1])
   HiveSortLimit(sort0=[$2], dir0=[ASC], fetch=[100])
     HiveProject(customer_id=[$2], customername=[$6], c_customer_id=[$2])
-      HiveJoin(condition=[=($1, $3)], joinType=[inner], algorithm=[none], cost=[not available])
-        HiveJoin(condition=[=($0, $1)], joinType=[inner], algorithm=[none], cost=[not available])
-          HiveProject(sr_cdemo_sk=[$4])
-            HiveFilter(condition=[IS NOT NULL($4)])
-              HiveTableScan(table=[[default, store_returns]], table:alias=[store_returns])
-          HiveProject(cd_demo_sk=[$0])
-            HiveTableScan(table=[[default, customer_demographics]], table:alias=[customer_demographics])
-        HiveProject(c_customer_id=[$0], c_current_cdemo_sk=[$1], c_current_hdemo_sk=[$2], c_current_addr_sk=[$3], ||=[$4], ca_address_sk=[$5], hd_demo_sk=[$6], hd_income_band_sk=[$7], ib_income_band_sk=[$8])
-          HiveJoin(condition=[=($6, $2)], joinType=[inner], algorithm=[none], cost=[not available])
+      HiveJoin(condition=[=($8, $4)], joinType=[inner], algorithm=[none], cost=[not available])
+        HiveJoin(condition=[=($1, $3)], joinType=[inner], algorithm=[none], cost=[not available])
+          HiveJoin(condition=[=($0, $1)], joinType=[inner], algorithm=[none], cost=[not available])
+            HiveProject(sr_cdemo_sk=[$4])
+              HiveFilter(condition=[IS NOT NULL($4)])
+                HiveTableScan(table=[[default, store_returns]], table:alias=[store_returns])
+            HiveProject(cd_demo_sk=[$0])
+              HiveTableScan(table=[[default, customer_demographics]], table:alias=[customer_demographics])
+          HiveProject(c_customer_id=[$0], c_current_cdemo_sk=[$1], c_current_hdemo_sk=[$2], c_current_addr_sk=[$3], ||=[$4], ca_address_sk=[$5])
             HiveJoin(condition=[=($3, $5)], joinType=[inner], algorithm=[none], cost=[not available])
               HiveProject(c_customer_id=[$1], c_current_cdemo_sk=[$2], c_current_hdemo_sk=[$3], c_current_addr_sk=[$4], ||=[||(||($9, _UTF-16LE', '), $8)])
                 HiveFilter(condition=[AND(IS NOT NULL($4), IS NOT NULL($2), IS NOT NULL($3))])
@@ -72,12 +72,12 @@ HiveProject(customer_id=[$0], customername=[$1])
               HiveProject(ca_address_sk=[$0])
                 HiveFilter(condition=[=($6, _UTF-16LE'Hopewell')])
                   HiveTableScan(table=[[default, customer_address]], table:alias=[customer_address])
-            HiveProject(hd_demo_sk=[$0], hd_income_band_sk=[$1], ib_income_band_sk=[$2])
-              HiveJoin(condition=[=($2, $1)], joinType=[inner], algorithm=[none], cost=[not available])
-                HiveProject(hd_demo_sk=[$0], hd_income_band_sk=[$1])
-                  HiveFilter(condition=[IS NOT NULL($1)])
-                    HiveTableScan(table=[[default, household_demographics]], table:alias=[household_demographics])
-                HiveProject(ib_income_band_sk=[$0])
-                  HiveFilter(condition=[AND(>=($1, 32287), <=($2, 82287))])
-                    HiveTableScan(table=[[default, income_band]], table:alias=[income_band])
+        HiveProject(hd_demo_sk=[$0], hd_income_band_sk=[$1], ib_income_band_sk=[$2])
+          HiveJoin(condition=[=($2, $1)], joinType=[inner], algorithm=[none], cost=[not available])
+            HiveProject(hd_demo_sk=[$0], hd_income_band_sk=[$1])
+              HiveFilter(condition=[IS NOT NULL($1)])
+                HiveTableScan(table=[[default, household_demographics]], table:alias=[household_demographics])
+            HiveProject(ib_income_band_sk=[$0])
+              HiveFilter(condition=[AND(>=($1, 32287), <=($2, 82287))])
+                HiveTableScan(table=[[default, income_band]], table:alias=[income_band])
 

http://git-wip-us.apache.org/repos/asf/hive/blob/f8b4c869/ql/src/test/results/clientpositive/perf/tez/constraints/query17.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/tez/constraints/query17.q.out b/ql/src/test/results/clientpositive/perf/tez/constraints/query17.q.out
index cac5875..4e5c2a9 100644
--- a/ql/src/test/results/clientpositive/perf/tez/constraints/query17.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/constraints/query17.q.out
@@ -103,217 +103,225 @@ POSTHOOK: Output: hdfs://### HDFS PATH ###
 Plan optimized by CBO.
 
 Vertex dependency in root stage
-Map 1 <- Reducer 12 (BROADCAST_EDGE), Reducer 13 (BROADCAST_EDGE), Reducer 16 (BROADCAST_EDGE), Reducer 17 (BROADCAST_EDGE), Reducer 9 (BROADCAST_EDGE)
-Map 19 <- Reducer 14 (BROADCAST_EDGE), Reducer 16 (BROADCAST_EDGE), Reducer 17 (BROADCAST_EDGE)
+Map 1 <- Reducer 9 (BROADCAST_EDGE)
+Map 19 <- Reducer 14 (BROADCAST_EDGE), Reducer 16 (BROADCAST_EDGE), Reducer 17 (BROADCAST_EDGE), Reducer 18 (BROADCAST_EDGE), Reducer 6 (BROADCAST_EDGE), Reducer 7 (BROADCAST_EDGE)
 Reducer 10 <- Map 19 (SIMPLE_EDGE), Map 8 (SIMPLE_EDGE)
 Reducer 11 <- Reducer 10 (SIMPLE_EDGE), Reducer 15 (SIMPLE_EDGE)
-Reducer 12 <- Reducer 10 (CUSTOM_SIMPLE_EDGE)
-Reducer 13 <- Reducer 10 (CUSTOM_SIMPLE_EDGE)
+Reducer 12 <- Map 21 (SIMPLE_EDGE), Reducer 11 (SIMPLE_EDGE)
+Reducer 13 <- Map 22 (SIMPLE_EDGE), Reducer 12 (SIMPLE_EDGE)
 Reducer 14 <- Map 8 (CUSTOM_SIMPLE_EDGE)
 Reducer 15 <- Map 20 (SIMPLE_EDGE), Map 8 (SIMPLE_EDGE)
 Reducer 16 <- Reducer 15 (CUSTOM_SIMPLE_EDGE)
 Reducer 17 <- Reducer 15 (CUSTOM_SIMPLE_EDGE)
+Reducer 18 <- Reducer 15 (CUSTOM_SIMPLE_EDGE)
 Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 8 (SIMPLE_EDGE)
-Reducer 3 <- Map 18 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
-Reducer 4 <- Reducer 11 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
-Reducer 5 <- Map 21 (SIMPLE_EDGE), Reducer 4 (SIMPLE_EDGE)
-Reducer 6 <- Reducer 5 (SIMPLE_EDGE)
-Reducer 7 <- Reducer 6 (SIMPLE_EDGE)
+Reducer 3 <- Reducer 13 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Reducer 4 (SIMPLE_EDGE)
+Reducer 6 <- Reducer 2 (CUSTOM_SIMPLE_EDGE)
+Reducer 7 <- Reducer 2 (CUSTOM_SIMPLE_EDGE)
 Reducer 9 <- Map 8 (CUSTOM_SIMPLE_EDGE)
 
 Stage-0
   Fetch Operator
     limit:100
     Stage-1
-      Reducer 7 vectorized
-      File Output Operator [FS_259]
-        Limit [LIM_258] (rows=100 width=466)
+      Reducer 5 vectorized
+      File Output Operator [FS_252]
+        Limit [LIM_251] (rows=100 width=466)
           Number of rows:100
-          Select Operator [SEL_257] (rows=8581091759 width=466)
+          Select Operator [SEL_250] (rows=8581091679 width=466)
             Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14"]
-          <-Reducer 6 [SIMPLE_EDGE] vectorized
-            SHUFFLE [RS_256]
-              Select Operator [SEL_255] (rows=8581091759 width=466)
+          <-Reducer 4 [SIMPLE_EDGE] vectorized
+            SHUFFLE [RS_249]
+              Select Operator [SEL_248] (rows=8581091679 width=466)
                 Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13"]
-                Group By Operator [GBY_254] (rows=8581091759 width=466)
+                Group By Operator [GBY_247] (rows=8581091679 width=466)
                   Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14"],aggregations:["count(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)","sum(VALUE._col3)","count(VALUE._col4)","sum(VALUE._col5)","sum(VALUE._col6)","sum(VALUE._col7)","count(VALUE._col8)","sum(VALUE._col9)","sum(VALUE._col10)","sum(VALUE._col11)"],keys:KEY._col0, KEY._col1, KEY._col2
-                <-Reducer 5 [SIMPLE_EDGE]
+                <-Reducer 3 [SIMPLE_EDGE]
                   SHUFFLE [RS_48]
                     PartitionCols:_col0, _col1, _col2
-                    Group By Operator [GBY_47] (rows=8581091759 width=466)
+                    Group By Operator [GBY_47] (rows=8581091679 width=466)
                       Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14"],aggregations:["count(_col3)","sum(_col3)","sum(_col7)","sum(_col6)","count(_col4)","sum(_col4)","sum(_col9)","sum(_col8)","count(_col5)","sum(_col5)","sum(_col11)","sum(_col10)"],keys:_col0, _col1, _col2
-                      Top N Key Operator [TNK_91] (rows=8581091759 width=381)
+                      Top N Key Operator [TNK_92] (rows=8581091679 width=381)
                         keys:_col0, _col1, _col2,sort order:+++,top n:100
-                        Select Operator [SEL_45] (rows=8581091759 width=381)
+                        Select Operator [SEL_45] (rows=8581091679 width=381)
                           Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11"]
-                          Merge Join Operator [MERGEJOIN_211] (rows=8581091759 width=381)
-                            Conds:RS_42._col3=RS_253._col0(Inner),Output:["_col5","_col8","_col9","_col13","_col19","_col22"]
-                          <-Map 21 [SIMPLE_EDGE] vectorized
-                            SHUFFLE [RS_253]
-                              PartitionCols:_col0
-                              Select Operator [SEL_252] (rows=1704 width=90)
-                                Output:["_col0","_col1"]
-                                TableScan [TS_31] (rows=1704 width=90)
-                                  default@store,store,Tbl:COMPLETE,Col:COMPLETE,Output:["s_store_sk","s_state"]
-                          <-Reducer 4 [SIMPLE_EDGE]
-                            SHUFFLE [RS_42]
-                              PartitionCols:_col3
-                              Merge Join Operator [MERGEJOIN_210] (rows=8581091759 width=299)
-                                Conds:RS_39._col1, _col2, _col4=RS_40._col6, _col7, _col8(Inner),Output:["_col3","_col5","_col8","_col9","_col13","_col19"]
-                              <-Reducer 11 [SIMPLE_EDGE]
-                                SHUFFLE [RS_40]
-                                  PartitionCols:_col6, _col7, _col8
-                                  Merge Join Operator [MERGEJOIN_209] (rows=1640229377 width=19)
-                                    Conds:RS_27._col2, _col1=RS_28._col1, _col2(Inner),Output:["_col3","_col6","_col7","_col8","_col9"]
-                                  <-Reducer 10 [SIMPLE_EDGE]
-                                    PARTITION_ONLY_SHUFFLE [RS_27]
-                                      PartitionCols:_col2, _col1
-                                      Merge Join Operator [MERGEJOIN_207] (rows=47131396 width=11)
-                                        Conds:RS_242._col0=RS_220._col0(Inner),Output:["_col1","_col2","_col3"]
-                                      <-Map 8 [SIMPLE_EDGE] vectorized
-                                        PARTITION_ONLY_SHUFFLE [RS_220]
-                                          PartitionCols:_col0
-                                          Select Operator [SEL_216] (rows=304 width=4)
-                                            Output:["_col0"]
-                                            Filter Operator [FIL_213] (rows=304 width=94)
-                                              predicate:(d_quarter_name) IN ('2000Q1', '2000Q2', '2000Q3')
-                                              TableScan [TS_3] (rows=73049 width=94)
-                                                default@date_dim,d1,Tbl:COMPLETE,Col:COMPLETE,Output:["d_date_sk","d_quarter_name"]
-                                      <-Map 19 [SIMPLE_EDGE] vectorized
-                                        SHUFFLE [RS_242]
-                                          PartitionCols:_col0
-                                          Select Operator [SEL_241] (rows=285117831 width=15)
-                                            Output:["_col0","_col1","_col2","_col3"]
-                                            Filter Operator [FIL_240] (rows=285117831 width=15)
-                                              predicate:((cs_bill_customer_sk BETWEEN DynamicValue(RS_28_store_returns_sr_customer_sk_min) AND DynamicValue(RS_28_store_returns_sr_customer_sk_max) and in_bloom_filter(cs_bill_customer_sk, DynamicValue(RS_28_store_returns_sr_customer_sk_bloom_filter))) and (cs_item_sk BETWEEN DynamicValue(RS_28_store_returns_sr_item_sk_min) AND DynamicValue(RS_28_store_returns_sr_item_sk_max) and in_bloom_filter(cs_item_sk, DynamicValue(RS_28_store_returns_sr_item_sk_bloom_filter))) and (cs_sold_date_sk BETWEEN DynamicValue(RS_25_d3_d_date_sk_min) AND DynamicValue(RS_25_d3_d_date_sk_max) and in_bloom_filter(cs_sold_date_sk, DynamicValue(RS_25_d3_d_date_sk_bloom_filter))) and cs_bill_customer_sk is not null and cs_sold_date_sk is not null)
-                                              TableScan [TS_8] (rows=287989836 width=15)
-                                                default@catalog_sales,catalog_sales,Tbl:COMPLETE,Col:COMPLETE,Output:["cs_sold_date_sk","cs_bill_customer_sk","cs_item_sk","cs_quantity"]
-                                              <-Reducer 16 [BROADCAST_EDGE] vectorized
-                                                BROADCAST [RS_234]
-                                                  Group By Operator [GBY_232] (rows=1 width=12)
-                                                    Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"]
-                                                  <-Reducer 15 [CUSTOM_SIMPLE_EDGE]
-                                                    PARTITION_ONLY_SHUFFLE [RS_109]
-                                                      Group By Operator [GBY_108] (rows=1 width=12)
-                                                        Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"]
-                                                        Select Operator [SEL_107] (rows=8143830 width=8)
-                                                          Output:["_col0"]
-                                                          Merge Join Operator [MERGEJOIN_208] (rows=8143830 width=14)
-                                                            Conds:RS_231._col0=RS_222._col0(Inner),Output:["_col1","_col2","_col3","_col4"]
-                                                          <-Map 8 [SIMPLE_EDGE] vectorized
-                                                            PARTITION_ONLY_SHUFFLE [RS_222]
-                                                              PartitionCols:_col0
-                                                              Select Operator [SEL_217] (rows=304 width=4)
+                          Merge Join Operator [MERGEJOIN_204] (rows=8581091679 width=381)
+                            Conds:RS_42._col2, _col1=RS_43._col11, _col12(Inner),Output:["_col3","_col6","_col7","_col13","_col19","_col22"]
+                          <-Reducer 2 [SIMPLE_EDGE]
+                            PARTITION_ONLY_SHUFFLE [RS_42]
+                              PartitionCols:_col2, _col1
+                              Merge Join Operator [MERGEJOIN_198] (rows=47131396 width=11)
+                                Conds:RS_224._col0=RS_211._col0(Inner),Output:["_col1","_col2","_col3"]
+                              <-Map 8 [SIMPLE_EDGE] vectorized
+                                PARTITION_ONLY_SHUFFLE [RS_211]
+                                  PartitionCols:_col0
+                                  Select Operator [SEL_208] (rows=304 width=4)
+                                    Output:["_col0"]
+                                    Filter Operator [FIL_205] (rows=304 width=94)
+                                      predicate:(d_quarter_name) IN ('2000Q1', '2000Q2', '2000Q3')
+                                      TableScan [TS_3] (rows=73049 width=94)
+                                        default@date_dim,d3,Tbl:COMPLETE,Col:COMPLETE,Output:["d_date_sk","d_quarter_name"]
+                              <-Map 1 [SIMPLE_EDGE] vectorized
+                                SHUFFLE [RS_224]
+                                  PartitionCols:_col0
+                                  Select Operator [SEL_223] (rows=285117831 width=15)
+                                    Output:["_col0","_col1","_col2","_col3"]
+                                    Filter Operator [FIL_222] (rows=285117831 width=15)
+                                      predicate:((cs_sold_date_sk BETWEEN DynamicValue(RS_40_d3_d_date_sk_min) AND DynamicValue(RS_40_d3_d_date_sk_max) and in_bloom_filter(cs_sold_date_sk, DynamicValue(RS_40_d3_d_date_sk_bloom_filter))) and cs_bill_customer_sk is not null and cs_sold_date_sk is not null)
+                                      TableScan [TS_0] (rows=287989836 width=15)
+                                        default@catalog_sales,catalog_sales,Tbl:COMPLETE,Col:COMPLETE,Output:["cs_sold_date_sk","cs_bill_customer_sk","cs_item_sk","cs_quantity"]
+                                      <-Reducer 9 [BROADCAST_EDGE] vectorized
+                                        BROADCAST [RS_221]
+                                          Group By Operator [GBY_220] (rows=1 width=12)
+                                            Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"]
+                                          <-Map 8 [CUSTOM_SIMPLE_EDGE] vectorized
+                                            PARTITION_ONLY_SHUFFLE [RS_218]
+                                              Group By Operator [GBY_216] (rows=1 width=12)
+                                                Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"]
+                                                Select Operator [SEL_212] (rows=304 width=4)
+                                                  Output:["_col0"]
+                                                   Please refer to the previous Select Operator [SEL_208]
+                          <-Reducer 13 [SIMPLE_EDGE]
+                            SHUFFLE [RS_43]
+                              PartitionCols:_col11, _col12
+                              Select Operator [SEL_38] (rows=42605597 width=383)
+                                Output:["_col1","_col2","_col8","_col11","_col12","_col14","_col17"]
+                                Merge Join Operator [MERGEJOIN_203] (rows=42605597 width=383)
+                                  Conds:RS_35._col1=RS_246._col0(Inner),Output:["_col5","_col8","_col9","_col11","_col14","_col16","_col17"]
+                                <-Map 22 [SIMPLE_EDGE] vectorized
+                                  SHUFFLE [RS_246]
+                                    PartitionCols:_col0
+                                    Select Operator [SEL_245] (rows=462000 width=288)
+                                      Output:["_col0","_col1","_col2"]
+                                      TableScan [TS_24] (rows=462000 width=288)
+                                        default@item,item,Tbl:COMPLETE,Col:COMPLETE,Output:["i_item_sk","i_item_id","i_item_desc"]
+                                <-Reducer 12 [SIMPLE_EDGE]
+                                  SHUFFLE [RS_35]
+                                    PartitionCols:_col1
+                                    Merge Join Operator [MERGEJOIN_202] (rows=42605597 width=103)
+                                      Conds:RS_32._col3=RS_244._col0(Inner),Output:["_col1","_col5","_col8","_col9","_col11","_col14"]
+                                    <-Map 21 [SIMPLE_EDGE] vectorized
+                                      SHUFFLE [RS_244]
+                                        PartitionCols:_col0
+                                        Select Operator [SEL_243] (rows=1704 width=90)
+                                          Output:["_col0","_col1"]
+                                          TableScan [TS_22] (rows=1704 width=90)
+                                            default@store,store,Tbl:COMPLETE,Col:COMPLETE,Output:["s_store_sk","s_state"]
+                                    <-Reducer 11 [SIMPLE_EDGE]
+                                      SHUFFLE [RS_32]
+                                        PartitionCols:_col3
+                                        Merge Join Operator [MERGEJOIN_201] (rows=42605597 width=19)
+                                          Conds:RS_29._col1, _col2, _col4=RS_30._col1, _col2, _col3(Inner),Output:["_col1","_col3","_col5","_col8","_col9","_col11"]
+                                        <-Reducer 15 [SIMPLE_EDGE]
+                                          PARTITION_ONLY_SHUFFLE [RS_30]
+                                            PartitionCols:_col1, _col2, _col3
+                                            Merge Join Operator [MERGEJOIN_200] (rows=8143830 width=14)
+                                              Conds:RS_229._col0=RS_215._col0(Inner),Output:["_col1","_col2","_col3","_col4"]
+                                            <-Map 8 [SIMPLE_EDGE] vectorized
+                                              PARTITION_ONLY_SHUFFLE [RS_215]
+                                                PartitionCols:_col0
+                                                Select Operator [SEL_210] (rows=304 width=4)
+                                                  Output:["_col0"]
+                                                  Filter Operator [FIL_207] (rows=304 width=94)
+                                                    predicate:(d_quarter_name) IN ('2000Q1', '2000Q2', '2000Q3')
+                                                     Please refer to the previous TableScan [TS_3]
+                                            <-Map 20 [SIMPLE_EDGE] vectorized
+                                              SHUFFLE [RS_229]
+                                                PartitionCols:_col0
+                                                Select Operator [SEL_228] (rows=53632139 width=19)
+                                                  Output:["_col0","_col1","_col2","_col3","_col4"]
+                                                  Filter Operator [FIL_227] (rows=53632139 width=19)
+                                                    predicate:(sr_customer_sk is not null and sr_returned_date_sk is not null)
+                                                    TableScan [TS_12] (rows=57591150 width=19)
+                                                      default@store_returns,store_returns,Tbl:COMPLETE,Col:COMPLETE,Output:["sr_returned_date_sk","sr_item_sk","sr_customer_sk","sr_ticket_number","sr_return_quantity"]
+                                        <-Reducer 10 [SIMPLE_EDGE]
+                                          SHUFFLE [RS_29]
+                                            PartitionCols:_col1, _col2, _col4
+                                            Merge Join Operator [MERGEJOIN_199] (rows=27749405 width=10)
+                                              Conds:RS_242._col0=RS_213._col0(Inner),Output:["_col1","_col2","_col3","_col4","_col5"]
+                                            <-Map 8 [SIMPLE_EDGE] vectorized
+                                              PARTITION_ONLY_SHUFFLE [RS_213]
+                                                PartitionCols:_col0
+                                                Select Operator [SEL_209] (rows=101 width=4)
+                                                  Output:["_col0"]
+                                                  Filter Operator [FIL_206] (rows=101 width=94)
+                                                    predicate:(d_quarter_name = '2000Q1')
+                                                     Please refer to the previous TableScan [TS_3]
+                                            <-Map 19 [SIMPLE_EDGE] vectorized
+                                              SHUFFLE [RS_242]
+                                                PartitionCols:_col0
+                                                Select Operator [SEL_241] (rows=501694138 width=23)
+                                                  Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
+                                                  Filter Operator [FIL_240] (rows=501694138 width=23)
+                                                    predicate:((ss_customer_sk BETWEEN DynamicValue(RS_30_store_returns_sr_customer_sk_min) AND DynamicValue(RS_30_store_returns_sr_customer_sk_max) and in_bloom_filter(ss_customer_sk, DynamicValue(RS_30_store_returns_sr_customer_sk_bloom_filter))) and (ss_customer_sk BETWEEN DynamicValue(RS_42_catalog_sales_cs_bill_customer_sk_min) AND DynamicValue(RS_42_catalog_sales_cs_bill_customer_sk_max) and in_bloom_filter(ss_customer_sk, DynamicValue(RS_42_catalog_sales_cs_bill_customer_sk_bloom_filter))) and (ss_item_sk BETWEEN DynamicValue(RS_30_store_returns_sr_item_sk_min) AND DynamicValue(RS_30_store_returns_sr_item_sk_max) and in_bloom_filter(ss_item_sk, DynamicValue(RS_30_store_returns_sr_item_sk_bloom_filter))) and (ss_item_sk BETWEEN DynamicValue(RS_42_catalog_sales_cs_item_sk_min) AND DynamicValue(RS_42_catalog_sales_cs_item_sk_max) and in_bloom_filter(ss_item_sk, DynamicValue(RS_42_catalog_sales_cs_item_sk_bloom_filter))) and (ss_sol
 d_date_sk BETWEEN DynamicValue(RS_27_d1_d_date_sk_min) AND DynamicValue(RS_27_d1_d_date_sk_max) and in_bloom_filter(ss_sold_date_sk, DynamicValue(RS_27_d1_d_date_sk_bloom_filter))) and (ss_ticket_number BETWEEN DynamicValue(RS_30_store_returns_sr_ticket_number_min) AND DynamicValue(RS_30_store_returns_sr_ticket_number_max) and in_bloom_filter(ss_ticket_number, DynamicValue(RS_30_store_returns_sr_ticket_number_bloom_filter))) and ss_customer_sk is not null and ss_sold_date_sk is not null and ss_store_sk is not null)
+                                                    TableScan [TS_6] (rows=575995635 width=23)
+                                                      default@store_sales,store_sales,Tbl:COMPLETE,Col:COMPLETE,Output:["ss_sold_date_sk","ss_item_sk","ss_customer_sk","ss_store_sk","ss_ticket_number","ss_quantity"]
+                                                    <-Reducer 14 [BROADCAST_EDGE] vectorized
+                                                      BROADCAST [RS_226]
+                                                        Group By Operator [GBY_225] (rows=1 width=12)
+                                                          Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"]
+                                                        <-Map 8 [CUSTOM_SIMPLE_EDGE] vectorized
+                                                          PARTITION_ONLY_SHUFFLE [RS_219]
+                                                            Group By Operator [GBY_217] (rows=1 width=12)
+                                                              Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"]
+                                                              Select Operator [SEL_214] (rows=101 width=4)
                                                                 Output:["_col0"]
-                                                                Filter Operator [FIL_214] (rows=304 width=94)
-                                                                  predicate:(d_quarter_name) IN ('2000Q1', '2000Q2', '2000Q3')
-                                                                   Please refer to the previous TableScan [TS_3]
-                                                          <-Map 20 [SIMPLE_EDGE] vectorized
-                                                            SHUFFLE [RS_231]
-                                                              PartitionCols:_col0
-                                                              Select Operator [SEL_230] (rows=53632139 width=19)
-                                                                Output:["_col0","_col1","_col2","_col3","_col4"]
-                                                                Filter Operator [FIL_229] (rows=53632139 width=19)
-                                                                  predicate:(sr_customer_sk is not null and sr_returned_date_sk is not null)
-                                                                  TableScan [TS_14] (rows=57591150 width=19)
-                                                                    default@store_returns,store_returns,Tbl:COMPLETE,Col:COMPLETE,Output:["sr_returned_date_sk","sr_item_sk","sr_customer_sk","sr_ticket_number","sr_return_quantity"]
-                                              <-Reducer 17 [BROADCAST_EDGE] vectorized
-                                                BROADCAST [RS_239]
-                                                  Group By Operator [GBY_237] (rows=1 width=12)
-                                                    Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"]
-                                                  <-Reducer 15 [CUSTOM_SIMPLE_EDGE]
-                                                    PARTITION_ONLY_SHUFFLE [RS_124]
-                                                      Group By Operator [GBY_123] (rows=1 width=12)
-                                                        Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"]
-                                                        Select Operator [SEL_122] (rows=8143830 width=6)
-                                                          Output:["_col0"]
-                                                           Please refer to the previous Merge Join Operator [MERGEJOIN_208]
-                                              <-Reducer 14 [BROADCAST_EDGE] vectorized
-                                                BROADCAST [RS_236]
-                                                  Group By Operator [GBY_235] (rows=1 width=12)
-                                                    Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"]
-                                                  <-Map 8 [CUSTOM_SIMPLE_EDGE] vectorized
-                                                    PARTITION_ONLY_SHUFFLE [RS_226]
-                                                      Group By Operator [GBY_224] (rows=1 width=12)
-                                                        Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"]
-                                                        Select Operator [SEL_221] (rows=304 width=4)
-                                                          Output:["_col0"]
-                                                           Please refer to the previous Select Operator [SEL_216]
-                                  <-Reducer 15 [SIMPLE_EDGE]
-                                    PARTITION_ONLY_SHUFFLE [RS_28]
-                                      PartitionCols:_col1, _col2
-                                       Please refer to the previous Merge Join Operator [MERGEJOIN_208]
-                              <-Reducer 3 [SIMPLE_EDGE]
-                                SHUFFLE [RS_39]
-                                  PartitionCols:_col1, _col2, _col4
-                                  Merge Join Operator [MERGEJOIN_206] (rows=27749405 width=294)
-                                    Conds:RS_36._col1=RS_251._col0(Inner),Output:["_col1","_col2","_col3","_col4","_col5","_col8","_col9"]
-                                  <-Map 18 [SIMPLE_EDGE] vectorized
-                                    SHUFFLE [RS_251]
-                                      PartitionCols:_col0
-                                      Select Operator [SEL_250] (rows=462000 width=288)
-                                        Output:["_col0","_col1","_col2"]
-                                        TableScan [TS_6] (rows=462000 width=288)
-                                          default@item,item,Tbl:COMPLETE,Col:COMPLETE,Output:["i_item_sk","i_item_id","i_item_desc"]
-                                  <-Reducer 2 [SIMPLE_EDGE]
-                                    SHUFFLE [RS_36]
-                                      PartitionCols:_col1
-                                      Merge Join Operator [MERGEJOIN_205] (rows=27749405 width=10)
-                                        Conds:RS_249._col0=RS_218._col0(Inner),Output:["_col1","_col2","_col3","_col4","_col5"]
-                                      <-Map 8 [SIMPLE_EDGE] vectorized
-                                        PARTITION_ONLY_SHUFFLE [RS_218]
-                                          PartitionCols:_col0
-                                          Select Operator [SEL_215] (rows=101 width=4)
-                                            Output:["_col0"]
-                                            Filter Operator [FIL_212] (rows=101 width=94)
-                                              predicate:(d_quarter_name = '2000Q1')
-                                               Please refer to the previous TableScan [TS_3]
-                                      <-Map 1 [SIMPLE_EDGE] vectorized
-                                        SHUFFLE [RS_249]
-                                          PartitionCols:_col0
-                                          Select Operator [SEL_248] (rows=501694138 width=23)
-                                            Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
-                                            Filter Operator [FIL_247] (rows=501694138 width=23)
-                                              predicate:((ss_customer_sk BETWEEN DynamicValue(RS_27_catalog_sales_cs_bill_customer_sk_min) AND DynamicValue(RS_27_catalog_sales_cs_bill_customer_sk_max) and in_bloom_filter(ss_customer_sk, DynamicValue(RS_27_catalog_sales_cs_bill_customer_sk_bloom_filter))) and (ss_customer_sk BETWEEN DynamicValue(RS_28_store_returns_sr_customer_sk_min) AND DynamicValue(RS_28_store_returns_sr_customer_sk_max) and in_bloom_filter(ss_customer_sk, DynamicValue(RS_28_store_returns_sr_customer_sk_bloom_filter))) and (ss_item_sk BETWEEN DynamicValue(RS_27_catalog_sales_cs_item_sk_min) AND DynamicValue(RS_27_catalog_sales_cs_item_sk_max) and in_bloom_filter(ss_item_sk, DynamicValue(RS_27_catalog_sales_cs_item_sk_bloom_filter))) and (ss_item_sk BETWEEN DynamicValue(RS_28_store_returns_sr_item_sk_min) AND DynamicValue(RS_28_store_returns_sr_item_sk_max) and in_bloom_filter(ss_item_sk, DynamicValue(RS_28_store_returns_sr_item_sk_bloom_filter))) and (ss_sold_date
 _sk BETWEEN DynamicValue(RS_34_d1_d_date_sk_min) AND DynamicValue(RS_34_d1_d_date_sk_max) and in_bloom_filter(ss_sold_date_sk, DynamicValue(RS_34_d1_d_date_sk_bloom_filter))) and ss_customer_sk is not null and ss_sold_date_sk is not null and ss_store_sk is not null)
-                                              TableScan [TS_0] (rows=575995635 width=23)
-                                                default@store_sales,store_sales,Tbl:COMPLETE,Col:COMPLETE,Output:["ss_sold_date_sk","ss_item_sk","ss_customer_sk","ss_store_sk","ss_ticket_number","ss_quantity"]
-                                              <-Reducer 16 [BROADCAST_EDGE] vectorized
-                                                BROADCAST [RS_233]
-                                                   Please refer to the previous Group By Operator [GBY_232]
-                                              <-Reducer 17 [BROADCAST_EDGE] vectorized
-                                                BROADCAST [RS_238]
-                                                   Please refer to the previous Group By Operator [GBY_237]
-                                              <-Reducer 12 [BROADCAST_EDGE] vectorized
-                                                BROADCAST [RS_244]
-                                                  Group By Operator [GBY_243] (rows=1 width=12)
-                                                    Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"]
-                                                  <-Reducer 10 [CUSTOM_SIMPLE_EDGE]
-                                                    PARTITION_ONLY_SHUFFLE [RS_114]
-                                                      Group By Operator [GBY_113] (rows=1 width=12)
-                                                        Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"]
-                                                        Select Operator [SEL_112] (rows=47131396 width=8)
-                                                          Output:["_col0"]
-                                                           Please refer to the previous Merge Join Operator [MERGEJOIN_207]
-                                              <-Reducer 13 [BROADCAST_EDGE] vectorized
-                                                BROADCAST [RS_246]
-                                                  Group By Operator [GBY_245] (rows=1 width=12)
-                                                    Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"]
-                                                  <-Reducer 10 [CUSTOM_SIMPLE_EDGE]
-                                                    PARTITION_ONLY_SHUFFLE [RS_129]
-                                                      Group By Operator [GBY_128] (rows=1 width=12)
-                                                        Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"]
-                                                        Select Operator [SEL_127] (rows=47131396 width=7)
-                                                          Output:["_col0"]
-                                                           Please refer to the previous Merge Join Operator [MERGEJOIN_207]
-                                              <-Reducer 9 [BROADCAST_EDGE] vectorized
-                                                BROADCAST [RS_228]
-                                                  Group By Operator [GBY_227] (rows=1 width=12)
-                                                    Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"]
-                                                  <-Map 8 [CUSTOM_SIMPLE_EDGE] vectorized
-                                                    PARTITION_ONLY_SHUFFLE [RS_225]
-                                                      Group By Operator [GBY_223] (rows=1 width=12)
-                                                        Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"]
-                                                        Select Operator [SEL_219] (rows=101 width=4)
-                                                          Output:["_col0"]
-                                                           Please refer to the previous Select Operator [SEL_215]
+                                                                 Please refer to the previous Select Operator [SEL_209]
+                                                    <-Reducer 16 [BROADCAST_EDGE] vectorized
+                                                      BROADCAST [RS_231]
+                                                        Group By Operator [GBY_230] (rows=1 width=12)
+                                                          Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"]
+                                                        <-Reducer 15 [CUSTOM_SIMPLE_EDGE]
+                                                          PARTITION_ONLY_SHUFFLE [RS_120]
+                                                            Group By Operator [GBY_119] (rows=1 width=12)
+                                                              Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"]
+                                                              Select Operator [SEL_118] (rows=8143830 width=8)
+                                                                Output:["_col0"]
+                                                                 Please refer to the previous Merge Join Operator [MERGEJOIN_200]
+                                                    <-Reducer 17 [BROADCAST_EDGE] vectorized
+                                                      BROADCAST [RS_233]
+                                                        Group By Operator [GBY_232] (rows=1 width=12)
+                                                          Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"]
+                                                        <-Reducer 15 [CUSTOM_SIMPLE_EDGE]
+                                                          PARTITION_ONLY_SHUFFLE [RS_125]
+                                                            Group By Operator [GBY_124] (rows=1 width=12)
+                                                              Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"]
+                                                              Select Operator [SEL_123] (rows=8143830 width=6)
+                                                                Output:["_col0"]
+                                                                 Please refer to the previous Merge Join Operator [MERGEJOIN_200]
+                                                    <-Reducer 18 [BROADCAST_EDGE] vectorized
+                                                      BROADCAST [RS_235]
+                                                        Group By Operator [GBY_234] (rows=1 width=12)
+                                                          Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=5304149)"]
+                                                        <-Reducer 15 [CUSTOM_SIMPLE_EDGE]
+                                                          PARTITION_ONLY_SHUFFLE [RS_130]
+                                                            Group By Operator [GBY_129] (rows=1 width=12)
+                                                              Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=5304149)"]
+                                                              Select Operator [SEL_128] (rows=8143830 width=8)
+                                                                Output:["_col0"]
+                                                                 Please refer to the previous Merge Join Operator [MERGEJOIN_200]
+                                                    <-Reducer 6 [BROADCAST_EDGE] vectorized
+                                                      BROADCAST [RS_237]
+                                                        Group By Operator [GBY_236] (rows=1 width=12)
+                                                          Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"]
+                                                        <-Reducer 2 [CUSTOM_SIMPLE_EDGE]
+                                                          PARTITION_ONLY_SHUFFLE [RS_145]
+                                                            Group By Operator [GBY_144] (rows=1 width=12)
+                                                              Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"]
+                                                              Select Operator [SEL_143] (rows=47131396 width=8)
+                                                                Output:["_col0"]
+                                                                 Please refer to the previous Merge Join Operator [MERGEJOIN_198]
+                                                    <-Reducer 7 [BROADCAST_EDGE] vectorized
+                                                      BROADCAST [RS_239]
+                                                        Group By Operator [GBY_238] (rows=1 width=12)
+                                                          Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"]
+                                                        <-Reducer 2 [CUSTOM_SIMPLE_EDGE]
+                                                          PARTITION_ONLY_SHUFFLE [RS_150]
+                                                            Group By Operator [GBY_149] (rows=1 width=12)
+                                                              Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"]
+                                                              Select Operator [SEL_148] (rows=47131396 width=7)
+                                                                Output:["_col0"]
+                                                                 Please refer to the previous Merge Join Operator [MERGEJOIN_198]