== Physical Plan ==
* CometColumnarToRow (72)
+- CometTakeOrderedAndProject (71)
   +- 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.web_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.web_sales (57)
                           +- ReusedExchange (62)


(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 [5]: [customer_id#41, customer_first_name#42, customer_last_name#43, customer_email_address#44, year_total#45]
Arguments: [customer_id#41, customer_first_name#42, customer_last_name#43, customer_email_address#44, year_total#45]

(35) CometBroadcastHashJoin
Left output [2]: [customer_id#23, year_total#24]
Right output [5]: [customer_id#41, customer_first_name#42, customer_last_name#43, customer_email_address#44, year_total#45]
Arguments: [customer_id#23], [customer_id#41], Inner, BuildRight

(36) CometScan [native_iceberg_compat] parquet spark_catalog.default.customer
Output [8]: [c_customer_sk#46, c_customer_id#47, c_first_name#48, c_last_name#49, c_preferred_cust_flag#50, c_birth_country#51, c_login#52, c_email_address#53]
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#46, c_customer_id#47, c_first_name#48, c_last_name#49, c_preferred_cust_flag#50, c_birth_country#51, c_login#52, c_email_address#53]
Condition : (isnotnull(c_customer_sk#46) AND isnotnull(staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_customer_id#47, 16, true, false, true)))

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

(39) CometScan [native_iceberg_compat] parquet spark_catalog.default.web_sales
Output [4]: [ws_bill_customer_sk#60, ws_ext_discount_amt#61, ws_ext_list_price#62, ws_sold_date_sk#63]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(ws_sold_date_sk#63), dynamicpruningexpression(ws_sold_date_sk#63 IN dynamicpruning#64)]
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)>

(40) CometFilter
Input [4]: [ws_bill_customer_sk#60, ws_ext_discount_amt#61, ws_ext_list_price#62, ws_sold_date_sk#63]
Condition : isnotnull(ws_bill_customer_sk#60)

(41) CometBroadcastExchange
Input [4]: [ws_bill_customer_sk#60, ws_ext_discount_amt#61, ws_ext_list_price#62, ws_sold_date_sk#63]
Arguments: [ws_bill_customer_sk#60, ws_ext_discount_amt#61, ws_ext_list_price#62, ws_sold_date_sk#63]

(42) CometBroadcastHashJoin
Left output [8]: [c_customer_sk#46, c_customer_id#54, c_first_name#55, c_last_name#56, c_preferred_cust_flag#57, c_birth_country#51, c_login#58, c_email_address#59]
Right output [4]: [ws_bill_customer_sk#60, ws_ext_discount_amt#61, ws_ext_list_price#62, ws_sold_date_sk#63]
Arguments: [c_customer_sk#46], [ws_bill_customer_sk#60], Inner, BuildRight

(43) CometProject
Input [12]: [c_customer_sk#46, c_customer_id#54, c_first_name#55, c_last_name#56, c_preferred_cust_flag#57, c_birth_country#51, c_login#58, c_email_address#59, ws_bill_customer_sk#60, ws_ext_discount_amt#61, ws_ext_list_price#62, ws_sold_date_sk#63]
Arguments: [c_customer_id#54, c_first_name#55, c_last_name#56, c_preferred_cust_flag#57, c_birth_country#51, c_login#58, c_email_address#59, ws_ext_discount_amt#61, ws_ext_list_price#62, ws_sold_date_sk#63], [c_customer_id#54, c_first_name#55, c_last_name#56, c_preferred_cust_flag#57, c_birth_country#51, c_login#58, c_email_address#59, ws_ext_discount_amt#61, ws_ext_list_price#62, ws_sold_date_sk#63]

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

(45) CometBroadcastHashJoin
Left output [10]: [c_customer_id#54, c_first_name#55, c_last_name#56, c_preferred_cust_flag#57, c_birth_country#51, c_login#58, c_email_address#59, ws_ext_discount_amt#61, ws_ext_list_price#62, ws_sold_date_sk#63]
Right output [2]: [d_date_sk#65, d_year#66]
Arguments: [ws_sold_date_sk#63], [d_date_sk#65], Inner, BuildRight

(46) CometProject
Input [12]: [c_customer_id#54, c_first_name#55, c_last_name#56, c_preferred_cust_flag#57, c_birth_country#51, c_login#58, c_email_address#59, ws_ext_discount_amt#61, ws_ext_list_price#62, ws_sold_date_sk#63, d_date_sk#65, d_year#66]
Arguments: [c_customer_id#54, c_first_name#55, c_last_name#56, c_preferred_cust_flag#57, c_birth_country#51, c_login#58, c_email_address#59, ws_ext_discount_amt#61, ws_ext_list_price#62, d_year#66], [c_customer_id#54, c_first_name#55, c_last_name#56, c_preferred_cust_flag#57, c_birth_country#51, c_login#58, c_email_address#59, ws_ext_discount_amt#61, ws_ext_list_price#62, d_year#66]

(47) CometHashAggregate
Input [10]: [c_customer_id#54, c_first_name#55, c_last_name#56, c_preferred_cust_flag#57, c_birth_country#51, c_login#58, c_email_address#59, ws_ext_discount_amt#61, ws_ext_list_price#62, d_year#66]
Keys [8]: [c_customer_id#54, c_first_name#55, c_last_name#56, c_preferred_cust_flag#57, c_birth_country#51, c_login#58, c_email_address#59, d_year#66]
Functions [1]: [partial_sum(UnscaledValue((ws_ext_list_price#62 - ws_ext_discount_amt#61)))]

(48) CometExchange
Input [9]: [c_customer_id#54, c_first_name#55, c_last_name#56, c_preferred_cust_flag#57, c_birth_country#51, c_login#58, c_email_address#59, d_year#66, sum#67]
Arguments: hashpartitioning(c_customer_id#54, c_first_name#55, c_last_name#56, c_preferred_cust_flag#57, c_birth_country#51, c_login#58, c_email_address#59, d_year#66, 5), ENSURE_REQUIREMENTS, CometNativeShuffle, [plan_id=3]

(49) CometHashAggregate
Input [9]: [c_customer_id#54, c_first_name#55, c_last_name#56, c_preferred_cust_flag#57, c_birth_country#51, c_login#58, c_email_address#59, d_year#66, sum#67]
Keys [8]: [c_customer_id#54, c_first_name#55, c_last_name#56, c_preferred_cust_flag#57, c_birth_country#51, c_login#58, c_email_address#59, d_year#66]
Functions [1]: [sum(UnscaledValue((ws_ext_list_price#62 - ws_ext_discount_amt#61)))]

(50) CometFilter
Input [2]: [customer_id#68, year_total#69]
Condition : (isnotnull(year_total#69) AND (year_total#69 > 0.00))

(51) CometBroadcastExchange
Input [2]: [customer_id#68, year_total#69]
Arguments: [customer_id#68, year_total#69]

(52) CometBroadcastHashJoin
Left output [7]: [customer_id#23, year_total#24, customer_id#41, customer_first_name#42, customer_last_name#43, customer_email_address#44, year_total#45]
Right output [2]: [customer_id#68, year_total#69]
Arguments: [customer_id#23], [customer_id#68], Inner, BuildRight

(53) CometProject
Input [9]: [customer_id#23, year_total#24, customer_id#41, customer_first_name#42, customer_last_name#43, customer_email_address#44, year_total#45, customer_id#68, year_total#69]
Arguments: [customer_id#23, year_total#24, customer_id#41, customer_first_name#42, customer_last_name#43, customer_email_address#44, year_total#45, year_total#69], [customer_id#23, year_total#24, customer_id#41, customer_first_name#42, customer_last_name#43, customer_email_address#44, year_total#45, year_total#69]

(54) CometScan [native_iceberg_compat] parquet spark_catalog.default.customer
Output [8]: [c_customer_sk#70, c_customer_id#71, c_first_name#72, c_last_name#73, c_preferred_cust_flag#74, c_birth_country#75, c_login#76, c_email_address#77]
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#70, c_customer_id#71, c_first_name#72, c_last_name#73, c_preferred_cust_flag#74, c_birth_country#75, c_login#76, c_email_address#77]
Condition : (isnotnull(c_customer_sk#70) AND isnotnull(staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_customer_id#71, 16, true, false, true)))

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

(57) CometScan [native_iceberg_compat] parquet spark_catalog.default.web_sales
Output [4]: [ws_bill_customer_sk#78, ws_ext_discount_amt#79, ws_ext_list_price#80, ws_sold_date_sk#81]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(ws_sold_date_sk#81), dynamicpruningexpression(ws_sold_date_sk#81 IN dynamicpruning#82)]
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)>

(58) CometFilter
Input [4]: [ws_bill_customer_sk#78, ws_ext_discount_amt#79, ws_ext_list_price#80, ws_sold_date_sk#81]
Condition : isnotnull(ws_bill_customer_sk#78)

(59) CometBroadcastExchange
Input [4]: [ws_bill_customer_sk#78, ws_ext_discount_amt#79, ws_ext_list_price#80, ws_sold_date_sk#81]
Arguments: [ws_bill_customer_sk#78, ws_ext_discount_amt#79, ws_ext_list_price#80, ws_sold_date_sk#81]

(60) CometBroadcastHashJoin
Left output [8]: [c_customer_sk#70, c_customer_id#54, c_first_name#55, c_last_name#56, c_preferred_cust_flag#57, c_birth_country#75, c_login#58, c_email_address#59]
Right output [4]: [ws_bill_customer_sk#78, ws_ext_discount_amt#79, ws_ext_list_price#80, ws_sold_date_sk#81]
Arguments: [c_customer_sk#70], [ws_bill_customer_sk#78], Inner, BuildRight

(61) CometProject
Input [12]: [c_customer_sk#70, c_customer_id#54, c_first_name#55, c_last_name#56, c_preferred_cust_flag#57, c_birth_country#75, c_login#58, c_email_address#59, ws_bill_customer_sk#78, ws_ext_discount_amt#79, ws_ext_list_price#80, ws_sold_date_sk#81]
Arguments: [c_customer_id#54, c_first_name#55, c_last_name#56, c_preferred_cust_flag#57, c_birth_country#75, c_login#58, c_email_address#59, ws_ext_discount_amt#79, ws_ext_list_price#80, ws_sold_date_sk#81], [c_customer_id#54, c_first_name#55, c_last_name#56, c_preferred_cust_flag#57, c_birth_country#75, c_login#58, c_email_address#59, ws_ext_discount_amt#79, ws_ext_list_price#80, ws_sold_date_sk#81]

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

(63) CometBroadcastHashJoin
Left output [10]: [c_customer_id#54, c_first_name#55, c_last_name#56, c_preferred_cust_flag#57, c_birth_country#75, c_login#58, c_email_address#59, ws_ext_discount_amt#79, ws_ext_list_price#80, ws_sold_date_sk#81]
Right output [2]: [d_date_sk#83, d_year#84]
Arguments: [ws_sold_date_sk#81], [d_date_sk#83], Inner, BuildRight

(64) CometProject
Input [12]: [c_customer_id#54, c_first_name#55, c_last_name#56, c_preferred_cust_flag#57, c_birth_country#75, c_login#58, c_email_address#59, ws_ext_discount_amt#79, ws_ext_list_price#80, ws_sold_date_sk#81, d_date_sk#83, d_year#84]
Arguments: [c_customer_id#54, c_first_name#55, c_last_name#56, c_preferred_cust_flag#57, c_birth_country#75, c_login#58, c_email_address#59, ws_ext_discount_amt#79, ws_ext_list_price#80, d_year#84], [c_customer_id#54, c_first_name#55, c_last_name#56, c_preferred_cust_flag#57, c_birth_country#75, c_login#58, c_email_address#59, ws_ext_discount_amt#79, ws_ext_list_price#80, d_year#84]

(65) CometHashAggregate
Input [10]: [c_customer_id#54, c_first_name#55, c_last_name#56, c_preferred_cust_flag#57, c_birth_country#75, c_login#58, c_email_address#59, ws_ext_discount_amt#79, ws_ext_list_price#80, d_year#84]
Keys [8]: [c_customer_id#54, c_first_name#55, c_last_name#56, c_preferred_cust_flag#57, c_birth_country#75, c_login#58, c_email_address#59, d_year#84]
Functions [1]: [partial_sum(UnscaledValue((ws_ext_list_price#80 - ws_ext_discount_amt#79)))]

(66) CometExchange
Input [9]: [c_customer_id#54, c_first_name#55, c_last_name#56, c_preferred_cust_flag#57, c_birth_country#75, c_login#58, c_email_address#59, d_year#84, sum#85]
Arguments: hashpartitioning(c_customer_id#54, c_first_name#55, c_last_name#56, c_preferred_cust_flag#57, c_birth_country#75, c_login#58, c_email_address#59, d_year#84, 5), ENSURE_REQUIREMENTS, CometNativeShuffle, [plan_id=4]

(67) CometHashAggregate
Input [9]: [c_customer_id#54, c_first_name#55, c_last_name#56, c_preferred_cust_flag#57, c_birth_country#75, c_login#58, c_email_address#59, d_year#84, sum#85]
Keys [8]: [c_customer_id#54, c_first_name#55, c_last_name#56, c_preferred_cust_flag#57, c_birth_country#75, c_login#58, c_email_address#59, d_year#84]
Functions [1]: [sum(UnscaledValue((ws_ext_list_price#80 - ws_ext_discount_amt#79)))]

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

(69) CometBroadcastHashJoin
Left output [8]: [customer_id#23, year_total#24, customer_id#41, customer_first_name#42, customer_last_name#43, customer_email_address#44, year_total#45, year_total#69]
Right output [2]: [customer_id#86, year_total#87]
Arguments: [customer_id#23], [customer_id#86], Inner, (CASE WHEN (year_total#69 > 0.00) THEN (year_total#87 / year_total#69) ELSE 0E-20 END > CASE WHEN (year_total#24 > 0.00) THEN (year_total#45 / year_total#24) ELSE 0E-20 END), BuildRight

(70) CometProject
Input [10]: [customer_id#23, year_total#24, customer_id#41, customer_first_name#42, customer_last_name#43, customer_email_address#44, year_total#45, year_total#69, customer_id#86, year_total#87]
Arguments: [customer_id#41, customer_first_name#42, customer_last_name#43, customer_email_address#44], [customer_id#41, customer_first_name#42, customer_last_name#43, customer_email_address#44]

(71) CometTakeOrderedAndProject
Input [4]: [customer_id#41, customer_first_name#42, customer_last_name#43, customer_email_address#44]
Arguments: TakeOrderedAndProject(limit=100, orderBy=[customer_id#41 ASC NULLS FIRST,customer_first_name#42 ASC NULLS FIRST,customer_last_name#43 ASC NULLS FIRST,customer_email_address#44 ASC NULLS FIRST], output=[customer_id#41,customer_first_name#42,customer_last_name#43,customer_email_address#44]), [customer_id#41, customer_first_name#42, customer_last_name#43, customer_email_address#44], 100, 0, [customer_id#41 ASC NULLS FIRST, customer_first_name#42 ASC NULLS FIRST, customer_last_name#43 ASC NULLS FIRST, customer_email_address#44 ASC NULLS FIRST], [customer_id#41, customer_first_name#42, customer_last_name#43, customer_email_address#44]

(72) CometColumnarToRow [codegen id : 1]
Input [4]: [customer_id#41, customer_first_name#42, customer_last_name#43, customer_email_address#44]

===== Subqueries =====

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


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

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

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

(76) 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 (80)
+- * CometColumnarToRow (79)
   +- CometFilter (78)
      +- CometScan [native_iceberg_compat] parquet spark_catalog.default.date_dim (77)


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

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

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

(80) 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 = 39 Hosting Expression = ws_sold_date_sk#63 IN dynamicpruning#19

Subquery:4 Hosting operator id = 57 Hosting Expression = ws_sold_date_sk#81 IN dynamicpruning#37


