== Physical Plan ==
* ColumnarToRow (39)
+- CometTakeOrderedAndProject (38)
   +- CometHashAggregate (37)
      +- CometExchange (36)
         +- CometHashAggregate (35)
            +- CometProject (34)
               +- CometBroadcastHashJoin (33)
                  :- CometProject (29)
                  :  +- CometBroadcastHashJoin (28)
                  :     :- CometProject (23)
                  :     :  +- CometBroadcastHashJoin (22)
                  :     :     :- 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)
                  :     :     +- CometBroadcastExchange (21)
                  :     :        +- CometUnion (20)
                  :     :           :- CometProject (15)
                  :     :           :  +- CometBroadcastHashJoin (14)
                  :     :           :     :- CometNativeScan: `spark_catalog`.`default`.`web_sales` (12)
                  :     :           :     +- ReusedExchange (13)
                  :     :           +- CometProject (19)
                  :     :              +- CometBroadcastHashJoin (18)
                  :     :                 :- CometNativeScan: `spark_catalog`.`default`.`catalog_sales` (16)
                  :     :                 +- ReusedExchange (17)
                  :     +- CometBroadcastExchange (27)
                  :        +- CometProject (26)
                  :           +- CometFilter (25)
                  :              +- CometNativeScan: `spark_catalog`.`default`.`customer_address` (24)
                  +- CometBroadcastExchange (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 = 2002)) AND (d_moy#8 >= 4)) AND (d_moy#8 <= 7)) 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) 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]

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

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

(15) CometProject
Input [3]: [ws_bill_customer_sk#9, ws_sold_date_sk#10, d_date_sk#11]
Arguments: [customer_sk#12], [ws_bill_customer_sk#9 AS customer_sk#12]

(16) CometNativeScan: `spark_catalog`.`default`.`catalog_sales`
Output [2]: [cs_ship_customer_sk#13, cs_sold_date_sk#14]
Arguments: [cs_ship_customer_sk#13, cs_sold_date_sk#14]

(17) ReusedExchange [Reuses operator id: 7]
Output [1]: [d_date_sk#15]

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

(19) CometProject
Input [3]: [cs_ship_customer_sk#13, cs_sold_date_sk#14, d_date_sk#15]
Arguments: [customer_sk#16], [cs_ship_customer_sk#13 AS customer_sk#16]

(20) CometUnion
Child 0 Input [1]: [customer_sk#12]
Child 1 Input [1]: [customer_sk#16]

(21) CometBroadcastExchange
Input [1]: [customer_sk#12]
Arguments: [customer_sk#12]

(22) CometBroadcastHashJoin
Left output [3]: [c_customer_sk#1, c_current_cdemo_sk#2, c_current_addr_sk#3]
Right output [1]: [customer_sk#12]
Arguments: [c_customer_sk#1], [customer_sk#12], LeftSemi, BuildRight

(23) CometProject
Input [3]: [c_customer_sk#1, c_current_cdemo_sk#2, c_current_addr_sk#3]
Arguments: [c_current_cdemo_sk#2, c_current_addr_sk#3], [c_current_cdemo_sk#2, c_current_addr_sk#3]

(24) CometNativeScan: `spark_catalog`.`default`.`customer_address`
Output [2]: [ca_address_sk#17, ca_county#18]
Arguments: [ca_address_sk#17, ca_county#18]

(25) CometFilter
Input [2]: [ca_address_sk#17, ca_county#18]
Condition : (ca_county#18 IN (Walker County,Richland County,Gaines County,Douglas County,Dona Ana County) AND isnotnull(ca_address_sk#17))

(26) CometProject
Input [2]: [ca_address_sk#17, ca_county#18]
Arguments: [ca_address_sk#17], [ca_address_sk#17]

(27) CometBroadcastExchange
Input [1]: [ca_address_sk#17]
Arguments: [ca_address_sk#17]

(28) CometBroadcastHashJoin
Left output [2]: [c_current_cdemo_sk#2, c_current_addr_sk#3]
Right output [1]: [ca_address_sk#17]
Arguments: [c_current_addr_sk#3], [ca_address_sk#17], Inner, BuildRight

(29) CometProject
Input [3]: [c_current_cdemo_sk#2, c_current_addr_sk#3, ca_address_sk#17]
Arguments: [c_current_cdemo_sk#2], [c_current_cdemo_sk#2]

(30) CometNativeScan: `spark_catalog`.`default`.`customer_demographics`
Output [9]: [cd_demo_sk#19, cd_gender#20, cd_marital_status#21, cd_education_status#22, cd_purchase_estimate#23, cd_credit_rating#24, cd_dep_count#25, cd_dep_employed_count#26, cd_dep_college_count#27]
Arguments: [cd_demo_sk#19, cd_gender#20, cd_marital_status#21, cd_education_status#22, cd_purchase_estimate#23, cd_credit_rating#24, cd_dep_count#25, cd_dep_employed_count#26, cd_dep_college_count#27]

(31) CometFilter
Input [9]: [cd_demo_sk#19, cd_gender#20, cd_marital_status#21, cd_education_status#22, cd_purchase_estimate#23, cd_credit_rating#24, cd_dep_count#25, cd_dep_employed_count#26, cd_dep_college_count#27]
Condition : isnotnull(cd_demo_sk#19)

(32) CometBroadcastExchange
Input [9]: [cd_demo_sk#19, cd_gender#20, cd_marital_status#21, cd_education_status#22, cd_purchase_estimate#23, cd_credit_rating#24, cd_dep_count#25, cd_dep_employed_count#26, cd_dep_college_count#27]
Arguments: [cd_demo_sk#19, cd_gender#20, cd_marital_status#21, cd_education_status#22, cd_purchase_estimate#23, cd_credit_rating#24, cd_dep_count#25, cd_dep_employed_count#26, cd_dep_college_count#27]

(33) CometBroadcastHashJoin
Left output [1]: [c_current_cdemo_sk#2]
Right output [9]: [cd_demo_sk#19, cd_gender#20, cd_marital_status#21, cd_education_status#22, cd_purchase_estimate#23, cd_credit_rating#24, cd_dep_count#25, cd_dep_employed_count#26, cd_dep_college_count#27]
Arguments: [c_current_cdemo_sk#2], [cd_demo_sk#19], Inner, BuildRight

(34) CometProject
Input [10]: [c_current_cdemo_sk#2, cd_demo_sk#19, cd_gender#20, cd_marital_status#21, cd_education_status#22, cd_purchase_estimate#23, cd_credit_rating#24, cd_dep_count#25, cd_dep_employed_count#26, cd_dep_college_count#27]
Arguments: [cd_gender#20, cd_marital_status#21, cd_education_status#22, cd_purchase_estimate#23, cd_credit_rating#24, cd_dep_count#25, cd_dep_employed_count#26, cd_dep_college_count#27], [cd_gender#20, cd_marital_status#21, cd_education_status#22, cd_purchase_estimate#23, cd_credit_rating#24, cd_dep_count#25, cd_dep_employed_count#26, cd_dep_college_count#27]

(35) CometHashAggregate
Input [8]: [cd_gender#20, cd_marital_status#21, cd_education_status#22, cd_purchase_estimate#23, cd_credit_rating#24, cd_dep_count#25, cd_dep_employed_count#26, cd_dep_college_count#27]
Keys [8]: [cd_gender#20, cd_marital_status#21, cd_education_status#22, cd_purchase_estimate#23, cd_credit_rating#24, cd_dep_count#25, cd_dep_employed_count#26, cd_dep_college_count#27]
Functions [1]: [partial_count(1)]

(36) CometExchange
Input [9]: [cd_gender#20, cd_marital_status#21, cd_education_status#22, cd_purchase_estimate#23, cd_credit_rating#24, cd_dep_count#25, cd_dep_employed_count#26, cd_dep_college_count#27, count#28]
Arguments: hashpartitioning(cd_gender#20, cd_marital_status#21, cd_education_status#22, cd_purchase_estimate#23, cd_credit_rating#24, cd_dep_count#25, cd_dep_employed_count#26, cd_dep_college_count#27, 5), ENSURE_REQUIREMENTS, CometNativeShuffle, [plan_id=1]

(37) CometHashAggregate
Input [9]: [cd_gender#20, cd_marital_status#21, cd_education_status#22, cd_purchase_estimate#23, cd_credit_rating#24, cd_dep_count#25, cd_dep_employed_count#26, cd_dep_college_count#27, count#28]
Keys [8]: [cd_gender#20, cd_marital_status#21, cd_education_status#22, cd_purchase_estimate#23, cd_credit_rating#24, cd_dep_count#25, cd_dep_employed_count#26, cd_dep_college_count#27]
Functions [1]: [count(1)]

(38) CometTakeOrderedAndProject
Input [14]: [cd_gender#20, cd_marital_status#21, cd_education_status#22, cnt1#29, cd_purchase_estimate#23, cnt2#30, cd_credit_rating#24, cnt3#31, cd_dep_count#25, cnt4#32, cd_dep_employed_count#26, cnt5#33, cd_dep_college_count#27, cnt6#34]
Arguments: TakeOrderedAndProject(limit=100, orderBy=[cd_gender#20 ASC NULLS FIRST,cd_marital_status#21 ASC NULLS FIRST,cd_education_status#22 ASC NULLS FIRST,cd_purchase_estimate#23 ASC NULLS FIRST,cd_credit_rating#24 ASC NULLS FIRST,cd_dep_count#25 ASC NULLS FIRST,cd_dep_employed_count#26 ASC NULLS FIRST,cd_dep_college_count#27 ASC NULLS FIRST], output=[cd_gender#20,cd_marital_status#21,cd_education_status#22,cnt1#29,cd_purchase_estimate#23,cnt2#30,cd_credit_rating#24,cnt3#31,cd_dep_count#25,cnt4#32,cd_dep_employed_count#26,cnt5#33,cd_dep_college_count#27,cnt6#34]), [cd_gender#20, cd_marital_status#21, cd_education_status#22, cnt1#29, cd_purchase_estimate#23, cnt2#30, cd_credit_rating#24, cnt3#31, cd_dep_count#25, cnt4#32, cd_dep_employed_count#26, cnt5#33, cd_dep_college_count#27, cnt6#34], 100, [cd_gender#20 ASC NULLS FIRST, cd_marital_status#21 ASC NULLS FIRST, cd_education_status#22 ASC NULLS FIRST, cd_purchase_estimate#23 ASC NULLS FIRST, cd_credit_rating#24 ASC NULLS FIRST, cd_dep_count#25 ASC NULLS FIRST, cd_dep_employed_count#26 ASC NULLS FIRST, cd_dep_college_count#27 ASC NULLS FIRST], [cd_gender#20, cd_marital_status#21, cd_education_status#22, cnt1#29, cd_purchase_estimate#23, cnt2#30, cd_credit_rating#24, cnt3#31, cd_dep_count#25, cnt4#32, cd_dep_employed_count#26, cnt5#33, cd_dep_college_count#27, cnt6#34]

(39) ColumnarToRow [codegen id : 1]
Input [14]: [cd_gender#20, cd_marital_status#21, cd_education_status#22, cnt1#29, cd_purchase_estimate#23, cnt2#30, cd_credit_rating#24, cnt3#31, cd_dep_count#25, cnt4#32, cd_dep_employed_count#26, cnt5#33, cd_dep_college_count#27, cnt6#34]

