== Physical Plan ==
* HashAggregate (51)
+- * CometColumnarToRow (50)
   +- CometColumnarExchange (49)
      +- * HashAggregate (48)
         +- * Project (47)
            +- * BroadcastHashJoin LeftAnti BuildRight (46)
               :- * BroadcastHashJoin LeftAnti BuildRight (32)
               :  :- * CometColumnarToRow (18)
               :  :  +- CometHashAggregate (17)
               :  :     +- CometExchange (16)
               :  :        +- CometHashAggregate (15)
               :  :           +- CometProject (14)
               :  :              +- CometBroadcastHashJoin (13)
               :  :                 :- CometProject (8)
               :  :                 :  +- CometBroadcastHashJoin (7)
               :  :                 :     :- CometFilter (2)
               :  :                 :     :  +- CometScan [native_iceberg_compat] parquet spark_catalog.default.store_sales (1)
               :  :                 :     +- CometBroadcastExchange (6)
               :  :                 :        +- CometProject (5)
               :  :                 :           +- CometFilter (4)
               :  :                 :              +- CometScan [native_iceberg_compat] parquet spark_catalog.default.date_dim (3)
               :  :                 +- CometBroadcastExchange (12)
               :  :                    +- CometProject (11)
               :  :                       +- CometFilter (10)
               :  :                          +- CometScan [native_iceberg_compat] parquet spark_catalog.default.customer (9)
               :  +- BroadcastExchange (31)
               :     +- * CometColumnarToRow (30)
               :        +- CometHashAggregate (29)
               :           +- CometExchange (28)
               :              +- CometHashAggregate (27)
               :                 +- CometProject (26)
               :                    +- CometBroadcastHashJoin (25)
               :                       :- CometProject (23)
               :                       :  +- CometBroadcastHashJoin (22)
               :                       :     :- CometFilter (20)
               :                       :     :  +- CometScan [native_iceberg_compat] parquet spark_catalog.default.catalog_sales (19)
               :                       :     +- ReusedExchange (21)
               :                       +- ReusedExchange (24)
               +- BroadcastExchange (45)
                  +- * CometColumnarToRow (44)
                     +- CometHashAggregate (43)
                        +- CometExchange (42)
                           +- CometHashAggregate (41)
                              +- CometProject (40)
                                 +- CometBroadcastHashJoin (39)
                                    :- CometProject (37)
                                    :  +- CometBroadcastHashJoin (36)
                                    :     :- CometFilter (34)
                                    :     :  +- CometScan [native_iceberg_compat] parquet spark_catalog.default.web_sales (33)
                                    :     +- ReusedExchange (35)
                                    +- ReusedExchange (38)


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

