== Physical Plan ==
TakeOrderedAndProject (51)
+- * Project (50)
   +- * BroadcastHashJoin Inner BuildRight (49)
      :- * Project (47)
      :  +- * BroadcastHashJoin Inner BuildRight (46)
      :     :- * Project (44)
      :     :  +- * BroadcastHashJoin Inner BuildRight (43)
      :     :     :- * Project (39)
      :     :     :  +- * BroadcastHashJoin Inner BuildRight (38)
      :     :     :     :- * BroadcastHashJoin Inner BuildRight (33)
      :     :     :     :  :- * Filter (17)
      :     :     :     :  :  +- * HashAggregate (16)
      :     :     :     :  :     +- Exchange (15)
      :     :     :     :  :        +- * HashAggregate (14)
      :     :     :     :  :           +- * ColumnarToRow (13)
      :     :     :     :  :              +- CometProject (12)
      :     :     :     :  :                 +- CometBroadcastHashJoin (11)
      :     :     :     :  :                    :- CometProject (7)
      :     :     :     :  :                    :  +- CometBroadcastHashJoin (6)
      :     :     :     :  :                    :     :- CometFilter (2)
      :     :     :     :  :                    :     :  +- CometNativeScan: `spark_catalog`.`default`.`customer` (1)
      :     :     :     :  :                    :     +- CometBroadcastExchange (5)
      :     :     :     :  :                    :        +- CometFilter (4)
      :     :     :     :  :                    :           +- CometNativeScan: `spark_catalog`.`default`.`store_sales` (3)
      :     :     :     :  :                    +- CometBroadcastExchange (10)
      :     :     :     :  :                       +- CometFilter (9)
      :     :     :     :  :                          +- CometNativeScan: `spark_catalog`.`default`.`date_dim` (8)
      :     :     :     :  +- BroadcastExchange (32)
      :     :     :     :     +- * HashAggregate (31)
      :     :     :     :        +- Exchange (30)
      :     :     :     :           +- * HashAggregate (29)
      :     :     :     :              +- * ColumnarToRow (28)
      :     :     :     :                 +- CometProject (27)
      :     :     :     :                    +- CometBroadcastHashJoin (26)
      :     :     :     :                       :- CometProject (22)
      :     :     :     :                       :  +- CometBroadcastHashJoin (21)
      :     :     :     :                       :     :- CometFilter (19)
      :     :     :     :                       :     :  +- CometNativeScan: `spark_catalog`.`default`.`customer` (18)
      :     :     :     :                       :     +- ReusedExchange (20)
      :     :     :     :                       +- CometBroadcastExchange (25)
      :     :     :     :                          +- CometFilter (24)
      :     :     :     :                             +- CometNativeScan: `spark_catalog`.`default`.`date_dim` (23)
      :     :     :     +- BroadcastExchange (37)
      :     :     :        +- * Filter (36)
      :     :     :           +- * HashAggregate (35)
      :     :     :              +- ReusedExchange (34)
      :     :     +- BroadcastExchange (42)
      :     :        +- * HashAggregate (41)
      :     :           +- ReusedExchange (40)
      :     +- ReusedExchange (45)
      +- ReusedExchange (48)


