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


(1) CometNativeScan: `spark_catalog`.`default`.`customer`
Output [3]: [c_customer_sk#1, c_current_cdemo_sk#2, c_current_addr_sk#3]
Arguments: [c_customer_sk#1, c_current_cdemo_sk#2, c_current_addr_sk#3]

(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) CometNativeScan: `spark_catalog`.`default`.`store_sales`
Output [2]: [ss_customer_sk#4, ss_sold_date_sk#5]
Arguments: [ss_customer_sk#4, ss_sold_date_sk#5]

(4) CometNativeScan: `spark_catalog`.`default`.`date_dim`
Output [3]: [d_date_sk#6, d_year#7, d_moy#8]
Arguments: [d_date_sk#6, d_year#7, d_moy#8]

(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) CometNativeScan: `spark_catalog`.`default`.`web_sales`
Output [2]: [ws_bill_customer_sk#9, ws_sold_date_sk#10]
Arguments: [ws_bill_customer_sk#9, ws_sold_date_sk#10]

(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) ReusedExchange [Reuses operator id: 18]
Output [1]: [cs_ship_customer_sk#12]

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

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

(23) CometNativeScan: `spark_catalog`.`default`.`customer_address`
Output [2]: [ca_address_sk#13, ca_state#14]
Arguments: [ca_address_sk#13, ca_state#14]

(24) CometFilter
Input [2]: [ca_address_sk#13, ca_state#14]
Condition : (ca_state#14 IN (KY,GA,NM) AND isnotnull(ca_address_sk#13))

(25) CometProject
Input [2]: [ca_address_sk#13, ca_state#14]
Arguments: [ca_address_sk#13], [ca_address_sk#13]

(26) ColumnarToRow [codegen id : 3]
Input [1]: [ca_address_sk#13]

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

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

(29) 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#13]

(30) CometNativeScan: `spark_catalog`.`default`.`customer_demographics`
Output [6]: [cd_demo_sk#15, cd_gender#16, cd_marital_status#17, cd_education_status#18, cd_purchase_estimate#19, cd_credit_rating#20]
Arguments: [cd_demo_sk#15, cd_gender#16, cd_marital_status#17, cd_education_status#18, cd_purchase_estimate#19, cd_credit_rating#20]

(31) CometFilter
Input [6]: [cd_demo_sk#15, cd_gender#16, cd_marital_status#17, cd_education_status#18, cd_purchase_estimate#19, cd_credit_rating#20]
Condition : isnotnull(cd_demo_sk#15)

(32) ColumnarToRow [codegen id : 4]
Input [6]: [cd_demo_sk#15, cd_gender#16, cd_marital_status#17, cd_education_status#18, cd_purchase_estimate#19, cd_credit_rating#20]

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

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

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

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

(37) Exchange
Input [6]: [cd_gender#16, cd_marital_status#17, cd_education_status#18, cd_purchase_estimate#19, cd_credit_rating#20, count#22]
Arguments: hashpartitioning(cd_gender#16, cd_marital_status#17, cd_education_status#18, cd_purchase_estimate#19, cd_credit_rating#20, 5), ENSURE_REQUIREMENTS, [plan_id=4]

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

(39) TakeOrderedAndProject
Input [8]: [cd_gender#16, cd_marital_status#17, cd_education_status#18, cnt1#24, cd_purchase_estimate#19, cnt2#25, cd_credit_rating#20, cnt3#26]
Arguments: 100, [cd_gender#16 ASC NULLS FIRST, cd_marital_status#17 ASC NULLS FIRST, cd_education_status#18 ASC NULLS FIRST, cd_purchase_estimate#19 ASC NULLS FIRST, cd_credit_rating#20 ASC NULLS FIRST], [cd_gender#16, cd_marital_status#17, cd_education_status#18, cnt1#24, cd_purchase_estimate#19, cnt2#25, cd_credit_rating#20, cnt3#26]