(2) CometFilter
Input [2]: [ss_customer_sk#1, ss_sold_date_sk#2]
Condition : isnotnull(ss_customer_sk#1)

(3) CometScan [native_iceberg_compat] parquet spark_catalog.default.date_dim
Output [3]: [d_date_sk#4, d_date#5, d_month_seq#6]
Batched: true
Location [not included in comparison]/{warehouse_dir}/date_dim]
PushedFilters: [IsNotNull(d_month_seq), GreaterThanOrEqual(d_month_seq,1200), LessThanOrEqual(d_month_seq,1211), IsNotNull(d_date_sk)]
ReadSchema: struct<d_date_sk:int,d_date:date,d_month_seq:int>

(4) CometFilter
Input [3]: [d_date_sk#4, d_date#5, d_month_seq#6]
Condition : (((isnotnull(d_month_seq#6) AND (d_month_seq#6 >= 1200)) AND (d_month_seq#6 <= 1211)) AND isnotnull(d_date_sk#4))

(5) CometProject
Input [3]: [d_date_sk#4, d_date#5, d_month_seq#6]
Arguments: [d_date_sk#4, d_date#5], [d_date_sk#4, d_date#5]

(6) CometBroadcastExchange
Input [2]: [d_date_sk#4, d_date#5]
Arguments: [d_date_sk#4, d_date#5]

(7) CometBroadcastHashJoin
Left output [2]: [ss_customer_sk#1, ss_sold_date_sk#2]
Right output [2]: [d_date_sk#4, d_date#5]
Arguments: [ss_sold_date_sk#2], [d_date_sk#4], Inner, BuildRight

(8) CometProject
Input [4]: [ss_customer_sk#1, ss_sold_date_sk#2, d_date_sk#4, d_date#5]
Arguments: [ss_customer_sk#1, d_date#5], [ss_customer_sk#1, d_date#5]

(9) CometScan [native_iceberg_compat] parquet spark_catalog.default.customer
Output [3]: [c_customer_sk#7, c_first_name#8, c_last_name#9]
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>

(10) CometFilter
Input [3]: [c_customer_sk#7, c_first_name#8, c_last_name#9]
Condition : isnotnull(c_customer_sk#7)

(11) CometProject
Input [3]: [c_customer_sk#7, c_first_name#8, c_last_name#9]
Arguments: [c_customer_sk#7, c_first_name#10, c_last_name#11], [c_customer_sk#7, static_invoke(CharVarcharCodegenUtils.readSidePadding(c_first_name#8, 20)) AS c_first_name#10, static_invoke(CharVarcharCodegenUtils.readSidePadding(c_last_name#9, 30)) AS c_last_name#11]

(12) CometBroadcastExchange
Input [3]: [c_customer_sk#7, c_first_name#10, c_last_name#11]
Arguments: [c_customer_sk#7, c_first_name#10, c_last_name#11]

(13) CometBroadcastHashJoin
Left output [2]: [ss_customer_sk#1, d_date#5]
Right output [3]: [c_customer_sk#7, c_first_name#10, c_last_name#11]
Arguments: [ss_customer_sk#1], [c_customer_sk#7], Inner, BuildRight

(14) CometProject
Input [5]: [ss_customer_sk#1, d_date#5, c_customer_sk#7, c_first_name#10, c_last_name#11]
Arguments: [c_last_name#11, c_first_name#10, d_date#5], [c_last_name#11, c_first_name#10, d_date#5]

(15) CometHashAggregate
Input [3]: [c_last_name#11, c_first_name#10, d_date#5]
Keys [3]: [c_last_name#11, c_first_name#10, d_date#5]
Functions: []

(16) CometExchange
Input [3]: [c_last_name#11, c_first_name#10, d_date#5]
Arguments: hashpartitioning(c_last_name#11, c_first_name#10, d_date#5, 5), ENSURE_REQUIREMENTS, CometNativeShuffle, [plan_id=1]

(17) CometHashAggregate
Input [3]: [c_last_name#11, c_first_name#10, d_date#5]
Keys [3]: [c_last_name#11, c_first_name#10, d_date#5]
Functions: []

(18) CometColumnarToRow [codegen id : 3]
Input [3]: [c_last_name#11, c_first_name#10, d_date#5]

(19) CometScan [native_iceberg_compat] parquet spark_catalog.default.catalog_sales
Output [2]: [cs_bill_customer_sk#12, cs_sold_date_sk#13]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(cs_sold_date_sk#13), dynamicpruningexpression(cs_sold_date_sk#13 IN dynamicpruning#14)]
PushedFilters: [IsNotNull(cs_bill_customer_sk)]
ReadSchema: struct<cs_bill_customer_sk:int>

(20) CometFilter
Input [2]: [cs_bill_customer_sk#12, cs_sold_date_sk#13]
Condition : isnotnull(cs_bill_customer_sk#12)

(21) ReusedExchange [Reuses operator id: 6]
Output [2]: [d_date_sk#15, d_date#16]

(22) CometBroadcastHashJoin
Left output [2]: [cs_bill_customer_sk#12, cs_sold_date_sk#13]
Right output [2]: [d_date_sk#15, d_date#16]
Arguments: [cs_sold_date_sk#13], [d_date_sk#15], Inner, BuildRight

(23) CometProject
Input [4]: [cs_bill_customer_sk#12, cs_sold_date_sk#13, d_date_sk#15, d_date#16]
Arguments: [cs_bill_customer_sk#12, d_date#16], [cs_bill_customer_sk#12, d_date#16]

(24) ReusedExchange [Reuses operator id: 12]
Output [3]: [c_customer_sk#17, c_first_name#18, c_last_name#19]

(25) CometBroadcastHashJoin
Left output [2]: [cs_bill_customer_sk#12, d_date#16]
Right output [3]: [c_customer_sk#17, c_first_name#18, c_last_name#19]
Arguments: [cs_bill_customer_sk#12], [c_customer_sk#17], Inner, BuildRight

(26) CometProject
Input [5]: [cs_bill_customer_sk#12, d_date#16, c_customer_sk#17, c_first_name#18, c_last_name#19]
Arguments: [c_last_name#19, c_first_name#18, d_date#16], [c_last_name#19, c_first_name#18, d_date#16]

(27) CometHashAggregate
Input [3]: [c_last_name#19, c_first_name#18, d_date#16]
Keys [3]: [c_last_name#19, c_first_name#18, d_date#16]
Functions: []

(28) CometExchange
Input [3]: [c_last_name#19, c_first_name#18, d_date#16]
Arguments: hashpartitioning(c_last_name#19, c_first_name#18, d_date#16, 5), ENSURE_REQUIREMENTS, CometNativeShuffle, [plan_id=2]

(29) CometHashAggregate
Input [3]: [c_last_name#19, c_first_name#18, d_date#16]
Keys [3]: [c_last_name#19, c_first_name#18, d_date#16]
Functions: []

(30) CometColumnarToRow [codegen id : 1]
Input [3]: [c_last_name#19, c_first_name#18, d_date#16]

(31) BroadcastExchange
Input [3]: [c_last_name#19, c_first_name#18, d_date#16]
Arguments: HashedRelationBroadcastMode(List(coalesce(input[0, string, true], ), isnull(input[0, string, true]), coalesce(input[1, string, true], ), isnull(input[1, string, true]), coalesce(input[2, date, true], 1970-01-01), isnull(input[2, date, true])),false), [plan_id=3]

(32) BroadcastHashJoin [codegen id : 3]
Left keys [6]: [coalesce(c_last_name#11, ), isnull(c_last_name#11), coalesce(c_first_name#10, ), isnull(c_first_name#10), coalesce(d_date#5, 1970-01-01), isnull(d_date#5)]
Right keys [6]: [coalesce(c_last_name#19, ), isnull(c_last_name#19), coalesce(c_first_name#18, ), isnull(c_first_name#18), coalesce(d_date#16, 1970-01-01), isnull(d_date#16)]
Join type: LeftAnti
Join condition: None

(33) CometScan [native_iceberg_compat] parquet spark_catalog.default.web_sales
Output [2]: [ws_bill_customer_sk#20, ws_sold_date_sk#21]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(ws_sold_date_sk#21), dynamicpruningexpression(ws_sold_date_sk#21 IN dynamicpruning#22)]
PushedFilters: [IsNotNull(ws_bill_customer_sk)]
ReadSchema: struct<ws_bill_customer_sk:int>

(34) CometFilter
Input [2]: [ws_bill_customer_sk#20, ws_sold_date_sk#21]
Condition : isnotnull(ws_bill_customer_sk#20)

(35) ReusedExchange [Reuses operator id: 6]
Output [2]: [d_date_sk#23, d_date#24]

(36) CometBroadcastHashJoin
Left output [2]: [ws_bill_customer_sk#20, ws_sold_date_sk#21]
Right output [2]: [d_date_sk#23, d_date#24]
Arguments: [ws_sold_date_sk#21], [d_date_sk#23], Inner, BuildRight

(37) CometProject
Input [4]: [ws_bill_customer_sk#20, ws_sold_date_sk#21, d_date_sk#23, d_date#24]
Arguments: [ws_bill_customer_sk#20, d_date#24], [ws_bill_customer_sk#20, d_date#24]

(38) ReusedExchange [Reuses operator id: 12]
Output [3]: [c_customer_sk#25, c_first_name#26, c_last_name#27]

(39) CometBroadcastHashJoin
Left output [2]: [ws_bill_customer_sk#20, d_date#24]
Right output [3]: [c_customer_sk#25, c_first_name#26, c_last_name#27]
Arguments: [ws_bill_customer_sk#20], [c_customer_sk#25], Inner, BuildRight

(40) CometProject
Input [5]: [ws_bill_customer_sk#20, d_date#24, c_customer_sk#25, c_first_name#26, c_last_name#27]
Arguments: [c_last_name#27, c_first_name#26, d_date#24], [c_last_name#27, c_first_name#26, d_date#24]

(41) CometHashAggregate
Input [3]: [c_last_name#27, c_first_name#26, d_date#24]
Keys [3]: [c_last_name#27, c_first_name#26, d_date#24]
Functions: []

(42) CometExchange
Input [3]: [c_last_name#27, c_first_name#26, d_date#24]
Arguments: hashpartitioning(c_last_name#27, c_first_name#26, d_date#24, 5), ENSURE_REQUIREMENTS, CometNativeShuffle, [plan_id=4]

(43) CometHashAggregate
Input [3]: [c_last_name#27, c_first_name#26, d_date#24]
Keys [3]: [c_last_name#27, c_first_name#26, d_date#24]
Functions: []

(44) CometColumnarToRow [codegen id : 2]
Input [3]: [c_last_name#27, c_first_name#26, d_date#24]

(45) BroadcastExchange
Input [3]: [c_last_name#27, c_first_name#26, d_date#24]
Arguments: HashedRelationBroadcastMode(List(coalesce(input[0, string, true], ), isnull(input[0, string, true]), coalesce(input[1, string, true], ), isnull(input[1, string, true]), coalesce(input[2, date, true], 1970-01-01), isnull(input[2, date, true])),false), [plan_id=5]

(46) BroadcastHashJoin [codegen id : 3]
Left keys [6]: [coalesce(c_last_name#11, ), isnull(c_last_name#11), coalesce(c_first_name#10, ), isnull(c_first_name#10), coalesce(d_date#5, 1970-01-01), isnull(d_date#5)]
Right keys [6]: [coalesce(c_last_name#27, ), isnull(c_last_name#27), coalesce(c_first_name#26, ), isnull(c_first_name#26), coalesce(d_date#24, 1970-01-01), isnull(d_date#24)]
Join type: LeftAnti
Join condition: None

(47) Project [codegen id : 3]
Output: []
Input [3]: [c_last_name#11, c_first_name#10, d_date#5]

(48) HashAggregate [codegen id : 3]
Input: []
Keys: []
Functions [1]: [partial_count(1)]
Aggregate Attributes [1]: [count#28]
Results [1]: [count#29]

(49) CometColumnarExchange
Input [1]: [count#29]
Arguments: SinglePartition, ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=6]

(50) CometColumnarToRow [codegen id : 4]
Input [1]: [count#29]

(51) HashAggregate [codegen id : 4]
Input [1]: [count#29]
Keys: []
Functions [1]: [count(1)]
Aggregate Attributes [1]: [count(1)#30]
Results [1]: [count(1)#30 AS count(1)#31]

===== Subqueries =====

Subquery:1 Hosting operator id = 1 Hosting Expression = ss_sold_date_sk#2 IN dynamicpruning#3
BroadcastExchange (56)
+- * CometColumnarToRow (55)
   +- CometProject (54)
      +- CometFilter (53)
         +- CometScan [native_iceberg_compat] parquet spark_catalog.default.date_dim (52)


(52) CometScan [native_iceberg_compat] parquet spark_catalog.default.date_dim
Output [3]: [d_date_sk#4, d_date#5, d_month_seq#6]
Batched: true
Location [not included in comparison]/{warehouse_dir}/date_dim]
PushedFilters: [IsNotNull(d_month_seq), GreaterThanOrEqual(d_month_seq,1200), LessThanOrEqual(d_month_seq,1211), IsNotNull(d_date_sk)]
ReadSchema: struct<d_date_sk:int,d_date:date,d_month_seq:int>

(53) CometFilter
Input [3]: [d_date_sk#4, d_date#5, d_month_seq#6]
Condition : (((isnotnull(d_month_seq#6) AND (d_month_seq#6 >= 1200)) AND (d_month_seq#6 <= 1211)) AND isnotnull(d_date_sk#4))

(54) CometProject
Input [3]: [d_date_sk#4, d_date#5, d_month_seq#6]
Arguments: [d_date_sk#4, d_date#5], [d_date_sk#4, d_date#5]

(55) CometColumnarToRow [codegen id : 1]
Input [2]: [d_date_sk#4, d_date#5]

(56) BroadcastExchange
Input [2]: [d_date_sk#4, d_date#5]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, true] as bigint)),false), [plan_id=7]

Subquery:2 Hosting operator id = 19 Hosting Expression = cs_sold_date_sk#13 IN dynamicpruning#3

Subquery:3 Hosting operator id = 33 Hosting Expression = ws_sold_date_sk#21 IN dynamicpruning#3