(1) CometNativeScan: `spark_catalog`.`default`.`customer`
Output [8]: [c_customer_sk#1, c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8]
Arguments: [c_customer_sk#1, c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8]

(2) CometFilter
Input [8]: [c_customer_sk#1, c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8]
Condition : (isnotnull(c_customer_sk#1) AND isnotnull(c_customer_id#2))

(3) CometNativeScan: `spark_catalog`.`default`.`store_sales`
Output [6]: [ss_customer_sk#9, ss_ext_discount_amt#10, ss_ext_sales_price#11, ss_ext_wholesale_cost#12, ss_ext_list_price#13, ss_sold_date_sk#14]
Arguments: [ss_customer_sk#9, ss_ext_discount_amt#10, ss_ext_sales_price#11, ss_ext_wholesale_cost#12, ss_ext_list_price#13, ss_sold_date_sk#14]

(4) CometFilter
Input [6]: [ss_customer_sk#9, ss_ext_discount_amt#10, ss_ext_sales_price#11, ss_ext_wholesale_cost#12, ss_ext_list_price#13, ss_sold_date_sk#14]
Condition : isnotnull(ss_customer_sk#9)

(5) CometBroadcastExchange
Input [6]: [ss_customer_sk#9, ss_ext_discount_amt#10, ss_ext_sales_price#11, ss_ext_wholesale_cost#12, ss_ext_list_price#13, ss_sold_date_sk#14]
Arguments: [ss_customer_sk#9, ss_ext_discount_amt#10, ss_ext_sales_price#11, ss_ext_wholesale_cost#12, ss_ext_list_price#13, ss_sold_date_sk#14]

(6) CometBroadcastHashJoin
Left output [8]: [c_customer_sk#1, c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8]
Right output [6]: [ss_customer_sk#9, ss_ext_discount_amt#10, ss_ext_sales_price#11, ss_ext_wholesale_cost#12, ss_ext_list_price#13, ss_sold_date_sk#14]
Arguments: [c_customer_sk#1], [ss_customer_sk#9], Inner, BuildRight

(7) CometProject
Input [14]: [c_customer_sk#1, c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, ss_customer_sk#9, ss_ext_discount_amt#10, ss_ext_sales_price#11, ss_ext_wholesale_cost#12, ss_ext_list_price#13, ss_sold_date_sk#14]
Arguments: [c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, ss_ext_discount_amt#10, ss_ext_sales_price#11, ss_ext_wholesale_cost#12, ss_ext_list_price#13, ss_sold_date_sk#14], [c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, ss_ext_discount_amt#10, ss_ext_sales_price#11, ss_ext_wholesale_cost#12, ss_ext_list_price#13, ss_sold_date_sk#14]

(8) CometNativeScan: `spark_catalog`.`default`.`date_dim`
Output [2]: [d_date_sk#15, d_year#16]
Arguments: [d_date_sk#15, d_year#16]

(9) CometFilter
Input [2]: [d_date_sk#15, d_year#16]
Condition : ((isnotnull(d_year#16) AND (d_year#16 = 2001)) AND isnotnull(d_date_sk#15))

(10) CometBroadcastExchange
Input [2]: [d_date_sk#15, d_year#16]
Arguments: [d_date_sk#15, d_year#16]

(11) CometBroadcastHashJoin
Left output [12]: [c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, ss_ext_discount_amt#10, ss_ext_sales_price#11, ss_ext_wholesale_cost#12, ss_ext_list_price#13, ss_sold_date_sk#14]
Right output [2]: [d_date_sk#15, d_year#16]
Arguments: [ss_sold_date_sk#14], [d_date_sk#15], Inner, BuildRight

(12) CometProject
Input [14]: [c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, ss_ext_discount_amt#10, ss_ext_sales_price#11, ss_ext_wholesale_cost#12, ss_ext_list_price#13, ss_sold_date_sk#14, d_date_sk#15, d_year#16]
Arguments: [c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, ss_ext_discount_amt#10, ss_ext_sales_price#11, ss_ext_wholesale_cost#12, ss_ext_list_price#13, d_year#16], [c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, ss_ext_discount_amt#10, ss_ext_sales_price#11, ss_ext_wholesale_cost#12, ss_ext_list_price#13, d_year#16]

(13) ColumnarToRow [codegen id : 1]
Input [12]: [c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, ss_ext_discount_amt#10, ss_ext_sales_price#11, ss_ext_wholesale_cost#12, ss_ext_list_price#13, d_year#16]

(14) HashAggregate [codegen id : 1]
Input [12]: [c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, ss_ext_discount_amt#10, ss_ext_sales_price#11, ss_ext_wholesale_cost#12, ss_ext_list_price#13, d_year#16]
Keys [8]: [c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, d_year#16]
Functions [1]: [partial_sum(((((ss_ext_list_price#13 - ss_ext_wholesale_cost#12) - ss_ext_discount_amt#10) + ss_ext_sales_price#11) / 2))]
Aggregate Attributes [2]: [sum#17, isEmpty#18]
Results [10]: [c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, d_year#16, sum#19, isEmpty#20]

(15) Exchange
Input [10]: [c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, d_year#16, sum#19, isEmpty#20]
Arguments: hashpartitioning(c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, d_year#16, 5), ENSURE_REQUIREMENTS, [plan_id=1]

(16) HashAggregate [codegen id : 12]
Input [10]: [c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, d_year#16, sum#19, isEmpty#20]
Keys [8]: [c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, d_year#16]
Functions [1]: [sum(((((ss_ext_list_price#13 - ss_ext_wholesale_cost#12) - ss_ext_discount_amt#10) + ss_ext_sales_price#11) / 2))]
Aggregate Attributes [1]: [sum(((((ss_ext_list_price#13 - ss_ext_wholesale_cost#12) - ss_ext_discount_amt#10) + ss_ext_sales_price#11) / 2))#21]
Results [2]: [c_customer_id#2 AS customer_id#22, sum(((((ss_ext_list_price#13 - ss_ext_wholesale_cost#12) - ss_ext_discount_amt#10) + ss_ext_sales_price#11) / 2))#21 AS year_total#23]

(17) Filter [codegen id : 12]
Input [2]: [customer_id#22, year_total#23]
Condition : (isnotnull(year_total#23) AND (year_total#23 > 0.000000))

(18) CometNativeScan: `spark_catalog`.`default`.`customer`
Output [8]: [c_customer_sk#24, c_customer_id#25, c_first_name#26, c_last_name#27, c_preferred_cust_flag#28, c_birth_country#29, c_login#30, c_email_address#31]
Arguments: [c_customer_sk#24, c_customer_id#25, c_first_name#26, c_last_name#27, c_preferred_cust_flag#28, c_birth_country#29, c_login#30, c_email_address#31]

(19) CometFilter
Input [8]: [c_customer_sk#24, c_customer_id#25, c_first_name#26, c_last_name#27, c_preferred_cust_flag#28, c_birth_country#29, c_login#30, c_email_address#31]
Condition : (isnotnull(c_customer_sk#24) AND isnotnull(c_customer_id#25))

(20) ReusedExchange [Reuses operator id: 5]
Output [6]: [ss_customer_sk#32, ss_ext_discount_amt#33, ss_ext_sales_price#34, ss_ext_wholesale_cost#35, ss_ext_list_price#36, ss_sold_date_sk#37]

(21) CometBroadcastHashJoin
Left output [8]: [c_customer_sk#24, c_customer_id#25, c_first_name#26, c_last_name#27, c_preferred_cust_flag#28, c_birth_country#29, c_login#30, c_email_address#31]
Right output [6]: [ss_customer_sk#32, ss_ext_discount_amt#33, ss_ext_sales_price#34, ss_ext_wholesale_cost#35, ss_ext_list_price#36, ss_sold_date_sk#37]
Arguments: [c_customer_sk#24], [ss_customer_sk#32], Inner, BuildRight

(22) CometProject
Input [14]: [c_customer_sk#24, c_customer_id#25, c_first_name#26, c_last_name#27, c_preferred_cust_flag#28, c_birth_country#29, c_login#30, c_email_address#31, ss_customer_sk#32, ss_ext_discount_amt#33, ss_ext_sales_price#34, ss_ext_wholesale_cost#35, ss_ext_list_price#36, ss_sold_date_sk#37]
Arguments: [c_customer_id#25, c_first_name#26, c_last_name#27, c_preferred_cust_flag#28, c_birth_country#29, c_login#30, c_email_address#31, ss_ext_discount_amt#33, ss_ext_sales_price#34, ss_ext_wholesale_cost#35, ss_ext_list_price#36, ss_sold_date_sk#37], [c_customer_id#25, c_first_name#26, c_last_name#27, c_preferred_cust_flag#28, c_birth_country#29, c_login#30, c_email_address#31, ss_ext_discount_amt#33, ss_ext_sales_price#34, ss_ext_wholesale_cost#35, ss_ext_list_price#36, ss_sold_date_sk#37]

(23) CometNativeScan: `spark_catalog`.`default`.`date_dim`
Output [2]: [d_date_sk#38, d_year#39]
Arguments: [d_date_sk#38, d_year#39]

(24) CometFilter
Input [2]: [d_date_sk#38, d_year#39]
Condition : ((isnotnull(d_year#39) AND (d_year#39 = 2002)) AND isnotnull(d_date_sk#38))

(25) CometBroadcastExchange
Input [2]: [d_date_sk#38, d_year#39]
Arguments: [d_date_sk#38, d_year#39]

(26) CometBroadcastHashJoin
Left output [12]: [c_customer_id#25, c_first_name#26, c_last_name#27, c_preferred_cust_flag#28, c_birth_country#29, c_login#30, c_email_address#31, ss_ext_discount_amt#33, ss_ext_sales_price#34, ss_ext_wholesale_cost#35, ss_ext_list_price#36, ss_sold_date_sk#37]
Right output [2]: [d_date_sk#38, d_year#39]
Arguments: [ss_sold_date_sk#37], [d_date_sk#38], Inner, BuildRight

(27) CometProject
Input [14]: [c_customer_id#25, c_first_name#26, c_last_name#27, c_preferred_cust_flag#28, c_birth_country#29, c_login#30, c_email_address#31, ss_ext_discount_amt#33, ss_ext_sales_price#34, ss_ext_wholesale_cost#35, ss_ext_list_price#36, ss_sold_date_sk#37, d_date_sk#38, d_year#39]
Arguments: [c_customer_id#25, c_first_name#26, c_last_name#27, c_preferred_cust_flag#28, c_birth_country#29, c_login#30, c_email_address#31, ss_ext_discount_amt#33, ss_ext_sales_price#34, ss_ext_wholesale_cost#35, ss_ext_list_price#36, d_year#39], [c_customer_id#25, c_first_name#26, c_last_name#27, c_preferred_cust_flag#28, c_birth_country#29, c_login#30, c_email_address#31, ss_ext_discount_amt#33, ss_ext_sales_price#34, ss_ext_wholesale_cost#35, ss_ext_list_price#36, d_year#39]

(28) ColumnarToRow [codegen id : 2]
Input [12]: [c_customer_id#25, c_first_name#26, c_last_name#27, c_preferred_cust_flag#28, c_birth_country#29, c_login#30, c_email_address#31, ss_ext_discount_amt#33, ss_ext_sales_price#34, ss_ext_wholesale_cost#35, ss_ext_list_price#36, d_year#39]

(29) HashAggregate [codegen id : 2]
Input [12]: [c_customer_id#25, c_first_name#26, c_last_name#27, c_preferred_cust_flag#28, c_birth_country#29, c_login#30, c_email_address#31, ss_ext_discount_amt#33, ss_ext_sales_price#34, ss_ext_wholesale_cost#35, ss_ext_list_price#36, d_year#39]
Keys [8]: [c_customer_id#25, c_first_name#26, c_last_name#27, c_preferred_cust_flag#28, c_birth_country#29, c_login#30, c_email_address#31, d_year#39]
Functions [1]: [partial_sum(((((ss_ext_list_price#36 - ss_ext_wholesale_cost#35) - ss_ext_discount_amt#33) + ss_ext_sales_price#34) / 2))]
Aggregate Attributes [2]: [sum#40, isEmpty#41]
Results [10]: [c_customer_id#25, c_first_name#26, c_last_name#27, c_preferred_cust_flag#28, c_birth_country#29, c_login#30, c_email_address#31, d_year#39, sum#42, isEmpty#43]

(30) Exchange
Input [10]: [c_customer_id#25, c_first_name#26, c_last_name#27, c_preferred_cust_flag#28, c_birth_country#29, c_login#30, c_email_address#31, d_year#39, sum#42, isEmpty#43]
Arguments: hashpartitioning(c_customer_id#25, c_first_name#26, c_last_name#27, c_preferred_cust_flag#28, c_birth_country#29, c_login#30, c_email_address#31, d_year#39, 5), ENSURE_REQUIREMENTS, [plan_id=2]

(31) HashAggregate [codegen id : 3]
Input [10]: [c_customer_id#25, c_first_name#26, c_last_name#27, c_preferred_cust_flag#28, c_birth_country#29, c_login#30, c_email_address#31, d_year#39, sum#42, isEmpty#43]
Keys [8]: [c_customer_id#25, c_first_name#26, c_last_name#27, c_preferred_cust_flag#28, c_birth_country#29, c_login#30, c_email_address#31, d_year#39]
Functions [1]: [sum(((((ss_ext_list_price#36 - ss_ext_wholesale_cost#35) - ss_ext_discount_amt#33) + ss_ext_sales_price#34) / 2))]
Aggregate Attributes [1]: [sum(((((ss_ext_list_price#36 - ss_ext_wholesale_cost#35) - ss_ext_discount_amt#33) + ss_ext_sales_price#34) / 2))#21]
Results [8]: [c_customer_id#25 AS customer_id#44, c_first_name#26 AS customer_first_name#45, c_last_name#27 AS customer_last_name#46, c_preferred_cust_flag#28 AS customer_preferred_cust_flag#47, c_birth_country#29 AS customer_birth_country#48, c_login#30 AS customer_login#49, c_email_address#31 AS customer_email_address#50, sum(((((ss_ext_list_price#36 - ss_ext_wholesale_cost#35) - ss_ext_discount_amt#33) + ss_ext_sales_price#34) / 2))#21 AS year_total#51]

(32) BroadcastExchange
Input [8]: [customer_id#44, customer_first_name#45, customer_last_name#46, customer_preferred_cust_flag#47, customer_birth_country#48, customer_login#49, customer_email_address#50, year_total#51]
Arguments: HashedRelationBroadcastMode(List(input[0, string, true]),false), [plan_id=3]

(33) BroadcastHashJoin [codegen id : 12]
Left keys [1]: [customer_id#22]
Right keys [1]: [customer_id#44]
Join type: Inner
Join condition: None

(34) ReusedExchange [Reuses operator id: 15]
Output [10]: [c_customer_id#52, c_first_name#53, c_last_name#54, c_preferred_cust_flag#55, c_birth_country#56, c_login#57, c_email_address#58, d_year#59, sum#60, isEmpty#61]

(35) HashAggregate [codegen id : 5]
Input [10]: [c_customer_id#52, c_first_name#53, c_last_name#54, c_preferred_cust_flag#55, c_birth_country#56, c_login#57, c_email_address#58, d_year#59, sum#60, isEmpty#61]
Keys [8]: [c_customer_id#52, c_first_name#53, c_last_name#54, c_preferred_cust_flag#55, c_birth_country#56, c_login#57, c_email_address#58, d_year#59]
Functions [1]: [sum(((((cs_ext_list_price#62 - cs_ext_wholesale_cost#63) - cs_ext_discount_amt#64) + cs_ext_sales_price#65) / 2))]
Aggregate Attributes [1]: [sum(((((cs_ext_list_price#62 - cs_ext_wholesale_cost#63) - cs_ext_discount_amt#64) + cs_ext_sales_price#65) / 2))#66]
Results [2]: [c_customer_id#52 AS customer_id#67, sum(((((cs_ext_list_price#62 - cs_ext_wholesale_cost#63) - cs_ext_discount_amt#64) + cs_ext_sales_price#65) / 2))#66 AS year_total#68]

(36) Filter [codegen id : 5]
Input [2]: [customer_id#67, year_total#68]
Condition : (isnotnull(year_total#68) AND (year_total#68 > 0.000000))

(37) BroadcastExchange
Input [2]: [customer_id#67, year_total#68]
Arguments: HashedRelationBroadcastMode(List(input[0, string, true]),false), [plan_id=4]

(38) BroadcastHashJoin [codegen id : 12]
Left keys [1]: [customer_id#22]
Right keys [1]: [customer_id#67]
Join type: Inner
Join condition: None

(39) Project [codegen id : 12]
Output [11]: [customer_id#22, year_total#23, customer_id#44, customer_first_name#45, customer_last_name#46, customer_preferred_cust_flag#47, customer_birth_country#48, customer_login#49, customer_email_address#50, year_total#51, year_total#68]
Input [12]: [customer_id#22, year_total#23, customer_id#44, customer_first_name#45, customer_last_name#46, customer_preferred_cust_flag#47, customer_birth_country#48, customer_login#49, customer_email_address#50, year_total#51, customer_id#67, year_total#68]

(40) ReusedExchange [Reuses operator id: 30]
Output [10]: [c_customer_id#69, c_first_name#70, c_last_name#71, c_preferred_cust_flag#72, c_birth_country#73, c_login#74, c_email_address#75, d_year#76, sum#77, isEmpty#78]

(41) HashAggregate [codegen id : 7]
Input [10]: [c_customer_id#69, c_first_name#70, c_last_name#71, c_preferred_cust_flag#72, c_birth_country#73, c_login#74, c_email_address#75, d_year#76, sum#77, isEmpty#78]
Keys [8]: [c_customer_id#69, c_first_name#70, c_last_name#71, c_preferred_cust_flag#72, c_birth_country#73, c_login#74, c_email_address#75, d_year#76]
Functions [1]: [sum(((((cs_ext_list_price#79 - cs_ext_wholesale_cost#80) - cs_ext_discount_amt#81) + cs_ext_sales_price#82) / 2))]
Aggregate Attributes [1]: [sum(((((cs_ext_list_price#79 - cs_ext_wholesale_cost#80) - cs_ext_discount_amt#81) + cs_ext_sales_price#82) / 2))#66]
Results [2]: [c_customer_id#69 AS customer_id#83, sum(((((cs_ext_list_price#79 - cs_ext_wholesale_cost#80) - cs_ext_discount_amt#81) + cs_ext_sales_price#82) / 2))#66 AS year_total#84]

(42) BroadcastExchange
Input [2]: [customer_id#83, year_total#84]
Arguments: HashedRelationBroadcastMode(List(input[0, string, true]),false), [plan_id=5]

(43) BroadcastHashJoin [codegen id : 12]
Left keys [1]: [customer_id#22]
Right keys [1]: [customer_id#83]
Join type: Inner
Join condition: (CASE WHEN (year_total#68 > 0.000000) THEN (year_total#84 / year_total#68) END > CASE WHEN (year_total#23 > 0.000000) THEN (year_total#51 / year_total#23) END)

(44) Project [codegen id : 12]
Output [10]: [customer_id#22, customer_id#44, customer_first_name#45, customer_last_name#46, customer_preferred_cust_flag#47, customer_birth_country#48, customer_login#49, customer_email_address#50, year_total#68, year_total#84]
Input [13]: [customer_id#22, year_total#23, customer_id#44, customer_first_name#45, customer_last_name#46, customer_preferred_cust_flag#47, customer_birth_country#48, customer_login#49, customer_email_address#50, year_total#51, year_total#68, customer_id#83, year_total#84]

(45) ReusedExchange [Reuses operator id: 37]
Output [2]: [customer_id#85, year_total#86]

(46) BroadcastHashJoin [codegen id : 12]
Left keys [1]: [customer_id#22]
Right keys [1]: [customer_id#85]
Join type: Inner
Join condition: None

(47) Project [codegen id : 12]
Output [11]: [customer_id#22, customer_id#44, customer_first_name#45, customer_last_name#46, customer_preferred_cust_flag#47, customer_birth_country#48, customer_login#49, customer_email_address#50, year_total#68, year_total#84, year_total#86]
Input [12]: [customer_id#22, customer_id#44, customer_first_name#45, customer_last_name#46, customer_preferred_cust_flag#47, customer_birth_country#48, customer_login#49, customer_email_address#50, year_total#68, year_total#84, customer_id#85, year_total#86]

(48) ReusedExchange [Reuses operator id: 42]
Output [2]: [customer_id#87, year_total#88]

(49) BroadcastHashJoin [codegen id : 12]
Left keys [1]: [customer_id#22]
Right keys [1]: [customer_id#87]
Join type: Inner
Join condition: (CASE WHEN (year_total#68 > 0.000000) THEN (year_total#84 / year_total#68) END > CASE WHEN (year_total#86 > 0.000000) THEN (year_total#88 / year_total#86) END)

(50) Project [codegen id : 12]
Output [7]: [customer_id#44, customer_first_name#45, customer_last_name#46, customer_preferred_cust_flag#47, customer_birth_country#48, customer_login#49, customer_email_address#50]
Input [13]: [customer_id#22, customer_id#44, customer_first_name#45, customer_last_name#46, customer_preferred_cust_flag#47, customer_birth_country#48, customer_login#49, customer_email_address#50, year_total#68, year_total#84, year_total#86, customer_id#87, year_total#88]

(51) TakeOrderedAndProject
Input [7]: [customer_id#44, customer_first_name#45, customer_last_name#46, customer_preferred_cust_flag#47, customer_birth_country#48, customer_login#49, customer_email_address#50]
Arguments: 100, [customer_id#44 ASC NULLS FIRST, customer_first_name#45 ASC NULLS FIRST, customer_last_name#46 ASC NULLS FIRST, customer_preferred_cust_flag#47 ASC NULLS FIRST, customer_birth_country#48 ASC NULLS FIRST, customer_login#49 ASC NULLS FIRST, customer_email_address#50 ASC NULLS FIRST], [customer_id#44, customer_first_name#45, customer_last_name#46, customer_preferred_cust_flag#47, customer_birth_country#48, customer_login#49, customer_email_address#50]

