== Physical Plan ==
* ColumnarToRow (68)
+- CometTakeOrderedAndProject (67)
   +- CometProject (66)
      +- CometBroadcastHashJoin (65)
         :- CometProject (50)
         :  +- CometBroadcastHashJoin (49)
         :     :- CometBroadcastHashJoin (33)
         :     :  :- CometFilter (16)
         :     :  :  +- CometHashAggregate (15)
         :     :  :     +- CometColumnarExchange (14)
         :     :  :        +- CometHashAggregate (13)
         :     :  :           +- CometProject (12)
         :     :  :              +- CometBroadcastHashJoin (11)
         :     :  :                 :- CometProject (7)
         :     :  :                 :  +- CometBroadcastHashJoin (6)
         :     :  :                 :     :- CometFilter (2)
         :     :  :                 :     :  +- CometScan parquet spark_catalog.default.customer (1)
         :     :  :                 :     +- CometBroadcastExchange (5)
         :     :  :                 :        +- CometFilter (4)
         :     :  :                 :           +- CometScan parquet spark_catalog.default.store_sales (3)
         :     :  :                 +- CometBroadcastExchange (10)
         :     :  :                    +- CometFilter (9)
         :     :  :                       +- CometScan parquet spark_catalog.default.date_dim (8)
         :     :  +- CometBroadcastExchange (32)
         :     :     +- CometHashAggregate (31)
         :     :        +- CometColumnarExchange (30)
         :     :           +- CometHashAggregate (29)
         :     :              +- CometProject (28)
         :     :                 +- CometBroadcastHashJoin (27)
         :     :                    :- CometProject (23)
         :     :                    :  +- CometBroadcastHashJoin (22)
         :     :                    :     :- CometFilter (18)
         :     :                    :     :  +- CometScan parquet spark_catalog.default.customer (17)
         :     :                    :     +- CometBroadcastExchange (21)
         :     :                    :        +- CometFilter (20)
         :     :                    :           +- CometScan parquet spark_catalog.default.store_sales (19)
         :     :                    +- CometBroadcastExchange (26)
         :     :                       +- CometFilter (25)
         :     :                          +- CometScan parquet spark_catalog.default.date_dim (24)
         :     +- CometBroadcastExchange (48)
         :        +- CometFilter (47)
         :           +- CometHashAggregate (46)
         :              +- CometColumnarExchange (45)
         :                 +- CometHashAggregate (44)
         :                    +- CometProject (43)
         :                       +- CometBroadcastHashJoin (42)
         :                          :- CometProject (40)
         :                          :  +- CometBroadcastHashJoin (39)
         :                          :     :- CometFilter (35)
         :                          :     :  +- CometScan parquet spark_catalog.default.customer (34)
         :                          :     +- CometBroadcastExchange (38)
         :                          :        +- CometFilter (37)
         :                          :           +- CometScan parquet spark_catalog.default.web_sales (36)
         :                          +- ReusedExchange (41)
         +- CometBroadcastExchange (64)
            +- CometHashAggregate (63)
               +- CometColumnarExchange (62)
                  +- CometHashAggregate (61)
                     +- CometProject (60)
                        +- CometBroadcastHashJoin (59)
                           :- CometProject (57)
                           :  +- CometBroadcastHashJoin (56)
                           :     :- CometFilter (52)
                           :     :  +- CometScan parquet spark_catalog.default.customer (51)
                           :     +- CometBroadcastExchange (55)
                           :        +- CometFilter (54)
                           :           +- CometScan parquet spark_catalog.default.web_sales (53)
                           +- ReusedExchange (58)


(1) Scan parquet spark_catalog.default.customer
Output [8]: [c_customer_sk#1, c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8]
Batched: true
Location [not included in comparison]/{warehouse_dir}/customer]
PushedFilters: [IsNotNull(c_customer_sk), IsNotNull(c_customer_id)]
ReadSchema: struct<c_customer_sk:int,c_customer_id:string,c_first_name:string,c_last_name:string,c_preferred_cust_flag:string,c_birth_country:string,c_login:string,c_email_address:string>

