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


(1) CometScan [native_iceberg_compat] 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(static_invoke(CharVarcharCodegenUtils.readSidePadding(c_customer_id#2, 16))))

(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, static_invoke(CharVarcharCodegenUtils.readSidePadding(c_customer_id#2, 16)) AS c_customer_id#9, static_invoke(CharVarcharCodegenUtils.readSidePadding(c_first_name#3, 20)) AS c_first_name#10, static_invoke(CharVarcharCodegenUtils.readSidePadding(c_last_name#4, 30)) AS c_last_name#11, static_invoke(CharVarcharCodegenUtils.readSidePadding(c_preferred_cust_flag#5, 1)) AS c_preferred_cust_flag#12, c_birth_country#6, static_invoke(CharVarcharCodegenUtils.readSidePadding(c_login#7, 13)) AS c_login#13, static_invoke(CharVarcharCodegenUtils.readSidePadding(c_email_address#8, 50)) AS c_email_address#14]

(4) CometScan [native_iceberg_compat] 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 [native_iceberg_compat] 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) CometHashAggregate
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))]

(15) CometExchange
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#24, isEmpty#25]
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, CometNativeShuffle, [plan_id=1]

(16) CometHashAggregate
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#24, isEmpty#25]
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))]

(17) CometFilter
Input [2]: [customer_id#26, year_total#27]
Condition : (isnotnull(year_total#27) AND (year_total#27 > 0.000000))

(18) CometScan [native_iceberg_compat] parquet spark_catalog.default.customer
Output [8]: [c_customer_sk#28, c_customer_id#29, c_first_name#30, c_last_name#31, c_preferred_cust_flag#32, c_birth_country#33, c_login#34, c_email_address#35]
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>

(19) CometFilter
Input [8]: [c_customer_sk#28, c_customer_id#29, c_first_name#30, c_last_name#31, c_preferred_cust_flag#32, c_birth_country#33, c_login#34, c_email_address#35]
Condition : (isnotnull(c_customer_sk#28) AND isnotnull(static_invoke(CharVarcharCodegenUtils.readSidePadding(c_customer_id#29, 16))))

(20) CometProject
Input [8]: [c_customer_sk#28, c_customer_id#29, c_first_name#30, c_last_name#31, c_preferred_cust_flag#32, c_birth_country#33, c_login#34, c_email_address#35]
Arguments: [c_customer_sk#28, c_customer_id#36, c_first_name#37, c_last_name#38, c_preferred_cust_flag#39, c_birth_country#33, c_login#40, c_email_address#41], [c_customer_sk#28, static_invoke(CharVarcharCodegenUtils.readSidePadding(c_customer_id#29, 16)) AS c_customer_id#36, static_invoke(CharVarcharCodegenUtils.readSidePadding(c_first_name#30, 20)) AS c_first_name#37, static_invoke(CharVarcharCodegenUtils.readSidePadding(c_last_name#31, 30)) AS c_last_name#38, static_invoke(CharVarcharCodegenUtils.readSidePadding(c_preferred_cust_flag#32, 1)) AS c_preferred_cust_flag#39, c_birth_country#33, static_invoke(CharVarcharCodegenUtils.readSidePadding(c_login#34, 13)) AS c_login#40, static_invoke(CharVarcharCodegenUtils.readSidePadding(c_email_address#35, 50)) AS c_email_address#41]

(21) CometScan [native_iceberg_compat] parquet spark_catalog.default.store_sales
Output [6]: [ss_customer_sk#42, ss_ext_discount_amt#43, ss_ext_sales_price#44, ss_ext_wholesale_cost#45, ss_ext_list_price#46, ss_sold_date_sk#47]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(ss_sold_date_sk#47), dynamicpruningexpression(ss_sold_date_sk#47 IN dynamicpruning#48)]
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)>

(22) CometFilter
Input [6]: [ss_customer_sk#42, ss_ext_discount_amt#43, ss_ext_sales_price#44, ss_ext_wholesale_cost#45, ss_ext_list_price#46, ss_sold_date_sk#47]
Condition : isnotnull(ss_customer_sk#42)

(23) CometBroadcastExchange
Input [6]: [ss_customer_sk#42, ss_ext_discount_amt#43, ss_ext_sales_price#44, ss_ext_wholesale_cost#45, ss_ext_list_price#46, ss_sold_date_sk#47]
Arguments: [ss_customer_sk#42, ss_ext_discount_amt#43, ss_ext_sales_price#44, ss_ext_wholesale_cost#45, ss_ext_list_price#46, ss_sold_date_sk#47]

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

(25) CometProject
Input [14]: [c_customer_sk#28, c_customer_id#36, c_first_name#37, c_last_name#38, c_preferred_cust_flag#39, c_birth_country#33, c_login#40, c_email_address#41, ss_customer_sk#42, ss_ext_discount_amt#43, ss_ext_sales_price#44, ss_ext_wholesale_cost#45, ss_ext_list_price#46, ss_sold_date_sk#47]
Arguments: [c_customer_id#36, c_first_name#37, c_last_name#38, c_preferred_cust_flag#39, c_birth_country#33, c_login#40, c_email_address#41, ss_ext_discount_amt#43, ss_ext_sales_price#44, ss_ext_wholesale_cost#45, ss_ext_list_price#46, ss_sold_date_sk#47], [c_customer_id#36, c_first_name#37, c_last_name#38, c_preferred_cust_flag#39, c_birth_country#33, c_login#40, c_email_address#41, ss_ext_discount_amt#43, ss_ext_sales_price#44, ss_ext_wholesale_cost#45, ss_ext_list_price#46, ss_sold_date_sk#47]

(26) CometScan [native_iceberg_compat] parquet spark_catalog.default.date_dim
Output [2]: [d_date_sk#49, d_year#50]
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>

(27) CometFilter
Input [2]: [d_date_sk#49, d_year#50]
Condition : ((isnotnull(d_year#50) AND (d_year#50 = 2002)) AND isnotnull(d_date_sk#49))

(28) CometBroadcastExchange
Input [2]: [d_date_sk#49, d_year#50]
Arguments: [d_date_sk#49, d_year#50]

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

(30) CometProject
Input [14]: [c_customer_id#36, c_first_name#37, c_last_name#38, c_preferred_cust_flag#39, c_birth_country#33, c_login#40, c_email_address#41, ss_ext_discount_amt#43, ss_ext_sales_price#44, ss_ext_wholesale_cost#45, ss_ext_list_price#46, ss_sold_date_sk#47, d_date_sk#49, d_year#50]
Arguments: [c_customer_id#36, c_first_name#37, c_last_name#38, c_preferred_cust_flag#39, c_birth_country#33, c_login#40, c_email_address#41, ss_ext_discount_amt#43, ss_ext_sales_price#44, ss_ext_wholesale_cost#45, ss_ext_list_price#46, d_year#50], [c_customer_id#36, c_first_name#37, c_last_name#38, c_preferred_cust_flag#39, c_birth_country#33, c_login#40, c_email_address#41, ss_ext_discount_amt#43, ss_ext_sales_price#44, ss_ext_wholesale_cost#45, ss_ext_list_price#46, d_year#50]

(31) CometHashAggregate
Input [12]: [c_customer_id#36, c_first_name#37, c_last_name#38, c_preferred_cust_flag#39, c_birth_country#33, c_login#40, c_email_address#41, ss_ext_discount_amt#43, ss_ext_sales_price#44, ss_ext_wholesale_cost#45, ss_ext_list_price#46, d_year#50]
Keys [8]: [c_customer_id#36, c_first_name#37, c_last_name#38, c_preferred_cust_flag#39, c_birth_country#33, c_login#40, c_email_address#41, d_year#50]
Functions [1]: [partial_sum(((((ss_ext_list_price#46 - ss_ext_wholesale_cost#45) - ss_ext_discount_amt#43) + ss_ext_sales_price#44) / 2))]

(32) CometExchange
Input [10]: [c_customer_id#36, c_first_name#37, c_last_name#38, c_preferred_cust_flag#39, c_birth_country#33, c_login#40, c_email_address#41, d_year#50, sum#51, isEmpty#52]
Arguments: hashpartitioning(c_customer_id#36, c_first_name#37, c_last_name#38, c_preferred_cust_flag#39, c_birth_country#33, c_login#40, c_email_address#41, d_year#50, 5), ENSURE_REQUIREMENTS, CometNativeShuffle, [plan_id=2]

(33) CometHashAggregate
Input [10]: [c_customer_id#36, c_first_name#37, c_last_name#38, c_preferred_cust_flag#39, c_birth_country#33, c_login#40, c_email_address#41, d_year#50, sum#51, isEmpty#52]
Keys [8]: [c_customer_id#36, c_first_name#37, c_last_name#38, c_preferred_cust_flag#39, c_birth_country#33, c_login#40, c_email_address#41, d_year#50]
Functions [1]: [sum(((((ss_ext_list_price#46 - ss_ext_wholesale_cost#45) - ss_ext_discount_amt#43) + ss_ext_sales_price#44) / 2))]

(34) CometBroadcastExchange
Input [8]: [customer_id#53, customer_first_name#54, customer_last_name#55, customer_preferred_cust_flag#56, customer_birth_country#57, customer_login#58, customer_email_address#59, year_total#60]
Arguments: [customer_id#53, customer_first_name#54, customer_last_name#55, customer_preferred_cust_flag#56, customer_birth_country#57, customer_login#58, customer_email_address#59, year_total#60]

(35) CometBroadcastHashJoin
Left output [2]: [customer_id#26, year_total#27]
Right output [8]: [customer_id#53, customer_first_name#54, customer_last_name#55, customer_preferred_cust_flag#56, customer_birth_country#57, customer_login#58, customer_email_address#59, year_total#60]
Arguments: [customer_id#26], [customer_id#53], Inner, BuildRight

(36) CometScan [native_iceberg_compat] parquet spark_catalog.default.customer
Output [8]: [c_customer_sk#61, c_customer_id#62, c_first_name#63, c_last_name#64, c_preferred_cust_flag#65, c_birth_country#66, c_login#67, c_email_address#68]
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>

(37) CometFilter
Input [8]: [c_customer_sk#61, c_customer_id#62, c_first_name#63, c_last_name#64, c_preferred_cust_flag#65, c_birth_country#66, c_login#67, c_email_address#68]
Condition : (isnotnull(c_customer_sk#61) AND isnotnull(static_invoke(CharVarcharCodegenUtils.readSidePadding(c_customer_id#62, 16))))

(38) CometProject
Input [8]: [c_customer_sk#61, c_customer_id#62, c_first_name#63, c_last_name#64, c_preferred_cust_flag#65, c_birth_country#66, c_login#67, c_email_address#68]
Arguments: [c_customer_sk#61, c_customer_id#69, c_first_name#70, c_last_name#71, c_preferred_cust_flag#72, c_birth_country#66, c_login#73, c_email_address#74], [c_customer_sk#61, static_invoke(CharVarcharCodegenUtils.readSidePadding(c_customer_id#62, 16)) AS c_customer_id#69, static_invoke(CharVarcharCodegenUtils.readSidePadding(c_first_name#63, 20)) AS c_first_name#70, static_invoke(CharVarcharCodegenUtils.readSidePadding(c_last_name#64, 30)) AS c_last_name#71, static_invoke(CharVarcharCodegenUtils.readSidePadding(c_preferred_cust_flag#65, 1)) AS c_preferred_cust_flag#72, c_birth_country#66, static_invoke(CharVarcharCodegenUtils.readSidePadding(c_login#67, 13)) AS c_login#73, static_invoke(CharVarcharCodegenUtils.readSidePadding(c_email_address#68, 50)) AS c_email_address#74]

(39) CometScan [native_iceberg_compat] parquet spark_catalog.default.catalog_sales
Output [6]: [cs_bill_customer_sk#75, cs_ext_discount_amt#76, cs_ext_sales_price#77, cs_ext_wholesale_cost#78, cs_ext_list_price#79, cs_sold_date_sk#80]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(cs_sold_date_sk#80), dynamicpruningexpression(cs_sold_date_sk#80 IN dynamicpruning#81)]
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)>

(40) CometFilter
Input [6]: [cs_bill_customer_sk#75, cs_ext_discount_amt#76, cs_ext_sales_price#77, cs_ext_wholesale_cost#78, cs_ext_list_price#79, cs_sold_date_sk#80]
Condition : isnotnull(cs_bill_customer_sk#75)

(41) CometBroadcastExchange
Input [6]: [cs_bill_customer_sk#75, cs_ext_discount_amt#76, cs_ext_sales_price#77, cs_ext_wholesale_cost#78, cs_ext_list_price#79, cs_sold_date_sk#80]
Arguments: [cs_bill_customer_sk#75, cs_ext_discount_amt#76, cs_ext_sales_price#77, cs_ext_wholesale_cost#78, cs_ext_list_price#79, cs_sold_date_sk#80]

(42) CometBroadcastHashJoin
Left output [8]: [c_customer_sk#61, c_customer_id#69, c_first_name#70, c_last_name#71, c_preferred_cust_flag#72, c_birth_country#66, c_login#73, c_email_address#74]
Right output [6]: [cs_bill_customer_sk#75, cs_ext_discount_amt#76, cs_ext_sales_price#77, cs_ext_wholesale_cost#78, cs_ext_list_price#79, cs_sold_date_sk#80]
Arguments: [c_customer_sk#61], [cs_bill_customer_sk#75], Inner, BuildRight

(43) CometProject
Input [14]: [c_customer_sk#61, c_customer_id#69, c_first_name#70, c_last_name#71, c_preferred_cust_flag#72, c_birth_country#66, c_login#73, c_email_address#74, cs_bill_customer_sk#75, cs_ext_discount_amt#76, cs_ext_sales_price#77, cs_ext_wholesale_cost#78, cs_ext_list_price#79, cs_sold_date_sk#80]
Arguments: [c_customer_id#69, c_first_name#70, c_last_name#71, c_preferred_cust_flag#72, c_birth_country#66, c_login#73, c_email_address#74, cs_ext_discount_amt#76, cs_ext_sales_price#77, cs_ext_wholesale_cost#78, cs_ext_list_price#79, cs_sold_date_sk#80], [c_customer_id#69, c_first_name#70, c_last_name#71, c_preferred_cust_flag#72, c_birth_country#66, c_login#73, c_email_address#74, cs_ext_discount_amt#76, cs_ext_sales_price#77, cs_ext_wholesale_cost#78, cs_ext_list_price#79, cs_sold_date_sk#80]

(44) ReusedExchange [Reuses operator id: 11]
Output [2]: [d_date_sk#82, d_year#83]

(45) CometBroadcastHashJoin
Left output [12]: [c_customer_id#69, c_first_name#70, c_last_name#71, c_preferred_cust_flag#72, c_birth_country#66, c_login#73, c_email_address#74, cs_ext_discount_amt#76, cs_ext_sales_price#77, cs_ext_wholesale_cost#78, cs_ext_list_price#79, cs_sold_date_sk#80]
Right output [2]: [d_date_sk#82, d_year#83]
Arguments: [cs_sold_date_sk#80], [d_date_sk#82], Inner, BuildRight

(46) CometProject
Input [14]: [c_customer_id#69, c_first_name#70, c_last_name#71, c_preferred_cust_flag#72, c_birth_country#66, c_login#73, c_email_address#74, cs_ext_discount_amt#76, cs_ext_sales_price#77, cs_ext_wholesale_cost#78, cs_ext_list_price#79, cs_sold_date_sk#80, d_date_sk#82, d_year#83]
Arguments: [c_customer_id#69, c_first_name#70, c_last_name#71, c_preferred_cust_flag#72, c_birth_country#66, c_login#73, c_email_address#74, cs_ext_discount_amt#76, cs_ext_sales_price#77, cs_ext_wholesale_cost#78, cs_ext_list_price#79, d_year#83], [c_customer_id#69, c_first_name#70, c_last_name#71, c_preferred_cust_flag#72, c_birth_country#66, c_login#73, c_email_address#74, cs_ext_discount_amt#76, cs_ext_sales_price#77, cs_ext_wholesale_cost#78, cs_ext_list_price#79, d_year#83]

(47) CometHashAggregate
Input [12]: [c_customer_id#69, c_first_name#70, c_last_name#71, c_preferred_cust_flag#72, c_birth_country#66, c_login#73, c_email_address#74, cs_ext_discount_amt#76, cs_ext_sales_price#77, cs_ext_wholesale_cost#78, cs_ext_list_price#79, d_year#83]
Keys [8]: [c_customer_id#69, c_first_name#70, c_last_name#71, c_preferred_cust_flag#72, c_birth_country#66, c_login#73, c_email_address#74, d_year#83]
Functions [1]: [partial_sum(((((cs_ext_list_price#79 - cs_ext_wholesale_cost#78) - cs_ext_discount_amt#76) + cs_ext_sales_price#77) / 2))]

(48) CometExchange
Input [10]: [c_customer_id#69, c_first_name#70, c_last_name#71, c_preferred_cust_flag#72, c_birth_country#66, c_login#73, c_email_address#74, d_year#83, sum#84, isEmpty#85]
Arguments: hashpartitioning(c_customer_id#69, c_first_name#70, c_last_name#71, c_preferred_cust_flag#72, c_birth_country#66, c_login#73, c_email_address#74, d_year#83, 5), ENSURE_REQUIREMENTS, CometNativeShuffle, [plan_id=3]

(49) CometHashAggregate
Input [10]: [c_customer_id#69, c_first_name#70, c_last_name#71, c_preferred_cust_flag#72, c_birth_country#66, c_login#73, c_email_address#74, d_year#83, sum#84, isEmpty#85]
Keys [8]: [c_customer_id#69, c_first_name#70, c_last_name#71, c_preferred_cust_flag#72, c_birth_country#66, c_login#73, c_email_address#74, d_year#83]
Functions [1]: [sum(((((cs_ext_list_price#79 - cs_ext_wholesale_cost#78) - cs_ext_discount_amt#76) + cs_ext_sales_price#77) / 2))]

(50) CometFilter
Input [2]: [customer_id#86, year_total#87]
Condition : (isnotnull(year_total#87) AND (year_total#87 > 0.000000))

(51) CometBroadcastExchange
Input [2]: [customer_id#86, year_total#87]
Arguments: [customer_id#86, year_total#87]

(52) CometBroadcastHashJoin
Left output [10]: [customer_id#26, year_total#27, customer_id#53, customer_first_name#54, customer_last_name#55, customer_preferred_cust_flag#56, customer_birth_country#57, customer_login#58, customer_email_address#59, year_total#60]
Right output [2]: [customer_id#86, year_total#87]
Arguments: [customer_id#26], [customer_id#86], Inner, BuildRight

(53) CometProject
Input [12]: [customer_id#26, year_total#27, customer_id#53, customer_first_name#54, customer_last_name#55, customer_preferred_cust_flag#56, customer_birth_country#57, customer_login#58, customer_email_address#59, year_total#60, customer_id#86, year_total#87]
Arguments: [customer_id#26, year_total#27, customer_id#53, customer_first_name#54, customer_last_name#55, customer_preferred_cust_flag#56, customer_birth_country#57, customer_login#58, customer_email_address#59, year_total#60, year_total#87], [customer_id#26, year_total#27, customer_id#53, customer_first_name#54, customer_last_name#55, customer_preferred_cust_flag#56, customer_birth_country#57, customer_login#58, customer_email_address#59, year_total#60, year_total#87]

(54) CometScan [native_iceberg_compat] parquet spark_catalog.default.customer
Output [8]: [c_customer_sk#88, c_customer_id#89, c_first_name#90, c_last_name#91, c_preferred_cust_flag#92, c_birth_country#93, c_login#94, c_email_address#95]
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>

(55) CometFilter
Input [8]: [c_customer_sk#88, c_customer_id#89, c_first_name#90, c_last_name#91, c_preferred_cust_flag#92, c_birth_country#93, c_login#94, c_email_address#95]
Condition : (isnotnull(c_customer_sk#88) AND isnotnull(static_invoke(CharVarcharCodegenUtils.readSidePadding(c_customer_id#89, 16))))

(56) CometProject
Input [8]: [c_customer_sk#88, c_customer_id#89, c_first_name#90, c_last_name#91, c_preferred_cust_flag#92, c_birth_country#93, c_login#94, c_email_address#95]
Arguments: [c_customer_sk#88, c_customer_id#96, c_first_name#97, c_last_name#98, c_preferred_cust_flag#99, c_birth_country#93, c_login#100, c_email_address#101], [c_customer_sk#88, static_invoke(CharVarcharCodegenUtils.readSidePadding(c_customer_id#89, 16)) AS c_customer_id#96, static_invoke(CharVarcharCodegenUtils.readSidePadding(c_first_name#90, 20)) AS c_first_name#97, static_invoke(CharVarcharCodegenUtils.readSidePadding(c_last_name#91, 30)) AS c_last_name#98, static_invoke(CharVarcharCodegenUtils.readSidePadding(c_preferred_cust_flag#92, 1)) AS c_preferred_cust_flag#99, c_birth_country#93, static_invoke(CharVarcharCodegenUtils.readSidePadding(c_login#94, 13)) AS c_login#100, static_invoke(CharVarcharCodegenUtils.readSidePadding(c_email_address#95, 50)) AS c_email_address#101]

(57) CometScan [native_iceberg_compat] parquet spark_catalog.default.catalog_sales
Output [6]: [cs_bill_customer_sk#102, cs_ext_discount_amt#103, cs_ext_sales_price#104, cs_ext_wholesale_cost#105, cs_ext_list_price#106, cs_sold_date_sk#107]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(cs_sold_date_sk#107), dynamicpruningexpression(cs_sold_date_sk#107 IN dynamicpruning#108)]
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)>

(58) CometFilter
Input [6]: [cs_bill_customer_sk#102, cs_ext_discount_amt#103, cs_ext_sales_price#104, cs_ext_wholesale_cost#105, cs_ext_list_price#106, cs_sold_date_sk#107]
Condition : isnotnull(cs_bill_customer_sk#102)

(59) CometBroadcastExchange
Input [6]: [cs_bill_customer_sk#102, cs_ext_discount_amt#103, cs_ext_sales_price#104, cs_ext_wholesale_cost#105, cs_ext_list_price#106, cs_sold_date_sk#107]
Arguments: [cs_bill_customer_sk#102, cs_ext_discount_amt#103, cs_ext_sales_price#104, cs_ext_wholesale_cost#105, cs_ext_list_price#106, cs_sold_date_sk#107]

(60) CometBroadcastHashJoin
Left output [8]: [c_customer_sk#88, c_customer_id#96, c_first_name#97, c_last_name#98, c_preferred_cust_flag#99, c_birth_country#93, c_login#100, c_email_address#101]
Right output [6]: [cs_bill_customer_sk#102, cs_ext_discount_amt#103, cs_ext_sales_price#104, cs_ext_wholesale_cost#105, cs_ext_list_price#106, cs_sold_date_sk#107]
Arguments: [c_customer_sk#88], [cs_bill_customer_sk#102], Inner, BuildRight

(61) CometProject
Input [14]: [c_customer_sk#88, c_customer_id#96, c_first_name#97, c_last_name#98, c_preferred_cust_flag#99, c_birth_country#93, c_login#100, c_email_address#101, cs_bill_customer_sk#102, cs_ext_discount_amt#103, cs_ext_sales_price#104, cs_ext_wholesale_cost#105, cs_ext_list_price#106, cs_sold_date_sk#107]
Arguments: [c_customer_id#96, c_first_name#97, c_last_name#98, c_preferred_cust_flag#99, c_birth_country#93, c_login#100, c_email_address#101, cs_ext_discount_amt#103, cs_ext_sales_price#104, cs_ext_wholesale_cost#105, cs_ext_list_price#106, cs_sold_date_sk#107], [c_customer_id#96, c_first_name#97, c_last_name#98, c_preferred_cust_flag#99, c_birth_country#93, c_login#100, c_email_address#101, cs_ext_discount_amt#103, cs_ext_sales_price#104, cs_ext_wholesale_cost#105, cs_ext_list_price#106, cs_sold_date_sk#107]

(62) ReusedExchange [Reuses operator id: 28]
Output [2]: [d_date_sk#109, d_year#110]

(63) CometBroadcastHashJoin
Left output [12]: [c_customer_id#96, c_first_name#97, c_last_name#98, c_preferred_cust_flag#99, c_birth_country#93, c_login#100, c_email_address#101, cs_ext_discount_amt#103, cs_ext_sales_price#104, cs_ext_wholesale_cost#105, cs_ext_list_price#106, cs_sold_date_sk#107]
Right output [2]: [d_date_sk#109, d_year#110]
Arguments: [cs_sold_date_sk#107], [d_date_sk#109], Inner, BuildRight

(64) CometProject
Input [14]: [c_customer_id#96, c_first_name#97, c_last_name#98, c_preferred_cust_flag#99, c_birth_country#93, c_login#100, c_email_address#101, cs_ext_discount_amt#103, cs_ext_sales_price#104, cs_ext_wholesale_cost#105, cs_ext_list_price#106, cs_sold_date_sk#107, d_date_sk#109, d_year#110]
Arguments: [c_customer_id#96, c_first_name#97, c_last_name#98, c_preferred_cust_flag#99, c_birth_country#93, c_login#100, c_email_address#101, cs_ext_discount_amt#103, cs_ext_sales_price#104, cs_ext_wholesale_cost#105, cs_ext_list_price#106, d_year#110], [c_customer_id#96, c_first_name#97, c_last_name#98, c_preferred_cust_flag#99, c_birth_country#93, c_login#100, c_email_address#101, cs_ext_discount_amt#103, cs_ext_sales_price#104, cs_ext_wholesale_cost#105, cs_ext_list_price#106, d_year#110]

(65) CometHashAggregate
Input [12]: [c_customer_id#96, c_first_name#97, c_last_name#98, c_preferred_cust_flag#99, c_birth_country#93, c_login#100, c_email_address#101, cs_ext_discount_amt#103, cs_ext_sales_price#104, cs_ext_wholesale_cost#105, cs_ext_list_price#106, d_year#110]
Keys [8]: [c_customer_id#96, c_first_name#97, c_last_name#98, c_preferred_cust_flag#99, c_birth_country#93, c_login#100, c_email_address#101, d_year#110]
Functions [1]: [partial_sum(((((cs_ext_list_price#106 - cs_ext_wholesale_cost#105) - cs_ext_discount_amt#103) + cs_ext_sales_price#104) / 2))]

(66) CometExchange
Input [10]: [c_customer_id#96, c_first_name#97, c_last_name#98, c_preferred_cust_flag#99, c_birth_country#93, c_login#100, c_email_address#101, d_year#110, sum#111, isEmpty#112]
Arguments: hashpartitioning(c_customer_id#96, c_first_name#97, c_last_name#98, c_preferred_cust_flag#99, c_birth_country#93, c_login#100, c_email_address#101, d_year#110, 5), ENSURE_REQUIREMENTS, CometNativeShuffle, [plan_id=4]

(67) CometHashAggregate
Input [10]: [c_customer_id#96, c_first_name#97, c_last_name#98, c_preferred_cust_flag#99, c_birth_country#93, c_login#100, c_email_address#101, d_year#110, sum#111, isEmpty#112]
Keys [8]: [c_customer_id#96, c_first_name#97, c_last_name#98, c_preferred_cust_flag#99, c_birth_country#93, c_login#100, c_email_address#101, d_year#110]
Functions [1]: [sum(((((cs_ext_list_price#106 - cs_ext_wholesale_cost#105) - cs_ext_discount_amt#103) + cs_ext_sales_price#104) / 2))]

(68) CometBroadcastExchange
Input [2]: [customer_id#113, year_total#114]
Arguments: [customer_id#113, year_total#114]

(69) CometBroadcastHashJoin
Left output [11]: [customer_id#26, year_total#27, customer_id#53, customer_first_name#54, customer_last_name#55, customer_preferred_cust_flag#56, customer_birth_country#57, customer_login#58, customer_email_address#59, year_total#60, year_total#87]
Right output [2]: [customer_id#113, year_total#114]
Arguments: [customer_id#26], [customer_id#113], Inner, (CASE WHEN (year_total#87 > 0.000000) THEN (year_total#114 / year_total#87) END > CASE WHEN (year_total#27 > 0.000000) THEN (year_total#60 / year_total#27) END), BuildRight

(70) CometProject
Input [13]: [customer_id#26, year_total#27, customer_id#53, customer_first_name#54, customer_last_name#55, customer_preferred_cust_flag#56, customer_birth_country#57, customer_login#58, customer_email_address#59, year_total#60, year_total#87, customer_id#113, year_total#114]
Arguments: [customer_id#26, customer_id#53, customer_first_name#54, customer_last_name#55, customer_preferred_cust_flag#56, customer_birth_country#57, customer_login#58, customer_email_address#59, year_total#87, year_total#114], [customer_id#26, customer_id#53, customer_first_name#54, customer_last_name#55, customer_preferred_cust_flag#56, customer_birth_country#57, customer_login#58, customer_email_address#59, year_total#87, year_total#114]

(71) CometScan [native_iceberg_compat] parquet spark_catalog.default.customer
Output [8]: [c_customer_sk#115, c_customer_id#116, c_first_name#117, c_last_name#118, c_preferred_cust_flag#119, c_birth_country#120, c_login#121, c_email_address#122]
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>

(72) CometFilter
Input [8]: [c_customer_sk#115, c_customer_id#116, c_first_name#117, c_last_name#118, c_preferred_cust_flag#119, c_birth_country#120, c_login#121, c_email_address#122]
Condition : (isnotnull(c_customer_sk#115) AND isnotnull(static_invoke(CharVarcharCodegenUtils.readSidePadding(c_customer_id#116, 16))))

(73) CometProject
Input [8]: [c_customer_sk#115, c_customer_id#116, c_first_name#117, c_last_name#118, c_preferred_cust_flag#119, c_birth_country#120, c_login#121, c_email_address#122]
Arguments: [c_customer_sk#115, c_customer_id#123, c_first_name#124, c_last_name#125, c_preferred_cust_flag#126, c_birth_country#120, c_login#127, c_email_address#128], [c_customer_sk#115, static_invoke(CharVarcharCodegenUtils.readSidePadding(c_customer_id#116, 16)) AS c_customer_id#123, static_invoke(CharVarcharCodegenUtils.readSidePadding(c_first_name#117, 20)) AS c_first_name#124, static_invoke(CharVarcharCodegenUtils.readSidePadding(c_last_name#118, 30)) AS c_last_name#125, static_invoke(CharVarcharCodegenUtils.readSidePadding(c_preferred_cust_flag#119, 1)) AS c_preferred_cust_flag#126, c_birth_country#120, static_invoke(CharVarcharCodegenUtils.readSidePadding(c_login#121, 13)) AS c_login#127, static_invoke(CharVarcharCodegenUtils.readSidePadding(c_email_address#122, 50)) AS c_email_address#128]

(74) CometScan [native_iceberg_compat] parquet spark_catalog.default.web_sales
Output [6]: [ws_bill_customer_sk#129, ws_ext_discount_amt#130, ws_ext_sales_price#131, ws_ext_wholesale_cost#132, ws_ext_list_price#133, ws_sold_date_sk#134]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(ws_sold_date_sk#134), dynamicpruningexpression(ws_sold_date_sk#134 IN dynamicpruning#135)]
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)>

(75) CometFilter
Input [6]: [ws_bill_customer_sk#129, ws_ext_discount_amt#130, ws_ext_sales_price#131, ws_ext_wholesale_cost#132, ws_ext_list_price#133, ws_sold_date_sk#134]
Condition : isnotnull(ws_bill_customer_sk#129)

(76) CometBroadcastExchange
Input [6]: [ws_bill_customer_sk#129, ws_ext_discount_amt#130, ws_ext_sales_price#131, ws_ext_wholesale_cost#132, ws_ext_list_price#133, ws_sold_date_sk#134]
Arguments: [ws_bill_customer_sk#129, ws_ext_discount_amt#130, ws_ext_sales_price#131, ws_ext_wholesale_cost#132, ws_ext_list_price#133, ws_sold_date_sk#134]

(77) CometBroadcastHashJoin
Left output [8]: [c_customer_sk#115, c_customer_id#123, c_first_name#124, c_last_name#125, c_preferred_cust_flag#126, c_birth_country#120, c_login#127, c_email_address#128]
Right output [6]: [ws_bill_customer_sk#129, ws_ext_discount_amt#130, ws_ext_sales_price#131, ws_ext_wholesale_cost#132, ws_ext_list_price#133, ws_sold_date_sk#134]
Arguments: [c_customer_sk#115], [ws_bill_customer_sk#129], Inner, BuildRight

(78) CometProject
Input [14]: [c_customer_sk#115, c_customer_id#123, c_first_name#124, c_last_name#125, c_preferred_cust_flag#126, c_birth_country#120, c_login#127, c_email_address#128, ws_bill_customer_sk#129, ws_ext_discount_amt#130, ws_ext_sales_price#131, ws_ext_wholesale_cost#132, ws_ext_list_price#133, ws_sold_date_sk#134]
Arguments: [c_customer_id#123, c_first_name#124, c_last_name#125, c_preferred_cust_flag#126, c_birth_country#120, c_login#127, c_email_address#128, ws_ext_discount_amt#130, ws_ext_sales_price#131, ws_ext_wholesale_cost#132, ws_ext_list_price#133, ws_sold_date_sk#134], [c_customer_id#123, c_first_name#124, c_last_name#125, c_preferred_cust_flag#126, c_birth_country#120, c_login#127, c_email_address#128, ws_ext_discount_amt#130, ws_ext_sales_price#131, ws_ext_wholesale_cost#132, ws_ext_list_price#133, ws_sold_date_sk#134]

(79) ReusedExchange [Reuses operator id: 11]
Output [2]: [d_date_sk#136, d_year#137]

(80) CometBroadcastHashJoin
Left output [12]: [c_customer_id#123, c_first_name#124, c_last_name#125, c_preferred_cust_flag#126, c_birth_country#120, c_login#127, c_email_address#128, ws_ext_discount_amt#130, ws_ext_sales_price#131, ws_ext_wholesale_cost#132, ws_ext_list_price#133, ws_sold_date_sk#134]
Right output [2]: [d_date_sk#136, d_year#137]
Arguments: [ws_sold_date_sk#134], [d_date_sk#136], Inner, BuildRight

(81) CometProject
Input [14]: [c_customer_id#123, c_first_name#124, c_last_name#125, c_preferred_cust_flag#126, c_birth_country#120, c_login#127, c_email_address#128, ws_ext_discount_amt#130, ws_ext_sales_price#131, ws_ext_wholesale_cost#132, ws_ext_list_price#133, ws_sold_date_sk#134, d_date_sk#136, d_year#137]
Arguments: [c_customer_id#123, c_first_name#124, c_last_name#125, c_preferred_cust_flag#126, c_birth_country#120, c_login#127, c_email_address#128, ws_ext_discount_amt#130, ws_ext_sales_price#131, ws_ext_wholesale_cost#132, ws_ext_list_price#133, d_year#137], [c_customer_id#123, c_first_name#124, c_last_name#125, c_preferred_cust_flag#126, c_birth_country#120, c_login#127, c_email_address#128, ws_ext_discount_amt#130, ws_ext_sales_price#131, ws_ext_wholesale_cost#132, ws_ext_list_price#133, d_year#137]

(82) CometHashAggregate
Input [12]: [c_customer_id#123, c_first_name#124, c_last_name#125, c_preferred_cust_flag#126, c_birth_country#120, c_login#127, c_email_address#128, ws_ext_discount_amt#130, ws_ext_sales_price#131, ws_ext_wholesale_cost#132, ws_ext_list_price#133, d_year#137]
Keys [8]: [c_customer_id#123, c_first_name#124, c_last_name#125, c_preferred_cust_flag#126, c_birth_country#120, c_login#127, c_email_address#128, d_year#137]
Functions [1]: [partial_sum(((((ws_ext_list_price#133 - ws_ext_wholesale_cost#132) - ws_ext_discount_amt#130) + ws_ext_sales_price#131) / 2))]

(83) CometExchange
Input [10]: [c_customer_id#123, c_first_name#124, c_last_name#125, c_preferred_cust_flag#126, c_birth_country#120, c_login#127, c_email_address#128, d_year#137, sum#138, isEmpty#139]
Arguments: hashpartitioning(c_customer_id#123, c_first_name#124, c_last_name#125, c_preferred_cust_flag#126, c_birth_country#120, c_login#127, c_email_address#128, d_year#137, 5), ENSURE_REQUIREMENTS, CometNativeShuffle, [plan_id=5]

(84) CometHashAggregate
Input [10]: [c_customer_id#123, c_first_name#124, c_last_name#125, c_preferred_cust_flag#126, c_birth_country#120, c_login#127, c_email_address#128, d_year#137, sum#138, isEmpty#139]
Keys [8]: [c_customer_id#123, c_first_name#124, c_last_name#125, c_preferred_cust_flag#126, c_birth_country#120, c_login#127, c_email_address#128, d_year#137]
Functions [1]: [sum(((((ws_ext_list_price#133 - ws_ext_wholesale_cost#132) - ws_ext_discount_amt#130) + ws_ext_sales_price#131) / 2))]

(85) CometFilter
Input [2]: [customer_id#140, year_total#141]
Condition : (isnotnull(year_total#141) AND (year_total#141 > 0.000000))

(86) CometBroadcastExchange
Input [2]: [customer_id#140, year_total#141]
Arguments: [customer_id#140, year_total#141]

(87) CometBroadcastHashJoin
Left output [10]: [customer_id#26, customer_id#53, customer_first_name#54, customer_last_name#55, customer_preferred_cust_flag#56, customer_birth_country#57, customer_login#58, customer_email_address#59, year_total#87, year_total#114]
Right output [2]: [customer_id#140, year_total#141]
Arguments: [customer_id#26], [customer_id#140], Inner, BuildRight

(88) CometProject
Input [12]: [customer_id#26, customer_id#53, customer_first_name#54, customer_last_name#55, customer_preferred_cust_flag#56, customer_birth_country#57, customer_login#58, customer_email_address#59, year_total#87, year_total#114, customer_id#140, year_total#141]
Arguments: [customer_id#26, customer_id#53, customer_first_name#54, customer_last_name#55, customer_preferred_cust_flag#56, customer_birth_country#57, customer_login#58, customer_email_address#59, year_total#87, year_total#114, year_total#141], [customer_id#26, customer_id#53, customer_first_name#54, customer_last_name#55, customer_preferred_cust_flag#56, customer_birth_country#57, customer_login#58, customer_email_address#59, year_total#87, year_total#114, year_total#141]

(89) CometScan [native_iceberg_compat] parquet spark_catalog.default.customer
Output [8]: [c_customer_sk#142, c_customer_id#143, c_first_name#144, c_last_name#145, c_preferred_cust_flag#146, c_birth_country#147, c_login#148, c_email_address#149]
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>

(90) CometFilter
Input [8]: [c_customer_sk#142, c_customer_id#143, c_first_name#144, c_last_name#145, c_preferred_cust_flag#146, c_birth_country#147, c_login#148, c_email_address#149]
Condition : (isnotnull(c_customer_sk#142) AND isnotnull(static_invoke(CharVarcharCodegenUtils.readSidePadding(c_customer_id#143, 16))))

(91) CometProject
Input [8]: [c_customer_sk#142, c_customer_id#143, c_first_name#144, c_last_name#145, c_preferred_cust_flag#146, c_birth_country#147, c_login#148, c_email_address#149]
Arguments: [c_customer_sk#142, c_customer_id#150, c_first_name#151, c_last_name#152, c_preferred_cust_flag#153, c_birth_country#147, c_login#154, c_email_address#155], [c_customer_sk#142, static_invoke(CharVarcharCodegenUtils.readSidePadding(c_customer_id#143, 16)) AS c_customer_id#150, static_invoke(CharVarcharCodegenUtils.readSidePadding(c_first_name#144, 20)) AS c_first_name#151, static_invoke(CharVarcharCodegenUtils.readSidePadding(c_last_name#145, 30)) AS c_last_name#152, static_invoke(CharVarcharCodegenUtils.readSidePadding(c_preferred_cust_flag#146, 1)) AS c_preferred_cust_flag#153, c_birth_country#147, static_invoke(CharVarcharCodegenUtils.readSidePadding(c_login#148, 13)) AS c_login#154, static_invoke(CharVarcharCodegenUtils.readSidePadding(c_email_address#149, 50)) AS c_email_address#155]

(92) CometScan [native_iceberg_compat] parquet spark_catalog.default.web_sales
Output [6]: [ws_bill_customer_sk#156, ws_ext_discount_amt#157, ws_ext_sales_price#158, ws_ext_wholesale_cost#159, ws_ext_list_price#160, ws_sold_date_sk#161]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(ws_sold_date_sk#161), dynamicpruningexpression(ws_sold_date_sk#161 IN dynamicpruning#162)]
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)>

(93) CometFilter
Input [6]: [ws_bill_customer_sk#156, ws_ext_discount_amt#157, ws_ext_sales_price#158, ws_ext_wholesale_cost#159, ws_ext_list_price#160, ws_sold_date_sk#161]
Condition : isnotnull(ws_bill_customer_sk#156)

(94) CometBroadcastExchange
Input [6]: [ws_bill_customer_sk#156, ws_ext_discount_amt#157, ws_ext_sales_price#158, ws_ext_wholesale_cost#159, ws_ext_list_price#160, ws_sold_date_sk#161]
Arguments: [ws_bill_customer_sk#156, ws_ext_discount_amt#157, ws_ext_sales_price#158, ws_ext_wholesale_cost#159, ws_ext_list_price#160, ws_sold_date_sk#161]

(95) CometBroadcastHashJoin
Left output [8]: [c_customer_sk#142, c_customer_id#150, c_first_name#151, c_last_name#152, c_preferred_cust_flag#153, c_birth_country#147, c_login#154, c_email_address#155]
Right output [6]: [ws_bill_customer_sk#156, ws_ext_discount_amt#157, ws_ext_sales_price#158, ws_ext_wholesale_cost#159, ws_ext_list_price#160, ws_sold_date_sk#161]
Arguments: [c_customer_sk#142], [ws_bill_customer_sk#156], Inner, BuildRight

(96) CometProject
Input [14]: [c_customer_sk#142, c_customer_id#150, c_first_name#151, c_last_name#152, c_preferred_cust_flag#153, c_birth_country#147, c_login#154, c_email_address#155, ws_bill_customer_sk#156, ws_ext_discount_amt#157, ws_ext_sales_price#158, ws_ext_wholesale_cost#159, ws_ext_list_price#160, ws_sold_date_sk#161]
Arguments: [c_customer_id#150, c_first_name#151, c_last_name#152, c_preferred_cust_flag#153, c_birth_country#147, c_login#154, c_email_address#155, ws_ext_discount_amt#157, ws_ext_sales_price#158, ws_ext_wholesale_cost#159, ws_ext_list_price#160, ws_sold_date_sk#161], [c_customer_id#150, c_first_name#151, c_last_name#152, c_preferred_cust_flag#153, c_birth_country#147, c_login#154, c_email_address#155, ws_ext_discount_amt#157, ws_ext_sales_price#158, ws_ext_wholesale_cost#159, ws_ext_list_price#160, ws_sold_date_sk#161]

(97) ReusedExchange [Reuses operator id: 28]
Output [2]: [d_date_sk#163, d_year#164]

(98) CometBroadcastHashJoin
Left output [12]: [c_customer_id#150, c_first_name#151, c_last_name#152, c_preferred_cust_flag#153, c_birth_country#147, c_login#154, c_email_address#155, ws_ext_discount_amt#157, ws_ext_sales_price#158, ws_ext_wholesale_cost#159, ws_ext_list_price#160, ws_sold_date_sk#161]
Right output [2]: [d_date_sk#163, d_year#164]
Arguments: [ws_sold_date_sk#161], [d_date_sk#163], Inner, BuildRight

(99) CometProject
Input [14]: [c_customer_id#150, c_first_name#151, c_last_name#152, c_preferred_cust_flag#153, c_birth_country#147, c_login#154, c_email_address#155, ws_ext_discount_amt#157, ws_ext_sales_price#158, ws_ext_wholesale_cost#159, ws_ext_list_price#160, ws_sold_date_sk#161, d_date_sk#163, d_year#164]
Arguments: [c_customer_id#150, c_first_name#151, c_last_name#152, c_preferred_cust_flag#153, c_birth_country#147, c_login#154, c_email_address#155, ws_ext_discount_amt#157, ws_ext_sales_price#158, ws_ext_wholesale_cost#159, ws_ext_list_price#160, d_year#164], [c_customer_id#150, c_first_name#151, c_last_name#152, c_preferred_cust_flag#153, c_birth_country#147, c_login#154, c_email_address#155, ws_ext_discount_amt#157, ws_ext_sales_price#158, ws_ext_wholesale_cost#159, ws_ext_list_price#160, d_year#164]

(100) CometHashAggregate
Input [12]: [c_customer_id#150, c_first_name#151, c_last_name#152, c_preferred_cust_flag#153, c_birth_country#147, c_login#154, c_email_address#155, ws_ext_discount_amt#157, ws_ext_sales_price#158, ws_ext_wholesale_cost#159, ws_ext_list_price#160, d_year#164]
Keys [8]: [c_customer_id#150, c_first_name#151, c_last_name#152, c_preferred_cust_flag#153, c_birth_country#147, c_login#154, c_email_address#155, d_year#164]
Functions [1]: [partial_sum(((((ws_ext_list_price#160 - ws_ext_wholesale_cost#159) - ws_ext_discount_amt#157) + ws_ext_sales_price#158) / 2))]

(101) CometExchange
Input [10]: [c_customer_id#150, c_first_name#151, c_last_name#152, c_preferred_cust_flag#153, c_birth_country#147, c_login#154, c_email_address#155, d_year#164, sum#165, isEmpty#166]
Arguments: hashpartitioning(c_customer_id#150, c_first_name#151, c_last_name#152, c_preferred_cust_flag#153, c_birth_country#147, c_login#154, c_email_address#155, d_year#164, 5), ENSURE_REQUIREMENTS, CometNativeShuffle, [plan_id=6]

(102) CometHashAggregate
Input [10]: [c_customer_id#150, c_first_name#151, c_last_name#152, c_preferred_cust_flag#153, c_birth_country#147, c_login#154, c_email_address#155, d_year#164, sum#165, isEmpty#166]
Keys [8]: [c_customer_id#150, c_first_name#151, c_last_name#152, c_preferred_cust_flag#153, c_birth_country#147, c_login#154, c_email_address#155, d_year#164]
Functions [1]: [sum(((((ws_ext_list_price#160 - ws_ext_wholesale_cost#159) - ws_ext_discount_amt#157) + ws_ext_sales_price#158) / 2))]

(103) CometBroadcastExchange
Input [2]: [customer_id#167, year_total#168]
Arguments: [customer_id#167, year_total#168]

(104) CometBroadcastHashJoin
Left output [11]: [customer_id#26, customer_id#53, customer_first_name#54, customer_last_name#55, customer_preferred_cust_flag#56, customer_birth_country#57, customer_login#58, customer_email_address#59, year_total#87, year_total#114, year_total#141]
Right output [2]: [customer_id#167, year_total#168]
Arguments: [customer_id#26], [customer_id#167], Inner, (CASE WHEN (year_total#87 > 0.000000) THEN (year_total#114 / year_total#87) END > CASE WHEN (year_total#141 > 0.000000) THEN (year_total#168 / year_total#141) END), BuildRight

(105) CometProject
Input [13]: [customer_id#26, customer_id#53, customer_first_name#54, customer_last_name#55, customer_preferred_cust_flag#56, customer_birth_country#57, customer_login#58, customer_email_address#59, year_total#87, year_total#114, year_total#141, customer_id#167, year_total#168]
Arguments: [customer_id#53, customer_first_name#54, customer_last_name#55, customer_preferred_cust_flag#56, customer_birth_country#57, customer_login#58, customer_email_address#59], [customer_id#53, customer_first_name#54, customer_last_name#55, customer_preferred_cust_flag#56, customer_birth_country#57, customer_login#58, customer_email_address#59]

(106) CometTakeOrderedAndProject
Input [7]: [customer_id#53, customer_first_name#54, customer_last_name#55, customer_preferred_cust_flag#56, customer_birth_country#57, customer_login#58, customer_email_address#59]
Arguments: TakeOrderedAndProject(limit=100, orderBy=[customer_id#53 ASC NULLS FIRST,customer_first_name#54 ASC NULLS FIRST,customer_last_name#55 ASC NULLS FIRST,customer_preferred_cust_flag#56 ASC NULLS FIRST,customer_birth_country#57 ASC NULLS FIRST,customer_login#58 ASC NULLS FIRST,customer_email_address#59 ASC NULLS FIRST], output=[customer_id#53,customer_first_name#54,customer_last_name#55,customer_preferred_cust_flag#56,customer_birth_country#57,customer_login#58,customer_email_address#59]), [customer_id#53, customer_first_name#54, customer_last_name#55, customer_preferred_cust_flag#56, customer_birth_country#57, customer_login#58, customer_email_address#59], 100, 0, [customer_id#53 ASC NULLS FIRST, customer_first_name#54 ASC NULLS FIRST, customer_last_name#55 ASC NULLS FIRST, customer_preferred_cust_flag#56 ASC NULLS FIRST, customer_birth_country#57 ASC NULLS FIRST, customer_login#58 ASC NULLS FIRST, customer_email_address#59 ASC NULLS FIRST], [customer_id#53, customer_first_name#54, customer_last_name#55, customer_preferred_cust_flag#56, customer_birth_country#57, customer_login#58, customer_email_address#59]

(107) CometColumnarToRow [codegen id : 1]
Input [7]: [customer_id#53, customer_first_name#54, customer_last_name#55, customer_preferred_cust_flag#56, customer_birth_country#57, customer_login#58, customer_email_address#59]

===== Subqueries =====

Subquery:1 Hosting operator id = 4 Hosting Expression = ss_sold_date_sk#20 IN dynamicpruning#21
BroadcastExchange (111)
+- * CometColumnarToRow (110)
   +- CometFilter (109)
      +- CometScan [native_iceberg_compat] parquet spark_catalog.default.date_dim (108)


(108) CometScan [native_iceberg_compat] 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>

(109) 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))

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

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

Subquery:2 Hosting operator id = 21 Hosting Expression = ss_sold_date_sk#47 IN dynamicpruning#48
BroadcastExchange (115)
+- * CometColumnarToRow (114)
   +- CometFilter (113)
      +- CometScan [native_iceberg_compat] parquet spark_catalog.default.date_dim (112)


(112) CometScan [native_iceberg_compat] parquet spark_catalog.default.date_dim
Output [2]: [d_date_sk#49, d_year#50]
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>

(113) CometFilter
Input [2]: [d_date_sk#49, d_year#50]
Condition : ((isnotnull(d_year#50) AND (d_year#50 = 2002)) AND isnotnull(d_date_sk#49))

(114) CometColumnarToRow [codegen id : 1]
Input [2]: [d_date_sk#49, d_year#50]

(115) BroadcastExchange
Input [2]: [d_date_sk#49, d_year#50]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, false] as bigint)),false), [plan_id=8]

Subquery:3 Hosting operator id = 39 Hosting Expression = cs_sold_date_sk#80 IN dynamicpruning#21

Subquery:4 Hosting operator id = 57 Hosting Expression = cs_sold_date_sk#107 IN dynamicpruning#48

Subquery:5 Hosting operator id = 74 Hosting Expression = ws_sold_date_sk#134 IN dynamicpruning#21

Subquery:6 Hosting operator id = 92 Hosting Expression = ws_sold_date_sk#161 IN dynamicpruning#48


