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


(1) Scan parquet 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 default.store_sales
Output [2]: [ss_sold_date_sk#4, ss_customer_sk#5]
Batched: true
Location [not included in comparison]/{warehouse_dir}/store_sales]
PushedFilters: [IsNotNull(ss_sold_date_sk)]
ReadSchema: struct<ss_sold_date_sk:int,ss_customer_sk:int>

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

(6) Filter [codegen id : 2]
Input [2]: [ss_sold_date_sk#4, ss_customer_sk#5]
Condition : isnotnull(ss_sold_date_sk#4)

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

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

(9) 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))

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

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

(12) BroadcastHashJoin [codegen id : 2]
Left keys [1]: [ss_sold_date_sk#4]
Right keys [1]: [d_date_sk#6]
Join condition: None

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

(14) BroadcastExchange
Input [1]: [ss_customer_sk#5]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, true] as bigint)),false), [id=#10]

(15) BroadcastHashJoin [codegen id : 9]
Left keys [1]: [c_customer_sk#1]
Right keys [1]: [ss_customer_sk#5]
Join condition: None

(16) Scan parquet default.web_sales
Output [2]: [ws_sold_date_sk#11, ws_bill_customer_sk#12]
Batched: true
Location [not included in comparison]/{warehouse_dir}/web_sales]
PushedFilters: [IsNotNull(ws_sold_date_sk)]
ReadSchema: struct<ws_sold_date_sk:int,ws_bill_customer_sk:int>

(17) ColumnarToRow [codegen id : 4]
Input [2]: [ws_sold_date_sk#11, ws_bill_customer_sk#12]

(18) Filter [codegen id : 4]
Input [2]: [ws_sold_date_sk#11, ws_bill_customer_sk#12]
Condition : isnotnull(ws_sold_date_sk#11)

(19) ReusedExchange [Reuses operator id: 11]
Output [1]: [d_date_sk#6]

(20) BroadcastHashJoin [codegen id : 4]
Left keys [1]: [ws_sold_date_sk#11]
Right keys [1]: [d_date_sk#6]
Join condition: None

(21) Project [codegen id : 4]
Output [1]: [ws_bill_customer_sk#12]
Input [3]: [ws_sold_date_sk#11, ws_bill_customer_sk#12, d_date_sk#6]

(22) BroadcastExchange
Input [1]: [ws_bill_customer_sk#12]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, true] as bigint)),false), [id=#13]

(23) BroadcastHashJoin [codegen id : 9]
Left keys [1]: [c_customer_sk#1]
Right keys [1]: [ws_bill_customer_sk#12]
Join condition: None

(24) Scan parquet default.catalog_sales
Output [2]: [cs_sold_date_sk#14, cs_ship_customer_sk#15]
Batched: true
Location [not included in comparison]/{warehouse_dir}/catalog_sales]
PushedFilters: [IsNotNull(cs_sold_date_sk)]
ReadSchema: struct<cs_sold_date_sk:int,cs_ship_customer_sk:int>

(25) ColumnarToRow [codegen id : 6]
Input [2]: [cs_sold_date_sk#14, cs_ship_customer_sk#15]

(26) Filter [codegen id : 6]
Input [2]: [cs_sold_date_sk#14, cs_ship_customer_sk#15]
Condition : isnotnull(cs_sold_date_sk#14)

(27) ReusedExchange [Reuses operator id: 11]
Output [1]: [d_date_sk#6]

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

(29) Project [codegen id : 6]
Output [1]: [cs_ship_customer_sk#15]
Input [3]: [cs_sold_date_sk#14, cs_ship_customer_sk#15, d_date_sk#6]

(30) BroadcastExchange
Input [1]: [cs_ship_customer_sk#15]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, true] as bigint)),false), [id=#16]

(31) BroadcastHashJoin [codegen id : 9]
Left keys [1]: [c_customer_sk#1]
Right keys [1]: [cs_ship_customer_sk#15]
Join condition: None

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

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

(34) ColumnarToRow [codegen id : 7]
Input [2]: [ca_address_sk#17, ca_state#18]

(35) Filter [codegen id : 7]
Input [2]: [ca_address_sk#17, ca_state#18]
Condition : (ca_state#18 IN (KY,GA,NM) AND isnotnull(ca_address_sk#17))

(36) Project [codegen id : 7]
Output [1]: [ca_address_sk#17]
Input [2]: [ca_address_sk#17, ca_state#18]

(37) BroadcastExchange
Input [1]: [ca_address_sk#17]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, true] as bigint)),false), [id=#19]

(38) BroadcastHashJoin [codegen id : 9]
Left keys [1]: [c_current_addr_sk#3]
Right keys [1]: [ca_address_sk#17]
Join condition: None

(39) 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#17]

(40) Scan parquet default.customer_demographics
Output [6]: [cd_demo_sk#20, cd_gender#21, cd_marital_status#22, cd_education_status#23, cd_purchase_estimate#24, cd_credit_rating#25]
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>

(41) ColumnarToRow [codegen id : 8]
Input [6]: [cd_demo_sk#20, cd_gender#21, cd_marital_status#22, cd_education_status#23, cd_purchase_estimate#24, cd_credit_rating#25]

(42) Filter [codegen id : 8]
Input [6]: [cd_demo_sk#20, cd_gender#21, cd_marital_status#22, cd_education_status#23, cd_purchase_estimate#24, cd_credit_rating#25]
Condition : isnotnull(cd_demo_sk#20)

(43) BroadcastExchange
Input [6]: [cd_demo_sk#20, cd_gender#21, cd_marital_status#22, cd_education_status#23, cd_purchase_estimate#24, cd_credit_rating#25]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, false] as bigint)),false), [id=#26]

(44) BroadcastHashJoin [codegen id : 9]
Left keys [1]: [c_current_cdemo_sk#2]
Right keys [1]: [cd_demo_sk#20]
Join condition: None

(45) Project [codegen id : 9]
Output [5]: [cd_gender#21, cd_marital_status#22, cd_education_status#23, cd_purchase_estimate#24, cd_credit_rating#25]
Input [7]: [c_current_cdemo_sk#2, cd_demo_sk#20, cd_gender#21, cd_marital_status#22, cd_education_status#23, cd_purchase_estimate#24, cd_credit_rating#25]

(46) HashAggregate [codegen id : 9]
Input [5]: [cd_gender#21, cd_marital_status#22, cd_education_status#23, cd_purchase_estimate#24, cd_credit_rating#25]
Keys [5]: [cd_gender#21, cd_marital_status#22, cd_education_status#23, cd_purchase_estimate#24, cd_credit_rating#25]
Functions [1]: [partial_count(1)]
Aggregate Attributes [1]: [count#27]
Results [6]: [cd_gender#21, cd_marital_status#22, cd_education_status#23, cd_purchase_estimate#24, cd_credit_rating#25, count#28]

(47) Exchange
Input [6]: [cd_gender#21, cd_marital_status#22, cd_education_status#23, cd_purchase_estimate#24, cd_credit_rating#25, count#28]
Arguments: hashpartitioning(cd_gender#21, cd_marital_status#22, cd_education_status#23, cd_purchase_estimate#24, cd_credit_rating#25, 5), true, [id=#29]

(48) HashAggregate [codegen id : 10]
Input [6]: [cd_gender#21, cd_marital_status#22, cd_education_status#23, cd_purchase_estimate#24, cd_credit_rating#25, count#28]
Keys [5]: [cd_gender#21, cd_marital_status#22, cd_education_status#23, cd_purchase_estimate#24, cd_credit_rating#25]
Functions [1]: [count(1)]
Aggregate Attributes [1]: [count(1)#30]
Results [8]: [cd_gender#21, cd_marital_status#22, cd_education_status#23, count(1)#30 AS cnt1#31, cd_purchase_estimate#24, count(1)#30 AS cnt2#32, cd_credit_rating#25, count(1)#30 AS cnt3#33]

(49) TakeOrderedAndProject
Input [8]: [cd_gender#21, cd_marital_status#22, cd_education_status#23, cnt1#31, cd_purchase_estimate#24, cnt2#32, cd_credit_rating#25, cnt3#33]
Arguments: 100, [cd_gender#21 ASC NULLS FIRST, cd_marital_status#22 ASC NULLS FIRST, cd_education_status#23 ASC NULLS FIRST, cd_purchase_estimate#24 ASC NULLS FIRST, cd_credit_rating#25 ASC NULLS FIRST], [cd_gender#21, cd_marital_status#22, cd_education_status#23, cnt1#31, cd_purchase_estimate#24, cnt2#32, cd_credit_rating#25, cnt3#33]

