== 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 [4]: [c_customer_sk#1, c_customer_id#2, c_first_name#3, c_last_name#4]
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>

(2) CometFilter
Input [4]: [c_customer_sk#1, c_customer_id#2, c_first_name#3, c_last_name#4]
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 [4]: [c_customer_sk#1, c_customer_id#2, c_first_name#3, c_last_name#4]
Arguments: [c_customer_sk#1, c_customer_id#5, c_first_name#6, c_last_name#7], [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#5, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_first_name#3, 20, true, false, true) AS c_first_name#6, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_last_name#4, 30, true, false, true) AS c_last_name#7]

(4) CometScan [native_iceberg_compat] parquet spark_catalog.default.store_sales
Output [3]: [ss_customer_sk#8, ss_net_paid#9, ss_sold_date_sk#10]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(ss_sold_date_sk#10), dynamicpruningexpression(ss_sold_date_sk#10 IN dynamicpruning#11)]
PushedFilters: [IsNotNull(ss_customer_sk)]
ReadSchema: struct<ss_customer_sk:int,ss_net_paid:decimal(7,2)>

(5) CometFilter
Input [3]: [ss_customer_sk#8, ss_net_paid#9, ss_sold_date_sk#10]
Condition : isnotnull(ss_customer_sk#8)

(6) CometBroadcastExchange
Input [3]: [ss_customer_sk#8, ss_net_paid#9, ss_sold_date_sk#10]
Arguments: [ss_customer_sk#8, ss_net_paid#9, ss_sold_date_sk#10]

(7) CometBroadcastHashJoin
Left output [4]: [c_customer_sk#1, c_customer_id#5, c_first_name#6, c_last_name#7]
Right output [3]: [ss_customer_sk#8, ss_net_paid#9, ss_sold_date_sk#10]
Arguments: [c_customer_sk#1], [ss_customer_sk#8], Inner, BuildRight

(8) CometProject
Input [7]: [c_customer_sk#1, c_customer_id#5, c_first_name#6, c_last_name#7, ss_customer_sk#8, ss_net_paid#9, ss_sold_date_sk#10]
Arguments: [c_customer_id#5, c_first_name#6, c_last_name#7, ss_net_paid#9, ss_sold_date_sk#10], [c_customer_id#5, c_first_name#6, c_last_name#7, ss_net_paid#9, ss_sold_date_sk#10]

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

(10) CometFilter
Input [2]: [d_date_sk#12, d_year#13]
Condition : (((isnotnull(d_year#13) AND (d_year#13 = 2001)) AND d_year#13 IN (2001,2002)) AND isnotnull(d_date_sk#12))

(11) CometBroadcastExchange
Input [2]: [d_date_sk#12, d_year#13]
Arguments: [d_date_sk#12, d_year#13]

(12) CometBroadcastHashJoin
Left output [5]: [c_customer_id#5, c_first_name#6, c_last_name#7, ss_net_paid#9, ss_sold_date_sk#10]
Right output [2]: [d_date_sk#12, d_year#13]
Arguments: [ss_sold_date_sk#10], [d_date_sk#12], Inner, BuildRight

(13) CometProject
Input [7]: [c_customer_id#5, c_first_name#6, c_last_name#7, ss_net_paid#9, ss_sold_date_sk#10, d_date_sk#12, d_year#13]
Arguments: [c_customer_id#5, c_first_name#6, c_last_name#7, ss_net_paid#9, d_year#13], [c_customer_id#5, c_first_name#6, c_last_name#7, ss_net_paid#9, d_year#13]

(14) CometHashAggregate
Input [5]: [c_customer_id#5, c_first_name#6, c_last_name#7, ss_net_paid#9, d_year#13]
Keys [4]: [c_customer_id#5, c_first_name#6, c_last_name#7, d_year#13]
Functions [1]: [partial_sum(UnscaledValue(ss_net_paid#9))]

(15) CometExchange
Input [5]: [c_customer_id#5, c_first_name#6, c_last_name#7, d_year#13, sum#14]
Arguments: hashpartitioning(c_customer_id#5, c_first_name#6, c_last_name#7, d_year#13, 5), ENSURE_REQUIREMENTS, CometNativeShuffle, [plan_id=1]

(16) CometHashAggregate
Input [5]: [c_customer_id#5, c_first_name#6, c_last_name#7, d_year#13, sum#14]
Keys [4]: [c_customer_id#5, c_first_name#6, c_last_name#7, d_year#13]
Functions [1]: [sum(UnscaledValue(ss_net_paid#9))]

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

(18) CometScan [native_iceberg_compat] parquet spark_catalog.default.customer
Output [4]: [c_customer_sk#17, c_customer_id#18, c_first_name#19, c_last_name#20]
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>

(19) CometFilter
Input [4]: [c_customer_sk#17, c_customer_id#18, c_first_name#19, c_last_name#20]
Condition : (isnotnull(c_customer_sk#17) AND isnotnull(staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_customer_id#18, 16, true, false, true)))

(20) CometProject
Input [4]: [c_customer_sk#17, c_customer_id#18, c_first_name#19, c_last_name#20]
Arguments: [c_customer_sk#17, c_customer_id#5, c_first_name#6, c_last_name#7], [c_customer_sk#17, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_customer_id#18, 16, true, false, true) AS c_customer_id#5, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_first_name#19, 20, true, false, true) AS c_first_name#6, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_last_name#20, 30, true, false, true) AS c_last_name#7]

(21) CometScan [native_iceberg_compat] parquet spark_catalog.default.store_sales
Output [3]: [ss_customer_sk#21, ss_net_paid#22, ss_sold_date_sk#23]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(ss_sold_date_sk#23), dynamicpruningexpression(ss_sold_date_sk#23 IN dynamicpruning#24)]
PushedFilters: [IsNotNull(ss_customer_sk)]
ReadSchema: struct<ss_customer_sk:int,ss_net_paid:decimal(7,2)>

(22) CometFilter
Input [3]: [ss_customer_sk#21, ss_net_paid#22, ss_sold_date_sk#23]
Condition : isnotnull(ss_customer_sk#21)

(23) CometBroadcastExchange
Input [3]: [ss_customer_sk#21, ss_net_paid#22, ss_sold_date_sk#23]
Arguments: [ss_customer_sk#21, ss_net_paid#22, ss_sold_date_sk#23]

(24) CometBroadcastHashJoin
Left output [4]: [c_customer_sk#17, c_customer_id#5, c_first_name#6, c_last_name#7]
Right output [3]: [ss_customer_sk#21, ss_net_paid#22, ss_sold_date_sk#23]
Arguments: [c_customer_sk#17], [ss_customer_sk#21], Inner, BuildRight

(25) CometProject
Input [7]: [c_customer_sk#17, c_customer_id#5, c_first_name#6, c_last_name#7, ss_customer_sk#21, ss_net_paid#22, ss_sold_date_sk#23]
Arguments: [c_customer_id#5, c_first_name#6, c_last_name#7, ss_net_paid#22, ss_sold_date_sk#23], [c_customer_id#5, c_first_name#6, c_last_name#7, ss_net_paid#22, ss_sold_date_sk#23]

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

(27) CometFilter
Input [2]: [d_date_sk#25, d_year#26]
Condition : (((isnotnull(d_year#26) AND (d_year#26 = 2002)) AND d_year#26 IN (2001,2002)) AND isnotnull(d_date_sk#25))

(28) CometBroadcastExchange
Input [2]: [d_date_sk#25, d_year#26]
Arguments: [d_date_sk#25, d_year#26]

(29) CometBroadcastHashJoin
Left output [5]: [c_customer_id#5, c_first_name#6, c_last_name#7, ss_net_paid#22, ss_sold_date_sk#23]
Right output [2]: [d_date_sk#25, d_year#26]
Arguments: [ss_sold_date_sk#23], [d_date_sk#25], Inner, BuildRight

(30) CometProject
Input [7]: [c_customer_id#5, c_first_name#6, c_last_name#7, ss_net_paid#22, ss_sold_date_sk#23, d_date_sk#25, d_year#26]
Arguments: [c_customer_id#5, c_first_name#6, c_last_name#7, ss_net_paid#22, d_year#26], [c_customer_id#5, c_first_name#6, c_last_name#7, ss_net_paid#22, d_year#26]

(31) CometHashAggregate
Input [5]: [c_customer_id#5, c_first_name#6, c_last_name#7, ss_net_paid#22, d_year#26]
Keys [4]: [c_customer_id#5, c_first_name#6, c_last_name#7, d_year#26]
Functions [1]: [partial_sum(UnscaledValue(ss_net_paid#22))]

(32) CometExchange
Input [5]: [c_customer_id#5, c_first_name#6, c_last_name#7, d_year#26, sum#27]
Arguments: hashpartitioning(c_customer_id#5, c_first_name#6, c_last_name#7, d_year#26, 5), ENSURE_REQUIREMENTS, CometNativeShuffle, [plan_id=2]

(33) CometHashAggregate
Input [5]: [c_customer_id#5, c_first_name#6, c_last_name#7, d_year#26, sum#27]
Keys [4]: [c_customer_id#5, c_first_name#6, c_last_name#7, d_year#26]
Functions [1]: [sum(UnscaledValue(ss_net_paid#22))]

(34) CometBroadcastExchange
Input [4]: [customer_id#28, customer_first_name#29, customer_last_name#30, year_total#31]
Arguments: [customer_id#28, customer_first_name#29, customer_last_name#30, year_total#31]

(35) CometBroadcastHashJoin
Left output [2]: [customer_id#15, year_total#16]
Right output [4]: [customer_id#28, customer_first_name#29, customer_last_name#30, year_total#31]
Arguments: [customer_id#15], [customer_id#28], Inner, BuildRight

(36) CometScan [native_iceberg_compat] parquet spark_catalog.default.customer
Output [4]: [c_customer_sk#32, c_customer_id#33, c_first_name#34, c_last_name#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>

(37) CometFilter
Input [4]: [c_customer_sk#32, c_customer_id#33, c_first_name#34, c_last_name#35]
Condition : (isnotnull(c_customer_sk#32) AND isnotnull(staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_customer_id#33, 16, true, false, true)))

(38) CometProject
Input [4]: [c_customer_sk#32, c_customer_id#33, c_first_name#34, c_last_name#35]
Arguments: [c_customer_sk#32, c_customer_id#36, c_first_name#37, c_last_name#38], [c_customer_sk#32, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_customer_id#33, 16, true, false, true) AS c_customer_id#36, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_first_name#34, 20, true, false, true) AS c_first_name#37, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_last_name#35, 30, true, false, true) AS c_last_name#38]

(39) CometScan [native_iceberg_compat] parquet spark_catalog.default.web_sales
Output [3]: [ws_bill_customer_sk#39, ws_net_paid#40, ws_sold_date_sk#41]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(ws_sold_date_sk#41), dynamicpruningexpression(ws_sold_date_sk#41 IN dynamicpruning#42)]
PushedFilters: [IsNotNull(ws_bill_customer_sk)]
ReadSchema: struct<ws_bill_customer_sk:int,ws_net_paid:decimal(7,2)>

(40) CometFilter
Input [3]: [ws_bill_customer_sk#39, ws_net_paid#40, ws_sold_date_sk#41]
Condition : isnotnull(ws_bill_customer_sk#39)

(41) CometBroadcastExchange
Input [3]: [ws_bill_customer_sk#39, ws_net_paid#40, ws_sold_date_sk#41]
Arguments: [ws_bill_customer_sk#39, ws_net_paid#40, ws_sold_date_sk#41]

(42) CometBroadcastHashJoin
Left output [4]: [c_customer_sk#32, c_customer_id#36, c_first_name#37, c_last_name#38]
Right output [3]: [ws_bill_customer_sk#39, ws_net_paid#40, ws_sold_date_sk#41]
Arguments: [c_customer_sk#32], [ws_bill_customer_sk#39], Inner, BuildRight

(43) CometProject
Input [7]: [c_customer_sk#32, c_customer_id#36, c_first_name#37, c_last_name#38, ws_bill_customer_sk#39, ws_net_paid#40, ws_sold_date_sk#41]
Arguments: [c_customer_id#36, c_first_name#37, c_last_name#38, ws_net_paid#40, ws_sold_date_sk#41], [c_customer_id#36, c_first_name#37, c_last_name#38, ws_net_paid#40, ws_sold_date_sk#41]

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

(45) CometBroadcastHashJoin
Left output [5]: [c_customer_id#36, c_first_name#37, c_last_name#38, ws_net_paid#40, ws_sold_date_sk#41]
Right output [2]: [d_date_sk#43, d_year#44]
Arguments: [ws_sold_date_sk#41], [d_date_sk#43], Inner, BuildRight

(46) CometProject
Input [7]: [c_customer_id#36, c_first_name#37, c_last_name#38, ws_net_paid#40, ws_sold_date_sk#41, d_date_sk#43, d_year#44]
Arguments: [c_customer_id#36, c_first_name#37, c_last_name#38, ws_net_paid#40, d_year#44], [c_customer_id#36, c_first_name#37, c_last_name#38, ws_net_paid#40, d_year#44]

(47) CometHashAggregate
Input [5]: [c_customer_id#36, c_first_name#37, c_last_name#38, ws_net_paid#40, d_year#44]
Keys [4]: [c_customer_id#36, c_first_name#37, c_last_name#38, d_year#44]
Functions [1]: [partial_sum(UnscaledValue(ws_net_paid#40))]

(48) CometExchange
Input [5]: [c_customer_id#36, c_first_name#37, c_last_name#38, d_year#44, sum#45]
Arguments: hashpartitioning(c_customer_id#36, c_first_name#37, c_last_name#38, d_year#44, 5), ENSURE_REQUIREMENTS, CometNativeShuffle, [plan_id=3]

(49) CometHashAggregate
Input [5]: [c_customer_id#36, c_first_name#37, c_last_name#38, d_year#44, sum#45]
Keys [4]: [c_customer_id#36, c_first_name#37, c_last_name#38, d_year#44]
Functions [1]: [sum(UnscaledValue(ws_net_paid#40))]

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

(51) CometBroadcastExchange
Input [2]: [customer_id#46, year_total#47]
Arguments: [customer_id#46, year_total#47]

(52) CometBroadcastHashJoin
Left output [6]: [customer_id#15, year_total#16, customer_id#28, customer_first_name#29, customer_last_name#30, year_total#31]
Right output [2]: [customer_id#46, year_total#47]
Arguments: [customer_id#15], [customer_id#46], Inner, BuildRight

(53) CometProject
Input [8]: [customer_id#15, year_total#16, customer_id#28, customer_first_name#29, customer_last_name#30, year_total#31, customer_id#46, year_total#47]
Arguments: [customer_id#15, year_total#16, customer_id#28, customer_first_name#29, customer_last_name#30, year_total#31, year_total#47], [customer_id#15, year_total#16, customer_id#28, customer_first_name#29, customer_last_name#30, year_total#31, year_total#47]

(54) CometScan [native_iceberg_compat] parquet spark_catalog.default.customer
Output [4]: [c_customer_sk#48, c_customer_id#49, c_first_name#50, c_last_name#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>

(55) CometFilter
Input [4]: [c_customer_sk#48, c_customer_id#49, c_first_name#50, c_last_name#51]
Condition : (isnotnull(c_customer_sk#48) AND isnotnull(staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_customer_id#49, 16, true, false, true)))

(56) CometProject
Input [4]: [c_customer_sk#48, c_customer_id#49, c_first_name#50, c_last_name#51]
Arguments: [c_customer_sk#48, c_customer_id#36, c_first_name#37, c_last_name#38], [c_customer_sk#48, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_customer_id#49, 16, true, false, true) AS c_customer_id#36, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_first_name#50, 20, true, false, true) AS c_first_name#37, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_last_name#51, 30, true, false, true) AS c_last_name#38]

(57) CometScan [native_iceberg_compat] parquet spark_catalog.default.web_sales
Output [3]: [ws_bill_customer_sk#52, ws_net_paid#53, ws_sold_date_sk#54]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(ws_sold_date_sk#54), dynamicpruningexpression(ws_sold_date_sk#54 IN dynamicpruning#55)]
PushedFilters: [IsNotNull(ws_bill_customer_sk)]
ReadSchema: struct<ws_bill_customer_sk:int,ws_net_paid:decimal(7,2)>

(58) CometFilter
Input [3]: [ws_bill_customer_sk#52, ws_net_paid#53, ws_sold_date_sk#54]
Condition : isnotnull(ws_bill_customer_sk#52)

(59) CometBroadcastExchange
Input [3]: [ws_bill_customer_sk#52, ws_net_paid#53, ws_sold_date_sk#54]
Arguments: [ws_bill_customer_sk#52, ws_net_paid#53, ws_sold_date_sk#54]

(60) CometBroadcastHashJoin
Left output [4]: [c_customer_sk#48, c_customer_id#36, c_first_name#37, c_last_name#38]
Right output [3]: [ws_bill_customer_sk#52, ws_net_paid#53, ws_sold_date_sk#54]
Arguments: [c_customer_sk#48], [ws_bill_customer_sk#52], Inner, BuildRight

(61) CometProject
Input [7]: [c_customer_sk#48, c_customer_id#36, c_first_name#37, c_last_name#38, ws_bill_customer_sk#52, ws_net_paid#53, ws_sold_date_sk#54]
Arguments: [c_customer_id#36, c_first_name#37, c_last_name#38, ws_net_paid#53, ws_sold_date_sk#54], [c_customer_id#36, c_first_name#37, c_last_name#38, ws_net_paid#53, ws_sold_date_sk#54]

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

(63) CometBroadcastHashJoin
Left output [5]: [c_customer_id#36, c_first_name#37, c_last_name#38, ws_net_paid#53, ws_sold_date_sk#54]
Right output [2]: [d_date_sk#56, d_year#57]
Arguments: [ws_sold_date_sk#54], [d_date_sk#56], Inner, BuildRight

(64) CometProject
Input [7]: [c_customer_id#36, c_first_name#37, c_last_name#38, ws_net_paid#53, ws_sold_date_sk#54, d_date_sk#56, d_year#57]
Arguments: [c_customer_id#36, c_first_name#37, c_last_name#38, ws_net_paid#53, d_year#57], [c_customer_id#36, c_first_name#37, c_last_name#38, ws_net_paid#53, d_year#57]

(65) CometHashAggregate
Input [5]: [c_customer_id#36, c_first_name#37, c_last_name#38, ws_net_paid#53, d_year#57]
Keys [4]: [c_customer_id#36, c_first_name#37, c_last_name#38, d_year#57]
Functions [1]: [partial_sum(UnscaledValue(ws_net_paid#53))]

(66) CometExchange
Input [5]: [c_customer_id#36, c_first_name#37, c_last_name#38, d_year#57, sum#58]
Arguments: hashpartitioning(c_customer_id#36, c_first_name#37, c_last_name#38, d_year#57, 5), ENSURE_REQUIREMENTS, CometNativeShuffle, [plan_id=4]

(67) CometHashAggregate
Input [5]: [c_customer_id#36, c_first_name#37, c_last_name#38, d_year#57, sum#58]
Keys [4]: [c_customer_id#36, c_first_name#37, c_last_name#38, d_year#57]
Functions [1]: [sum(UnscaledValue(ws_net_paid#53))]

(68) CometBroadcastExchange
Input [2]: [customer_id#59, year_total#60]
Arguments: [customer_id#59, year_total#60]

(69) CometBroadcastHashJoin
Left output [7]: [customer_id#15, year_total#16, customer_id#28, customer_first_name#29, customer_last_name#30, year_total#31, year_total#47]
Right output [2]: [customer_id#59, year_total#60]
Arguments: [customer_id#15], [customer_id#59], Inner, (CASE WHEN (year_total#47 > 0.00) THEN (year_total#60 / year_total#47) END > CASE WHEN (year_total#16 > 0.00) THEN (year_total#31 / year_total#16) END), BuildRight

(70) CometProject
Input [9]: [customer_id#15, year_total#16, customer_id#28, customer_first_name#29, customer_last_name#30, year_total#31, year_total#47, customer_id#59, year_total#60]
Arguments: [customer_id#28, customer_first_name#29, customer_last_name#30], [customer_id#28, customer_first_name#29, customer_last_name#30]

(71) CometTakeOrderedAndProject
Input [3]: [customer_id#28, customer_first_name#29, customer_last_name#30]
Arguments: TakeOrderedAndProject(limit=100, orderBy=[customer_first_name#29 ASC NULLS FIRST,customer_id#28 ASC NULLS FIRST,customer_last_name#30 ASC NULLS FIRST], output=[customer_id#28,customer_first_name#29,customer_last_name#30]), [customer_id#28, customer_first_name#29, customer_last_name#30], 100, 0, [customer_first_name#29 ASC NULLS FIRST, customer_id#28 ASC NULLS FIRST, customer_last_name#30 ASC NULLS FIRST], [customer_id#28, customer_first_name#29, customer_last_name#30]

(72) CometColumnarToRow [codegen id : 1]
Input [3]: [customer_id#28, customer_first_name#29, customer_last_name#30]

===== Subqueries =====

Subquery:1 Hosting operator id = 4 Hosting Expression = ss_sold_date_sk#10 IN dynamicpruning#11
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#12, d_year#13]
Batched: true
Location [not included in comparison]/{warehouse_dir}/date_dim]
PushedFilters: [IsNotNull(d_year), EqualTo(d_year,2001), In(d_year, [2001,2002]), IsNotNull(d_date_sk)]
ReadSchema: struct<d_date_sk:int,d_year:int>

(74) CometFilter
Input [2]: [d_date_sk#12, d_year#13]
Condition : (((isnotnull(d_year#13) AND (d_year#13 = 2001)) AND d_year#13 IN (2001,2002)) AND isnotnull(d_date_sk#12))

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

(76) BroadcastExchange
Input [2]: [d_date_sk#12, d_year#13]
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#23 IN dynamicpruning#24
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#25, d_year#26]
Batched: true
Location [not included in comparison]/{warehouse_dir}/date_dim]
PushedFilters: [IsNotNull(d_year), EqualTo(d_year,2002), In(d_year, [2001,2002]), IsNotNull(d_date_sk)]
ReadSchema: struct<d_date_sk:int,d_year:int>

(78) CometFilter
Input [2]: [d_date_sk#25, d_year#26]
Condition : (((isnotnull(d_year#26) AND (d_year#26 = 2002)) AND d_year#26 IN (2001,2002)) AND isnotnull(d_date_sk#25))

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

(80) BroadcastExchange
Input [2]: [d_date_sk#25, d_year#26]
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#41 IN dynamicpruning#11

Subquery:4 Hosting operator id = 57 Hosting Expression = ws_sold_date_sk#54 IN dynamicpruning#24