(2) CometFilter
Input [8]: [c_customer_sk#1, c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8]
Condition : (isnotnull(c_customer_sk#1) AND isnotnull(c_customer_id#2))

(3) Scan parquet spark_catalog.default.store_sales
Output [4]: [ss_customer_sk#9, ss_ext_discount_amt#10, ss_ext_list_price#11, ss_sold_date_sk#12]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(ss_sold_date_sk#12), dynamicpruningexpression(ss_sold_date_sk#12 IN dynamicpruning#13)]
PushedFilters: [IsNotNull(ss_customer_sk)]
ReadSchema: struct<ss_customer_sk:int,ss_ext_discount_amt:decimal(7,2),ss_ext_list_price:decimal(7,2)>

(4) CometFilter
Input [4]: [ss_customer_sk#9, ss_ext_discount_amt#10, ss_ext_list_price#11, ss_sold_date_sk#12]
Condition : isnotnull(ss_customer_sk#9)

(5) CometBroadcastExchange
Input [4]: [ss_customer_sk#9, ss_ext_discount_amt#10, ss_ext_list_price#11, ss_sold_date_sk#12]
Arguments: [ss_customer_sk#9, ss_ext_discount_amt#10, ss_ext_list_price#11, ss_sold_date_sk#12]

(6) CometBroadcastHashJoin
Left output [8]: [c_customer_sk#1, c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8]
Right output [4]: [ss_customer_sk#9, ss_ext_discount_amt#10, ss_ext_list_price#11, ss_sold_date_sk#12]
Arguments: [c_customer_sk#1], [ss_customer_sk#9], Inner, BuildRight

(7) CometProject
Input [12]: [c_customer_sk#1, c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, ss_customer_sk#9, ss_ext_discount_amt#10, ss_ext_list_price#11, ss_sold_date_sk#12]
Arguments: [c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, ss_ext_discount_amt#10, ss_ext_list_price#11, ss_sold_date_sk#12], [c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, ss_ext_discount_amt#10, ss_ext_list_price#11, ss_sold_date_sk#12]

(8) Scan parquet spark_catalog.default.date_dim
Output [2]: [d_date_sk#14, d_year#15]
Batched: true
Location [not included in comparison]/{warehouse_dir}/date_dim]
PushedFilters: [IsNotNull(d_year), EqualTo(d_year,2001), IsNotNull(d_date_sk)]
ReadSchema: struct<d_date_sk:int,d_year:int>

(9) CometFilter
Input [2]: [d_date_sk#14, d_year#15]
Condition : ((isnotnull(d_year#15) AND (d_year#15 = 2001)) AND isnotnull(d_date_sk#14))

(10) CometBroadcastExchange
Input [2]: [d_date_sk#14, d_year#15]
Arguments: [d_date_sk#14, d_year#15]

(11) CometBroadcastHashJoin
Left output [10]: [c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, ss_ext_discount_amt#10, ss_ext_list_price#11, ss_sold_date_sk#12]
Right output [2]: [d_date_sk#14, d_year#15]
Arguments: [ss_sold_date_sk#12], [d_date_sk#14], Inner, BuildRight

(12) CometProject
Input [12]: [c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, ss_ext_discount_amt#10, ss_ext_list_price#11, ss_sold_date_sk#12, d_date_sk#14, d_year#15]
Arguments: [c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, ss_ext_discount_amt#10, ss_ext_list_price#11, d_year#15], [c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, ss_ext_discount_amt#10, ss_ext_list_price#11, d_year#15]

(13) CometHashAggregate
Input [10]: [c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, ss_ext_discount_amt#10, ss_ext_list_price#11, d_year#15]
Keys [8]: [c_customer_id#2, c_first_name#3, c_last_name#4, d_year#15, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8]
Functions [1]: [partial_sum(UnscaledValue((ss_ext_list_price#11 - ss_ext_discount_amt#10)))]

(14) CometColumnarExchange
Input [9]: [c_customer_id#2, c_first_name#3, c_last_name#4, d_year#15, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, sum#16]
Arguments: hashpartitioning(c_customer_id#2, c_first_name#3, c_last_name#4, d_year#15, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, 5), ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=1]

(15) CometHashAggregate
Input [9]: [c_customer_id#2, c_first_name#3, c_last_name#4, d_year#15, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, sum#16]
Keys [8]: [c_customer_id#2, c_first_name#3, c_last_name#4, d_year#15, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8]
Functions [1]: [sum(UnscaledValue((ss_ext_list_price#11 - ss_ext_discount_amt#10)))]

(16) CometFilter
Input [2]: [customer_id#17, year_total#18]
Condition : (isnotnull(year_total#18) AND (year_total#18 > 0.00))

(17) Scan parquet spark_catalog.default.customer
Output [8]: [c_customer_sk#19, c_customer_id#20, c_first_name#21, c_last_name#22, c_preferred_cust_flag#23, c_birth_country#24, c_login#25, c_email_address#26]
Batched: true
Location [not included in comparison]/{warehouse_dir}/customer]
PushedFilters: [IsNotNull(c_customer_sk), IsNotNull(c_customer_id)]
ReadSchema: struct<c_customer_sk:int,c_customer_id:string,c_first_name:string,c_last_name:string,c_preferred_cust_flag:string,c_birth_country:string,c_login:string,c_email_address:string>

(18) CometFilter
Input [8]: [c_customer_sk#19, c_customer_id#20, c_first_name#21, c_last_name#22, c_preferred_cust_flag#23, c_birth_country#24, c_login#25, c_email_address#26]
Condition : (isnotnull(c_customer_sk#19) AND isnotnull(c_customer_id#20))

(19) Scan parquet spark_catalog.default.store_sales
Output [4]: [ss_customer_sk#27, ss_ext_discount_amt#28, ss_ext_list_price#29, ss_sold_date_sk#30]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(ss_sold_date_sk#30), dynamicpruningexpression(ss_sold_date_sk#30 IN dynamicpruning#31)]
PushedFilters: [IsNotNull(ss_customer_sk)]
ReadSchema: struct<ss_customer_sk:int,ss_ext_discount_amt:decimal(7,2),ss_ext_list_price:decimal(7,2)>

(20) CometFilter
Input [4]: [ss_customer_sk#27, ss_ext_discount_amt#28, ss_ext_list_price#29, ss_sold_date_sk#30]
Condition : isnotnull(ss_customer_sk#27)

(21) CometBroadcastExchange
Input [4]: [ss_customer_sk#27, ss_ext_discount_amt#28, ss_ext_list_price#29, ss_sold_date_sk#30]
Arguments: [ss_customer_sk#27, ss_ext_discount_amt#28, ss_ext_list_price#29, ss_sold_date_sk#30]

(22) CometBroadcastHashJoin
Left output [8]: [c_customer_sk#19, c_customer_id#20, c_first_name#21, c_last_name#22, c_preferred_cust_flag#23, c_birth_country#24, c_login#25, c_email_address#26]
Right output [4]: [ss_customer_sk#27, ss_ext_discount_amt#28, ss_ext_list_price#29, ss_sold_date_sk#30]
Arguments: [c_customer_sk#19], [ss_customer_sk#27], Inner, BuildRight

(23) CometProject
Input [12]: [c_customer_sk#19, c_customer_id#20, c_first_name#21, c_last_name#22, c_preferred_cust_flag#23, c_birth_country#24, c_login#25, c_email_address#26, ss_customer_sk#27, ss_ext_discount_amt#28, ss_ext_list_price#29, ss_sold_date_sk#30]
Arguments: [c_customer_id#20, c_first_name#21, c_last_name#22, c_preferred_cust_flag#23, c_birth_country#24, c_login#25, c_email_address#26, ss_ext_discount_amt#28, ss_ext_list_price#29, ss_sold_date_sk#30], [c_customer_id#20, c_first_name#21, c_last_name#22, c_preferred_cust_flag#23, c_birth_country#24, c_login#25, c_email_address#26, ss_ext_discount_amt#28, ss_ext_list_price#29, ss_sold_date_sk#30]

(24) Scan parquet spark_catalog.default.date_dim
Output [2]: [d_date_sk#32, d_year#33]
Batched: true
Location [not included in comparison]/{warehouse_dir}/date_dim]
PushedFilters: [IsNotNull(d_year), EqualTo(d_year,2002), IsNotNull(d_date_sk)]
ReadSchema: struct<d_date_sk:int,d_year:int>

(25) CometFilter
Input [2]: [d_date_sk#32, d_year#33]
Condition : ((isnotnull(d_year#33) AND (d_year#33 = 2002)) AND isnotnull(d_date_sk#32))

(26) CometBroadcastExchange
Input [2]: [d_date_sk#32, d_year#33]
Arguments: [d_date_sk#32, d_year#33]

(27) CometBroadcastHashJoin
Left output [10]: [c_customer_id#20, c_first_name#21, c_last_name#22, c_preferred_cust_flag#23, c_birth_country#24, c_login#25, c_email_address#26, ss_ext_discount_amt#28, ss_ext_list_price#29, ss_sold_date_sk#30]
Right output [2]: [d_date_sk#32, d_year#33]
Arguments: [ss_sold_date_sk#30], [d_date_sk#32], Inner, BuildRight

(28) CometProject
Input [12]: [c_customer_id#20, c_first_name#21, c_last_name#22, c_preferred_cust_flag#23, c_birth_country#24, c_login#25, c_email_address#26, ss_ext_discount_amt#28, ss_ext_list_price#29, ss_sold_date_sk#30, d_date_sk#32, d_year#33]
Arguments: [c_customer_id#20, c_first_name#21, c_last_name#22, c_preferred_cust_flag#23, c_birth_country#24, c_login#25, c_email_address#26, ss_ext_discount_amt#28, ss_ext_list_price#29, d_year#33], [c_customer_id#20, c_first_name#21, c_last_name#22, c_preferred_cust_flag#23, c_birth_country#24, c_login#25, c_email_address#26, ss_ext_discount_amt#28, ss_ext_list_price#29, d_year#33]

(29) CometHashAggregate
Input [10]: [c_customer_id#20, c_first_name#21, c_last_name#22, c_preferred_cust_flag#23, c_birth_country#24, c_login#25, c_email_address#26, ss_ext_discount_amt#28, ss_ext_list_price#29, d_year#33]
Keys [8]: [c_customer_id#20, c_first_name#21, c_last_name#22, d_year#33, c_preferred_cust_flag#23, c_birth_country#24, c_login#25, c_email_address#26]
Functions [1]: [partial_sum(UnscaledValue((ss_ext_list_price#29 - ss_ext_discount_amt#28)))]

(30) CometColumnarExchange
Input [9]: [c_customer_id#20, c_first_name#21, c_last_name#22, d_year#33, c_preferred_cust_flag#23, c_birth_country#24, c_login#25, c_email_address#26, sum#34]
Arguments: hashpartitioning(c_customer_id#20, c_first_name#21, c_last_name#22, d_year#33, c_preferred_cust_flag#23, c_birth_country#24, c_login#25, c_email_address#26, 5), ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=2]

(31) CometHashAggregate
Input [9]: [c_customer_id#20, c_first_name#21, c_last_name#22, d_year#33, c_preferred_cust_flag#23, c_birth_country#24, c_login#25, c_email_address#26, sum#34]
Keys [8]: [c_customer_id#20, c_first_name#21, c_last_name#22, d_year#33, c_preferred_cust_flag#23, c_birth_country#24, c_login#25, c_email_address#26]
Functions [1]: [sum(UnscaledValue((ss_ext_list_price#29 - ss_ext_discount_amt#28)))]

(32) CometBroadcastExchange
Input [5]: [customer_id#35, customer_first_name#36, customer_last_name#37, customer_email_address#38, year_total#39]
Arguments: [customer_id#35, customer_first_name#36, customer_last_name#37, customer_email_address#38, year_total#39]

(33) CometBroadcastHashJoin
Left output [2]: [customer_id#17, year_total#18]
Right output [5]: [customer_id#35, customer_first_name#36, customer_last_name#37, customer_email_address#38, year_total#39]
Arguments: [customer_id#17], [customer_id#35], Inner, BuildRight

(34) Scan parquet spark_catalog.default.customer
Output [8]: [c_customer_sk#40, c_customer_id#41, c_first_name#42, c_last_name#43, c_preferred_cust_flag#44, c_birth_country#45, c_login#46, c_email_address#47]
Batched: true
Location [not included in comparison]/{warehouse_dir}/customer]
PushedFilters: [IsNotNull(c_customer_sk), IsNotNull(c_customer_id)]
ReadSchema: struct<c_customer_sk:int,c_customer_id:string,c_first_name:string,c_last_name:string,c_preferred_cust_flag:string,c_birth_country:string,c_login:string,c_email_address:string>

(35) CometFilter
Input [8]: [c_customer_sk#40, c_customer_id#41, c_first_name#42, c_last_name#43, c_preferred_cust_flag#44, c_birth_country#45, c_login#46, c_email_address#47]
Condition : (isnotnull(c_customer_sk#40) AND isnotnull(c_customer_id#41))

(36) Scan parquet spark_catalog.default.web_sales
Output [4]: [ws_bill_customer_sk#48, ws_ext_discount_amt#49, ws_ext_list_price#50, ws_sold_date_sk#51]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(ws_sold_date_sk#51), dynamicpruningexpression(ws_sold_date_sk#51 IN dynamicpruning#52)]
PushedFilters: [IsNotNull(ws_bill_customer_sk)]
ReadSchema: struct<ws_bill_customer_sk:int,ws_ext_discount_amt:decimal(7,2),ws_ext_list_price:decimal(7,2)>

(37) CometFilter
Input [4]: [ws_bill_customer_sk#48, ws_ext_discount_amt#49, ws_ext_list_price#50, ws_sold_date_sk#51]
Condition : isnotnull(ws_bill_customer_sk#48)

(38) CometBroadcastExchange
Input [4]: [ws_bill_customer_sk#48, ws_ext_discount_amt#49, ws_ext_list_price#50, ws_sold_date_sk#51]
Arguments: [ws_bill_customer_sk#48, ws_ext_discount_amt#49, ws_ext_list_price#50, ws_sold_date_sk#51]

(39) CometBroadcastHashJoin
Left output [8]: [c_customer_sk#40, c_customer_id#41, c_first_name#42, c_last_name#43, c_preferred_cust_flag#44, c_birth_country#45, c_login#46, c_email_address#47]
Right output [4]: [ws_bill_customer_sk#48, ws_ext_discount_amt#49, ws_ext_list_price#50, ws_sold_date_sk#51]
Arguments: [c_customer_sk#40], [ws_bill_customer_sk#48], Inner, BuildRight

(40) CometProject
Input [12]: [c_customer_sk#40, c_customer_id#41, c_first_name#42, c_last_name#43, c_preferred_cust_flag#44, c_birth_country#45, c_login#46, c_email_address#47, ws_bill_customer_sk#48, ws_ext_discount_amt#49, ws_ext_list_price#50, ws_sold_date_sk#51]
Arguments: [c_customer_id#41, c_first_name#42, c_last_name#43, c_preferred_cust_flag#44, c_birth_country#45, c_login#46, c_email_address#47, ws_ext_discount_amt#49, ws_ext_list_price#50, ws_sold_date_sk#51], [c_customer_id#41, c_first_name#42, c_last_name#43, c_preferred_cust_flag#44, c_birth_country#45, c_login#46, c_email_address#47, ws_ext_discount_amt#49, ws_ext_list_price#50, ws_sold_date_sk#51]

(41) ReusedExchange [Reuses operator id: 10]
Output [2]: [d_date_sk#53, d_year#54]

(42) CometBroadcastHashJoin
Left output [10]: [c_customer_id#41, c_first_name#42, c_last_name#43, c_preferred_cust_flag#44, c_birth_country#45, c_login#46, c_email_address#47, ws_ext_discount_amt#49, ws_ext_list_price#50, ws_sold_date_sk#51]
Right output [2]: [d_date_sk#53, d_year#54]
Arguments: [ws_sold_date_sk#51], [d_date_sk#53], Inner, BuildRight

(43) CometProject
Input [12]: [c_customer_id#41, c_first_name#42, c_last_name#43, c_preferred_cust_flag#44, c_birth_country#45, c_login#46, c_email_address#47, ws_ext_discount_amt#49, ws_ext_list_price#50, ws_sold_date_sk#51, d_date_sk#53, d_year#54]
Arguments: [c_customer_id#41, c_first_name#42, c_last_name#43, c_preferred_cust_flag#44, c_birth_country#45, c_login#46, c_email_address#47, ws_ext_discount_amt#49, ws_ext_list_price#50, d_year#54], [c_customer_id#41, c_first_name#42, c_last_name#43, c_preferred_cust_flag#44, c_birth_country#45, c_login#46, c_email_address#47, ws_ext_discount_amt#49, ws_ext_list_price#50, d_year#54]

(44) CometHashAggregate
Input [10]: [c_customer_id#41, c_first_name#42, c_last_name#43, c_preferred_cust_flag#44, c_birth_country#45, c_login#46, c_email_address#47, ws_ext_discount_amt#49, ws_ext_list_price#50, d_year#54]
Keys [8]: [c_customer_id#41, c_first_name#42, c_last_name#43, c_preferred_cust_flag#44, c_birth_country#45, c_login#46, c_email_address#47, d_year#54]
Functions [1]: [partial_sum(UnscaledValue((ws_ext_list_price#50 - ws_ext_discount_amt#49)))]

(45) CometColumnarExchange
Input [9]: [c_customer_id#41, c_first_name#42, c_last_name#43, c_preferred_cust_flag#44, c_birth_country#45, c_login#46, c_email_address#47, d_year#54, sum#55]
Arguments: hashpartitioning(c_customer_id#41, c_first_name#42, c_last_name#43, c_preferred_cust_flag#44, c_birth_country#45, c_login#46, c_email_address#47, d_year#54, 5), ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=3]

(46) CometHashAggregate
Input [9]: [c_customer_id#41, c_first_name#42, c_last_name#43, c_preferred_cust_flag#44, c_birth_country#45, c_login#46, c_email_address#47, d_year#54, sum#55]
Keys [8]: [c_customer_id#41, c_first_name#42, c_last_name#43, c_preferred_cust_flag#44, c_birth_country#45, c_login#46, c_email_address#47, d_year#54]
Functions [1]: [sum(UnscaledValue((ws_ext_list_price#50 - ws_ext_discount_amt#49)))]

(47) CometFilter
Input [2]: [customer_id#56, year_total#57]
Condition : (isnotnull(year_total#57) AND (year_total#57 > 0.00))

(48) CometBroadcastExchange
Input [2]: [customer_id#56, year_total#57]
Arguments: [customer_id#56, year_total#57]

(49) CometBroadcastHashJoin
Left output [7]: [customer_id#17, year_total#18, customer_id#35, customer_first_name#36, customer_last_name#37, customer_email_address#38, year_total#39]
Right output [2]: [customer_id#56, year_total#57]
Arguments: [customer_id#17], [customer_id#56], Inner, BuildRight

(50) CometProject
Input [9]: [customer_id#17, year_total#18, customer_id#35, customer_first_name#36, customer_last_name#37, customer_email_address#38, year_total#39, customer_id#56, year_total#57]
Arguments: [customer_id#17, year_total#18, customer_id#35, customer_first_name#36, customer_last_name#37, customer_email_address#38, year_total#39, year_total#57], [customer_id#17, year_total#18, customer_id#35, customer_first_name#36, customer_last_name#37, customer_email_address#38, year_total#39, year_total#57]

(51) Scan parquet spark_catalog.default.customer
Output [8]: [c_customer_sk#58, c_customer_id#59, c_first_name#60, c_last_name#61, c_preferred_cust_flag#62, c_birth_country#63, c_login#64, c_email_address#65]
Batched: true
Location [not included in comparison]/{warehouse_dir}/customer]
PushedFilters: [IsNotNull(c_customer_sk), IsNotNull(c_customer_id)]
ReadSchema: struct<c_customer_sk:int,c_customer_id:string,c_first_name:string,c_last_name:string,c_preferred_cust_flag:string,c_birth_country:string,c_login:string,c_email_address:string>

(52) CometFilter
Input [8]: [c_customer_sk#58, c_customer_id#59, c_first_name#60, c_last_name#61, c_preferred_cust_flag#62, c_birth_country#63, c_login#64, c_email_address#65]
Condition : (isnotnull(c_customer_sk#58) AND isnotnull(c_customer_id#59))

(53) Scan parquet spark_catalog.default.web_sales
Output [4]: [ws_bill_customer_sk#66, ws_ext_discount_amt#67, ws_ext_list_price#68, ws_sold_date_sk#69]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(ws_sold_date_sk#69), dynamicpruningexpression(ws_sold_date_sk#69 IN dynamicpruning#70)]
PushedFilters: [IsNotNull(ws_bill_customer_sk)]
ReadSchema: struct<ws_bill_customer_sk:int,ws_ext_discount_amt:decimal(7,2),ws_ext_list_price:decimal(7,2)>

(54) CometFilter
Input [4]: [ws_bill_customer_sk#66, ws_ext_discount_amt#67, ws_ext_list_price#68, ws_sold_date_sk#69]
Condition : isnotnull(ws_bill_customer_sk#66)

(55) CometBroadcastExchange
Input [4]: [ws_bill_customer_sk#66, ws_ext_discount_amt#67, ws_ext_list_price#68, ws_sold_date_sk#69]
Arguments: [ws_bill_customer_sk#66, ws_ext_discount_amt#67, ws_ext_list_price#68, ws_sold_date_sk#69]

(56) CometBroadcastHashJoin
Left output [8]: [c_customer_sk#58, c_customer_id#59, c_first_name#60, c_last_name#61, c_preferred_cust_flag#62, c_birth_country#63, c_login#64, c_email_address#65]
Right output [4]: [ws_bill_customer_sk#66, ws_ext_discount_amt#67, ws_ext_list_price#68, ws_sold_date_sk#69]
Arguments: [c_customer_sk#58], [ws_bill_customer_sk#66], Inner, BuildRight

(57) CometProject
Input [12]: [c_customer_sk#58, c_customer_id#59, c_first_name#60, c_last_name#61, c_preferred_cust_flag#62, c_birth_country#63, c_login#64, c_email_address#65, ws_bill_customer_sk#66, ws_ext_discount_amt#67, ws_ext_list_price#68, ws_sold_date_sk#69]
Arguments: [c_customer_id#59, c_first_name#60, c_last_name#61, c_preferred_cust_flag#62, c_birth_country#63, c_login#64, c_email_address#65, ws_ext_discount_amt#67, ws_ext_list_price#68, ws_sold_date_sk#69], [c_customer_id#59, c_first_name#60, c_last_name#61, c_preferred_cust_flag#62, c_birth_country#63, c_login#64, c_email_address#65, ws_ext_discount_amt#67, ws_ext_list_price#68, ws_sold_date_sk#69]

(58) ReusedExchange [Reuses operator id: 26]
Output [2]: [d_date_sk#71, d_year#72]

(59) CometBroadcastHashJoin
Left output [10]: [c_customer_id#59, c_first_name#60, c_last_name#61, c_preferred_cust_flag#62, c_birth_country#63, c_login#64, c_email_address#65, ws_ext_discount_amt#67, ws_ext_list_price#68, ws_sold_date_sk#69]
Right output [2]: [d_date_sk#71, d_year#72]
Arguments: [ws_sold_date_sk#69], [d_date_sk#71], Inner, BuildRight

(60) CometProject
Input [12]: [c_customer_id#59, c_first_name#60, c_last_name#61, c_preferred_cust_flag#62, c_birth_country#63, c_login#64, c_email_address#65, ws_ext_discount_amt#67, ws_ext_list_price#68, ws_sold_date_sk#69, d_date_sk#71, d_year#72]
Arguments: [c_customer_id#59, c_first_name#60, c_last_name#61, c_preferred_cust_flag#62, c_birth_country#63, c_login#64, c_email_address#65, ws_ext_discount_amt#67, ws_ext_list_price#68, d_year#72], [c_customer_id#59, c_first_name#60, c_last_name#61, c_preferred_cust_flag#62, c_birth_country#63, c_login#64, c_email_address#65, ws_ext_discount_amt#67, ws_ext_list_price#68, d_year#72]

(61) CometHashAggregate
Input [10]: [c_customer_id#59, c_first_name#60, c_last_name#61, c_preferred_cust_flag#62, c_birth_country#63, c_login#64, c_email_address#65, ws_ext_discount_amt#67, ws_ext_list_price#68, d_year#72]
Keys [8]: [c_customer_id#59, c_first_name#60, c_last_name#61, c_preferred_cust_flag#62, c_birth_country#63, c_login#64, c_email_address#65, d_year#72]
Functions [1]: [partial_sum(UnscaledValue((ws_ext_list_price#68 - ws_ext_discount_amt#67)))]

(62) CometColumnarExchange
Input [9]: [c_customer_id#59, c_first_name#60, c_last_name#61, c_preferred_cust_flag#62, c_birth_country#63, c_login#64, c_email_address#65, d_year#72, sum#73]
Arguments: hashpartitioning(c_customer_id#59, c_first_name#60, c_last_name#61, c_preferred_cust_flag#62, c_birth_country#63, c_login#64, c_email_address#65, d_year#72, 5), ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=4]

(63) CometHashAggregate
Input [9]: [c_customer_id#59, c_first_name#60, c_last_name#61, c_preferred_cust_flag#62, c_birth_country#63, c_login#64, c_email_address#65, d_year#72, sum#73]
Keys [8]: [c_customer_id#59, c_first_name#60, c_last_name#61, c_preferred_cust_flag#62, c_birth_country#63, c_login#64, c_email_address#65, d_year#72]
Functions [1]: [sum(UnscaledValue((ws_ext_list_price#68 - ws_ext_discount_amt#67)))]

(64) CometBroadcastExchange
Input [2]: [customer_id#74, year_total#75]
Arguments: [customer_id#74, year_total#75]

(65) CometBroadcastHashJoin
Left output [8]: [customer_id#17, year_total#18, customer_id#35, customer_first_name#36, customer_last_name#37, customer_email_address#38, year_total#39, year_total#57]
Right output [2]: [customer_id#74, year_total#75]
Arguments: [customer_id#17], [customer_id#74], Inner, (CASE WHEN (year_total#57 > 0.00) THEN (year_total#75 / year_total#57) ELSE 0E-20 END > CASE WHEN (year_total#18 > 0.00) THEN (year_total#39 / year_total#18) ELSE 0E-20 END), BuildRight

(66) CometProject
Input [10]: [customer_id#17, year_total#18, customer_id#35, customer_first_name#36, customer_last_name#37, customer_email_address#38, year_total#39, year_total#57, customer_id#74, year_total#75]
Arguments: [customer_id#35, customer_first_name#36, customer_last_name#37, customer_email_address#38], [customer_id#35, customer_first_name#36, customer_last_name#37, customer_email_address#38]

(67) CometTakeOrderedAndProject
Input [4]: [customer_id#35, customer_first_name#36, customer_last_name#37, customer_email_address#38]
Arguments: TakeOrderedAndProject(limit=100, orderBy=[customer_id#35 ASC NULLS FIRST,customer_first_name#36 ASC NULLS FIRST,customer_last_name#37 ASC NULLS FIRST,customer_email_address#38 ASC NULLS FIRST], output=[customer_id#35,customer_first_name#36,customer_last_name#37,customer_email_address#38]), [customer_id#35, customer_first_name#36, customer_last_name#37, customer_email_address#38], 100, [customer_id#35 ASC NULLS FIRST, customer_first_name#36 ASC NULLS FIRST, customer_last_name#37 ASC NULLS FIRST, customer_email_address#38 ASC NULLS FIRST], [customer_id#35, customer_first_name#36, customer_last_name#37, customer_email_address#38]

(68) ColumnarToRow [codegen id : 1]
Input [4]: [customer_id#35, customer_first_name#36, customer_last_name#37, customer_email_address#38]

===== Subqueries =====

Subquery:1 Hosting operator id = 3 Hosting Expression = ss_sold_date_sk#12 IN dynamicpruning#13
BroadcastExchange (72)
+- * ColumnarToRow (71)
   +- CometFilter (70)
      +- CometScan parquet spark_catalog.default.date_dim (69)


(69) Scan parquet spark_catalog.default.date_dim
Output [2]: [d_date_sk#14, d_year#15]
Batched: true
Location [not included in comparison]/{warehouse_dir}/date_dim]
PushedFilters: [IsNotNull(d_year), EqualTo(d_year,2001), IsNotNull(d_date_sk)]
ReadSchema: struct<d_date_sk:int,d_year:int>

(70) CometFilter
Input [2]: [d_date_sk#14, d_year#15]
Condition : ((isnotnull(d_year#15) AND (d_year#15 = 2001)) AND isnotnull(d_date_sk#14))

(71) ColumnarToRow [codegen id : 1]
Input [2]: [d_date_sk#14, d_year#15]

(72) BroadcastExchange
Input [2]: [d_date_sk#14, d_year#15]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, false] as bigint)),false), [plan_id=5]

Subquery:2 Hosting operator id = 19 Hosting Expression = ss_sold_date_sk#30 IN dynamicpruning#31
BroadcastExchange (76)
+- * ColumnarToRow (75)
   +- CometFilter (74)
      +- CometScan parquet spark_catalog.default.date_dim (73)


(73) Scan parquet spark_catalog.default.date_dim
Output [2]: [d_date_sk#32, d_year#33]
Batched: true
Location [not included in comparison]/{warehouse_dir}/date_dim]
PushedFilters: [IsNotNull(d_year), EqualTo(d_year,2002), IsNotNull(d_date_sk)]
ReadSchema: struct<d_date_sk:int,d_year:int>

(74) CometFilter
Input [2]: [d_date_sk#32, d_year#33]
Condition : ((isnotnull(d_year#33) AND (d_year#33 = 2002)) AND isnotnull(d_date_sk#32))

(75) ColumnarToRow [codegen id : 1]
Input [2]: [d_date_sk#32, d_year#33]

(76) BroadcastExchange
Input [2]: [d_date_sk#32, d_year#33]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, false] as bigint)),false), [plan_id=6]

Subquery:3 Hosting operator id = 36 Hosting Expression = ws_sold_date_sk#51 IN dynamicpruning#13

Subquery:4 Hosting operator id = 53 Hosting Expression = ws_sold_date_sk#69 IN dynamicpruning#31


