== Physical Plan ==
* CometColumnarToRow (73)
+- CometTakeOrderedAndProject (72)
   +- CometProject (71)
      +- CometBroadcastHashJoin (70)
         :- CometProject (54)
         :  +- CometBroadcastHashJoin (53)
         :     :- CometProject (36)
         :     :  +- 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 (52)
         :        +- CometFilter (51)
         :           +- CometHashAggregate (50)
         :              +- CometExchange (49)
         :                 +- CometHashAggregate (48)
         :                    +- CometProject (47)
         :                       +- CometBroadcastHashJoin (46)
         :                          :- CometProject (44)
         :                          :  +- CometBroadcastHashJoin (43)
         :                          :     :- CometProject (39)
         :                          :     :  +- CometFilter (38)
         :                          :     :     +- CometScan [native_iceberg_compat] parquet spark_catalog.default.customer (37)
         :                          :     +- CometBroadcastExchange (42)
         :                          :        +- CometFilter (41)
         :                          :           +- CometScan [native_iceberg_compat] parquet spark_catalog.default.web_sales (40)
         :                          +- ReusedExchange (45)
         +- CometBroadcastExchange (69)
            +- CometHashAggregate (68)
               +- CometExchange (67)
                  +- CometHashAggregate (66)
                     +- CometProject (65)
                        +- CometBroadcastHashJoin (64)
                           :- CometProject (62)
                           :  +- CometBroadcastHashJoin (61)
                           :     :- CometProject (57)
                           :     :  +- CometFilter (56)
                           :     :     +- CometScan [native_iceberg_compat] parquet spark_catalog.default.customer (55)
                           :     +- CometBroadcastExchange (60)
                           :        +- CometFilter (59)
                           :           +- CometScan [native_iceberg_compat] parquet spark_catalog.default.web_sales (58)
                           +- ReusedExchange (63)


