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


(1) Scan 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) ColumnarToRow [codegen id : 9]
Input [3]: [c_customer_sk#1, c_current_cdemo_sk#2, c_current_addr_sk#3]

(3) Filter [codegen id : 9]
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))

(4) Scan 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>

(5) ColumnarToRow [codegen id : 2]
Input [2]: [ss_customer_sk#4, ss_sold_date_sk#5]

(6) Scan 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>

(7) ColumnarToRow [codegen id : 1]
Input [3]: [d_date_sk#6, d_year#7, d_moy#8]

(8) Filter [codegen id : 1]
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))

(9) Project [codegen id : 1]
Output [1]: [d_date_sk#6]
Input [3]: [d_date_sk#6, d_year#7, d_moy#8]

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

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

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

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

(14) BroadcastHashJoin [codegen id : 9]
Left keys [1]: [c_customer_sk#1]
Right keys [1]: [ss_customer_sk#4]
Join type: LeftSemi
Join condition: None

(15) Scan 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>

(16) ColumnarToRow [codegen id : 4]
Input [2]: [ws_bill_customer_sk#9, ws_sold_date_sk#10]

(17) ReusedExchange [Reuses operator id: 10]
Output [1]: [d_date_sk#11]

(18) BroadcastHashJoin [codegen id : 4]
Left keys [1]: [ws_sold_date_sk#10]
Right keys [1]: [d_date_sk#11]
Join type: Inner
Join condition: None

(19) Project [codegen id : 4]
Output [1]: [ws_bill_customer_sk#9]
Input [3]: [ws_bill_customer_sk#9, ws_sold_date_sk#10, d_date_sk#11]

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

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

(22) Scan 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>

(23) ColumnarToRow [codegen id : 6]
Input [2]: [cs_ship_customer_sk#12, cs_sold_date_sk#13]

(24) ReusedExchange [Reuses operator id: 10]
Output [1]: [d_date_sk#14]

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

(26) Project [codegen id : 6]
Output [1]: [cs_ship_customer_sk#12]
Input [3]: [cs_ship_customer_sk#12, cs_sold_date_sk#13, d_date_sk#14]

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

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

(29) Project [codegen id : 9]
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]

(30) Scan 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>

(31) ColumnarToRow [codegen id : 7]
Input [2]: [ca_address_sk#15, ca_state#16]

(32) Filter [codegen id : 7]
Input [2]: [ca_address_sk#15, ca_state#16]
Condition : (ca_state#16 IN (KY,GA,NM) AND isnotnull(ca_address_sk#15))

(33) Project [codegen id : 7]
Output [1]: [ca_address_sk#15]
Input [2]: [ca_address_sk#15, ca_state#16]

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

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

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

(37) Scan 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>

(38) ColumnarToRow [codegen id : 8]
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]

(39) Filter [codegen id : 8]
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)

(40) 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=6]

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

(42) Project [codegen id : 9]
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]

(43) HashAggregate [codegen id : 9]
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]

(44) 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=7]

(45) HashAggregate [codegen id : 10]
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]

(46) 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]

