== Physical Plan ==
TakeOrderedAndProject (44)
+- * HashAggregate (43)
   +- Exchange (42)
      +- * HashAggregate (41)
         +- * Project (40)
            +- * BroadcastHashJoin Inner BuildRight (39)
               :- * Project (34)
               :  +- * BroadcastHashJoin Inner BuildRight (33)
               :     :- * Project (27)
               :     :  +- * BroadcastHashJoin LeftAnti BuildRight (26)
               :     :     :- * BroadcastHashJoin LeftAnti BuildRight (19)
               :     :     :  :- * ColumnarToRow (12)
               :     :     :  :  +- CometBroadcastHashJoin (11)
               :     :     :  :     :- CometFilter (2)
               :     :     :  :     :  +- CometScan parquet spark_catalog.default.customer (1)
               :     :     :  :     +- CometBroadcastExchange (10)
               :     :     :  :        +- CometProject (9)
               :     :     :  :           +- CometBroadcastHashJoin (8)
               :     :     :  :              :- CometScan parquet spark_catalog.default.store_sales (3)
               :     :     :  :              +- CometBroadcastExchange (7)
               :     :     :  :                 +- CometProject (6)
               :     :     :  :                    +- CometFilter (5)
               :     :     :  :                       +- CometScan parquet spark_catalog.default.date_dim (4)
               :     :     :  +- BroadcastExchange (18)
               :     :     :     +- * ColumnarToRow (17)
               :     :     :        +- CometProject (16)
               :     :     :           +- CometBroadcastHashJoin (15)
               :     :     :              :- CometScan parquet spark_catalog.default.web_sales (13)
               :     :     :              +- ReusedExchange (14)
               :     :     +- BroadcastExchange (25)
               :     :        +- * ColumnarToRow (24)
               :     :           +- CometProject (23)
               :     :              +- CometBroadcastHashJoin (22)
               :     :                 :- CometScan parquet spark_catalog.default.catalog_sales (20)
               :     :                 +- ReusedExchange (21)
               :     +- BroadcastExchange (32)
               :        +- * ColumnarToRow (31)
               :           +- CometProject (30)
               :              +- CometFilter (29)
               :                 +- CometScan parquet spark_catalog.default.customer_address (28)
               +- BroadcastExchange (38)
                  +- * ColumnarToRow (37)
                     +- CometFilter (36)
                        +- CometScan parquet spark_catalog.default.customer_demographics (35)


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

