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


(1) CometScan [native_iceberg_compat] parquet spark_catalog.default.catalog_sales
Output [5]: [cs_bill_customer_sk#1, cs_item_sk#2, cs_quantity#3, cs_list_price#4, cs_sold_date_sk#5]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(cs_sold_date_sk#5), dynamicpruningexpression(cs_sold_date_sk#5 IN dynamicpruning#6)]
PushedFilters: [IsNotNull(cs_bill_customer_sk)]
ReadSchema: struct<cs_bill_customer_sk:int,cs_item_sk:int,cs_quantity:int,cs_list_price:decimal(7,2)>

(2) CometFilter
Input [5]: [cs_bill_customer_sk#1, cs_item_sk#2, cs_quantity#3, cs_list_price#4, cs_sold_date_sk#5]
Condition : isnotnull(cs_bill_customer_sk#1)

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

(4) CometFilter
Input [2]: [ss_item_sk#7, ss_sold_date_sk#8]
Condition : isnotnull(ss_item_sk#7)

(5) CometScan [native_iceberg_compat] parquet spark_catalog.default.date_dim
Output [3]: [d_date_sk#10, d_date#11, d_year#12]
Batched: true
Location [not included in comparison]/{warehouse_dir}/date_dim]
PushedFilters: [In(d_year, [2000,2001,2002,2003]), IsNotNull(d_date_sk)]
ReadSchema: struct<d_date_sk:int,d_date:date,d_year:int>

(6) CometFilter
Input [3]: [d_date_sk#10, d_date#11, d_year#12]
Condition : (d_year#12 IN (2000,2001,2002,2003) AND isnotnull(d_date_sk#10))

(7) CometProject
Input [3]: [d_date_sk#10, d_date#11, d_year#12]
Arguments: [d_date_sk#10, d_date#11], [d_date_sk#10, d_date#11]

(8) CometBroadcastExchange
Input [2]: [d_date_sk#10, d_date#11]
Arguments: [d_date_sk#10, d_date#11]

(9) CometBroadcastHashJoin
Left output [2]: [ss_item_sk#7, ss_sold_date_sk#8]
Right output [2]: [d_date_sk#10, d_date#11]
Arguments: [ss_sold_date_sk#8], [d_date_sk#10], Inner, BuildRight

(10) CometProject
Input [4]: [ss_item_sk#7, ss_sold_date_sk#8, d_date_sk#10, d_date#11]
Arguments: [ss_item_sk#7, d_date#11], [ss_item_sk#7, d_date#11]

(11) CometScan [native_iceberg_compat] parquet spark_catalog.default.item
Output [2]: [i_item_sk#13, i_item_desc#14]
Batched: true
Location [not included in comparison]/{warehouse_dir}/item]
PushedFilters: [IsNotNull(i_item_sk)]
ReadSchema: struct<i_item_sk:int,i_item_desc:string>

(12) CometFilter
Input [2]: [i_item_sk#13, i_item_desc#14]
Condition : isnotnull(i_item_sk#13)

(13) CometBroadcastExchange
Input [2]: [i_item_sk#13, i_item_desc#14]
Arguments: [i_item_sk#13, i_item_desc#14]

(14) CometBroadcastHashJoin
Left output [2]: [ss_item_sk#7, d_date#11]
Right output [2]: [i_item_sk#13, i_item_desc#14]
Arguments: [ss_item_sk#7], [i_item_sk#13], Inner, BuildRight

(15) CometProject
Input [4]: [ss_item_sk#7, d_date#11, i_item_sk#13, i_item_desc#14]
Arguments: [d_date#11, i_item_sk#13, _groupingexpression#15], [d_date#11, i_item_sk#13, substr(i_item_desc#14, 1, 30) AS _groupingexpression#15]

(16) CometHashAggregate
Input [3]: [d_date#11, i_item_sk#13, _groupingexpression#15]
Keys [3]: [_groupingexpression#15, i_item_sk#13, d_date#11]
Functions [1]: [partial_count(1)]

(17) CometExchange
Input [4]: [_groupingexpression#15, i_item_sk#13, d_date#11, count#16]
Arguments: hashpartitioning(_groupingexpression#15, i_item_sk#13, d_date#11, 5), ENSURE_REQUIREMENTS, CometNativeShuffle, [plan_id=1]

(18) CometHashAggregate
Input [4]: [_groupingexpression#15, i_item_sk#13, d_date#11, count#16]
Keys [3]: [_groupingexpression#15, i_item_sk#13, d_date#11]
Functions [1]: [count(1)]

(19) CometFilter
Input [2]: [item_sk#17, cnt#18]
Condition : (cnt#18 > 4)

(20) CometProject
Input [2]: [item_sk#17, cnt#18]
Arguments: [item_sk#17], [item_sk#17]

(21) CometBroadcastExchange
Input [1]: [item_sk#17]
Arguments: [item_sk#17]

(22) CometBroadcastHashJoin
Left output [5]: [cs_bill_customer_sk#1, cs_item_sk#2, cs_quantity#3, cs_list_price#4, cs_sold_date_sk#5]
Right output [1]: [item_sk#17]
Arguments: [cs_item_sk#2], [item_sk#17], LeftSemi, BuildRight

(23) CometProject
Input [5]: [cs_bill_customer_sk#1, cs_item_sk#2, cs_quantity#3, cs_list_price#4, cs_sold_date_sk#5]
Arguments: [cs_bill_customer_sk#1, cs_quantity#3, cs_list_price#4, cs_sold_date_sk#5], [cs_bill_customer_sk#1, cs_quantity#3, cs_list_price#4, cs_sold_date_sk#5]

(24) CometExchange
Input [4]: [cs_bill_customer_sk#1, cs_quantity#3, cs_list_price#4, cs_sold_date_sk#5]
Arguments: hashpartitioning(cs_bill_customer_sk#1, 5), ENSURE_REQUIREMENTS, CometNativeShuffle, [plan_id=2]

(25) CometSort
Input [4]: [cs_bill_customer_sk#1, cs_quantity#3, cs_list_price#4, cs_sold_date_sk#5]
Arguments: [cs_bill_customer_sk#1, cs_quantity#3, cs_list_price#4, cs_sold_date_sk#5], [cs_bill_customer_sk#1 ASC NULLS FIRST]

(26) CometScan [native_iceberg_compat] parquet spark_catalog.default.store_sales
Output [4]: [ss_customer_sk#19, ss_quantity#20, ss_sales_price#21, ss_sold_date_sk#22]
Batched: true
Location [not included in comparison]/{warehouse_dir}/store_sales]
PushedFilters: [IsNotNull(ss_customer_sk)]
ReadSchema: struct<ss_customer_sk:int,ss_quantity:int,ss_sales_price:decimal(7,2)>

(27) CometFilter
Input [4]: [ss_customer_sk#19, ss_quantity#20, ss_sales_price#21, ss_sold_date_sk#22]
Condition : isnotnull(ss_customer_sk#19)

(28) CometProject
Input [4]: [ss_customer_sk#19, ss_quantity#20, ss_sales_price#21, ss_sold_date_sk#22]
Arguments: [ss_customer_sk#19, ss_quantity#20, ss_sales_price#21], [ss_customer_sk#19, ss_quantity#20, ss_sales_price#21]

(29) CometScan [native_iceberg_compat] parquet spark_catalog.default.customer
Output [1]: [c_customer_sk#23]
Batched: true
Location [not included in comparison]/{warehouse_dir}/customer]
PushedFilters: [IsNotNull(c_customer_sk)]
ReadSchema: struct<c_customer_sk:int>

(30) CometFilter
Input [1]: [c_customer_sk#23]
Condition : isnotnull(c_customer_sk#23)

(31) CometBroadcastExchange
Input [1]: [c_customer_sk#23]
Arguments: [c_customer_sk#23]

(32) CometBroadcastHashJoin
Left output [3]: [ss_customer_sk#19, ss_quantity#20, ss_sales_price#21]
Right output [1]: [c_customer_sk#23]
Arguments: [ss_customer_sk#19], [c_customer_sk#23], Inner, BuildRight

(33) CometProject
Input [4]: [ss_customer_sk#19, ss_quantity#20, ss_sales_price#21, c_customer_sk#23]
Arguments: [ss_quantity#20, ss_sales_price#21, c_customer_sk#23], [ss_quantity#20, ss_sales_price#21, c_customer_sk#23]

(34) CometHashAggregate
Input [3]: [ss_quantity#20, ss_sales_price#21, c_customer_sk#23]
Keys [1]: [c_customer_sk#23]
Functions [1]: [partial_sum((cast(ss_quantity#20 as decimal(10,0)) * ss_sales_price#21))]

(35) CometExchange
Input [3]: [c_customer_sk#23, sum#24, isEmpty#25]
Arguments: hashpartitioning(c_customer_sk#23, 5), ENSURE_REQUIREMENTS, CometNativeShuffle, [plan_id=3]

(36) CometHashAggregate
Input [3]: [c_customer_sk#23, sum#24, isEmpty#25]
Keys [1]: [c_customer_sk#23]
Functions [1]: [sum((cast(ss_quantity#20 as decimal(10,0)) * ss_sales_price#21))]

(37) CometFilter
Input [2]: [c_customer_sk#23, ssales#26]
Condition : (isnotnull(ssales#26) AND (cast(ssales#26 as decimal(38,8)) > (0.500000 * Subquery scalar-subquery#27, [id=#28])))

(38) CometProject
Input [2]: [c_customer_sk#23, ssales#26]
Arguments: [c_customer_sk#23], [c_customer_sk#23]

(39) CometSort
Input [1]: [c_customer_sk#23]
Arguments: [c_customer_sk#23], [c_customer_sk#23 ASC NULLS FIRST]

(40) CometSortMergeJoin
Left output [4]: [cs_bill_customer_sk#1, cs_quantity#3, cs_list_price#4, cs_sold_date_sk#5]
Right output [1]: [c_customer_sk#23]
Arguments: [cs_bill_customer_sk#1], [c_customer_sk#23], LeftSemi

(41) CometScan [native_iceberg_compat] parquet spark_catalog.default.customer
Output [3]: [c_customer_sk#29, c_first_name#30, c_last_name#31]
Batched: true
Location [not included in comparison]/{warehouse_dir}/customer]
PushedFilters: [IsNotNull(c_customer_sk)]
ReadSchema: struct<c_customer_sk:int,c_first_name:string,c_last_name:string>

(42) CometFilter
Input [3]: [c_customer_sk#29, c_first_name#30, c_last_name#31]
Condition : isnotnull(c_customer_sk#29)

(43) CometExchange
Input [3]: [c_customer_sk#29, c_first_name#30, c_last_name#31]
Arguments: hashpartitioning(c_customer_sk#29, 5), ENSURE_REQUIREMENTS, CometNativeShuffle, [plan_id=4]

(44) CometSort
Input [3]: [c_customer_sk#29, c_first_name#30, c_last_name#31]
Arguments: [c_customer_sk#29, c_first_name#30, c_last_name#31], [c_customer_sk#29 ASC NULLS FIRST]

(45) ReusedExchange [Reuses operator id: 35]
Output [3]: [c_customer_sk#23, sum#24, isEmpty#25]

(46) CometHashAggregate
Input [3]: [c_customer_sk#23, sum#24, isEmpty#25]
Keys [1]: [c_customer_sk#23]
Functions [1]: [sum((cast(ss_quantity#20 as decimal(10,0)) * ss_sales_price#21))]

(47) CometFilter
Input [2]: [c_customer_sk#23, ssales#26]
Condition : (isnotnull(ssales#26) AND (cast(ssales#26 as decimal(38,8)) > (0.500000 * ReusedSubquery Subquery scalar-subquery#27, [id=#28])))

(48) CometProject
Input [2]: [c_customer_sk#23, ssales#26]
Arguments: [c_customer_sk#23], [c_customer_sk#23]

(49) CometSort
Input [1]: [c_customer_sk#23]
Arguments: [c_customer_sk#23], [c_customer_sk#23 ASC NULLS FIRST]

(50) CometSortMergeJoin
Left output [3]: [c_customer_sk#29, c_first_name#30, c_last_name#31]
Right output [1]: [c_customer_sk#23]
Arguments: [c_customer_sk#29], [c_customer_sk#23], LeftSemi

(51) CometProject
Input [3]: [c_customer_sk#29, c_first_name#30, c_last_name#31]
Arguments: [c_customer_sk#29, c_first_name#32, c_last_name#33], [c_customer_sk#29, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_first_name#30, 20, true, false, true) AS c_first_name#32, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_last_name#31, 30, true, false, true) AS c_last_name#33]

(52) CometBroadcastExchange
Input [3]: [c_customer_sk#29, c_first_name#32, c_last_name#33]
Arguments: [c_customer_sk#29, c_first_name#32, c_last_name#33]

(53) CometBroadcastHashJoin
Left output [4]: [cs_bill_customer_sk#1, cs_quantity#3, cs_list_price#4, cs_sold_date_sk#5]
Right output [3]: [c_customer_sk#29, c_first_name#32, c_last_name#33]
Arguments: [cs_bill_customer_sk#1], [c_customer_sk#29], Inner, BuildRight

(54) CometProject
Input [7]: [cs_bill_customer_sk#1, cs_quantity#3, cs_list_price#4, cs_sold_date_sk#5, c_customer_sk#29, c_first_name#32, c_last_name#33]
Arguments: [cs_quantity#3, cs_list_price#4, cs_sold_date_sk#5, c_first_name#32, c_last_name#33], [cs_quantity#3, cs_list_price#4, cs_sold_date_sk#5, c_first_name#32, c_last_name#33]

(55) CometScan [native_iceberg_compat] parquet spark_catalog.default.date_dim
Output [3]: [d_date_sk#34, d_year#35, d_moy#36]
Batched: true
Location [not included in comparison]/{warehouse_dir}/date_dim]
PushedFilters: [IsNotNull(d_year), IsNotNull(d_moy), EqualTo(d_year,2000), EqualTo(d_moy,2), IsNotNull(d_date_sk)]
ReadSchema: struct<d_date_sk:int,d_year:int,d_moy:int>

(56) CometFilter
Input [3]: [d_date_sk#34, d_year#35, d_moy#36]
Condition : ((((isnotnull(d_year#35) AND isnotnull(d_moy#36)) AND (d_year#35 = 2000)) AND (d_moy#36 = 2)) AND isnotnull(d_date_sk#34))

(57) CometProject
Input [3]: [d_date_sk#34, d_year#35, d_moy#36]
Arguments: [d_date_sk#34], [d_date_sk#34]

(58) CometBroadcastExchange
Input [1]: [d_date_sk#34]
Arguments: [d_date_sk#34]

(59) CometBroadcastHashJoin
Left output [5]: [cs_quantity#3, cs_list_price#4, cs_sold_date_sk#5, c_first_name#32, c_last_name#33]
Right output [1]: [d_date_sk#34]
Arguments: [cs_sold_date_sk#5], [d_date_sk#34], Inner, BuildRight

(60) CometProject
Input [6]: [cs_quantity#3, cs_list_price#4, cs_sold_date_sk#5, c_first_name#32, c_last_name#33, d_date_sk#34]
Arguments: [cs_quantity#3, cs_list_price#4, c_first_name#32, c_last_name#33], [cs_quantity#3, cs_list_price#4, c_first_name#32, c_last_name#33]

(61) CometHashAggregate
Input [4]: [cs_quantity#3, cs_list_price#4, c_first_name#32, c_last_name#33]
Keys [2]: [c_last_name#33, c_first_name#32]
Functions [1]: [partial_sum((cast(cs_quantity#3 as decimal(10,0)) * cs_list_price#4))]

(62) CometExchange
Input [4]: [c_last_name#33, c_first_name#32, sum#37, isEmpty#38]
Arguments: hashpartitioning(c_last_name#33, c_first_name#32, 5), ENSURE_REQUIREMENTS, CometNativeShuffle, [plan_id=5]

(63) CometHashAggregate
Input [4]: [c_last_name#33, c_first_name#32, sum#37, isEmpty#38]
Keys [2]: [c_last_name#33, c_first_name#32]
Functions [1]: [sum((cast(cs_quantity#3 as decimal(10,0)) * cs_list_price#4))]

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

(65) CometFilter
Input [5]: [ws_item_sk#39, ws_bill_customer_sk#40, ws_quantity#41, ws_list_price#42, ws_sold_date_sk#43]
Condition : isnotnull(ws_bill_customer_sk#40)

(66) ReusedExchange [Reuses operator id: 21]
Output [1]: [item_sk#17]

(67) CometBroadcastHashJoin
Left output [5]: [ws_item_sk#39, ws_bill_customer_sk#40, ws_quantity#41, ws_list_price#42, ws_sold_date_sk#43]
Right output [1]: [item_sk#17]
Arguments: [ws_item_sk#39], [item_sk#17], LeftSemi, BuildRight

(68) CometProject
Input [5]: [ws_item_sk#39, ws_bill_customer_sk#40, ws_quantity#41, ws_list_price#42, ws_sold_date_sk#43]
Arguments: [ws_bill_customer_sk#40, ws_quantity#41, ws_list_price#42, ws_sold_date_sk#43], [ws_bill_customer_sk#40, ws_quantity#41, ws_list_price#42, ws_sold_date_sk#43]

(69) CometExchange
Input [4]: [ws_bill_customer_sk#40, ws_quantity#41, ws_list_price#42, ws_sold_date_sk#43]
Arguments: hashpartitioning(ws_bill_customer_sk#40, 5), ENSURE_REQUIREMENTS, CometNativeShuffle, [plan_id=6]

(70) CometSort
Input [4]: [ws_bill_customer_sk#40, ws_quantity#41, ws_list_price#42, ws_sold_date_sk#43]
Arguments: [ws_bill_customer_sk#40, ws_quantity#41, ws_list_price#42, ws_sold_date_sk#43], [ws_bill_customer_sk#40 ASC NULLS FIRST]

(71) ReusedExchange [Reuses operator id: 35]
Output [3]: [c_customer_sk#23, sum#24, isEmpty#25]

(72) CometHashAggregate
Input [3]: [c_customer_sk#23, sum#24, isEmpty#25]
Keys [1]: [c_customer_sk#23]
Functions [1]: [sum((cast(ss_quantity#20 as decimal(10,0)) * ss_sales_price#21))]

(73) CometFilter
Input [2]: [c_customer_sk#23, ssales#26]
Condition : (isnotnull(ssales#26) AND (cast(ssales#26 as decimal(38,8)) > (0.500000 * ReusedSubquery Subquery scalar-subquery#27, [id=#28])))

(74) CometProject
Input [2]: [c_customer_sk#23, ssales#26]
Arguments: [c_customer_sk#23], [c_customer_sk#23]

(75) CometSort
Input [1]: [c_customer_sk#23]
Arguments: [c_customer_sk#23], [c_customer_sk#23 ASC NULLS FIRST]

(76) CometSortMergeJoin
Left output [4]: [ws_bill_customer_sk#40, ws_quantity#41, ws_list_price#42, ws_sold_date_sk#43]
Right output [1]: [c_customer_sk#23]
Arguments: [ws_bill_customer_sk#40], [c_customer_sk#23], LeftSemi

(77) ReusedExchange [Reuses operator id: 52]
Output [3]: [c_customer_sk#45, c_first_name#46, c_last_name#47]

(78) CometBroadcastHashJoin
Left output [4]: [ws_bill_customer_sk#40, ws_quantity#41, ws_list_price#42, ws_sold_date_sk#43]
Right output [3]: [c_customer_sk#45, c_first_name#46, c_last_name#47]
Arguments: [ws_bill_customer_sk#40], [c_customer_sk#45], Inner, BuildRight

(79) CometProject
Input [7]: [ws_bill_customer_sk#40, ws_quantity#41, ws_list_price#42, ws_sold_date_sk#43, c_customer_sk#45, c_first_name#46, c_last_name#47]
Arguments: [ws_quantity#41, ws_list_price#42, ws_sold_date_sk#43, c_first_name#46, c_last_name#47], [ws_quantity#41, ws_list_price#42, ws_sold_date_sk#43, c_first_name#46, c_last_name#47]

(80) ReusedExchange [Reuses operator id: 58]
Output [1]: [d_date_sk#48]

(81) CometBroadcastHashJoin
Left output [5]: [ws_quantity#41, ws_list_price#42, ws_sold_date_sk#43, c_first_name#46, c_last_name#47]
Right output [1]: [d_date_sk#48]
Arguments: [ws_sold_date_sk#43], [d_date_sk#48], Inner, BuildRight

(82) CometProject
Input [6]: [ws_quantity#41, ws_list_price#42, ws_sold_date_sk#43, c_first_name#46, c_last_name#47, d_date_sk#48]
Arguments: [ws_quantity#41, ws_list_price#42, c_first_name#46, c_last_name#47], [ws_quantity#41, ws_list_price#42, c_first_name#46, c_last_name#47]

(83) CometHashAggregate
Input [4]: [ws_quantity#41, ws_list_price#42, c_first_name#46, c_last_name#47]
Keys [2]: [c_last_name#47, c_first_name#46]
Functions [1]: [partial_sum((cast(ws_quantity#41 as decimal(10,0)) * ws_list_price#42))]

(84) CometExchange
Input [4]: [c_last_name#47, c_first_name#46, sum#49, isEmpty#50]
Arguments: hashpartitioning(c_last_name#47, c_first_name#46, 5), ENSURE_REQUIREMENTS, CometNativeShuffle, [plan_id=7]

(85) CometHashAggregate
Input [4]: [c_last_name#47, c_first_name#46, sum#49, isEmpty#50]
Keys [2]: [c_last_name#47, c_first_name#46]
Functions [1]: [sum((cast(ws_quantity#41 as decimal(10,0)) * ws_list_price#42))]

(86) CometUnion
Child 0 Input [3]: [c_last_name#33, c_first_name#32, sales#51]
Child 1 Input [3]: [c_last_name#47, c_first_name#46, sales#52]

(87) CometTakeOrderedAndProject
Input [3]: [c_last_name#33, c_first_name#32, sales#51]
Arguments: TakeOrderedAndProject(limit=100, orderBy=[c_last_name#33 ASC NULLS FIRST,c_first_name#32 ASC NULLS FIRST,sales#51 ASC NULLS FIRST], output=[c_last_name#33,c_first_name#32,sales#51]), [c_last_name#33, c_first_name#32, sales#51], 100, 0, [c_last_name#33 ASC NULLS FIRST, c_first_name#32 ASC NULLS FIRST, sales#51 ASC NULLS FIRST], [c_last_name#33, c_first_name#32, sales#51]

(88) CometColumnarToRow [codegen id : 1]
Input [3]: [c_last_name#33, c_first_name#32, sales#51]

===== Subqueries =====

Subquery:1 Hosting operator id = 1 Hosting Expression = cs_sold_date_sk#5 IN dynamicpruning#6
BroadcastExchange (93)
+- * CometColumnarToRow (92)
   +- CometProject (91)
      +- CometFilter (90)
         +- CometScan [native_iceberg_compat] parquet spark_catalog.default.date_dim (89)


(89) CometScan [native_iceberg_compat] parquet spark_catalog.default.date_dim
Output [3]: [d_date_sk#34, d_year#35, d_moy#36]
Batched: true
Location [not included in comparison]/{warehouse_dir}/date_dim]
PushedFilters: [IsNotNull(d_year), IsNotNull(d_moy), EqualTo(d_year,2000), EqualTo(d_moy,2), IsNotNull(d_date_sk)]
ReadSchema: struct<d_date_sk:int,d_year:int,d_moy:int>

(90) CometFilter
Input [3]: [d_date_sk#34, d_year#35, d_moy#36]
Condition : ((((isnotnull(d_year#35) AND isnotnull(d_moy#36)) AND (d_year#35 = 2000)) AND (d_moy#36 = 2)) AND isnotnull(d_date_sk#34))

(91) CometProject
Input [3]: [d_date_sk#34, d_year#35, d_moy#36]
Arguments: [d_date_sk#34], [d_date_sk#34]

(92) CometColumnarToRow [codegen id : 1]
Input [1]: [d_date_sk#34]

(93) BroadcastExchange
Input [1]: [d_date_sk#34]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, true] as bigint)),false), [plan_id=8]

Subquery:2 Hosting operator id = 3 Hosting Expression = ss_sold_date_sk#8 IN dynamicpruning#9
BroadcastExchange (98)
+- * CometColumnarToRow (97)
   +- CometProject (96)
      +- CometFilter (95)
         +- CometScan [native_iceberg_compat] parquet spark_catalog.default.date_dim (94)


(94) CometScan [native_iceberg_compat] parquet spark_catalog.default.date_dim
Output [3]: [d_date_sk#10, d_date#11, d_year#12]
Batched: true
Location [not included in comparison]/{warehouse_dir}/date_dim]
PushedFilters: [In(d_year, [2000,2001,2002,2003]), IsNotNull(d_date_sk)]
ReadSchema: struct<d_date_sk:int,d_date:date,d_year:int>

(95) CometFilter
Input [3]: [d_date_sk#10, d_date#11, d_year#12]
Condition : (d_year#12 IN (2000,2001,2002,2003) AND isnotnull(d_date_sk#10))

(96) CometProject
Input [3]: [d_date_sk#10, d_date#11, d_year#12]
Arguments: [d_date_sk#10, d_date#11], [d_date_sk#10, d_date#11]

(97) CometColumnarToRow [codegen id : 1]
Input [2]: [d_date_sk#10, d_date#11]

(98) BroadcastExchange
Input [2]: [d_date_sk#10, d_date#11]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, true] as bigint)),false), [plan_id=9]

Subquery:3 Hosting operator id = 37 Hosting Expression = Subquery scalar-subquery#27, [id=#28]
* CometColumnarToRow (116)
+- CometHashAggregate (115)
   +- CometExchange (114)
      +- CometHashAggregate (113)
         +- CometHashAggregate (112)
            +- CometExchange (111)
               +- CometHashAggregate (110)
                  +- CometProject (109)
                     +- CometBroadcastHashJoin (108)
                        :- CometProject (103)
                        :  +- CometBroadcastHashJoin (102)
                        :     :- CometFilter (100)
                        :     :  +- CometScan [native_iceberg_compat] parquet spark_catalog.default.store_sales (99)
                        :     +- ReusedExchange (101)
                        +- CometBroadcastExchange (107)
                           +- CometProject (106)
                              +- CometFilter (105)
                                 +- CometScan [native_iceberg_compat] parquet spark_catalog.default.date_dim (104)


(99) CometScan [native_iceberg_compat] parquet spark_catalog.default.store_sales
Output [4]: [ss_customer_sk#53, ss_quantity#54, ss_sales_price#55, ss_sold_date_sk#56]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(ss_sold_date_sk#56), dynamicpruningexpression(ss_sold_date_sk#56 IN dynamicpruning#57)]
PushedFilters: [IsNotNull(ss_customer_sk)]
ReadSchema: struct<ss_customer_sk:int,ss_quantity:int,ss_sales_price:decimal(7,2)>

(100) CometFilter
Input [4]: [ss_customer_sk#53, ss_quantity#54, ss_sales_price#55, ss_sold_date_sk#56]
Condition : isnotnull(ss_customer_sk#53)

(101) ReusedExchange [Reuses operator id: 31]
Output [1]: [c_customer_sk#58]

(102) CometBroadcastHashJoin
Left output [4]: [ss_customer_sk#53, ss_quantity#54, ss_sales_price#55, ss_sold_date_sk#56]
Right output [1]: [c_customer_sk#58]
Arguments: [ss_customer_sk#53], [c_customer_sk#58], Inner, BuildRight

(103) CometProject
Input [5]: [ss_customer_sk#53, ss_quantity#54, ss_sales_price#55, ss_sold_date_sk#56, c_customer_sk#58]
Arguments: [ss_quantity#54, ss_sales_price#55, ss_sold_date_sk#56, c_customer_sk#58], [ss_quantity#54, ss_sales_price#55, ss_sold_date_sk#56, c_customer_sk#58]

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

(105) CometFilter
Input [2]: [d_date_sk#59, d_year#60]
Condition : (d_year#60 IN (2000,2001,2002,2003) AND isnotnull(d_date_sk#59))

(106) CometProject
Input [2]: [d_date_sk#59, d_year#60]
Arguments: [d_date_sk#59], [d_date_sk#59]

(107) CometBroadcastExchange
Input [1]: [d_date_sk#59]
Arguments: [d_date_sk#59]

(108) CometBroadcastHashJoin
Left output [4]: [ss_quantity#54, ss_sales_price#55, ss_sold_date_sk#56, c_customer_sk#58]
Right output [1]: [d_date_sk#59]
Arguments: [ss_sold_date_sk#56], [d_date_sk#59], Inner, BuildRight

(109) CometProject
Input [5]: [ss_quantity#54, ss_sales_price#55, ss_sold_date_sk#56, c_customer_sk#58, d_date_sk#59]
Arguments: [ss_quantity#54, ss_sales_price#55, c_customer_sk#58], [ss_quantity#54, ss_sales_price#55, c_customer_sk#58]

(110) CometHashAggregate
Input [3]: [ss_quantity#54, ss_sales_price#55, c_customer_sk#58]
Keys [1]: [c_customer_sk#58]
Functions [1]: [partial_sum((cast(ss_quantity#54 as decimal(10,0)) * ss_sales_price#55))]

(111) CometExchange
Input [3]: [c_customer_sk#58, sum#61, isEmpty#62]
Arguments: hashpartitioning(c_customer_sk#58, 5), ENSURE_REQUIREMENTS, CometNativeShuffle, [plan_id=10]

(112) CometHashAggregate
Input [3]: [c_customer_sk#58, sum#61, isEmpty#62]
Keys [1]: [c_customer_sk#58]
Functions [1]: [sum((cast(ss_quantity#54 as decimal(10,0)) * ss_sales_price#55))]

(113) CometHashAggregate
Input [1]: [csales#63]
Keys: []
Functions [1]: [partial_max(csales#63)]

(114) CometExchange
Input [1]: [max#64]
Arguments: SinglePartition, ENSURE_REQUIREMENTS, CometNativeShuffle, [plan_id=11]

(115) CometHashAggregate
Input [1]: [max#64]
Keys: []
Functions [1]: [max(csales#63)]

(116) CometColumnarToRow [codegen id : 1]
Input [1]: [tpcds_cmax#65]

Subquery:4 Hosting operator id = 99 Hosting Expression = ss_sold_date_sk#56 IN dynamicpruning#57
BroadcastExchange (121)
+- * CometColumnarToRow (120)
   +- CometProject (119)
      +- CometFilter (118)
         +- CometScan [native_iceberg_compat] parquet spark_catalog.default.date_dim (117)


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

(118) CometFilter
Input [2]: [d_date_sk#59, d_year#60]
Condition : (d_year#60 IN (2000,2001,2002,2003) AND isnotnull(d_date_sk#59))

(119) CometProject
Input [2]: [d_date_sk#59, d_year#60]
Arguments: [d_date_sk#59], [d_date_sk#59]

(120) CometColumnarToRow [codegen id : 1]
Input [1]: [d_date_sk#59]

(121) BroadcastExchange
Input [1]: [d_date_sk#59]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, true] as bigint)),false), [plan_id=12]

Subquery:5 Hosting operator id = 47 Hosting Expression = ReusedSubquery Subquery scalar-subquery#27, [id=#28]

Subquery:6 Hosting operator id = 64 Hosting Expression = ws_sold_date_sk#43 IN dynamicpruning#6

Subquery:7 Hosting operator id = 73 Hosting Expression = ReusedSubquery Subquery scalar-subquery#27, [id=#28]


