== Physical Plan ==
TakeOrderedAndProject (118)
+- * Project (117)
   +- * BroadcastHashJoin Inner BuildRight (116)
      :- * Project (98)
      :  +- * BroadcastHashJoin Inner BuildRight (97)
      :     :- * Project (78)
      :     :  +- * BroadcastHashJoin Inner BuildRight (77)
      :     :     :- * Project (59)
      :     :     :  +- * BroadcastHashJoin Inner BuildRight (58)
      :     :     :     :- * BroadcastHashJoin Inner BuildRight (39)
      :     :     :     :  :- * Filter (19)
      :     :     :     :  :  +- * HashAggregate (18)
      :     :     :     :  :     +- * CometColumnarToRow (17)
      :     :     :     :  :        +- CometColumnarExchange (16)
      :     :     :     :  :           +- * HashAggregate (15)
      :     :     :     :  :              +- * CometColumnarToRow (14)
      :     :     :     :  :                 +- CometProject (13)
      :     :     :     :  :                    +- CometBroadcastHashJoin (12)
      :     :     :     :  :                       :- CometProject (8)
      :     :     :     :  :                       :  +- CometBroadcastHashJoin (7)
      :     :     :     :  :                       :     :- CometProject (3)
      :     :     :     :  :                       :     :  +- CometFilter (2)
      :     :     :     :  :                       :     :     +- CometScan parquet spark_catalog.default.customer (1)
      :     :     :     :  :                       :     +- CometBroadcastExchange (6)
      :     :     :     :  :                       :        +- CometFilter (5)
      :     :     :     :  :                       :           +- CometScan parquet spark_catalog.default.store_sales (4)
      :     :     :     :  :                       +- CometBroadcastExchange (11)
      :     :     :     :  :                          +- CometFilter (10)
      :     :     :     :  :                             +- CometScan parquet spark_catalog.default.date_dim (9)
      :     :     :     :  +- BroadcastExchange (38)
      :     :     :     :     +- * HashAggregate (37)
      :     :     :     :        +- * CometColumnarToRow (36)
      :     :     :     :           +- CometColumnarExchange (35)
      :     :     :     :              +- * HashAggregate (34)
      :     :     :     :                 +- * CometColumnarToRow (33)
      :     :     :     :                    +- CometProject (32)
      :     :     :     :                       +- CometBroadcastHashJoin (31)
      :     :     :     :                          :- CometProject (27)
      :     :     :     :                          :  +- CometBroadcastHashJoin (26)
      :     :     :     :                          :     :- CometProject (22)
      :     :     :     :                          :     :  +- CometFilter (21)
      :     :     :     :                          :     :     +- CometScan parquet spark_catalog.default.customer (20)
      :     :     :     :                          :     +- CometBroadcastExchange (25)
      :     :     :     :                          :        +- CometFilter (24)
      :     :     :     :                          :           +- CometScan parquet spark_catalog.default.store_sales (23)
      :     :     :     :                          +- CometBroadcastExchange (30)
      :     :     :     :                             +- CometFilter (29)
      :     :     :     :                                +- CometScan parquet spark_catalog.default.date_dim (28)
      :     :     :     +- BroadcastExchange (57)
      :     :     :        +- * Filter (56)
      :     :     :           +- * HashAggregate (55)
      :     :     :              +- * CometColumnarToRow (54)
      :     :     :                 +- CometColumnarExchange (53)
      :     :     :                    +- * HashAggregate (52)
      :     :     :                       +- * CometColumnarToRow (51)
      :     :     :                          +- CometProject (50)
      :     :     :                             +- CometBroadcastHashJoin (49)
      :     :     :                                :- CometProject (47)
      :     :     :                                :  +- CometBroadcastHashJoin (46)
      :     :     :                                :     :- CometProject (42)
      :     :     :                                :     :  +- CometFilter (41)
      :     :     :                                :     :     +- CometScan parquet spark_catalog.default.customer (40)
      :     :     :                                :     +- CometBroadcastExchange (45)
      :     :     :                                :        +- CometFilter (44)
      :     :     :                                :           +- CometScan parquet spark_catalog.default.catalog_sales (43)
      :     :     :                                +- ReusedExchange (48)
      :     :     +- BroadcastExchange (76)
      :     :        +- * HashAggregate (75)
      :     :           +- * CometColumnarToRow (74)
      :     :              +- CometColumnarExchange (73)
      :     :                 +- * HashAggregate (72)
      :     :                    +- * CometColumnarToRow (71)
      :     :                       +- CometProject (70)
      :     :                          +- CometBroadcastHashJoin (69)
      :     :                             :- CometProject (67)
      :     :                             :  +- CometBroadcastHashJoin (66)
      :     :                             :     :- CometProject (62)
      :     :                             :     :  +- CometFilter (61)
      :     :                             :     :     +- CometScan parquet spark_catalog.default.customer (60)
      :     :                             :     +- CometBroadcastExchange (65)
      :     :                             :        +- CometFilter (64)
      :     :                             :           +- CometScan parquet spark_catalog.default.catalog_sales (63)
      :     :                             +- ReusedExchange (68)
      :     +- BroadcastExchange (96)
      :        +- * Filter (95)
      :           +- * HashAggregate (94)
      :              +- * CometColumnarToRow (93)
      :                 +- CometColumnarExchange (92)
      :                    +- * HashAggregate (91)
      :                       +- * CometColumnarToRow (90)
      :                          +- CometProject (89)
      :                             +- CometBroadcastHashJoin (88)
      :                                :- CometProject (86)
      :                                :  +- CometBroadcastHashJoin (85)
      :                                :     :- CometProject (81)
      :                                :     :  +- CometFilter (80)
      :                                :     :     +- CometScan parquet spark_catalog.default.customer (79)
      :                                :     +- CometBroadcastExchange (84)
      :                                :        +- CometFilter (83)
      :                                :           +- CometScan parquet spark_catalog.default.web_sales (82)
      :                                +- ReusedExchange (87)
      +- BroadcastExchange (115)
         +- * HashAggregate (114)
            +- * CometColumnarToRow (113)
               +- CometColumnarExchange (112)
                  +- * HashAggregate (111)
                     +- * CometColumnarToRow (110)
                        +- CometProject (109)
                           +- CometBroadcastHashJoin (108)
                              :- CometProject (106)
                              :  +- CometBroadcastHashJoin (105)
                              :     :- CometProject (101)
                              :     :  +- CometFilter (100)
                              :     :     +- CometScan parquet spark_catalog.default.customer (99)
                              :     +- CometBroadcastExchange (104)
                              :        +- CometFilter (103)
                              :           +- CometScan parquet spark_catalog.default.web_sales (102)
                              +- ReusedExchange (107)


(1) CometScan parquet 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]
Batched: true
Location [not included in comparison]/{warehouse_dir}/customer]
PushedFilters: [IsNotNull(c_customer_sk)]
ReadSchema: struct<c_customer_sk:int,c_customer_id:string,c_first_name:string,c_last_name:string,c_preferred_cust_flag:string,c_birth_country:string,c_login:string,c_email_address:string>