(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(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 [native_iceberg_compat] parquet spark_catalog.default.store_sales
Output [4]: [ss_customer_sk#15, ss_ext_discount_amt#16, ss_ext_list_price#17, ss_sold_date_sk#18]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(ss_sold_date_sk#18), dynamicpruningexpression(ss_sold_date_sk#18 IN dynamicpruning#19)]
PushedFilters: [IsNotNull(ss_customer_sk)]
ReadSchema: struct<ss_customer_sk:int,ss_ext_discount_amt:decimal(7,2),ss_ext_list_price:decimal(7,2)>

(5) CometFilter
Input [4]: [ss_customer_sk#15, ss_ext_discount_amt#16, ss_ext_list_price#17, ss_sold_date_sk#18]
Condition : isnotnull(ss_customer_sk#15)

(6) CometBroadcastExchange
Input [4]: [ss_customer_sk#15, ss_ext_discount_amt#16, ss_ext_list_price#17, ss_sold_date_sk#18]
Arguments: [ss_customer_sk#15, ss_ext_discount_amt#16, ss_ext_list_price#17, ss_sold_date_sk#18]

(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 [4]: [ss_customer_sk#15, ss_ext_discount_amt#16, ss_ext_list_price#17, ss_sold_date_sk#18]
Arguments: [c_customer_sk#1], [ss_customer_sk#15], Inner, BuildRight

(8) CometProject
Input [12]: [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_list_price#17, ss_sold_date_sk#18]
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_list_price#17, ss_sold_date_sk#18], [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_list_price#17, ss_sold_date_sk#18]

(9) CometScan [native_iceberg_compat] parquet spark_catalog.default.date_dim
Output [2]: [d_date_sk#20, d_year#21]
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#20, d_year#21]
Condition : ((isnotnull(d_year#21) AND (d_year#21 = 2001)) AND isnotnull(d_date_sk#20))

(11) CometBroadcastExchange
Input [2]: [d_date_sk#20, d_year#21]
Arguments: [d_date_sk#20, d_year#21]

(12) CometBroadcastHashJoin
Left output [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, ss_ext_discount_amt#16, ss_ext_list_price#17, ss_sold_date_sk#18]
Right output [2]: [d_date_sk#20, d_year#21]
Arguments: [ss_sold_date_sk#18], [d_date_sk#20], Inner, BuildRight

(13) CometProject
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_list_price#17, ss_sold_date_sk#18, d_date_sk#20, d_year#21]
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_list_price#17, d_year#21], [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_list_price#17, d_year#21]

(14) 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, ss_ext_discount_amt#16, ss_ext_list_price#17, d_year#21]
Keys [8]: [c_customer_id#9, c_first_name#10, c_last_name#11, d_year#21, c_preferred_cust_flag#12, c_birth_country#6, c_login#13, c_email_address#14]
Functions [1]: [partial_sum(UnscaledValue((ss_ext_list_price#17 - ss_ext_discount_amt#16)))]

(15) CometExchange
Input [9]: [c_customer_id#9, c_first_name#10, c_last_name#11, d_year#21, c_preferred_cust_flag#12, c_birth_country#6, c_login#13, c_email_address#14, sum#22]
Arguments: hashpartitioning(c_customer_id#9, c_first_name#10, c_last_name#11, d_year#21, c_preferred_cust_flag#12, c_birth_country#6, c_login#13, c_email_address#14, 5), ENSURE_REQUIREMENTS, CometNativeShuffle, [plan_id=1]

(16) CometHashAggregate
Input [9]: [c_customer_id#9, c_first_name#10, c_last_name#11, d_year#21, c_preferred_cust_flag#12, c_birth_country#6, c_login#13, c_email_address#14, sum#22]
Keys [8]: [c_customer_id#9, c_first_name#10, c_last_name#11, d_year#21, c_preferred_cust_flag#12, c_birth_country#6, c_login#13, c_email_address#14]
Functions [1]: [sum(UnscaledValue((ss_ext_list_price#17 - ss_ext_discount_amt#16)))]

(17) CometFilter
Input [2]: [customer_id#23, year_total#24]
Condition : (isnotnull(year_total#24) AND (year_total#24 > 0.00))

(18) CometScan [native_iceberg_compat] parquet spark_catalog.default.customer
Output [8]: [c_customer_sk#25, c_customer_id#26, c_first_name#27, c_last_name#28, c_preferred_cust_flag#29, c_birth_country#30, c_login#31, c_email_address#32]
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#25, c_customer_id#26, c_first_name#27, c_last_name#28, c_preferred_cust_flag#29, c_birth_country#30, c_login#31, c_email_address#32]
Condition : (isnotnull(c_customer_sk#25) AND isnotnull(staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_customer_id#26, 16, true, false, true)))

(20) CometProject
Input [8]: [c_customer_sk#25, c_customer_id#26, c_first_name#27, c_last_name#28, c_preferred_cust_flag#29, c_birth_country#30, c_login#31, c_email_address#32]
Arguments: [c_customer_sk#25, c_customer_id#9, c_first_name#10, c_last_name#11, c_preferred_cust_flag#12, c_birth_country#30, c_login#13, c_email_address#14], [c_customer_sk#25, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_customer_id#26, 16, true, false, true) AS c_customer_id#9, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_first_name#27, 20, true, false, true) AS c_first_name#10, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_last_name#28, 30, true, false, true) AS c_last_name#11, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_preferred_cust_flag#29, 1, true, false, true) AS c_preferred_cust_flag#12, c_birth_country#30, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_login#31, 13, true, false, true) AS c_login#13, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_email_address#32, 50, true, false, true) AS c_email_address#14]

(21) CometScan [native_iceberg_compat] parquet spark_catalog.default.store_sales
Output [4]: [ss_customer_sk#33, ss_ext_discount_amt#34, ss_ext_list_price#35, ss_sold_date_sk#36]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(ss_sold_date_sk#36), dynamicpruningexpression(ss_sold_date_sk#36 IN dynamicpruning#37)]
PushedFilters: [IsNotNull(ss_customer_sk)]
ReadSchema: struct<ss_customer_sk:int,ss_ext_discount_amt:decimal(7,2),ss_ext_list_price:decimal(7,2)>

(22) CometFilter
Input [4]: [ss_customer_sk#33, ss_ext_discount_amt#34, ss_ext_list_price#35, ss_sold_date_sk#36]
Condition : isnotnull(ss_customer_sk#33)

(23) CometBroadcastExchange
Input [4]: [ss_customer_sk#33, ss_ext_discount_amt#34, ss_ext_list_price#35, ss_sold_date_sk#36]
Arguments: [ss_customer_sk#33, ss_ext_discount_amt#34, ss_ext_list_price#35, ss_sold_date_sk#36]

(24) CometBroadcastHashJoin
Left output [8]: [c_customer_sk#25, c_customer_id#9, c_first_name#10, c_last_name#11, c_preferred_cust_flag#12, c_birth_country#30, c_login#13, c_email_address#14]
Right output [4]: [ss_customer_sk#33, ss_ext_discount_amt#34, ss_ext_list_price#35, ss_sold_date_sk#36]
Arguments: [c_customer_sk#25], [ss_customer_sk#33], Inner, BuildRight

(25) CometProject
Input [12]: [c_customer_sk#25, c_customer_id#9, c_first_name#10, c_last_name#11, c_preferred_cust_flag#12, c_birth_country#30, c_login#13, c_email_address#14, ss_customer_sk#33, ss_ext_discount_amt#34, ss_ext_list_price#35, ss_sold_date_sk#36]
Arguments: [c_customer_id#9, c_first_name#10, c_last_name#11, c_preferred_cust_flag#12, c_birth_country#30, c_login#13, c_email_address#14, ss_ext_discount_amt#34, ss_ext_list_price#35, ss_sold_date_sk#36], [c_customer_id#9, c_first_name#10, c_last_name#11, c_preferred_cust_flag#12, c_birth_country#30, c_login#13, c_email_address#14, ss_ext_discount_amt#34, ss_ext_list_price#35, ss_sold_date_sk#36]

(26) CometScan [native_iceberg_compat] parquet spark_catalog.default.date_dim
Output [2]: [d_date_sk#38, d_year#39]
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#38, d_year#39]
Condition : ((isnotnull(d_year#39) AND (d_year#39 = 2002)) AND isnotnull(d_date_sk#38))

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

(29) CometBroadcastHashJoin
Left output [10]: [c_customer_id#9, c_first_name#10, c_last_name#11, c_preferred_cust_flag#12, c_birth_country#30, c_login#13, c_email_address#14, ss_ext_discount_amt#34, ss_ext_list_price#35, ss_sold_date_sk#36]
Right output [2]: [d_date_sk#38, d_year#39]
Arguments: [ss_sold_date_sk#36], [d_date_sk#38], Inner, BuildRight

(30) CometProject
Input [12]: [c_customer_id#9, c_first_name#10, c_last_name#11, c_preferred_cust_flag#12, c_birth_country#30, c_login#13, c_email_address#14, ss_ext_discount_amt#34, ss_ext_list_price#35, ss_sold_date_sk#36, d_date_sk#38, d_year#39]
Arguments: [c_customer_id#9, c_first_name#10, c_last_name#11, c_preferred_cust_flag#12, c_birth_country#30, c_login#13, c_email_address#14, ss_ext_discount_amt#34, ss_ext_list_price#35, d_year#39], [c_customer_id#9, c_first_name#10, c_last_name#11, c_preferred_cust_flag#12, c_birth_country#30, c_login#13, c_email_address#14, ss_ext_discount_amt#34, ss_ext_list_price#35, d_year#39]

(31) CometHashAggregate
Input [10]: [c_customer_id#9, c_first_name#10, c_last_name#11, c_preferred_cust_flag#12, c_birth_country#30, c_login#13, c_email_address#14, ss_ext_discount_amt#34, ss_ext_list_price#35, d_year#39]
Keys [8]: [c_customer_id#9, c_first_name#10, c_last_name#11, d_year#39, c_preferred_cust_flag#12, c_birth_country#30, c_login#13, c_email_address#14]
Functions [1]: [partial_sum(UnscaledValue((ss_ext_list_price#35 - ss_ext_discount_amt#34)))]

(32) CometExchange
Input [9]: [c_customer_id#9, c_first_name#10, c_last_name#11, d_year#39, c_preferred_cust_flag#12, c_birth_country#30, c_login#13, c_email_address#14, sum#40]
Arguments: hashpartitioning(c_customer_id#9, c_first_name#10, c_last_name#11, d_year#39, c_preferred_cust_flag#12, c_birth_country#30, c_login#13, c_email_address#14, 5), ENSURE_REQUIREMENTS, CometNativeShuffle, [plan_id=2]

(33) CometHashAggregate
Input [9]: [c_customer_id#9, c_first_name#10, c_last_name#11, d_year#39, c_preferred_cust_flag#12, c_birth_country#30, c_login#13, c_email_address#14, sum#40]
Keys [8]: [c_customer_id#9, c_first_name#10, c_last_name#11, d_year#39, c_preferred_cust_flag#12, c_birth_country#30, c_login#13, c_email_address#14]
Functions [1]: [sum(UnscaledValue((ss_ext_list_price#35 - ss_ext_discount_amt#34)))]

(34) CometBroadcastExchange
Input [3]: [customer_id#41, customer_preferred_cust_flag#42, year_total#43]
Arguments: [customer_id#41, customer_preferred_cust_flag#42, year_total#43]

(35) CometBroadcastHashJoin
Left output [2]: [customer_id#23, year_total#24]
Right output [3]: [customer_id#41, customer_preferred_cust_flag#42, year_total#43]
Arguments: [customer_id#23], [customer_id#41], Inner, BuildRight

(36) CometProject
Input [5]: [customer_id#23, year_total#24, customer_id#41, customer_preferred_cust_flag#42, year_total#43]
Arguments: [customer_id#23, year_total#24, customer_preferred_cust_flag#42, year_total#43], [customer_id#23, year_total#24, customer_preferred_cust_flag#42, year_total#43]

(37) CometScan [native_iceberg_compat] parquet spark_catalog.default.customer
Output [8]: [c_customer_sk#44, c_customer_id#45, c_first_name#46, c_last_name#47, c_preferred_cust_flag#48, c_birth_country#49, c_login#50, c_email_address#51]
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>

(38) CometFilter
Input [8]: [c_customer_sk#44, c_customer_id#45, c_first_name#46, c_last_name#47, c_preferred_cust_flag#48, c_birth_country#49, c_login#50, c_email_address#51]
Condition : (isnotnull(c_customer_sk#44) AND isnotnull(staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_customer_id#45, 16, true, false, true)))

(39) CometProject
Input [8]: [c_customer_sk#44, c_customer_id#45, c_first_name#46, c_last_name#47, c_preferred_cust_flag#48, c_birth_country#49, c_login#50, c_email_address#51]
Arguments: [c_customer_sk#44, c_customer_id#52, c_first_name#53, c_last_name#54, c_preferred_cust_flag#55, c_birth_country#49, c_login#56, c_email_address#57], [c_customer_sk#44, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_customer_id#45, 16, true, false, true) AS c_customer_id#52, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_first_name#46, 20, true, false, true) AS c_first_name#53, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_last_name#47, 30, true, false, true) AS c_last_name#54, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_preferred_cust_flag#48, 1, true, false, true) AS c_preferred_cust_flag#55, c_birth_country#49, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_login#50, 13, true, false, true) AS c_login#56, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_email_address#51, 50, true, false, true) AS c_email_address#57]

(40) CometScan [native_iceberg_compat] parquet spark_catalog.default.web_sales
Output [4]: [ws_bill_customer_sk#58, ws_ext_discount_amt#59, ws_ext_list_price#60, ws_sold_date_sk#61]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(ws_sold_date_sk#61), dynamicpruningexpression(ws_sold_date_sk#61 IN dynamicpruning#62)]
PushedFilters: [IsNotNull(ws_bill_customer_sk)]
ReadSchema: struct<ws_bill_customer_sk:int,ws_ext_discount_amt:decimal(7,2),ws_ext_list_price:decimal(7,2)>

(41) CometFilter
Input [4]: [ws_bill_customer_sk#58, ws_ext_discount_amt#59, ws_ext_list_price#60, ws_sold_date_sk#61]
Condition : isnotnull(ws_bill_customer_sk#58)

(42) CometBroadcastExchange
Input [4]: [ws_bill_customer_sk#58, ws_ext_discount_amt#59, ws_ext_list_price#60, ws_sold_date_sk#61]
Arguments: [ws_bill_customer_sk#58, ws_ext_discount_amt#59, ws_ext_list_price#60, ws_sold_date_sk#61]

(43) CometBroadcastHashJoin
Left output [8]: [c_customer_sk#44, c_customer_id#52, c_first_name#53, c_last_name#54, c_preferred_cust_flag#55, c_birth_country#49, c_login#56, c_email_address#57]
Right output [4]: [ws_bill_customer_sk#58, ws_ext_discount_amt#59, ws_ext_list_price#60, ws_sold_date_sk#61]
Arguments: [c_customer_sk#44], [ws_bill_customer_sk#58], Inner, BuildRight

(44) CometProject
Input [12]: [c_customer_sk#44, c_customer_id#52, c_first_name#53, c_last_name#54, c_preferred_cust_flag#55, c_birth_country#49, c_login#56, c_email_address#57, ws_bill_customer_sk#58, ws_ext_discount_amt#59, ws_ext_list_price#60, ws_sold_date_sk#61]
Arguments: [c_customer_id#52, c_first_name#53, c_last_name#54, c_preferred_cust_flag#55, c_birth_country#49, c_login#56, c_email_address#57, ws_ext_discount_amt#59, ws_ext_list_price#60, ws_sold_date_sk#61], [c_customer_id#52, c_first_name#53, c_last_name#54, c_preferred_cust_flag#55, c_birth_country#49, c_login#56, c_email_address#57, ws_ext_discount_amt#59, ws_ext_list_price#60, ws_sold_date_sk#61]

(45) ReusedExchange [Reuses operator id: 11]
Output [2]: [d_date_sk#63, d_year#64]

(46) CometBroadcastHashJoin
Left output [10]: [c_customer_id#52, c_first_name#53, c_last_name#54, c_preferred_cust_flag#55, c_birth_country#49, c_login#56, c_email_address#57, ws_ext_discount_amt#59, ws_ext_list_price#60, ws_sold_date_sk#61]
Right output [2]: [d_date_sk#63, d_year#64]
Arguments: [ws_sold_date_sk#61], [d_date_sk#63], Inner, BuildRight

(47) CometProject
Input [12]: [c_customer_id#52, c_first_name#53, c_last_name#54, c_preferred_cust_flag#55, c_birth_country#49, c_login#56, c_email_address#57, ws_ext_discount_amt#59, ws_ext_list_price#60, ws_sold_date_sk#61, d_date_sk#63, d_year#64]
Arguments: [c_customer_id#52, c_first_name#53, c_last_name#54, c_preferred_cust_flag#55, c_birth_country#49, c_login#56, c_email_address#57, ws_ext_discount_amt#59, ws_ext_list_price#60, d_year#64], [c_customer_id#52, c_first_name#53, c_last_name#54, c_preferred_cust_flag#55, c_birth_country#49, c_login#56, c_email_address#57, ws_ext_discount_amt#59, ws_ext_list_price#60, d_year#64]

(48) CometHashAggregate
Input [10]: [c_customer_id#52, c_first_name#53, c_last_name#54, c_preferred_cust_flag#55, c_birth_country#49, c_login#56, c_email_address#57, ws_ext_discount_amt#59, ws_ext_list_price#60, d_year#64]
Keys [8]: [c_customer_id#52, c_first_name#53, c_last_name#54, c_preferred_cust_flag#55, c_birth_country#49, c_login#56, c_email_address#57, d_year#64]
Functions [1]: [partial_sum(UnscaledValue((ws_ext_list_price#60 - ws_ext_discount_amt#59)))]

(49) CometExchange
Input [9]: [c_customer_id#52, c_first_name#53, c_last_name#54, c_preferred_cust_flag#55, c_birth_country#49, c_login#56, c_email_address#57, d_year#64, sum#65]
Arguments: hashpartitioning(c_customer_id#52, c_first_name#53, c_last_name#54, c_preferred_cust_flag#55, c_birth_country#49, c_login#56, c_email_address#57, d_year#64, 5), ENSURE_REQUIREMENTS, CometNativeShuffle, [plan_id=3]

(50) CometHashAggregate
Input [9]: [c_customer_id#52, c_first_name#53, c_last_name#54, c_preferred_cust_flag#55, c_birth_country#49, c_login#56, c_email_address#57, d_year#64, sum#65]
Keys [8]: [c_customer_id#52, c_first_name#53, c_last_name#54, c_preferred_cust_flag#55, c_birth_country#49, c_login#56, c_email_address#57, d_year#64]
Functions [1]: [sum(UnscaledValue((ws_ext_list_price#60 - ws_ext_discount_amt#59)))]

(51) CometFilter
Input [2]: [customer_id#66, year_total#67]
Condition : (isnotnull(year_total#67) AND (year_total#67 > 0.00))

(52) CometBroadcastExchange
Input [2]: [customer_id#66, year_total#67]
Arguments: [customer_id#66, year_total#67]

(53) CometBroadcastHashJoin
Left output [4]: [customer_id#23, year_total#24, customer_preferred_cust_flag#42, year_total#43]
Right output [2]: [customer_id#66, year_total#67]
Arguments: [customer_id#23], [customer_id#66], Inner, BuildRight

(54) CometProject
Input [6]: [customer_id#23, year_total#24, customer_preferred_cust_flag#42, year_total#43, customer_id#66, year_total#67]
Arguments: [customer_id#23, year_total#24, customer_preferred_cust_flag#42, year_total#43, year_total#67], [customer_id#23, year_total#24, customer_preferred_cust_flag#42, year_total#43, year_total#67]

(55) CometScan [native_iceberg_compat] parquet spark_catalog.default.customer
Output [8]: [c_customer_sk#68, c_customer_id#69, c_first_name#70, c_last_name#71, c_preferred_cust_flag#72, c_birth_country#73, c_login#74, c_email_address#75]
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>

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

(57) CometProject
Input [8]: [c_customer_sk#68, c_customer_id#69, c_first_name#70, c_last_name#71, c_preferred_cust_flag#72, c_birth_country#73, c_login#74, c_email_address#75]
Arguments: [c_customer_sk#68, c_customer_id#52, c_first_name#53, c_last_name#54, c_preferred_cust_flag#55, c_birth_country#73, c_login#56, c_email_address#57], [c_customer_sk#68, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_customer_id#69, 16, true, false, true) AS c_customer_id#52, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_first_name#70, 20, true, false, true) AS c_first_name#53, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_last_name#71, 30, true, false, true) AS c_last_name#54, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_preferred_cust_flag#72, 1, true, false, true) AS c_preferred_cust_flag#55, c_birth_country#73, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_login#74, 13, true, false, true) AS c_login#56, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_email_address#75, 50, true, false, true) AS c_email_address#57]

(58) CometScan [native_iceberg_compat] parquet spark_catalog.default.web_sales
Output [4]: [ws_bill_customer_sk#76, ws_ext_discount_amt#77, ws_ext_list_price#78, ws_sold_date_sk#79]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(ws_sold_date_sk#79), dynamicpruningexpression(ws_sold_date_sk#79 IN dynamicpruning#80)]
PushedFilters: [IsNotNull(ws_bill_customer_sk)]
ReadSchema: struct<ws_bill_customer_sk:int,ws_ext_discount_amt:decimal(7,2),ws_ext_list_price:decimal(7,2)>

(59) CometFilter
Input [4]: [ws_bill_customer_sk#76, ws_ext_discount_amt#77, ws_ext_list_price#78, ws_sold_date_sk#79]
Condition : isnotnull(ws_bill_customer_sk#76)

(60) CometBroadcastExchange
Input [4]: [ws_bill_customer_sk#76, ws_ext_discount_amt#77, ws_ext_list_price#78, ws_sold_date_sk#79]
Arguments: [ws_bill_customer_sk#76, ws_ext_discount_amt#77, ws_ext_list_price#78, ws_sold_date_sk#79]

(61) CometBroadcastHashJoin
Left output [8]: [c_customer_sk#68, c_customer_id#52, c_first_name#53, c_last_name#54, c_preferred_cust_flag#55, c_birth_country#73, c_login#56, c_email_address#57]
Right output [4]: [ws_bill_customer_sk#76, ws_ext_discount_amt#77, ws_ext_list_price#78, ws_sold_date_sk#79]
Arguments: [c_customer_sk#68], [ws_bill_customer_sk#76], Inner, BuildRight

(62) CometProject
Input [12]: [c_customer_sk#68, c_customer_id#52, c_first_name#53, c_last_name#54, c_preferred_cust_flag#55, c_birth_country#73, c_login#56, c_email_address#57, ws_bill_customer_sk#76, ws_ext_discount_amt#77, ws_ext_list_price#78, ws_sold_date_sk#79]
Arguments: [c_customer_id#52, c_first_name#53, c_last_name#54, c_preferred_cust_flag#55, c_birth_country#73, c_login#56, c_email_address#57, ws_ext_discount_amt#77, ws_ext_list_price#78, ws_sold_date_sk#79], [c_customer_id#52, c_first_name#53, c_last_name#54, c_preferred_cust_flag#55, c_birth_country#73, c_login#56, c_email_address#57, ws_ext_discount_amt#77, ws_ext_list_price#78, ws_sold_date_sk#79]

(63) ReusedExchange [Reuses operator id: 28]
Output [2]: [d_date_sk#81, d_year#82]

(64) CometBroadcastHashJoin
Left output [10]: [c_customer_id#52, c_first_name#53, c_last_name#54, c_preferred_cust_flag#55, c_birth_country#73, c_login#56, c_email_address#57, ws_ext_discount_amt#77, ws_ext_list_price#78, ws_sold_date_sk#79]
Right output [2]: [d_date_sk#81, d_year#82]
Arguments: [ws_sold_date_sk#79], [d_date_sk#81], Inner, BuildRight

(65) CometProject
Input [12]: [c_customer_id#52, c_first_name#53, c_last_name#54, c_preferred_cust_flag#55, c_birth_country#73, c_login#56, c_email_address#57, ws_ext_discount_amt#77, ws_ext_list_price#78, ws_sold_date_sk#79, d_date_sk#81, d_year#82]
Arguments: [c_customer_id#52, c_first_name#53, c_last_name#54, c_preferred_cust_flag#55, c_birth_country#73, c_login#56, c_email_address#57, ws_ext_discount_amt#77, ws_ext_list_price#78, d_year#82], [c_customer_id#52, c_first_name#53, c_last_name#54, c_preferred_cust_flag#55, c_birth_country#73, c_login#56, c_email_address#57, ws_ext_discount_amt#77, ws_ext_list_price#78, d_year#82]

(66) CometHashAggregate
Input [10]: [c_customer_id#52, c_first_name#53, c_last_name#54, c_preferred_cust_flag#55, c_birth_country#73, c_login#56, c_email_address#57, ws_ext_discount_amt#77, ws_ext_list_price#78, d_year#82]
Keys [8]: [c_customer_id#52, c_first_name#53, c_last_name#54, c_preferred_cust_flag#55, c_birth_country#73, c_login#56, c_email_address#57, d_year#82]
Functions [1]: [partial_sum(UnscaledValue((ws_ext_list_price#78 - ws_ext_discount_amt#77)))]

(67) CometExchange
Input [9]: [c_customer_id#52, c_first_name#53, c_last_name#54, c_preferred_cust_flag#55, c_birth_country#73, c_login#56, c_email_address#57, d_year#82, sum#83]
Arguments: hashpartitioning(c_customer_id#52, c_first_name#53, c_last_name#54, c_preferred_cust_flag#55, c_birth_country#73, c_login#56, c_email_address#57, d_year#82, 5), ENSURE_REQUIREMENTS, CometNativeShuffle, [plan_id=4]

(68) CometHashAggregate
Input [9]: [c_customer_id#52, c_first_name#53, c_last_name#54, c_preferred_cust_flag#55, c_birth_country#73, c_login#56, c_email_address#57, d_year#82, sum#83]
Keys [8]: [c_customer_id#52, c_first_name#53, c_last_name#54, c_preferred_cust_flag#55, c_birth_country#73, c_login#56, c_email_address#57, d_year#82]
Functions [1]: [sum(UnscaledValue((ws_ext_list_price#78 - ws_ext_discount_amt#77)))]

(69) CometBroadcastExchange
Input [2]: [customer_id#84, year_total#85]
Arguments: [customer_id#84, year_total#85]

(70) CometBroadcastHashJoin
Left output [5]: [customer_id#23, year_total#24, customer_preferred_cust_flag#42, year_total#43, year_total#67]
Right output [2]: [customer_id#84, year_total#85]
Arguments: [customer_id#23], [customer_id#84], Inner, (CASE WHEN (year_total#67 > 0.00) THEN (year_total#85 / year_total#67) END > CASE WHEN (year_total#24 > 0.00) THEN (year_total#43 / year_total#24) END), BuildRight

(71) CometProject
Input [7]: [customer_id#23, year_total#24, customer_preferred_cust_flag#42, year_total#43, year_total#67, customer_id#84, year_total#85]
Arguments: [customer_preferred_cust_flag#42], [customer_preferred_cust_flag#42]

(72) CometTakeOrderedAndProject
Input [1]: [customer_preferred_cust_flag#42]
Arguments: TakeOrderedAndProject(limit=100, orderBy=[customer_preferred_cust_flag#42 ASC NULLS FIRST], output=[customer_preferred_cust_flag#42]), [customer_preferred_cust_flag#42], 100, 0, [customer_preferred_cust_flag#42 ASC NULLS FIRST], [customer_preferred_cust_flag#42]

(73) CometColumnarToRow [codegen id : 1]
Input [1]: [customer_preferred_cust_flag#42]

===== Subqueries =====

Subquery:1 Hosting operator id = 4 Hosting Expression = ss_sold_date_sk#18 IN dynamicpruning#19
BroadcastExchange (77)
+- * CometColumnarToRow (76)
   +- CometFilter (75)
      +- CometScan [native_iceberg_compat] parquet spark_catalog.default.date_dim (74)


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

(75) CometFilter
Input [2]: [d_date_sk#20, d_year#21]
Condition : ((isnotnull(d_year#21) AND (d_year#21 = 2001)) AND isnotnull(d_date_sk#20))

(76) CometColumnarToRow [codegen id : 1]
Input [2]: [d_date_sk#20, d_year#21]

(77) BroadcastExchange
Input [2]: [d_date_sk#20, d_year#21]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, false] as bigint)),false), [plan_id=5]

Subquery:2 Hosting operator id = 21 Hosting Expression = ss_sold_date_sk#36 IN dynamicpruning#37
BroadcastExchange (81)
+- * CometColumnarToRow (80)
   +- CometFilter (79)
      +- CometScan [native_iceberg_compat] parquet spark_catalog.default.date_dim (78)


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

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

(80) CometColumnarToRow [codegen id : 1]
Input [2]: [d_date_sk#38, d_year#39]

(81) BroadcastExchange
Input [2]: [d_date_sk#38, d_year#39]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, false] as bigint)),false), [plan_id=6]

Subquery:3 Hosting operator id = 40 Hosting Expression = ws_sold_date_sk#61 IN dynamicpruning#19

Subquery:4 Hosting operator id = 58 Hosting Expression = ws_sold_date_sk#79 IN dynamicpruning#37


