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


(1) Scan 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) ColumnarToRow [codegen id : 3]
Input [2]: [ss_customer_sk#1, ss_sold_date_sk#2]

(3) Filter [codegen id : 3]
Input [2]: [ss_customer_sk#1, ss_sold_date_sk#2]
Condition : isnotnull(ss_customer_sk#1)

(4) ReusedExchange [Reuses operator id: 54]
Output [2]: [d_date_sk#4, d_date#5]

(5) BroadcastHashJoin [codegen id : 3]
Left keys [1]: [ss_sold_date_sk#2]
Right keys [1]: [d_date_sk#4]
Join type: Inner
Join condition: None

(6) Project [codegen id : 3]
Output [2]: [ss_customer_sk#1, d_date#5]
Input [4]: [ss_customer_sk#1, ss_sold_date_sk#2, d_date_sk#4, d_date#5]

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

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

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

(10) CometColumnarToRow [codegen id : 2]
Input [3]: [c_customer_sk#6, c_first_name#9, c_last_name#10]

(11) BroadcastExchange
Input [3]: [c_customer_sk#6, c_first_name#9, c_last_name#10]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, true] as bigint)),false), [plan_id=1]

(12) BroadcastHashJoin [codegen id : 3]
Left keys [1]: [ss_customer_sk#1]
Right keys [1]: [c_customer_sk#6]
Join type: Inner
Join condition: None

(13) Project [codegen id : 3]
Output [3]: [c_last_name#10, c_first_name#9, d_date#5]
Input [5]: [ss_customer_sk#1, d_date#5, c_customer_sk#6, c_first_name#9, c_last_name#10]

(14) HashAggregate [codegen id : 3]
Input [3]: [c_last_name#10, c_first_name#9, d_date#5]
Keys [3]: [c_last_name#10, c_first_name#9, d_date#5]
Functions: []
Aggregate Attributes: []
Results [3]: [c_last_name#10, c_first_name#9, d_date#5]

(15) CometColumnarExchange
Input [3]: [c_last_name#10, c_first_name#9, d_date#5]
Arguments: hashpartitioning(c_last_name#10, c_first_name#9, d_date#5, 5), ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=2]

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

(17) Scan parquet spark_catalog.default.catalog_sales
Output [2]: [cs_bill_customer_sk#11, cs_sold_date_sk#12]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(cs_sold_date_sk#12), dynamicpruningexpression(cs_sold_date_sk#12 IN dynamicpruning#3)]
PushedFilters: [IsNotNull(cs_bill_customer_sk)]
ReadSchema: struct<cs_bill_customer_sk:int>

(18) ColumnarToRow [codegen id : 6]
Input [2]: [cs_bill_customer_sk#11, cs_sold_date_sk#12]

(19) Filter [codegen id : 6]
Input [2]: [cs_bill_customer_sk#11, cs_sold_date_sk#12]
Condition : isnotnull(cs_bill_customer_sk#11)

(20) ReusedExchange [Reuses operator id: 54]
Output [2]: [d_date_sk#13, d_date#14]

(21) BroadcastHashJoin [codegen id : 6]
Left keys [1]: [cs_sold_date_sk#12]
Right keys [1]: [d_date_sk#13]
Join type: Inner
Join condition: None

(22) Project [codegen id : 6]
Output [2]: [cs_bill_customer_sk#11, d_date#14]
Input [4]: [cs_bill_customer_sk#11, cs_sold_date_sk#12, d_date_sk#13, d_date#14]

(23) ReusedExchange [Reuses operator id: 11]
Output [3]: [c_customer_sk#15, c_first_name#16, c_last_name#17]

(24) BroadcastHashJoin [codegen id : 6]
Left keys [1]: [cs_bill_customer_sk#11]
Right keys [1]: [c_customer_sk#15]
Join type: Inner
Join condition: None

(25) Project [codegen id : 6]
Output [3]: [c_last_name#17, c_first_name#16, d_date#14]
Input [5]: [cs_bill_customer_sk#11, d_date#14, c_customer_sk#15, c_first_name#16, c_last_name#17]

(26) HashAggregate [codegen id : 6]
Input [3]: [c_last_name#17, c_first_name#16, d_date#14]
Keys [3]: [c_last_name#17, c_first_name#16, d_date#14]
Functions: []
Aggregate Attributes: []
Results [3]: [c_last_name#17, c_first_name#16, d_date#14]

(27) CometColumnarExchange
Input [3]: [c_last_name#17, c_first_name#16, d_date#14]
Arguments: hashpartitioning(c_last_name#17, c_first_name#16, d_date#14, 5), ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=3]

(28) CometHashAggregate
Input [3]: [c_last_name#17, c_first_name#16, d_date#14]
Keys [3]: [c_last_name#17, c_first_name#16, d_date#14]
Functions: []

(29) CometBroadcastExchange
Input [3]: [c_last_name#17, c_first_name#16, d_date#14]
Arguments: [c_last_name#17, c_first_name#16, d_date#14]

(30) CometBroadcastHashJoin
Left output [3]: [c_last_name#10, c_first_name#9, d_date#5]
Right output [3]: [c_last_name#17, c_first_name#16, d_date#14]
Arguments: [coalesce(c_last_name#10, ), isnull(c_last_name#10), coalesce(c_first_name#9, ), isnull(c_first_name#9), coalesce(d_date#5, 1970-01-01), isnull(d_date#5)], [coalesce(c_last_name#17, ), isnull(c_last_name#17), coalesce(c_first_name#16, ), isnull(c_first_name#16), coalesce(d_date#14, 1970-01-01), isnull(d_date#14)], LeftSemi, BuildRight

(31) Scan parquet spark_catalog.default.web_sales
Output [2]: [ws_bill_customer_sk#18, ws_sold_date_sk#19]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(ws_sold_date_sk#19), dynamicpruningexpression(ws_sold_date_sk#19 IN dynamicpruning#3)]
PushedFilters: [IsNotNull(ws_bill_customer_sk)]
ReadSchema: struct<ws_bill_customer_sk:int>

(32) ColumnarToRow [codegen id : 9]
Input [2]: [ws_bill_customer_sk#18, ws_sold_date_sk#19]

(33) Filter [codegen id : 9]
Input [2]: [ws_bill_customer_sk#18, ws_sold_date_sk#19]
Condition : isnotnull(ws_bill_customer_sk#18)

(34) ReusedExchange [Reuses operator id: 54]
Output [2]: [d_date_sk#20, d_date#21]

(35) BroadcastHashJoin [codegen id : 9]
Left keys [1]: [ws_sold_date_sk#19]
Right keys [1]: [d_date_sk#20]
Join type: Inner
Join condition: None

(36) Project [codegen id : 9]
Output [2]: [ws_bill_customer_sk#18, d_date#21]
Input [4]: [ws_bill_customer_sk#18, ws_sold_date_sk#19, d_date_sk#20, d_date#21]

(37) ReusedExchange [Reuses operator id: 11]
Output [3]: [c_customer_sk#22, c_first_name#23, c_last_name#24]

(38) BroadcastHashJoin [codegen id : 9]
Left keys [1]: [ws_bill_customer_sk#18]
Right keys [1]: [c_customer_sk#22]
Join type: Inner
Join condition: None

(39) Project [codegen id : 9]
Output [3]: [c_last_name#24, c_first_name#23, d_date#21]
Input [5]: [ws_bill_customer_sk#18, d_date#21, c_customer_sk#22, c_first_name#23, c_last_name#24]

(40) HashAggregate [codegen id : 9]
Input [3]: [c_last_name#24, c_first_name#23, d_date#21]
Keys [3]: [c_last_name#24, c_first_name#23, d_date#21]
Functions: []
Aggregate Attributes: []
Results [3]: [c_last_name#24, c_first_name#23, d_date#21]

(41) CometColumnarExchange
Input [3]: [c_last_name#24, c_first_name#23, d_date#21]
Arguments: hashpartitioning(c_last_name#24, c_first_name#23, d_date#21, 5), ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=4]

(42) CometHashAggregate
Input [3]: [c_last_name#24, c_first_name#23, d_date#21]
Keys [3]: [c_last_name#24, c_first_name#23, d_date#21]
Functions: []

(43) CometBroadcastExchange
Input [3]: [c_last_name#24, c_first_name#23, d_date#21]
Arguments: [c_last_name#24, c_first_name#23, d_date#21]

(44) CometBroadcastHashJoin
Left output [3]: [c_last_name#10, c_first_name#9, d_date#5]
Right output [3]: [c_last_name#24, c_first_name#23, d_date#21]
Arguments: [coalesce(c_last_name#10, ), isnull(c_last_name#10), coalesce(c_first_name#9, ), isnull(c_first_name#9), coalesce(d_date#5, 1970-01-01), isnull(d_date#5)], [coalesce(c_last_name#24, ), isnull(c_last_name#24), coalesce(c_first_name#23, ), isnull(c_first_name#23), coalesce(d_date#21, 1970-01-01), isnull(d_date#21)], LeftSemi, BuildRight

(45) CometProject
Input [3]: [c_last_name#10, c_first_name#9, d_date#5]

(46) CometHashAggregate
Input: []
Keys: []
Functions [1]: [partial_count(1)]

(47) CometExchange
Input [1]: [count#25]
Arguments: SinglePartition, ENSURE_REQUIREMENTS, CometNativeShuffle, [plan_id=5]

(48) CometHashAggregate
Input [1]: [count#25]
Keys: []
Functions [1]: [count(1)]

(49) CometColumnarToRow [codegen id : 10]
Input [1]: [count(1)#26]

===== Subqueries =====

Subquery:1 Hosting operator id = 1 Hosting Expression = ss_sold_date_sk#2 IN dynamicpruning#3
BroadcastExchange (54)
+- * CometColumnarToRow (53)
   +- CometProject (52)
      +- CometFilter (51)
         +- CometNativeScan parquet spark_catalog.default.date_dim (50)


(50) CometNativeScan parquet spark_catalog.default.date_dim
Output [3]: [d_date_sk#4, d_date#5, d_month_seq#27]
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>

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

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

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

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

Subquery:2 Hosting operator id = 17 Hosting Expression = cs_sold_date_sk#12 IN dynamicpruning#3

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