(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(staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_customer_id#2, 16, true, false, true)))

(3) CometProject
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]
Arguments: [c_customer_sk#1, c_customer_id#9, c_first_name#10, c_last_name#11, c_preferred_cust_flag#12, c_birth_country#6, c_login#13, c_email_address#14], [c_customer_sk#1, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_customer_id#2, 16, true, false, true) AS c_customer_id#9, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_first_name#3, 20, true, false, true) AS c_first_name#10, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_last_name#4, 30, true, false, true) AS c_last_name#11, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_preferred_cust_flag#5, 1, true, false, true) AS c_preferred_cust_flag#12, c_birth_country#6, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_login#7, 13, true, false, true) AS c_login#13, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_email_address#8, 50, true, false, true) AS c_email_address#14]

(4) CometScan parquet spark_catalog.default.store_sales
Output [6]: [ss_customer_sk#15, ss_ext_discount_amt#16, ss_ext_sales_price#17, ss_ext_wholesale_cost#18, ss_ext_list_price#19, ss_sold_date_sk#20]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(ss_sold_date_sk#20), dynamicpruningexpression(ss_sold_date_sk#20 IN dynamicpruning#21)]
PushedFilters: [IsNotNull(ss_customer_sk)]
ReadSchema: struct<ss_customer_sk:int,ss_ext_discount_amt:decimal(7,2),ss_ext_sales_price:decimal(7,2),ss_ext_wholesale_cost:decimal(7,2),ss_ext_list_price:decimal(7,2)>

(5) CometFilter
Input [6]: [ss_customer_sk#15, ss_ext_discount_amt#16, ss_ext_sales_price#17, ss_ext_wholesale_cost#18, ss_ext_list_price#19, ss_sold_date_sk#20]
Condition : isnotnull(ss_customer_sk#15)

(6) CometBroadcastExchange
Input [6]: [ss_customer_sk#15, ss_ext_discount_amt#16, ss_ext_sales_price#17, ss_ext_wholesale_cost#18, ss_ext_list_price#19, ss_sold_date_sk#20]
Arguments: [ss_customer_sk#15, ss_ext_discount_amt#16, ss_ext_sales_price#17, ss_ext_wholesale_cost#18, ss_ext_list_price#19, ss_sold_date_sk#20]

(7) CometBroadcastHashJoin
Left output [8]: [c_customer_sk#1, c_customer_id#9, c_first_name#10, c_last_name#11, c_preferred_cust_flag#12, c_birth_country#6, c_login#13, c_email_address#14]
Right output [6]: [ss_customer_sk#15, ss_ext_discount_amt#16, ss_ext_sales_price#17, ss_ext_wholesale_cost#18, ss_ext_list_price#19, ss_sold_date_sk#20]
Arguments: [c_customer_sk#1], [ss_customer_sk#15], Inner, BuildRight

(8) CometProject
Input [14]: [c_customer_sk#1, c_customer_id#9, c_first_name#10, c_last_name#11, c_preferred_cust_flag#12, c_birth_country#6, c_login#13, c_email_address#14, ss_customer_sk#15, ss_ext_discount_amt#16, ss_ext_sales_price#17, ss_ext_wholesale_cost#18, ss_ext_list_price#19, ss_sold_date_sk#20]
Arguments: [c_customer_id#9, c_first_name#10, c_last_name#11, c_preferred_cust_flag#12, c_birth_country#6, c_login#13, c_email_address#14, ss_ext_discount_amt#16, ss_ext_sales_price#17, ss_ext_wholesale_cost#18, ss_ext_list_price#19, ss_sold_date_sk#20], [c_customer_id#9, c_first_name#10, c_last_name#11, c_preferred_cust_flag#12, c_birth_country#6, c_login#13, c_email_address#14, ss_ext_discount_amt#16, ss_ext_sales_price#17, ss_ext_wholesale_cost#18, ss_ext_list_price#19, ss_sold_date_sk#20]

(9) CometScan parquet spark_catalog.default.date_dim
Output [2]: [d_date_sk#22, d_year#23]
Batched: true
Location [not included in comparison]/{warehouse_dir}/date_dim]
PushedFilters: [IsNotNull(d_year), EqualTo(d_year,2001), IsNotNull(d_date_sk)]
ReadSchema: struct<d_date_sk:int,d_year:int>

(10) CometFilter
Input [2]: [d_date_sk#22, d_year#23]
Condition : ((isnotnull(d_year#23) AND (d_year#23 = 2001)) AND isnotnull(d_date_sk#22))

(11) CometBroadcastExchange
Input [2]: [d_date_sk#22, d_year#23]
Arguments: [d_date_sk#22, d_year#23]

(12) CometBroadcastHashJoin
Left output [12]: [c_customer_id#9, c_first_name#10, c_last_name#11, c_preferred_cust_flag#12, c_birth_country#6, c_login#13, c_email_address#14, ss_ext_discount_amt#16, ss_ext_sales_price#17, ss_ext_wholesale_cost#18, ss_ext_list_price#19, ss_sold_date_sk#20]
Right output [2]: [d_date_sk#22, d_year#23]
Arguments: [ss_sold_date_sk#20], [d_date_sk#22], Inner, BuildRight

(13) CometProject
Input [14]: [c_customer_id#9, c_first_name#10, c_last_name#11, c_preferred_cust_flag#12, c_birth_country#6, c_login#13, c_email_address#14, ss_ext_discount_amt#16, ss_ext_sales_price#17, ss_ext_wholesale_cost#18, ss_ext_list_price#19, ss_sold_date_sk#20, d_date_sk#22, d_year#23]
Arguments: [c_customer_id#9, c_first_name#10, c_last_name#11, c_preferred_cust_flag#12, c_birth_country#6, c_login#13, c_email_address#14, ss_ext_discount_amt#16, ss_ext_sales_price#17, ss_ext_wholesale_cost#18, ss_ext_list_price#19, d_year#23], [c_customer_id#9, c_first_name#10, c_last_name#11, c_preferred_cust_flag#12, c_birth_country#6, c_login#13, c_email_address#14, ss_ext_discount_amt#16, ss_ext_sales_price#17, ss_ext_wholesale_cost#18, ss_ext_list_price#19, d_year#23]

(14) CometColumnarToRow [codegen id : 1]
Input [12]: [c_customer_id#9, c_first_name#10, c_last_name#11, c_preferred_cust_flag#12, c_birth_country#6, c_login#13, c_email_address#14, ss_ext_discount_amt#16, ss_ext_sales_price#17, ss_ext_wholesale_cost#18, ss_ext_list_price#19, d_year#23]

(15) HashAggregate [codegen id : 1]
Input [12]: [c_customer_id#9, c_first_name#10, c_last_name#11, c_preferred_cust_flag#12, c_birth_country#6, c_login#13, c_email_address#14, ss_ext_discount_amt#16, ss_ext_sales_price#17, ss_ext_wholesale_cost#18, ss_ext_list_price#19, d_year#23]
Keys [8]: [c_customer_id#9, c_first_name#10, c_last_name#11, c_preferred_cust_flag#12, c_birth_country#6, c_login#13, c_email_address#14, d_year#23]
Functions [1]: [partial_sum(((((ss_ext_list_price#19 - ss_ext_wholesale_cost#18) - ss_ext_discount_amt#16) + ss_ext_sales_price#17) / 2))]
Aggregate Attributes [2]: [sum#24, isEmpty#25]
Results [10]: [c_customer_id#9, c_first_name#10, c_last_name#11, c_preferred_cust_flag#12, c_birth_country#6, c_login#13, c_email_address#14, d_year#23, sum#26, isEmpty#27]

(16) CometColumnarExchange
Input [10]: [c_customer_id#9, c_first_name#10, c_last_name#11, c_preferred_cust_flag#12, c_birth_country#6, c_login#13, c_email_address#14, d_year#23, sum#26, isEmpty#27]
Arguments: hashpartitioning(c_customer_id#9, c_first_name#10, c_last_name#11, c_preferred_cust_flag#12, c_birth_country#6, c_login#13, c_email_address#14, d_year#23, 5), ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=1]

(17) CometColumnarToRow [codegen id : 12]
Input [10]: [c_customer_id#9, c_first_name#10, c_last_name#11, c_preferred_cust_flag#12, c_birth_country#6, c_login#13, c_email_address#14, d_year#23, sum#26, isEmpty#27]

(18) HashAggregate [codegen id : 12]
Input [10]: [c_customer_id#9, c_first_name#10, c_last_name#11, c_preferred_cust_flag#12, c_birth_country#6, c_login#13, c_email_address#14, d_year#23, sum#26, isEmpty#27]
Keys [8]: [c_customer_id#9, c_first_name#10, c_last_name#11, c_preferred_cust_flag#12, c_birth_country#6, c_login#13, c_email_address#14, d_year#23]
Functions [1]: [sum(((((ss_ext_list_price#19 - ss_ext_wholesale_cost#18) - ss_ext_discount_amt#16) + ss_ext_sales_price#17) / 2))]
Aggregate Attributes [1]: [sum(((((ss_ext_list_price#19 - ss_ext_wholesale_cost#18) - ss_ext_discount_amt#16) + ss_ext_sales_price#17) / 2))#28]
Results [2]: [c_customer_id#9 AS customer_id#29, sum(((((ss_ext_list_price#19 - ss_ext_wholesale_cost#18) - ss_ext_discount_amt#16) + ss_ext_sales_price#17) / 2))#28 AS year_total#30]

(19) Filter [codegen id : 12]
Input [2]: [customer_id#29, year_total#30]
Condition : (isnotnull(year_total#30) AND (year_total#30 > 0.000000))

(20) CometScan parquet spark_catalog.default.customer
Output [8]: [c_customer_sk#31, c_customer_id#32, c_first_name#33, c_last_name#34, c_preferred_cust_flag#35, c_birth_country#36, c_login#37, c_email_address#38]
Batched: true
Location [not included in comparison]/{warehouse_dir}/customer]
PushedFilters: [IsNotNull(c_customer_sk)]
ReadSchema: struct<c_customer_sk:int,c_customer_id:string,c_first_name:string,c_last_name:string,c_preferred_cust_flag:string,c_birth_country:string,c_login:string,c_email_address:string>

(21) CometFilter
Input [8]: [c_customer_sk#31, c_customer_id#32, c_first_name#33, c_last_name#34, c_preferred_cust_flag#35, c_birth_country#36, c_login#37, c_email_address#38]
Condition : (isnotnull(c_customer_sk#31) AND isnotnull(staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_customer_id#32, 16, true, false, true)))

(22) CometProject
Input [8]: [c_customer_sk#31, c_customer_id#32, c_first_name#33, c_last_name#34, c_preferred_cust_flag#35, c_birth_country#36, c_login#37, c_email_address#38]
Arguments: [c_customer_sk#31, c_customer_id#39, c_first_name#40, c_last_name#41, c_preferred_cust_flag#42, c_birth_country#36, c_login#43, c_email_address#44], [c_customer_sk#31, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_customer_id#32, 16, true, false, true) AS c_customer_id#39, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_first_name#33, 20, true, false, true) AS c_first_name#40, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_last_name#34, 30, true, false, true) AS c_last_name#41, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_preferred_cust_flag#35, 1, true, false, true) AS c_preferred_cust_flag#42, c_birth_country#36, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_login#37, 13, true, false, true) AS c_login#43, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_email_address#38, 50, true, false, true) AS c_email_address#44]

(23) CometScan parquet spark_catalog.default.store_sales
Output [6]: [ss_customer_sk#45, ss_ext_discount_amt#46, ss_ext_sales_price#47, ss_ext_wholesale_cost#48, ss_ext_list_price#49, ss_sold_date_sk#50]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(ss_sold_date_sk#50), dynamicpruningexpression(ss_sold_date_sk#50 IN dynamicpruning#51)]
PushedFilters: [IsNotNull(ss_customer_sk)]
ReadSchema: struct<ss_customer_sk:int,ss_ext_discount_amt:decimal(7,2),ss_ext_sales_price:decimal(7,2),ss_ext_wholesale_cost:decimal(7,2),ss_ext_list_price:decimal(7,2)>

(24) CometFilter
Input [6]: [ss_customer_sk#45, ss_ext_discount_amt#46, ss_ext_sales_price#47, ss_ext_wholesale_cost#48, ss_ext_list_price#49, ss_sold_date_sk#50]
Condition : isnotnull(ss_customer_sk#45)

(25) CometBroadcastExchange
Input [6]: [ss_customer_sk#45, ss_ext_discount_amt#46, ss_ext_sales_price#47, ss_ext_wholesale_cost#48, ss_ext_list_price#49, ss_sold_date_sk#50]
Arguments: [ss_customer_sk#45, ss_ext_discount_amt#46, ss_ext_sales_price#47, ss_ext_wholesale_cost#48, ss_ext_list_price#49, ss_sold_date_sk#50]

(26) CometBroadcastHashJoin
Left output [8]: [c_customer_sk#31, c_customer_id#39, c_first_name#40, c_last_name#41, c_preferred_cust_flag#42, c_birth_country#36, c_login#43, c_email_address#44]
Right output [6]: [ss_customer_sk#45, ss_ext_discount_amt#46, ss_ext_sales_price#47, ss_ext_wholesale_cost#48, ss_ext_list_price#49, ss_sold_date_sk#50]
Arguments: [c_customer_sk#31], [ss_customer_sk#45], Inner, BuildRight

(27) CometProject
Input [14]: [c_customer_sk#31, c_customer_id#39, c_first_name#40, c_last_name#41, c_preferred_cust_flag#42, c_birth_country#36, c_login#43, c_email_address#44, ss_customer_sk#45, ss_ext_discount_amt#46, ss_ext_sales_price#47, ss_ext_wholesale_cost#48, ss_ext_list_price#49, ss_sold_date_sk#50]
Arguments: [c_customer_id#39, c_first_name#40, c_last_name#41, c_preferred_cust_flag#42, c_birth_country#36, c_login#43, c_email_address#44, ss_ext_discount_amt#46, ss_ext_sales_price#47, ss_ext_wholesale_cost#48, ss_ext_list_price#49, ss_sold_date_sk#50], [c_customer_id#39, c_first_name#40, c_last_name#41, c_preferred_cust_flag#42, c_birth_country#36, c_login#43, c_email_address#44, ss_ext_discount_amt#46, ss_ext_sales_price#47, ss_ext_wholesale_cost#48, ss_ext_list_price#49, ss_sold_date_sk#50]

(28) CometScan parquet spark_catalog.default.date_dim
Output [2]: [d_date_sk#52, d_year#53]
Batched: true
Location [not included in comparison]/{warehouse_dir}/date_dim]
PushedFilters: [IsNotNull(d_year), EqualTo(d_year,2002), IsNotNull(d_date_sk)]
ReadSchema: struct<d_date_sk:int,d_year:int>

(29) CometFilter
Input [2]: [d_date_sk#52, d_year#53]
Condition : ((isnotnull(d_year#53) AND (d_year#53 = 2002)) AND isnotnull(d_date_sk#52))

(30) CometBroadcastExchange
Input [2]: [d_date_sk#52, d_year#53]
Arguments: [d_date_sk#52, d_year#53]

(31) CometBroadcastHashJoin
Left output [12]: [c_customer_id#39, c_first_name#40, c_last_name#41, c_preferred_cust_flag#42, c_birth_country#36, c_login#43, c_email_address#44, ss_ext_discount_amt#46, ss_ext_sales_price#47, ss_ext_wholesale_cost#48, ss_ext_list_price#49, ss_sold_date_sk#50]
Right output [2]: [d_date_sk#52, d_year#53]
Arguments: [ss_sold_date_sk#50], [d_date_sk#52], Inner, BuildRight

(32) CometProject
Input [14]: [c_customer_id#39, c_first_name#40, c_last_name#41, c_preferred_cust_flag#42, c_birth_country#36, c_login#43, c_email_address#44, ss_ext_discount_amt#46, ss_ext_sales_price#47, ss_ext_wholesale_cost#48, ss_ext_list_price#49, ss_sold_date_sk#50, d_date_sk#52, d_year#53]
Arguments: [c_customer_id#39, c_first_name#40, c_last_name#41, c_preferred_cust_flag#42, c_birth_country#36, c_login#43, c_email_address#44, ss_ext_discount_amt#46, ss_ext_sales_price#47, ss_ext_wholesale_cost#48, ss_ext_list_price#49, d_year#53], [c_customer_id#39, c_first_name#40, c_last_name#41, c_preferred_cust_flag#42, c_birth_country#36, c_login#43, c_email_address#44, ss_ext_discount_amt#46, ss_ext_sales_price#47, ss_ext_wholesale_cost#48, ss_ext_list_price#49, d_year#53]

(33) CometColumnarToRow [codegen id : 2]
Input [12]: [c_customer_id#39, c_first_name#40, c_last_name#41, c_preferred_cust_flag#42, c_birth_country#36, c_login#43, c_email_address#44, ss_ext_discount_amt#46, ss_ext_sales_price#47, ss_ext_wholesale_cost#48, ss_ext_list_price#49, d_year#53]

(34) HashAggregate [codegen id : 2]
Input [12]: [c_customer_id#39, c_first_name#40, c_last_name#41, c_preferred_cust_flag#42, c_birth_country#36, c_login#43, c_email_address#44, ss_ext_discount_amt#46, ss_ext_sales_price#47, ss_ext_wholesale_cost#48, ss_ext_list_price#49, d_year#53]
Keys [8]: [c_customer_id#39, c_first_name#40, c_last_name#41, c_preferred_cust_flag#42, c_birth_country#36, c_login#43, c_email_address#44, d_year#53]
Functions [1]: [partial_sum(((((ss_ext_list_price#49 - ss_ext_wholesale_cost#48) - ss_ext_discount_amt#46) + ss_ext_sales_price#47) / 2))]
Aggregate Attributes [2]: [sum#54, isEmpty#55]
Results [10]: [c_customer_id#39, c_first_name#40, c_last_name#41, c_preferred_cust_flag#42, c_birth_country#36, c_login#43, c_email_address#44, d_year#53, sum#56, isEmpty#57]

(35) CometColumnarExchange
Input [10]: [c_customer_id#39, c_first_name#40, c_last_name#41, c_preferred_cust_flag#42, c_birth_country#36, c_login#43, c_email_address#44, d_year#53, sum#56, isEmpty#57]
Arguments: hashpartitioning(c_customer_id#39, c_first_name#40, c_last_name#41, c_preferred_cust_flag#42, c_birth_country#36, c_login#43, c_email_address#44, d_year#53, 5), ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=2]

(36) CometColumnarToRow [codegen id : 3]
Input [10]: [c_customer_id#39, c_first_name#40, c_last_name#41, c_preferred_cust_flag#42, c_birth_country#36, c_login#43, c_email_address#44, d_year#53, sum#56, isEmpty#57]

(37) HashAggregate [codegen id : 3]
Input [10]: [c_customer_id#39, c_first_name#40, c_last_name#41, c_preferred_cust_flag#42, c_birth_country#36, c_login#43, c_email_address#44, d_year#53, sum#56, isEmpty#57]
Keys [8]: [c_customer_id#39, c_first_name#40, c_last_name#41, c_preferred_cust_flag#42, c_birth_country#36, c_login#43, c_email_address#44, d_year#53]
Functions [1]: [sum(((((ss_ext_list_price#49 - ss_ext_wholesale_cost#48) - ss_ext_discount_amt#46) + ss_ext_sales_price#47) / 2))]
Aggregate Attributes [1]: [sum(((((ss_ext_list_price#49 - ss_ext_wholesale_cost#48) - ss_ext_discount_amt#46) + ss_ext_sales_price#47) / 2))#28]
Results [8]: [c_customer_id#39 AS customer_id#58, c_first_name#40 AS customer_first_name#59, c_last_name#41 AS customer_last_name#60, c_preferred_cust_flag#42 AS customer_preferred_cust_flag#61, c_birth_country#36 AS customer_birth_country#62, c_login#43 AS customer_login#63, c_email_address#44 AS customer_email_address#64, sum(((((ss_ext_list_price#49 - ss_ext_wholesale_cost#48) - ss_ext_discount_amt#46) + ss_ext_sales_price#47) / 2))#28 AS year_total#65]

(38) BroadcastExchange
Input [8]: [customer_id#58, customer_first_name#59, customer_last_name#60, customer_preferred_cust_flag#61, customer_birth_country#62, customer_login#63, customer_email_address#64, year_total#65]
Arguments: HashedRelationBroadcastMode(List(input[0, string, true]),false), [plan_id=3]

(39) BroadcastHashJoin [codegen id : 12]
Left keys [1]: [customer_id#29]
Right keys [1]: [customer_id#58]
Join type: Inner
Join condition: None

(40) CometScan parquet spark_catalog.default.customer
Output [8]: [c_customer_sk#66, c_customer_id#67, c_first_name#68, c_last_name#69, c_preferred_cust_flag#70, c_birth_country#71, c_login#72, c_email_address#73]
Batched: true
Location [not included in comparison]/{warehouse_dir}/customer]
PushedFilters: [IsNotNull(c_customer_sk)]
ReadSchema: struct<c_customer_sk:int,c_customer_id:string,c_first_name:string,c_last_name:string,c_preferred_cust_flag:string,c_birth_country:string,c_login:string,c_email_address:string>

(41) CometFilter
Input [8]: [c_customer_sk#66, c_customer_id#67, c_first_name#68, c_last_name#69, c_preferred_cust_flag#70, c_birth_country#71, c_login#72, c_email_address#73]
Condition : (isnotnull(c_customer_sk#66) AND isnotnull(staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_customer_id#67, 16, true, false, true)))

(42) CometProject
Input [8]: [c_customer_sk#66, c_customer_id#67, c_first_name#68, c_last_name#69, c_preferred_cust_flag#70, c_birth_country#71, c_login#72, c_email_address#73]
Arguments: [c_customer_sk#66, c_customer_id#74, c_first_name#75, c_last_name#76, c_preferred_cust_flag#77, c_birth_country#71, c_login#78, c_email_address#79], [c_customer_sk#66, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_customer_id#67, 16, true, false, true) AS c_customer_id#74, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_first_name#68, 20, true, false, true) AS c_first_name#75, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_last_name#69, 30, true, false, true) AS c_last_name#76, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_preferred_cust_flag#70, 1, true, false, true) AS c_preferred_cust_flag#77, c_birth_country#71, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_login#72, 13, true, false, true) AS c_login#78, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_email_address#73, 50, true, false, true) AS c_email_address#79]

(43) CometScan parquet spark_catalog.default.catalog_sales
Output [6]: [cs_bill_customer_sk#80, cs_ext_discount_amt#81, cs_ext_sales_price#82, cs_ext_wholesale_cost#83, cs_ext_list_price#84, cs_sold_date_sk#85]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(cs_sold_date_sk#85), dynamicpruningexpression(cs_sold_date_sk#85 IN dynamicpruning#86)]
PushedFilters: [IsNotNull(cs_bill_customer_sk)]
ReadSchema: struct<cs_bill_customer_sk:int,cs_ext_discount_amt:decimal(7,2),cs_ext_sales_price:decimal(7,2),cs_ext_wholesale_cost:decimal(7,2),cs_ext_list_price:decimal(7,2)>

(44) CometFilter
Input [6]: [cs_bill_customer_sk#80, cs_ext_discount_amt#81, cs_ext_sales_price#82, cs_ext_wholesale_cost#83, cs_ext_list_price#84, cs_sold_date_sk#85]
Condition : isnotnull(cs_bill_customer_sk#80)

(45) CometBroadcastExchange
Input [6]: [cs_bill_customer_sk#80, cs_ext_discount_amt#81, cs_ext_sales_price#82, cs_ext_wholesale_cost#83, cs_ext_list_price#84, cs_sold_date_sk#85]
Arguments: [cs_bill_customer_sk#80, cs_ext_discount_amt#81, cs_ext_sales_price#82, cs_ext_wholesale_cost#83, cs_ext_list_price#84, cs_sold_date_sk#85]

(46) CometBroadcastHashJoin
Left output [8]: [c_customer_sk#66, c_customer_id#74, c_first_name#75, c_last_name#76, c_preferred_cust_flag#77, c_birth_country#71, c_login#78, c_email_address#79]
Right output [6]: [cs_bill_customer_sk#80, cs_ext_discount_amt#81, cs_ext_sales_price#82, cs_ext_wholesale_cost#83, cs_ext_list_price#84, cs_sold_date_sk#85]
Arguments: [c_customer_sk#66], [cs_bill_customer_sk#80], Inner, BuildRight

(47) CometProject
Input [14]: [c_customer_sk#66, c_customer_id#74, c_first_name#75, c_last_name#76, c_preferred_cust_flag#77, c_birth_country#71, c_login#78, c_email_address#79, cs_bill_customer_sk#80, cs_ext_discount_amt#81, cs_ext_sales_price#82, cs_ext_wholesale_cost#83, cs_ext_list_price#84, cs_sold_date_sk#85]
Arguments: [c_customer_id#74, c_first_name#75, c_last_name#76, c_preferred_cust_flag#77, c_birth_country#71, c_login#78, c_email_address#79, cs_ext_discount_amt#81, cs_ext_sales_price#82, cs_ext_wholesale_cost#83, cs_ext_list_price#84, cs_sold_date_sk#85], [c_customer_id#74, c_first_name#75, c_last_name#76, c_preferred_cust_flag#77, c_birth_country#71, c_login#78, c_email_address#79, cs_ext_discount_amt#81, cs_ext_sales_price#82, cs_ext_wholesale_cost#83, cs_ext_list_price#84, cs_sold_date_sk#85]

(48) ReusedExchange [Reuses operator id: 11]
Output [2]: [d_date_sk#87, d_year#88]

(49) CometBroadcastHashJoin
Left output [12]: [c_customer_id#74, c_first_name#75, c_last_name#76, c_preferred_cust_flag#77, c_birth_country#71, c_login#78, c_email_address#79, cs_ext_discount_amt#81, cs_ext_sales_price#82, cs_ext_wholesale_cost#83, cs_ext_list_price#84, cs_sold_date_sk#85]
Right output [2]: [d_date_sk#87, d_year#88]
Arguments: [cs_sold_date_sk#85], [d_date_sk#87], Inner, BuildRight

(50) CometProject
Input [14]: [c_customer_id#74, c_first_name#75, c_last_name#76, c_preferred_cust_flag#77, c_birth_country#71, c_login#78, c_email_address#79, cs_ext_discount_amt#81, cs_ext_sales_price#82, cs_ext_wholesale_cost#83, cs_ext_list_price#84, cs_sold_date_sk#85, d_date_sk#87, d_year#88]
Arguments: [c_customer_id#74, c_first_name#75, c_last_name#76, c_preferred_cust_flag#77, c_birth_country#71, c_login#78, c_email_address#79, cs_ext_discount_amt#81, cs_ext_sales_price#82, cs_ext_wholesale_cost#83, cs_ext_list_price#84, d_year#88], [c_customer_id#74, c_first_name#75, c_last_name#76, c_preferred_cust_flag#77, c_birth_country#71, c_login#78, c_email_address#79, cs_ext_discount_amt#81, cs_ext_sales_price#82, cs_ext_wholesale_cost#83, cs_ext_list_price#84, d_year#88]

(51) CometColumnarToRow [codegen id : 4]
Input [12]: [c_customer_id#74, c_first_name#75, c_last_name#76, c_preferred_cust_flag#77, c_birth_country#71, c_login#78, c_email_address#79, cs_ext_discount_amt#81, cs_ext_sales_price#82, cs_ext_wholesale_cost#83, cs_ext_list_price#84, d_year#88]

(52) HashAggregate [codegen id : 4]
Input [12]: [c_customer_id#74, c_first_name#75, c_last_name#76, c_preferred_cust_flag#77, c_birth_country#71, c_login#78, c_email_address#79, cs_ext_discount_amt#81, cs_ext_sales_price#82, cs_ext_wholesale_cost#83, cs_ext_list_price#84, d_year#88]
Keys [8]: [c_customer_id#74, c_first_name#75, c_last_name#76, c_preferred_cust_flag#77, c_birth_country#71, c_login#78, c_email_address#79, d_year#88]
Functions [1]: [partial_sum(((((cs_ext_list_price#84 - cs_ext_wholesale_cost#83) - cs_ext_discount_amt#81) + cs_ext_sales_price#82) / 2))]
Aggregate Attributes [2]: [sum#89, isEmpty#90]
Results [10]: [c_customer_id#74, c_first_name#75, c_last_name#76, c_preferred_cust_flag#77, c_birth_country#71, c_login#78, c_email_address#79, d_year#88, sum#91, isEmpty#92]

(53) CometColumnarExchange
Input [10]: [c_customer_id#74, c_first_name#75, c_last_name#76, c_preferred_cust_flag#77, c_birth_country#71, c_login#78, c_email_address#79, d_year#88, sum#91, isEmpty#92]
Arguments: hashpartitioning(c_customer_id#74, c_first_name#75, c_last_name#76, c_preferred_cust_flag#77, c_birth_country#71, c_login#78, c_email_address#79, d_year#88, 5), ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=4]

(54) CometColumnarToRow [codegen id : 5]
Input [10]: [c_customer_id#74, c_first_name#75, c_last_name#76, c_preferred_cust_flag#77, c_birth_country#71, c_login#78, c_email_address#79, d_year#88, sum#91, isEmpty#92]

(55) HashAggregate [codegen id : 5]
Input [10]: [c_customer_id#74, c_first_name#75, c_last_name#76, c_preferred_cust_flag#77, c_birth_country#71, c_login#78, c_email_address#79, d_year#88, sum#91, isEmpty#92]
Keys [8]: [c_customer_id#74, c_first_name#75, c_last_name#76, c_preferred_cust_flag#77, c_birth_country#71, c_login#78, c_email_address#79, d_year#88]
Functions [1]: [sum(((((cs_ext_list_price#84 - cs_ext_wholesale_cost#83) - cs_ext_discount_amt#81) + cs_ext_sales_price#82) / 2))]
Aggregate Attributes [1]: [sum(((((cs_ext_list_price#84 - cs_ext_wholesale_cost#83) - cs_ext_discount_amt#81) + cs_ext_sales_price#82) / 2))#93]
Results [2]: [c_customer_id#74 AS customer_id#94, sum(((((cs_ext_list_price#84 - cs_ext_wholesale_cost#83) - cs_ext_discount_amt#81) + cs_ext_sales_price#82) / 2))#93 AS year_total#95]

(56) Filter [codegen id : 5]
Input [2]: [customer_id#94, year_total#95]
Condition : (isnotnull(year_total#95) AND (year_total#95 > 0.000000))

(57) BroadcastExchange
Input [2]: [customer_id#94, year_total#95]
Arguments: HashedRelationBroadcastMode(List(input[0, string, true]),false), [plan_id=5]

(58) BroadcastHashJoin [codegen id : 12]
Left keys [1]: [customer_id#29]
Right keys [1]: [customer_id#94]
Join type: Inner
Join condition: None

(59) Project [codegen id : 12]
Output [11]: [customer_id#29, year_total#30, customer_id#58, customer_first_name#59, customer_last_name#60, customer_preferred_cust_flag#61, customer_birth_country#62, customer_login#63, customer_email_address#64, year_total#65, year_total#95]
Input [12]: [customer_id#29, year_total#30, customer_id#58, customer_first_name#59, customer_last_name#60, customer_preferred_cust_flag#61, customer_birth_country#62, customer_login#63, customer_email_address#64, year_total#65, customer_id#94, year_total#95]

(60) CometScan parquet spark_catalog.default.customer
Output [8]: [c_customer_sk#96, c_customer_id#97, c_first_name#98, c_last_name#99, c_preferred_cust_flag#100, c_birth_country#101, c_login#102, c_email_address#103]
Batched: true
Location [not included in comparison]/{warehouse_dir}/customer]
PushedFilters: [IsNotNull(c_customer_sk)]
ReadSchema: struct<c_customer_sk:int,c_customer_id:string,c_first_name:string,c_last_name:string,c_preferred_cust_flag:string,c_birth_country:string,c_login:string,c_email_address:string>

(61) CometFilter
Input [8]: [c_customer_sk#96, c_customer_id#97, c_first_name#98, c_last_name#99, c_preferred_cust_flag#100, c_birth_country#101, c_login#102, c_email_address#103]
Condition : (isnotnull(c_customer_sk#96) AND isnotnull(staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_customer_id#97, 16, true, false, true)))

(62) CometProject
Input [8]: [c_customer_sk#96, c_customer_id#97, c_first_name#98, c_last_name#99, c_preferred_cust_flag#100, c_birth_country#101, c_login#102, c_email_address#103]
Arguments: [c_customer_sk#96, c_customer_id#104, c_first_name#105, c_last_name#106, c_preferred_cust_flag#107, c_birth_country#101, c_login#108, c_email_address#109], [c_customer_sk#96, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_customer_id#97, 16, true, false, true) AS c_customer_id#104, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_first_name#98, 20, true, false, true) AS c_first_name#105, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_last_name#99, 30, true, false, true) AS c_last_name#106, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_preferred_cust_flag#100, 1, true, false, true) AS c_preferred_cust_flag#107, c_birth_country#101, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_login#102, 13, true, false, true) AS c_login#108, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_email_address#103, 50, true, false, true) AS c_email_address#109]

(63) CometScan parquet spark_catalog.default.catalog_sales
Output [6]: [cs_bill_customer_sk#110, cs_ext_discount_amt#111, cs_ext_sales_price#112, cs_ext_wholesale_cost#113, cs_ext_list_price#114, cs_sold_date_sk#115]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(cs_sold_date_sk#115), dynamicpruningexpression(cs_sold_date_sk#115 IN dynamicpruning#116)]
PushedFilters: [IsNotNull(cs_bill_customer_sk)]
ReadSchema: struct<cs_bill_customer_sk:int,cs_ext_discount_amt:decimal(7,2),cs_ext_sales_price:decimal(7,2),cs_ext_wholesale_cost:decimal(7,2),cs_ext_list_price:decimal(7,2)>

(64) CometFilter
Input [6]: [cs_bill_customer_sk#110, cs_ext_discount_amt#111, cs_ext_sales_price#112, cs_ext_wholesale_cost#113, cs_ext_list_price#114, cs_sold_date_sk#115]
Condition : isnotnull(cs_bill_customer_sk#110)

(65) CometBroadcastExchange
Input [6]: [cs_bill_customer_sk#110, cs_ext_discount_amt#111, cs_ext_sales_price#112, cs_ext_wholesale_cost#113, cs_ext_list_price#114, cs_sold_date_sk#115]
Arguments: [cs_bill_customer_sk#110, cs_ext_discount_amt#111, cs_ext_sales_price#112, cs_ext_wholesale_cost#113, cs_ext_list_price#114, cs_sold_date_sk#115]

(66) CometBroadcastHashJoin
Left output [8]: [c_customer_sk#96, c_customer_id#104, c_first_name#105, c_last_name#106, c_preferred_cust_flag#107, c_birth_country#101, c_login#108, c_email_address#109]
Right output [6]: [cs_bill_customer_sk#110, cs_ext_discount_amt#111, cs_ext_sales_price#112, cs_ext_wholesale_cost#113, cs_ext_list_price#114, cs_sold_date_sk#115]
Arguments: [c_customer_sk#96], [cs_bill_customer_sk#110], Inner, BuildRight

(67) CometProject
Input [14]: [c_customer_sk#96, c_customer_id#104, c_first_name#105, c_last_name#106, c_preferred_cust_flag#107, c_birth_country#101, c_login#108, c_email_address#109, cs_bill_customer_sk#110, cs_ext_discount_amt#111, cs_ext_sales_price#112, cs_ext_wholesale_cost#113, cs_ext_list_price#114, cs_sold_date_sk#115]
Arguments: [c_customer_id#104, c_first_name#105, c_last_name#106, c_preferred_cust_flag#107, c_birth_country#101, c_login#108, c_email_address#109, cs_ext_discount_amt#111, cs_ext_sales_price#112, cs_ext_wholesale_cost#113, cs_ext_list_price#114, cs_sold_date_sk#115], [c_customer_id#104, c_first_name#105, c_last_name#106, c_preferred_cust_flag#107, c_birth_country#101, c_login#108, c_email_address#109, cs_ext_discount_amt#111, cs_ext_sales_price#112, cs_ext_wholesale_cost#113, cs_ext_list_price#114, cs_sold_date_sk#115]

(68) ReusedExchange [Reuses operator id: 30]
Output [2]: [d_date_sk#117, d_year#118]

(69) CometBroadcastHashJoin
Left output [12]: [c_customer_id#104, c_first_name#105, c_last_name#106, c_preferred_cust_flag#107, c_birth_country#101, c_login#108, c_email_address#109, cs_ext_discount_amt#111, cs_ext_sales_price#112, cs_ext_wholesale_cost#113, cs_ext_list_price#114, cs_sold_date_sk#115]
Right output [2]: [d_date_sk#117, d_year#118]
Arguments: [cs_sold_date_sk#115], [d_date_sk#117], Inner, BuildRight

(70) CometProject
Input [14]: [c_customer_id#104, c_first_name#105, c_last_name#106, c_preferred_cust_flag#107, c_birth_country#101, c_login#108, c_email_address#109, cs_ext_discount_amt#111, cs_ext_sales_price#112, cs_ext_wholesale_cost#113, cs_ext_list_price#114, cs_sold_date_sk#115, d_date_sk#117, d_year#118]
Arguments: [c_customer_id#104, c_first_name#105, c_last_name#106, c_preferred_cust_flag#107, c_birth_country#101, c_login#108, c_email_address#109, cs_ext_discount_amt#111, cs_ext_sales_price#112, cs_ext_wholesale_cost#113, cs_ext_list_price#114, d_year#118], [c_customer_id#104, c_first_name#105, c_last_name#106, c_preferred_cust_flag#107, c_birth_country#101, c_login#108, c_email_address#109, cs_ext_discount_amt#111, cs_ext_sales_price#112, cs_ext_wholesale_cost#113, cs_ext_list_price#114, d_year#118]

(71) CometColumnarToRow [codegen id : 6]
Input [12]: [c_customer_id#104, c_first_name#105, c_last_name#106, c_preferred_cust_flag#107, c_birth_country#101, c_login#108, c_email_address#109, cs_ext_discount_amt#111, cs_ext_sales_price#112, cs_ext_wholesale_cost#113, cs_ext_list_price#114, d_year#118]

(72) HashAggregate [codegen id : 6]
Input [12]: [c_customer_id#104, c_first_name#105, c_last_name#106, c_preferred_cust_flag#107, c_birth_country#101, c_login#108, c_email_address#109, cs_ext_discount_amt#111, cs_ext_sales_price#112, cs_ext_wholesale_cost#113, cs_ext_list_price#114, d_year#118]
Keys [8]: [c_customer_id#104, c_first_name#105, c_last_name#106, c_preferred_cust_flag#107, c_birth_country#101, c_login#108, c_email_address#109, d_year#118]
Functions [1]: [partial_sum(((((cs_ext_list_price#114 - cs_ext_wholesale_cost#113) - cs_ext_discount_amt#111) + cs_ext_sales_price#112) / 2))]
Aggregate Attributes [2]: [sum#119, isEmpty#120]
Results [10]: [c_customer_id#104, c_first_name#105, c_last_name#106, c_preferred_cust_flag#107, c_birth_country#101, c_login#108, c_email_address#109, d_year#118, sum#121, isEmpty#122]

(73) CometColumnarExchange
Input [10]: [c_customer_id#104, c_first_name#105, c_last_name#106, c_preferred_cust_flag#107, c_birth_country#101, c_login#108, c_email_address#109, d_year#118, sum#121, isEmpty#122]
Arguments: hashpartitioning(c_customer_id#104, c_first_name#105, c_last_name#106, c_preferred_cust_flag#107, c_birth_country#101, c_login#108, c_email_address#109, d_year#118, 5), ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=6]

(74) CometColumnarToRow [codegen id : 7]
Input [10]: [c_customer_id#104, c_first_name#105, c_last_name#106, c_preferred_cust_flag#107, c_birth_country#101, c_login#108, c_email_address#109, d_year#118, sum#121, isEmpty#122]

(75) HashAggregate [codegen id : 7]
Input [10]: [c_customer_id#104, c_first_name#105, c_last_name#106, c_preferred_cust_flag#107, c_birth_country#101, c_login#108, c_email_address#109, d_year#118, sum#121, isEmpty#122]
Keys [8]: [c_customer_id#104, c_first_name#105, c_last_name#106, c_preferred_cust_flag#107, c_birth_country#101, c_login#108, c_email_address#109, d_year#118]
Functions [1]: [sum(((((cs_ext_list_price#114 - cs_ext_wholesale_cost#113) - cs_ext_discount_amt#111) + cs_ext_sales_price#112) / 2))]
Aggregate Attributes [1]: [sum(((((cs_ext_list_price#114 - cs_ext_wholesale_cost#113) - cs_ext_discount_amt#111) + cs_ext_sales_price#112) / 2))#93]
Results [2]: [c_customer_id#104 AS customer_id#123, sum(((((cs_ext_list_price#114 - cs_ext_wholesale_cost#113) - cs_ext_discount_amt#111) + cs_ext_sales_price#112) / 2))#93 AS year_total#124]

(76) BroadcastExchange
Input [2]: [customer_id#123, year_total#124]
Arguments: HashedRelationBroadcastMode(List(input[0, string, true]),false), [plan_id=7]

(77) BroadcastHashJoin [codegen id : 12]
Left keys [1]: [customer_id#29]
Right keys [1]: [customer_id#123]
Join type: Inner
Join condition: (CASE WHEN (year_total#95 > 0.000000) THEN (year_total#124 / year_total#95) END > CASE WHEN (year_total#30 > 0.000000) THEN (year_total#65 / year_total#30) END)

(78) Project [codegen id : 12]
Output [10]: [customer_id#29, customer_id#58, customer_first_name#59, customer_last_name#60, customer_preferred_cust_flag#61, customer_birth_country#62, customer_login#63, customer_email_address#64, year_total#95, year_total#124]
Input [13]: [customer_id#29, year_total#30, customer_id#58, customer_first_name#59, customer_last_name#60, customer_preferred_cust_flag#61, customer_birth_country#62, customer_login#63, customer_email_address#64, year_total#65, year_total#95, customer_id#123, year_total#124]

(79) CometScan parquet spark_catalog.default.customer
Output [8]: [c_customer_sk#125, c_customer_id#126, c_first_name#127, c_last_name#128, c_preferred_cust_flag#129, c_birth_country#130, c_login#131, c_email_address#132]
Batched: true
Location [not included in comparison]/{warehouse_dir}/customer]
PushedFilters: [IsNotNull(c_customer_sk)]
ReadSchema: struct<c_customer_sk:int,c_customer_id:string,c_first_name:string,c_last_name:string,c_preferred_cust_flag:string,c_birth_country:string,c_login:string,c_email_address:string>

(80) CometFilter
Input [8]: [c_customer_sk#125, c_customer_id#126, c_first_name#127, c_last_name#128, c_preferred_cust_flag#129, c_birth_country#130, c_login#131, c_email_address#132]
Condition : (isnotnull(c_customer_sk#125) AND isnotnull(staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_customer_id#126, 16, true, false, true)))

(81) CometProject
Input [8]: [c_customer_sk#125, c_customer_id#126, c_first_name#127, c_last_name#128, c_preferred_cust_flag#129, c_birth_country#130, c_login#131, c_email_address#132]
Arguments: [c_customer_sk#125, c_customer_id#133, c_first_name#134, c_last_name#135, c_preferred_cust_flag#136, c_birth_country#130, c_login#137, c_email_address#138], [c_customer_sk#125, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_customer_id#126, 16, true, false, true) AS c_customer_id#133, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_first_name#127, 20, true, false, true) AS c_first_name#134, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_last_name#128, 30, true, false, true) AS c_last_name#135, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_preferred_cust_flag#129, 1, true, false, true) AS c_preferred_cust_flag#136, c_birth_country#130, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_login#131, 13, true, false, true) AS c_login#137, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_email_address#132, 50, true, false, true) AS c_email_address#138]

(82) CometScan parquet spark_catalog.default.web_sales
Output [6]: [ws_bill_customer_sk#139, ws_ext_discount_amt#140, ws_ext_sales_price#141, ws_ext_wholesale_cost#142, ws_ext_list_price#143, ws_sold_date_sk#144]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(ws_sold_date_sk#144), dynamicpruningexpression(ws_sold_date_sk#144 IN dynamicpruning#145)]
PushedFilters: [IsNotNull(ws_bill_customer_sk)]
ReadSchema: struct<ws_bill_customer_sk:int,ws_ext_discount_amt:decimal(7,2),ws_ext_sales_price:decimal(7,2),ws_ext_wholesale_cost:decimal(7,2),ws_ext_list_price:decimal(7,2)>

(83) CometFilter
Input [6]: [ws_bill_customer_sk#139, ws_ext_discount_amt#140, ws_ext_sales_price#141, ws_ext_wholesale_cost#142, ws_ext_list_price#143, ws_sold_date_sk#144]
Condition : isnotnull(ws_bill_customer_sk#139)

(84) CometBroadcastExchange
Input [6]: [ws_bill_customer_sk#139, ws_ext_discount_amt#140, ws_ext_sales_price#141, ws_ext_wholesale_cost#142, ws_ext_list_price#143, ws_sold_date_sk#144]
Arguments: [ws_bill_customer_sk#139, ws_ext_discount_amt#140, ws_ext_sales_price#141, ws_ext_wholesale_cost#142, ws_ext_list_price#143, ws_sold_date_sk#144]

(85) CometBroadcastHashJoin
Left output [8]: [c_customer_sk#125, c_customer_id#133, c_first_name#134, c_last_name#135, c_preferred_cust_flag#136, c_birth_country#130, c_login#137, c_email_address#138]
Right output [6]: [ws_bill_customer_sk#139, ws_ext_discount_amt#140, ws_ext_sales_price#141, ws_ext_wholesale_cost#142, ws_ext_list_price#143, ws_sold_date_sk#144]
Arguments: [c_customer_sk#125], [ws_bill_customer_sk#139], Inner, BuildRight

(86) CometProject
Input [14]: [c_customer_sk#125, c_customer_id#133, c_first_name#134, c_last_name#135, c_preferred_cust_flag#136, c_birth_country#130, c_login#137, c_email_address#138, ws_bill_customer_sk#139, ws_ext_discount_amt#140, ws_ext_sales_price#141, ws_ext_wholesale_cost#142, ws_ext_list_price#143, ws_sold_date_sk#144]
Arguments: [c_customer_id#133, c_first_name#134, c_last_name#135, c_preferred_cust_flag#136, c_birth_country#130, c_login#137, c_email_address#138, ws_ext_discount_amt#140, ws_ext_sales_price#141, ws_ext_wholesale_cost#142, ws_ext_list_price#143, ws_sold_date_sk#144], [c_customer_id#133, c_first_name#134, c_last_name#135, c_preferred_cust_flag#136, c_birth_country#130, c_login#137, c_email_address#138, ws_ext_discount_amt#140, ws_ext_sales_price#141, ws_ext_wholesale_cost#142, ws_ext_list_price#143, ws_sold_date_sk#144]

(87) ReusedExchange [Reuses operator id: 11]
Output [2]: [d_date_sk#146, d_year#147]

(88) CometBroadcastHashJoin
Left output [12]: [c_customer_id#133, c_first_name#134, c_last_name#135, c_preferred_cust_flag#136, c_birth_country#130, c_login#137, c_email_address#138, ws_ext_discount_amt#140, ws_ext_sales_price#141, ws_ext_wholesale_cost#142, ws_ext_list_price#143, ws_sold_date_sk#144]
Right output [2]: [d_date_sk#146, d_year#147]
Arguments: [ws_sold_date_sk#144], [d_date_sk#146], Inner, BuildRight

(89) CometProject
Input [14]: [c_customer_id#133, c_first_name#134, c_last_name#135, c_preferred_cust_flag#136, c_birth_country#130, c_login#137, c_email_address#138, ws_ext_discount_amt#140, ws_ext_sales_price#141, ws_ext_wholesale_cost#142, ws_ext_list_price#143, ws_sold_date_sk#144, d_date_sk#146, d_year#147]
Arguments: [c_customer_id#133, c_first_name#134, c_last_name#135, c_preferred_cust_flag#136, c_birth_country#130, c_login#137, c_email_address#138, ws_ext_discount_amt#140, ws_ext_sales_price#141, ws_ext_wholesale_cost#142, ws_ext_list_price#143, d_year#147], [c_customer_id#133, c_first_name#134, c_last_name#135, c_preferred_cust_flag#136, c_birth_country#130, c_login#137, c_email_address#138, ws_ext_discount_amt#140, ws_ext_sales_price#141, ws_ext_wholesale_cost#142, ws_ext_list_price#143, d_year#147]

(90) CometColumnarToRow [codegen id : 8]
Input [12]: [c_customer_id#133, c_first_name#134, c_last_name#135, c_preferred_cust_flag#136, c_birth_country#130, c_login#137, c_email_address#138, ws_ext_discount_amt#140, ws_ext_sales_price#141, ws_ext_wholesale_cost#142, ws_ext_list_price#143, d_year#147]

(91) HashAggregate [codegen id : 8]
Input [12]: [c_customer_id#133, c_first_name#134, c_last_name#135, c_preferred_cust_flag#136, c_birth_country#130, c_login#137, c_email_address#138, ws_ext_discount_amt#140, ws_ext_sales_price#141, ws_ext_wholesale_cost#142, ws_ext_list_price#143, d_year#147]
Keys [8]: [c_customer_id#133, c_first_name#134, c_last_name#135, c_preferred_cust_flag#136, c_birth_country#130, c_login#137, c_email_address#138, d_year#147]
Functions [1]: [partial_sum(((((ws_ext_list_price#143 - ws_ext_wholesale_cost#142) - ws_ext_discount_amt#140) + ws_ext_sales_price#141) / 2))]
Aggregate Attributes [2]: [sum#148, isEmpty#149]
Results [10]: [c_customer_id#133, c_first_name#134, c_last_name#135, c_preferred_cust_flag#136, c_birth_country#130, c_login#137, c_email_address#138, d_year#147, sum#150, isEmpty#151]

(92) CometColumnarExchange
Input [10]: [c_customer_id#133, c_first_name#134, c_last_name#135, c_preferred_cust_flag#136, c_birth_country#130, c_login#137, c_email_address#138, d_year#147, sum#150, isEmpty#151]
Arguments: hashpartitioning(c_customer_id#133, c_first_name#134, c_last_name#135, c_preferred_cust_flag#136, c_birth_country#130, c_login#137, c_email_address#138, d_year#147, 5), ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=8]

(93) CometColumnarToRow [codegen id : 9]
Input [10]: [c_customer_id#133, c_first_name#134, c_last_name#135, c_preferred_cust_flag#136, c_birth_country#130, c_login#137, c_email_address#138, d_year#147, sum#150, isEmpty#151]

(94) HashAggregate [codegen id : 9]
Input [10]: [c_customer_id#133, c_first_name#134, c_last_name#135, c_preferred_cust_flag#136, c_birth_country#130, c_login#137, c_email_address#138, d_year#147, sum#150, isEmpty#151]
Keys [8]: [c_customer_id#133, c_first_name#134, c_last_name#135, c_preferred_cust_flag#136, c_birth_country#130, c_login#137, c_email_address#138, d_year#147]
Functions [1]: [sum(((((ws_ext_list_price#143 - ws_ext_wholesale_cost#142) - ws_ext_discount_amt#140) + ws_ext_sales_price#141) / 2))]
Aggregate Attributes [1]: [sum(((((ws_ext_list_price#143 - ws_ext_wholesale_cost#142) - ws_ext_discount_amt#140) + ws_ext_sales_price#141) / 2))#152]
Results [2]: [c_customer_id#133 AS customer_id#153, sum(((((ws_ext_list_price#143 - ws_ext_wholesale_cost#142) - ws_ext_discount_amt#140) + ws_ext_sales_price#141) / 2))#152 AS year_total#154]

(95) Filter [codegen id : 9]
Input [2]: [customer_id#153, year_total#154]
Condition : (isnotnull(year_total#154) AND (year_total#154 > 0.000000))

(96) BroadcastExchange
Input [2]: [customer_id#153, year_total#154]
Arguments: HashedRelationBroadcastMode(List(input[0, string, true]),false), [plan_id=9]

(97) BroadcastHashJoin [codegen id : 12]
Left keys [1]: [customer_id#29]
Right keys [1]: [customer_id#153]
Join type: Inner
Join condition: None

(98) Project [codegen id : 12]
Output [11]: [customer_id#29, customer_id#58, customer_first_name#59, customer_last_name#60, customer_preferred_cust_flag#61, customer_birth_country#62, customer_login#63, customer_email_address#64, year_total#95, year_total#124, year_total#154]
Input [12]: [customer_id#29, customer_id#58, customer_first_name#59, customer_last_name#60, customer_preferred_cust_flag#61, customer_birth_country#62, customer_login#63, customer_email_address#64, year_total#95, year_total#124, customer_id#153, year_total#154]

(99) CometScan parquet spark_catalog.default.customer
Output [8]: [c_customer_sk#155, c_customer_id#156, c_first_name#157, c_last_name#158, c_preferred_cust_flag#159, c_birth_country#160, c_login#161, c_email_address#162]
Batched: true
Location [not included in comparison]/{warehouse_dir}/customer]
PushedFilters: [IsNotNull(c_customer_sk)]
ReadSchema: struct<c_customer_sk:int,c_customer_id:string,c_first_name:string,c_last_name:string,c_preferred_cust_flag:string,c_birth_country:string,c_login:string,c_email_address:string>

(100) CometFilter
Input [8]: [c_customer_sk#155, c_customer_id#156, c_first_name#157, c_last_name#158, c_preferred_cust_flag#159, c_birth_country#160, c_login#161, c_email_address#162]
Condition : (isnotnull(c_customer_sk#155) AND isnotnull(staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_customer_id#156, 16, true, false, true)))

(101) CometProject
Input [8]: [c_customer_sk#155, c_customer_id#156, c_first_name#157, c_last_name#158, c_preferred_cust_flag#159, c_birth_country#160, c_login#161, c_email_address#162]
Arguments: [c_customer_sk#155, c_customer_id#163, c_first_name#164, c_last_name#165, c_preferred_cust_flag#166, c_birth_country#160, c_login#167, c_email_address#168], [c_customer_sk#155, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_customer_id#156, 16, true, false, true) AS c_customer_id#163, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_first_name#157, 20, true, false, true) AS c_first_name#164, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_last_name#158, 30, true, false, true) AS c_last_name#165, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_preferred_cust_flag#159, 1, true, false, true) AS c_preferred_cust_flag#166, c_birth_country#160, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_login#161, 13, true, false, true) AS c_login#167, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_email_address#162, 50, true, false, true) AS c_email_address#168]

(102) CometScan parquet spark_catalog.default.web_sales
Output [6]: [ws_bill_customer_sk#169, ws_ext_discount_amt#170, ws_ext_sales_price#171, ws_ext_wholesale_cost#172, ws_ext_list_price#173, ws_sold_date_sk#174]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(ws_sold_date_sk#174), dynamicpruningexpression(ws_sold_date_sk#174 IN dynamicpruning#175)]
PushedFilters: [IsNotNull(ws_bill_customer_sk)]
ReadSchema: struct<ws_bill_customer_sk:int,ws_ext_discount_amt:decimal(7,2),ws_ext_sales_price:decimal(7,2),ws_ext_wholesale_cost:decimal(7,2),ws_ext_list_price:decimal(7,2)>

(103) CometFilter
Input [6]: [ws_bill_customer_sk#169, ws_ext_discount_amt#170, ws_ext_sales_price#171, ws_ext_wholesale_cost#172, ws_ext_list_price#173, ws_sold_date_sk#174]
Condition : isnotnull(ws_bill_customer_sk#169)

(104) CometBroadcastExchange
Input [6]: [ws_bill_customer_sk#169, ws_ext_discount_amt#170, ws_ext_sales_price#171, ws_ext_wholesale_cost#172, ws_ext_list_price#173, ws_sold_date_sk#174]
Arguments: [ws_bill_customer_sk#169, ws_ext_discount_amt#170, ws_ext_sales_price#171, ws_ext_wholesale_cost#172, ws_ext_list_price#173, ws_sold_date_sk#174]

(105) CometBroadcastHashJoin
Left output [8]: [c_customer_sk#155, c_customer_id#163, c_first_name#164, c_last_name#165, c_preferred_cust_flag#166, c_birth_country#160, c_login#167, c_email_address#168]
Right output [6]: [ws_bill_customer_sk#169, ws_ext_discount_amt#170, ws_ext_sales_price#171, ws_ext_wholesale_cost#172, ws_ext_list_price#173, ws_sold_date_sk#174]
Arguments: [c_customer_sk#155], [ws_bill_customer_sk#169], Inner, BuildRight

(106) CometProject
Input [14]: [c_customer_sk#155, c_customer_id#163, c_first_name#164, c_last_name#165, c_preferred_cust_flag#166, c_birth_country#160, c_login#167, c_email_address#168, ws_bill_customer_sk#169, ws_ext_discount_amt#170, ws_ext_sales_price#171, ws_ext_wholesale_cost#172, ws_ext_list_price#173, ws_sold_date_sk#174]
Arguments: [c_customer_id#163, c_first_name#164, c_last_name#165, c_preferred_cust_flag#166, c_birth_country#160, c_login#167, c_email_address#168, ws_ext_discount_amt#170, ws_ext_sales_price#171, ws_ext_wholesale_cost#172, ws_ext_list_price#173, ws_sold_date_sk#174], [c_customer_id#163, c_first_name#164, c_last_name#165, c_preferred_cust_flag#166, c_birth_country#160, c_login#167, c_email_address#168, ws_ext_discount_amt#170, ws_ext_sales_price#171, ws_ext_wholesale_cost#172, ws_ext_list_price#173, ws_sold_date_sk#174]

(107) ReusedExchange [Reuses operator id: 30]
Output [2]: [d_date_sk#176, d_year#177]

(108) CometBroadcastHashJoin
Left output [12]: [c_customer_id#163, c_first_name#164, c_last_name#165, c_preferred_cust_flag#166, c_birth_country#160, c_login#167, c_email_address#168, ws_ext_discount_amt#170, ws_ext_sales_price#171, ws_ext_wholesale_cost#172, ws_ext_list_price#173, ws_sold_date_sk#174]
Right output [2]: [d_date_sk#176, d_year#177]
Arguments: [ws_sold_date_sk#174], [d_date_sk#176], Inner, BuildRight

(109) CometProject
Input [14]: [c_customer_id#163, c_first_name#164, c_last_name#165, c_preferred_cust_flag#166, c_birth_country#160, c_login#167, c_email_address#168, ws_ext_discount_amt#170, ws_ext_sales_price#171, ws_ext_wholesale_cost#172, ws_ext_list_price#173, ws_sold_date_sk#174, d_date_sk#176, d_year#177]
Arguments: [c_customer_id#163, c_first_name#164, c_last_name#165, c_preferred_cust_flag#166, c_birth_country#160, c_login#167, c_email_address#168, ws_ext_discount_amt#170, ws_ext_sales_price#171, ws_ext_wholesale_cost#172, ws_ext_list_price#173, d_year#177], [c_customer_id#163, c_first_name#164, c_last_name#165, c_preferred_cust_flag#166, c_birth_country#160, c_login#167, c_email_address#168, ws_ext_discount_amt#170, ws_ext_sales_price#171, ws_ext_wholesale_cost#172, ws_ext_list_price#173, d_year#177]

(110) CometColumnarToRow [codegen id : 10]
Input [12]: [c_customer_id#163, c_first_name#164, c_last_name#165, c_preferred_cust_flag#166, c_birth_country#160, c_login#167, c_email_address#168, ws_ext_discount_amt#170, ws_ext_sales_price#171, ws_ext_wholesale_cost#172, ws_ext_list_price#173, d_year#177]

(111) HashAggregate [codegen id : 10]
Input [12]: [c_customer_id#163, c_first_name#164, c_last_name#165, c_preferred_cust_flag#166, c_birth_country#160, c_login#167, c_email_address#168, ws_ext_discount_amt#170, ws_ext_sales_price#171, ws_ext_wholesale_cost#172, ws_ext_list_price#173, d_year#177]
Keys [8]: [c_customer_id#163, c_first_name#164, c_last_name#165, c_preferred_cust_flag#166, c_birth_country#160, c_login#167, c_email_address#168, d_year#177]
Functions [1]: [partial_sum(((((ws_ext_list_price#173 - ws_ext_wholesale_cost#172) - ws_ext_discount_amt#170) + ws_ext_sales_price#171) / 2))]
Aggregate Attributes [2]: [sum#178, isEmpty#179]
Results [10]: [c_customer_id#163, c_first_name#164, c_last_name#165, c_preferred_cust_flag#166, c_birth_country#160, c_login#167, c_email_address#168, d_year#177, sum#180, isEmpty#181]

(112) CometColumnarExchange
Input [10]: [c_customer_id#163, c_first_name#164, c_last_name#165, c_preferred_cust_flag#166, c_birth_country#160, c_login#167, c_email_address#168, d_year#177, sum#180, isEmpty#181]
Arguments: hashpartitioning(c_customer_id#163, c_first_name#164, c_last_name#165, c_preferred_cust_flag#166, c_birth_country#160, c_login#167, c_email_address#168, d_year#177, 5), ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=10]

(113) CometColumnarToRow [codegen id : 11]
Input [10]: [c_customer_id#163, c_first_name#164, c_last_name#165, c_preferred_cust_flag#166, c_birth_country#160, c_login#167, c_email_address#168, d_year#177, sum#180, isEmpty#181]

(114) HashAggregate [codegen id : 11]
Input [10]: [c_customer_id#163, c_first_name#164, c_last_name#165, c_preferred_cust_flag#166, c_birth_country#160, c_login#167, c_email_address#168, d_year#177, sum#180, isEmpty#181]
Keys [8]: [c_customer_id#163, c_first_name#164, c_last_name#165, c_preferred_cust_flag#166, c_birth_country#160, c_login#167, c_email_address#168, d_year#177]
Functions [1]: [sum(((((ws_ext_list_price#173 - ws_ext_wholesale_cost#172) - ws_ext_discount_amt#170) + ws_ext_sales_price#171) / 2))]
Aggregate Attributes [1]: [sum(((((ws_ext_list_price#173 - ws_ext_wholesale_cost#172) - ws_ext_discount_amt#170) + ws_ext_sales_price#171) / 2))#152]
Results [2]: [c_customer_id#163 AS customer_id#182, sum(((((ws_ext_list_price#173 - ws_ext_wholesale_cost#172) - ws_ext_discount_amt#170) + ws_ext_sales_price#171) / 2))#152 AS year_total#183]

(115) BroadcastExchange
Input [2]: [customer_id#182, year_total#183]
Arguments: HashedRelationBroadcastMode(List(input[0, string, true]),false), [plan_id=11]

(116) BroadcastHashJoin [codegen id : 12]
Left keys [1]: [customer_id#29]
Right keys [1]: [customer_id#182]
Join type: Inner
Join condition: (CASE WHEN (year_total#95 > 0.000000) THEN (year_total#124 / year_total#95) END > CASE WHEN (year_total#154 > 0.000000) THEN (year_total#183 / year_total#154) END)

(117) Project [codegen id : 12]
Output [7]: [customer_id#58, customer_first_name#59, customer_last_name#60, customer_preferred_cust_flag#61, customer_birth_country#62, customer_login#63, customer_email_address#64]
Input [13]: [customer_id#29, customer_id#58, customer_first_name#59, customer_last_name#60, customer_preferred_cust_flag#61, customer_birth_country#62, customer_login#63, customer_email_address#64, year_total#95, year_total#124, year_total#154, customer_id#182, year_total#183]

(118) TakeOrderedAndProject
Input [7]: [customer_id#58, customer_first_name#59, customer_last_name#60, customer_preferred_cust_flag#61, customer_birth_country#62, customer_login#63, customer_email_address#64]
Arguments: 100, [customer_id#58 ASC NULLS FIRST, customer_first_name#59 ASC NULLS FIRST, customer_last_name#60 ASC NULLS FIRST, customer_preferred_cust_flag#61 ASC NULLS FIRST, customer_birth_country#62 ASC NULLS FIRST, customer_login#63 ASC NULLS FIRST, customer_email_address#64 ASC NULLS FIRST], [customer_id#58, customer_first_name#59, customer_last_name#60, customer_preferred_cust_flag#61, customer_birth_country#62, customer_login#63, customer_email_address#64]

===== Subqueries =====

Subquery:1 Hosting operator id = 4 Hosting Expression = ss_sold_date_sk#20 IN dynamicpruning#21
BroadcastExchange (122)
+- * CometColumnarToRow (121)
   +- CometFilter (120)
      +- CometScan parquet spark_catalog.default.date_dim (119)


(119) CometScan parquet spark_catalog.default.date_dim
Output [2]: [d_date_sk#22, d_year#23]
Batched: true
Location [not included in comparison]/{warehouse_dir}/date_dim]
PushedFilters: [IsNotNull(d_year), EqualTo(d_year,2001), IsNotNull(d_date_sk)]
ReadSchema: struct<d_date_sk:int,d_year:int>

(120) CometFilter
Input [2]: [d_date_sk#22, d_year#23]
Condition : ((isnotnull(d_year#23) AND (d_year#23 = 2001)) AND isnotnull(d_date_sk#22))

(121) CometColumnarToRow [codegen id : 1]
Input [2]: [d_date_sk#22, d_year#23]

(122) BroadcastExchange
Input [2]: [d_date_sk#22, d_year#23]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, false] as bigint)),false), [plan_id=12]

Subquery:2 Hosting operator id = 23 Hosting Expression = ss_sold_date_sk#50 IN dynamicpruning#51
BroadcastExchange (126)
+- * CometColumnarToRow (125)
   +- CometFilter (124)
      +- CometScan parquet spark_catalog.default.date_dim (123)


(123) CometScan parquet spark_catalog.default.date_dim
Output [2]: [d_date_sk#52, d_year#53]
Batched: true
Location [not included in comparison]/{warehouse_dir}/date_dim]
PushedFilters: [IsNotNull(d_year), EqualTo(d_year,2002), IsNotNull(d_date_sk)]
ReadSchema: struct<d_date_sk:int,d_year:int>

(124) CometFilter
Input [2]: [d_date_sk#52, d_year#53]
Condition : ((isnotnull(d_year#53) AND (d_year#53 = 2002)) AND isnotnull(d_date_sk#52))

(125) CometColumnarToRow [codegen id : 1]
Input [2]: [d_date_sk#52, d_year#53]

(126) BroadcastExchange
Input [2]: [d_date_sk#52, d_year#53]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, false] as bigint)),false), [plan_id=13]

Subquery:3 Hosting operator id = 43 Hosting Expression = cs_sold_date_sk#85 IN dynamicpruning#21

Subquery:4 Hosting operator id = 63 Hosting Expression = cs_sold_date_sk#115 IN dynamicpruning#51

Subquery:5 Hosting operator id = 82 Hosting Expression = ws_sold_date_sk#144 IN dynamicpruning#21

Subquery:6 Hosting operator id = 102 Hosting Expression = ws_sold_date_sk#174 IN dynamicpruning#51