(2) CometFilter
Input [3]: [c_customer_sk#1, c_current_cdemo_sk#2, c_current_addr_sk#3]
Condition : (isnotnull(c_current_addr_sk#3) AND isnotnull(c_current_cdemo_sk#2))

(3) CometScan parquet spark_catalog.default.store_sales
Output [2]: [ss_customer_sk#4, ss_sold_date_sk#5]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(ss_sold_date_sk#5)]
ReadSchema: struct<ss_customer_sk:int>

(4) CometScan parquet spark_catalog.default.date_dim
Output [3]: [d_date_sk#6, d_year#7, d_moy#8]
Batched: true
Location [not included in comparison]/{warehouse_dir}/date_dim]
PushedFilters: [IsNotNull(d_year), IsNotNull(d_moy), EqualTo(d_year,2001), GreaterThanOrEqual(d_moy,4), LessThanOrEqual(d_moy,6), IsNotNull(d_date_sk)]
ReadSchema: struct<d_date_sk:int,d_year:int,d_moy:int>

(5) CometFilter
Input [3]: [d_date_sk#6, d_year#7, d_moy#8]
Condition : (((((isnotnull(d_year#7) AND isnotnull(d_moy#8)) AND (d_year#7 = 2001)) AND (d_moy#8 >= 4)) AND (d_moy#8 <= 6)) AND isnotnull(d_date_sk#6))

(6) CometProject
Input [3]: [d_date_sk#6, d_year#7, d_moy#8]
Arguments: [d_date_sk#6], [d_date_sk#6]

(7) CometBroadcastExchange
Input [1]: [d_date_sk#6]
Arguments: [d_date_sk#6]

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

(9) CometProject
Input [3]: [ss_customer_sk#4, ss_sold_date_sk#5, d_date_sk#6]
Arguments: [ss_customer_sk#4], [ss_customer_sk#4]

(10) CometBroadcastExchange
Input [1]: [ss_customer_sk#4]
Arguments: [ss_customer_sk#4]

(11) CometBroadcastHashJoin
Left output [3]: [c_customer_sk#1, c_current_cdemo_sk#2, c_current_addr_sk#3]
Right output [1]: [ss_customer_sk#4]
Arguments: [c_customer_sk#1], [ss_customer_sk#4], LeftSemi, BuildRight

(12) ColumnarToRow [codegen id : 5]
Input [3]: [c_customer_sk#1, c_current_cdemo_sk#2, c_current_addr_sk#3]

(13) CometScan parquet spark_catalog.default.web_sales
Output [2]: [ws_bill_customer_sk#9, ws_sold_date_sk#10]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(ws_sold_date_sk#10)]
ReadSchema: struct<ws_bill_customer_sk:int>

(14) ReusedExchange [Reuses operator id: 7]
Output [1]: [d_date_sk#11]

(15) CometBroadcastHashJoin
Left output [2]: [ws_bill_customer_sk#9, ws_sold_date_sk#10]
Right output [1]: [d_date_sk#11]
Arguments: [ws_sold_date_sk#10], [d_date_sk#11], Inner, BuildRight

(16) CometProject
Input [3]: [ws_bill_customer_sk#9, ws_sold_date_sk#10, d_date_sk#11]
Arguments: [ws_bill_customer_sk#9], [ws_bill_customer_sk#9]

(17) ColumnarToRow [codegen id : 1]
Input [1]: [ws_bill_customer_sk#9]

(18) BroadcastExchange
Input [1]: [ws_bill_customer_sk#9]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, true] as bigint)),false), [plan_id=1]

(19) BroadcastHashJoin [codegen id : 5]
Left keys [1]: [c_customer_sk#1]
Right keys [1]: [ws_bill_customer_sk#9]
Join type: LeftAnti
Join condition: None

(20) CometScan parquet spark_catalog.default.catalog_sales
Output [2]: [cs_ship_customer_sk#12, cs_sold_date_sk#13]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(cs_sold_date_sk#13)]
ReadSchema: struct<cs_ship_customer_sk:int>

(21) ReusedExchange [Reuses operator id: 7]
Output [1]: [d_date_sk#14]

(22) CometBroadcastHashJoin
Left output [2]: [cs_ship_customer_sk#12, cs_sold_date_sk#13]
Right output [1]: [d_date_sk#14]
Arguments: [cs_sold_date_sk#13], [d_date_sk#14], Inner, BuildRight

(23) CometProject
Input [3]: [cs_ship_customer_sk#12, cs_sold_date_sk#13, d_date_sk#14]
Arguments: [cs_ship_customer_sk#12], [cs_ship_customer_sk#12]

(24) ColumnarToRow [codegen id : 2]
Input [1]: [cs_ship_customer_sk#12]

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

(26) BroadcastHashJoin [codegen id : 5]
Left keys [1]: [c_customer_sk#1]
Right keys [1]: [cs_ship_customer_sk#12]
Join type: LeftAnti
Join condition: None

(27) Project [codegen id : 5]
Output [2]: [c_current_cdemo_sk#2, c_current_addr_sk#3]
Input [3]: [c_customer_sk#1, c_current_cdemo_sk#2, c_current_addr_sk#3]

(28) CometScan parquet spark_catalog.default.customer_address
Output [2]: [ca_address_sk#15, ca_state#16]
Batched: true
Location [not included in comparison]/{warehouse_dir}/customer_address]
PushedFilters: [In(ca_state, [GA,KY,NM]), IsNotNull(ca_address_sk)]
ReadSchema: struct<ca_address_sk:int,ca_state:string>

(29) CometFilter
Input [2]: [ca_address_sk#15, ca_state#16]
Condition : (ca_state#16 IN (KY,GA,NM) AND isnotnull(ca_address_sk#15))

(30) CometProject
Input [2]: [ca_address_sk#15, ca_state#16]
Arguments: [ca_address_sk#15], [ca_address_sk#15]

(31) ColumnarToRow [codegen id : 3]
Input [1]: [ca_address_sk#15]

(32) BroadcastExchange
Input [1]: [ca_address_sk#15]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, true] as bigint)),false), [plan_id=3]

(33) BroadcastHashJoin [codegen id : 5]
Left keys [1]: [c_current_addr_sk#3]
Right keys [1]: [ca_address_sk#15]
Join type: Inner
Join condition: None

(34) Project [codegen id : 5]
Output [1]: [c_current_cdemo_sk#2]
Input [3]: [c_current_cdemo_sk#2, c_current_addr_sk#3, ca_address_sk#15]

(35) CometScan parquet spark_catalog.default.customer_demographics
Output [6]: [cd_demo_sk#17, cd_gender#18, cd_marital_status#19, cd_education_status#20, cd_purchase_estimate#21, cd_credit_rating#22]
Batched: true
Location [not included in comparison]/{warehouse_dir}/customer_demographics]
PushedFilters: [IsNotNull(cd_demo_sk)]
ReadSchema: struct<cd_demo_sk:int,cd_gender:string,cd_marital_status:string,cd_education_status:string,cd_purchase_estimate:int,cd_credit_rating:string>

(36) CometFilter
Input [6]: [cd_demo_sk#17, cd_gender#18, cd_marital_status#19, cd_education_status#20, cd_purchase_estimate#21, cd_credit_rating#22]
Condition : isnotnull(cd_demo_sk#17)

(37) ColumnarToRow [codegen id : 4]
Input [6]: [cd_demo_sk#17, cd_gender#18, cd_marital_status#19, cd_education_status#20, cd_purchase_estimate#21, cd_credit_rating#22]

(38) BroadcastExchange
Input [6]: [cd_demo_sk#17, cd_gender#18, cd_marital_status#19, cd_education_status#20, cd_purchase_estimate#21, cd_credit_rating#22]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, false] as bigint)),false), [plan_id=4]

(39) BroadcastHashJoin [codegen id : 5]
Left keys [1]: [c_current_cdemo_sk#2]
Right keys [1]: [cd_demo_sk#17]
Join type: Inner
Join condition: None

(40) Project [codegen id : 5]
Output [5]: [cd_gender#18, cd_marital_status#19, cd_education_status#20, cd_purchase_estimate#21, cd_credit_rating#22]
Input [7]: [c_current_cdemo_sk#2, cd_demo_sk#17, cd_gender#18, cd_marital_status#19, cd_education_status#20, cd_purchase_estimate#21, cd_credit_rating#22]

(41) HashAggregate [codegen id : 5]
Input [5]: [cd_gender#18, cd_marital_status#19, cd_education_status#20, cd_purchase_estimate#21, cd_credit_rating#22]
Keys [5]: [cd_gender#18, cd_marital_status#19, cd_education_status#20, cd_purchase_estimate#21, cd_credit_rating#22]
Functions [1]: [partial_count(1)]
Aggregate Attributes [1]: [count#23]
Results [6]: [cd_gender#18, cd_marital_status#19, cd_education_status#20, cd_purchase_estimate#21, cd_credit_rating#22, count#24]

(42) Exchange
Input [6]: [cd_gender#18, cd_marital_status#19, cd_education_status#20, cd_purchase_estimate#21, cd_credit_rating#22, count#24]
Arguments: hashpartitioning(cd_gender#18, cd_marital_status#19, cd_education_status#20, cd_purchase_estimate#21, cd_credit_rating#22, 5), ENSURE_REQUIREMENTS, [plan_id=5]

(43) HashAggregate [codegen id : 6]
Input [6]: [cd_gender#18, cd_marital_status#19, cd_education_status#20, cd_purchase_estimate#21, cd_credit_rating#22, count#24]
Keys [5]: [cd_gender#18, cd_marital_status#19, cd_education_status#20, cd_purchase_estimate#21, cd_credit_rating#22]
Functions [1]: [count(1)]
Aggregate Attributes [1]: [count(1)#25]
Results [8]: [cd_gender#18, cd_marital_status#19, cd_education_status#20, count(1)#25 AS cnt1#26, cd_purchase_estimate#21, count(1)#25 AS cnt2#27, cd_credit_rating#22, count(1)#25 AS cnt3#28]

(44) TakeOrderedAndProject
Input [8]: [cd_gender#18, cd_marital_status#19, cd_education_status#20, cnt1#26, cd_purchase_estimate#21, cnt2#27, cd_credit_rating#22, cnt3#28]
Arguments: 100, [cd_gender#18 ASC NULLS FIRST, cd_marital_status#19 ASC NULLS FIRST, cd_education_status#20 ASC NULLS FIRST, cd_purchase_estimate#21 ASC NULLS FIRST, cd_credit_rating#22 ASC NULLS FIRST], [cd_gender#18, cd_marital_status#19, cd_education_status#20, cnt1#26, cd_purchase_estimate#21, cnt2#27, cd_credit_rating#22, cnt3#28]

