== Physical Plan ==
TakeOrderedAndProject (79)
+- * Project (78)
   +- * BroadcastHashJoin Inner BuildRight (77)
      :- * Project (58)
      :  +- * BroadcastHashJoin Inner BuildRight (57)
      :     :- * BroadcastHashJoin Inner BuildRight (37)
      :     :  :- * Filter (18)
      :     :  :  +- * HashAggregate (17)
      :     :  :     +- * CometColumnarToRow (16)
      :     :  :        +- CometColumnarExchange (15)
      :     :  :           +- * HashAggregate (14)
      :     :  :              +- * Project (13)
      :     :  :                 +- * BroadcastHashJoin Inner BuildRight (12)
      :     :  :                    :- * Project (10)
      :     :  :                    :  +- * BroadcastHashJoin Inner BuildRight (9)
      :     :  :                    :     :- * CometColumnarToRow (4)
      :     :  :                    :     :  +- CometProject (3)
      :     :  :                    :     :     +- CometFilter (2)
      :     :  :                    :     :        +- CometNativeScan parquet spark_catalog.default.customer (1)
      :     :  :                    :     +- BroadcastExchange (8)
      :     :  :                    :        +- * Filter (7)
      :     :  :                    :           +- * ColumnarToRow (6)
      :     :  :                    :              +- Scan parquet spark_catalog.default.store_sales (5)
      :     :  :                    +- ReusedExchange (11)
      :     :  +- BroadcastExchange (36)
      :     :     +- * HashAggregate (35)
      :     :        +- * CometColumnarToRow (34)
      :     :           +- CometColumnarExchange (33)
      :     :              +- * HashAggregate (32)
      :     :                 +- * Project (31)
      :     :                    +- * BroadcastHashJoin Inner BuildRight (30)
      :     :                       :- * Project (28)
      :     :                       :  +- * BroadcastHashJoin Inner BuildRight (27)
      :     :                       :     :- * CometColumnarToRow (22)
      :     :                       :     :  +- CometProject (21)
      :     :                       :     :     +- CometFilter (20)
      :     :                       :     :        +- CometNativeScan parquet spark_catalog.default.customer (19)
      :     :                       :     +- BroadcastExchange (26)
      :     :                       :        +- * Filter (25)
      :     :                       :           +- * ColumnarToRow (24)
      :     :                       :              +- Scan parquet spark_catalog.default.store_sales (23)
      :     :                       +- ReusedExchange (29)
      :     +- BroadcastExchange (56)
      :        +- * Filter (55)
      :           +- * HashAggregate (54)
      :              +- * CometColumnarToRow (53)
      :                 +- CometColumnarExchange (52)
      :                    +- * HashAggregate (51)
      :                       +- * Project (50)
      :                          +- * BroadcastHashJoin Inner BuildRight (49)
      :                             :- * Project (47)
      :                             :  +- * BroadcastHashJoin Inner BuildRight (46)
      :                             :     :- * CometColumnarToRow (41)
      :                             :     :  +- CometProject (40)
      :                             :     :     +- CometFilter (39)
      :                             :     :        +- CometNativeScan parquet spark_catalog.default.customer (38)
      :                             :     +- BroadcastExchange (45)
      :                             :        +- * Filter (44)
      :                             :           +- * ColumnarToRow (43)
      :                             :              +- Scan parquet spark_catalog.default.web_sales (42)
      :                             +- ReusedExchange (48)
      +- BroadcastExchange (76)
         +- * HashAggregate (75)
            +- * CometColumnarToRow (74)
               +- CometColumnarExchange (73)
                  +- * HashAggregate (72)
                     +- * Project (71)
                        +- * BroadcastHashJoin Inner BuildRight (70)
                           :- * Project (68)
                           :  +- * BroadcastHashJoin Inner BuildRight (67)
                           :     :- * CometColumnarToRow (62)
                           :     :  +- CometProject (61)
                           :     :     +- CometFilter (60)
                           :     :        +- CometNativeScan parquet spark_catalog.default.customer (59)
                           :     +- BroadcastExchange (66)
                           :        +- * Filter (65)
                           :           +- * ColumnarToRow (64)
                           :              +- Scan parquet spark_catalog.default.web_sales (63)
                           +- ReusedExchange (69)


(1) CometNativeScan 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)]
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(static_invoke(CharVarcharCodegenUtils.readSidePadding(c_customer_id#2, 16))))

(3) CometProject
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]
Arguments: [c_customer_sk#1, c_customer_id#9, c_first_name#10, c_last_name#11, c_preferred_cust_flag#12, c_birth_country#6, c_login#13, c_email_address#14], [c_customer_sk#1, static_invoke(CharVarcharCodegenUtils.readSidePadding(c_customer_id#2, 16)) AS c_customer_id#9, static_invoke(CharVarcharCodegenUtils.readSidePadding(c_first_name#3, 20)) AS c_first_name#10, static_invoke(CharVarcharCodegenUtils.readSidePadding(c_last_name#4, 30)) AS c_last_name#11, static_invoke(CharVarcharCodegenUtils.readSidePadding(c_preferred_cust_flag#5, 1)) AS c_preferred_cust_flag#12, c_birth_country#6, static_invoke(CharVarcharCodegenUtils.readSidePadding(c_login#7, 13)) AS c_login#13, static_invoke(CharVarcharCodegenUtils.readSidePadding(c_email_address#8, 50)) AS c_email_address#14]

(4) CometColumnarToRow [codegen id : 3]
Input [8]: [c_customer_sk#1, c_customer_id#9, c_first_name#10, c_last_name#11, c_preferred_cust_flag#12, c_birth_country#6, c_login#13, c_email_address#14]

(5) Scan parquet spark_catalog.default.store_sales
Output [4]: [ss_customer_sk#15, ss_ext_discount_amt#16, ss_ext_list_price#17, ss_sold_date_sk#18]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(ss_sold_date_sk#18), dynamicpruningexpression(ss_sold_date_sk#18 IN dynamicpruning#19)]
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)>

(6) ColumnarToRow [codegen id : 1]
Input [4]: [ss_customer_sk#15, ss_ext_discount_amt#16, ss_ext_list_price#17, ss_sold_date_sk#18]

(7) Filter [codegen id : 1]
Input [4]: [ss_customer_sk#15, ss_ext_discount_amt#16, ss_ext_list_price#17, ss_sold_date_sk#18]
Condition : isnotnull(ss_customer_sk#15)

(8) BroadcastExchange
Input [4]: [ss_customer_sk#15, ss_ext_discount_amt#16, ss_ext_list_price#17, ss_sold_date_sk#18]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, false] as bigint)),false), [plan_id=1]

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

(10) Project [codegen id : 3]
Output [10]: [c_customer_id#9, c_first_name#10, c_last_name#11, c_preferred_cust_flag#12, c_birth_country#6, c_login#13, c_email_address#14, ss_ext_discount_amt#16, ss_ext_list_price#17, ss_sold_date_sk#18]
Input [12]: [c_customer_sk#1, c_customer_id#9, c_first_name#10, c_last_name#11, c_preferred_cust_flag#12, c_birth_country#6, c_login#13, c_email_address#14, ss_customer_sk#15, ss_ext_discount_amt#16, ss_ext_list_price#17, ss_sold_date_sk#18]

(11) ReusedExchange [Reuses operator id: 83]
Output [2]: [d_date_sk#20, d_year#21]

(12) BroadcastHashJoin [codegen id : 3]
Left keys [1]: [ss_sold_date_sk#18]
Right keys [1]: [d_date_sk#20]
Join type: Inner
Join condition: None

(13) Project [codegen id : 3]
Output [10]: [c_customer_id#9, c_first_name#10, c_last_name#11, c_preferred_cust_flag#12, c_birth_country#6, c_login#13, c_email_address#14, ss_ext_discount_amt#16, ss_ext_list_price#17, d_year#21]
Input [12]: [c_customer_id#9, c_first_name#10, c_last_name#11, c_preferred_cust_flag#12, c_birth_country#6, c_login#13, c_email_address#14, ss_ext_discount_amt#16, ss_ext_list_price#17, ss_sold_date_sk#18, d_date_sk#20, d_year#21]

(14) HashAggregate [codegen id : 3]
Input [10]: [c_customer_id#9, c_first_name#10, c_last_name#11, c_preferred_cust_flag#12, c_birth_country#6, c_login#13, c_email_address#14, ss_ext_discount_amt#16, ss_ext_list_price#17, d_year#21]
Keys [8]: [c_customer_id#9, c_first_name#10, c_last_name#11, d_year#21, c_preferred_cust_flag#12, c_birth_country#6, c_login#13, c_email_address#14]
Functions [1]: [partial_sum(UnscaledValue((ss_ext_list_price#17 - ss_ext_discount_amt#16)))]
Aggregate Attributes [1]: [sum#22]
Results [9]: [c_customer_id#9, c_first_name#10, c_last_name#11, d_year#21, c_preferred_cust_flag#12, c_birth_country#6, c_login#13, c_email_address#14, sum#23]

(15) CometColumnarExchange
Input [9]: [c_customer_id#9, c_first_name#10, c_last_name#11, d_year#21, c_preferred_cust_flag#12, c_birth_country#6, c_login#13, c_email_address#14, sum#23]
Arguments: hashpartitioning(c_customer_id#9, c_first_name#10, c_last_name#11, d_year#21, c_preferred_cust_flag#12, c_birth_country#6, c_login#13, c_email_address#14, 5), ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=2]

(16) CometColumnarToRow [codegen id : 16]
Input [9]: [c_customer_id#9, c_first_name#10, c_last_name#11, d_year#21, c_preferred_cust_flag#12, c_birth_country#6, c_login#13, c_email_address#14, sum#23]

(17) HashAggregate [codegen id : 16]
Input [9]: [c_customer_id#9, c_first_name#10, c_last_name#11, d_year#21, c_preferred_cust_flag#12, c_birth_country#6, c_login#13, c_email_address#14, sum#23]
Keys [8]: [c_customer_id#9, c_first_name#10, c_last_name#11, d_year#21, c_preferred_cust_flag#12, c_birth_country#6, c_login#13, c_email_address#14]
Functions [1]: [sum(UnscaledValue((ss_ext_list_price#17 - ss_ext_discount_amt#16)))]
Aggregate Attributes [1]: [sum(UnscaledValue((ss_ext_list_price#17 - ss_ext_discount_amt#16)))#24]
Results [2]: [c_customer_id#9 AS customer_id#25, MakeDecimal(sum(UnscaledValue((ss_ext_list_price#17 - ss_ext_discount_amt#16)))#24,18,2) AS year_total#26]

(18) Filter [codegen id : 16]
Input [2]: [customer_id#25, year_total#26]
Condition : (isnotnull(year_total#26) AND (year_total#26 > 0.00))

(19) CometNativeScan parquet spark_catalog.default.customer
Output [8]: [c_customer_sk#27, c_customer_id#28, c_first_name#29, c_last_name#30, c_preferred_cust_flag#31, c_birth_country#32, c_login#33, c_email_address#34]
Batched: true
Location [not included in comparison]/{warehouse_dir}/customer]
PushedFilters: [IsNotNull(c_customer_sk)]
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>

(20) CometFilter
Input [8]: [c_customer_sk#27, c_customer_id#28, c_first_name#29, c_last_name#30, c_preferred_cust_flag#31, c_birth_country#32, c_login#33, c_email_address#34]
Condition : (isnotnull(c_customer_sk#27) AND isnotnull(static_invoke(CharVarcharCodegenUtils.readSidePadding(c_customer_id#28, 16))))

(21) CometProject
Input [8]: [c_customer_sk#27, c_customer_id#28, c_first_name#29, c_last_name#30, c_preferred_cust_flag#31, c_birth_country#32, c_login#33, c_email_address#34]
Arguments: [c_customer_sk#27, c_customer_id#35, c_first_name#36, c_last_name#37, c_preferred_cust_flag#38, c_birth_country#32, c_login#39, c_email_address#40], [c_customer_sk#27, static_invoke(CharVarcharCodegenUtils.readSidePadding(c_customer_id#28, 16)) AS c_customer_id#35, static_invoke(CharVarcharCodegenUtils.readSidePadding(c_first_name#29, 20)) AS c_first_name#36, static_invoke(CharVarcharCodegenUtils.readSidePadding(c_last_name#30, 30)) AS c_last_name#37, static_invoke(CharVarcharCodegenUtils.readSidePadding(c_preferred_cust_flag#31, 1)) AS c_preferred_cust_flag#38, c_birth_country#32, static_invoke(CharVarcharCodegenUtils.readSidePadding(c_login#33, 13)) AS c_login#39, static_invoke(CharVarcharCodegenUtils.readSidePadding(c_email_address#34, 50)) AS c_email_address#40]

(22) CometColumnarToRow [codegen id : 6]
Input [8]: [c_customer_sk#27, c_customer_id#35, c_first_name#36, c_last_name#37, c_preferred_cust_flag#38, c_birth_country#32, c_login#39, c_email_address#40]

(23) Scan parquet spark_catalog.default.store_sales
Output [4]: [ss_customer_sk#41, ss_ext_discount_amt#42, ss_ext_list_price#43, ss_sold_date_sk#44]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(ss_sold_date_sk#44), dynamicpruningexpression(ss_sold_date_sk#44 IN dynamicpruning#45)]
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)>

(24) ColumnarToRow [codegen id : 4]
Input [4]: [ss_customer_sk#41, ss_ext_discount_amt#42, ss_ext_list_price#43, ss_sold_date_sk#44]

(25) Filter [codegen id : 4]
Input [4]: [ss_customer_sk#41, ss_ext_discount_amt#42, ss_ext_list_price#43, ss_sold_date_sk#44]
Condition : isnotnull(ss_customer_sk#41)

(26) BroadcastExchange
Input [4]: [ss_customer_sk#41, ss_ext_discount_amt#42, ss_ext_list_price#43, ss_sold_date_sk#44]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, false] as bigint)),false), [plan_id=3]

(27) BroadcastHashJoin [codegen id : 6]
Left keys [1]: [c_customer_sk#27]
Right keys [1]: [ss_customer_sk#41]
Join type: Inner
Join condition: None

(28) Project [codegen id : 6]
Output [10]: [c_customer_id#35, c_first_name#36, c_last_name#37, c_preferred_cust_flag#38, c_birth_country#32, c_login#39, c_email_address#40, ss_ext_discount_amt#42, ss_ext_list_price#43, ss_sold_date_sk#44]
Input [12]: [c_customer_sk#27, c_customer_id#35, c_first_name#36, c_last_name#37, c_preferred_cust_flag#38, c_birth_country#32, c_login#39, c_email_address#40, ss_customer_sk#41, ss_ext_discount_amt#42, ss_ext_list_price#43, ss_sold_date_sk#44]

(29) ReusedExchange [Reuses operator id: 87]
Output [2]: [d_date_sk#46, d_year#47]

(30) BroadcastHashJoin [codegen id : 6]
Left keys [1]: [ss_sold_date_sk#44]
Right keys [1]: [d_date_sk#46]
Join type: Inner
Join condition: None

(31) Project [codegen id : 6]
Output [10]: [c_customer_id#35, c_first_name#36, c_last_name#37, c_preferred_cust_flag#38, c_birth_country#32, c_login#39, c_email_address#40, ss_ext_discount_amt#42, ss_ext_list_price#43, d_year#47]
Input [12]: [c_customer_id#35, c_first_name#36, c_last_name#37, c_preferred_cust_flag#38, c_birth_country#32, c_login#39, c_email_address#40, ss_ext_discount_amt#42, ss_ext_list_price#43, ss_sold_date_sk#44, d_date_sk#46, d_year#47]

(32) HashAggregate [codegen id : 6]
Input [10]: [c_customer_id#35, c_first_name#36, c_last_name#37, c_preferred_cust_flag#38, c_birth_country#32, c_login#39, c_email_address#40, ss_ext_discount_amt#42, ss_ext_list_price#43, d_year#47]
Keys [8]: [c_customer_id#35, c_first_name#36, c_last_name#37, d_year#47, c_preferred_cust_flag#38, c_birth_country#32, c_login#39, c_email_address#40]
Functions [1]: [partial_sum(UnscaledValue((ss_ext_list_price#43 - ss_ext_discount_amt#42)))]
Aggregate Attributes [1]: [sum#48]
Results [9]: [c_customer_id#35, c_first_name#36, c_last_name#37, d_year#47, c_preferred_cust_flag#38, c_birth_country#32, c_login#39, c_email_address#40, sum#49]

(33) CometColumnarExchange
Input [9]: [c_customer_id#35, c_first_name#36, c_last_name#37, d_year#47, c_preferred_cust_flag#38, c_birth_country#32, c_login#39, c_email_address#40, sum#49]
Arguments: hashpartitioning(c_customer_id#35, c_first_name#36, c_last_name#37, d_year#47, c_preferred_cust_flag#38, c_birth_country#32, c_login#39, c_email_address#40, 5), ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=4]

(34) CometColumnarToRow [codegen id : 7]
Input [9]: [c_customer_id#35, c_first_name#36, c_last_name#37, d_year#47, c_preferred_cust_flag#38, c_birth_country#32, c_login#39, c_email_address#40, sum#49]

(35) HashAggregate [codegen id : 7]
Input [9]: [c_customer_id#35, c_first_name#36, c_last_name#37, d_year#47, c_preferred_cust_flag#38, c_birth_country#32, c_login#39, c_email_address#40, sum#49]
Keys [8]: [c_customer_id#35, c_first_name#36, c_last_name#37, d_year#47, c_preferred_cust_flag#38, c_birth_country#32, c_login#39, c_email_address#40]
Functions [1]: [sum(UnscaledValue((ss_ext_list_price#43 - ss_ext_discount_amt#42)))]
Aggregate Attributes [1]: [sum(UnscaledValue((ss_ext_list_price#43 - ss_ext_discount_amt#42)))#24]
Results [5]: [c_customer_id#35 AS customer_id#50, c_first_name#36 AS customer_first_name#51, c_last_name#37 AS customer_last_name#52, c_email_address#40 AS customer_email_address#53, MakeDecimal(sum(UnscaledValue((ss_ext_list_price#43 - ss_ext_discount_amt#42)))#24,18,2) AS year_total#54]

(36) BroadcastExchange
Input [5]: [customer_id#50, customer_first_name#51, customer_last_name#52, customer_email_address#53, year_total#54]
Arguments: HashedRelationBroadcastMode(List(input[0, string, true]),false), [plan_id=5]

(37) BroadcastHashJoin [codegen id : 16]
Left keys [1]: [customer_id#25]
Right keys [1]: [customer_id#50]
Join type: Inner
Join condition: None

(38) CometNativeScan parquet spark_catalog.default.customer
Output [8]: [c_customer_sk#55, c_customer_id#56, c_first_name#57, c_last_name#58, c_preferred_cust_flag#59, c_birth_country#60, c_login#61, c_email_address#62]
Batched: true
Location [not included in comparison]/{warehouse_dir}/customer]
PushedFilters: [IsNotNull(c_customer_sk)]
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>

(39) CometFilter
Input [8]: [c_customer_sk#55, c_customer_id#56, c_first_name#57, c_last_name#58, c_preferred_cust_flag#59, c_birth_country#60, c_login#61, c_email_address#62]
Condition : (isnotnull(c_customer_sk#55) AND isnotnull(static_invoke(CharVarcharCodegenUtils.readSidePadding(c_customer_id#56, 16))))

(40) CometProject
Input [8]: [c_customer_sk#55, c_customer_id#56, c_first_name#57, c_last_name#58, c_preferred_cust_flag#59, c_birth_country#60, c_login#61, c_email_address#62]
Arguments: [c_customer_sk#55, c_customer_id#63, c_first_name#64, c_last_name#65, c_preferred_cust_flag#66, c_birth_country#60, c_login#67, c_email_address#68], [c_customer_sk#55, static_invoke(CharVarcharCodegenUtils.readSidePadding(c_customer_id#56, 16)) AS c_customer_id#63, static_invoke(CharVarcharCodegenUtils.readSidePadding(c_first_name#57, 20)) AS c_first_name#64, static_invoke(CharVarcharCodegenUtils.readSidePadding(c_last_name#58, 30)) AS c_last_name#65, static_invoke(CharVarcharCodegenUtils.readSidePadding(c_preferred_cust_flag#59, 1)) AS c_preferred_cust_flag#66, c_birth_country#60, static_invoke(CharVarcharCodegenUtils.readSidePadding(c_login#61, 13)) AS c_login#67, static_invoke(CharVarcharCodegenUtils.readSidePadding(c_email_address#62, 50)) AS c_email_address#68]

(41) CometColumnarToRow [codegen id : 10]
Input [8]: [c_customer_sk#55, c_customer_id#63, c_first_name#64, c_last_name#65, c_preferred_cust_flag#66, c_birth_country#60, c_login#67, c_email_address#68]

(42) Scan parquet spark_catalog.default.web_sales
Output [4]: [ws_bill_customer_sk#69, ws_ext_discount_amt#70, ws_ext_list_price#71, ws_sold_date_sk#72]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(ws_sold_date_sk#72), dynamicpruningexpression(ws_sold_date_sk#72 IN dynamicpruning#19)]
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)>

(43) ColumnarToRow [codegen id : 8]
Input [4]: [ws_bill_customer_sk#69, ws_ext_discount_amt#70, ws_ext_list_price#71, ws_sold_date_sk#72]

(44) Filter [codegen id : 8]
Input [4]: [ws_bill_customer_sk#69, ws_ext_discount_amt#70, ws_ext_list_price#71, ws_sold_date_sk#72]
Condition : isnotnull(ws_bill_customer_sk#69)

(45) BroadcastExchange
Input [4]: [ws_bill_customer_sk#69, ws_ext_discount_amt#70, ws_ext_list_price#71, ws_sold_date_sk#72]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, false] as bigint)),false), [plan_id=6]

(46) BroadcastHashJoin [codegen id : 10]
Left keys [1]: [c_customer_sk#55]
Right keys [1]: [ws_bill_customer_sk#69]
Join type: Inner
Join condition: None

(47) Project [codegen id : 10]
Output [10]: [c_customer_id#63, c_first_name#64, c_last_name#65, c_preferred_cust_flag#66, c_birth_country#60, c_login#67, c_email_address#68, ws_ext_discount_amt#70, ws_ext_list_price#71, ws_sold_date_sk#72]
Input [12]: [c_customer_sk#55, c_customer_id#63, c_first_name#64, c_last_name#65, c_preferred_cust_flag#66, c_birth_country#60, c_login#67, c_email_address#68, ws_bill_customer_sk#69, ws_ext_discount_amt#70, ws_ext_list_price#71, ws_sold_date_sk#72]

(48) ReusedExchange [Reuses operator id: 83]
Output [2]: [d_date_sk#73, d_year#74]

(49) BroadcastHashJoin [codegen id : 10]
Left keys [1]: [ws_sold_date_sk#72]
Right keys [1]: [d_date_sk#73]
Join type: Inner
Join condition: None

(50) Project [codegen id : 10]
Output [10]: [c_customer_id#63, c_first_name#64, c_last_name#65, c_preferred_cust_flag#66, c_birth_country#60, c_login#67, c_email_address#68, ws_ext_discount_amt#70, ws_ext_list_price#71, d_year#74]
Input [12]: [c_customer_id#63, c_first_name#64, c_last_name#65, c_preferred_cust_flag#66, c_birth_country#60, c_login#67, c_email_address#68, ws_ext_discount_amt#70, ws_ext_list_price#71, ws_sold_date_sk#72, d_date_sk#73, d_year#74]

(51) HashAggregate [codegen id : 10]
Input [10]: [c_customer_id#63, c_first_name#64, c_last_name#65, c_preferred_cust_flag#66, c_birth_country#60, c_login#67, c_email_address#68, ws_ext_discount_amt#70, ws_ext_list_price#71, d_year#74]
Keys [8]: [c_customer_id#63, c_first_name#64, c_last_name#65, c_preferred_cust_flag#66, c_birth_country#60, c_login#67, c_email_address#68, d_year#74]
Functions [1]: [partial_sum(UnscaledValue((ws_ext_list_price#71 - ws_ext_discount_amt#70)))]
Aggregate Attributes [1]: [sum#75]
Results [9]: [c_customer_id#63, c_first_name#64, c_last_name#65, c_preferred_cust_flag#66, c_birth_country#60, c_login#67, c_email_address#68, d_year#74, sum#76]

(52) CometColumnarExchange
Input [9]: [c_customer_id#63, c_first_name#64, c_last_name#65, c_preferred_cust_flag#66, c_birth_country#60, c_login#67, c_email_address#68, d_year#74, sum#76]
Arguments: hashpartitioning(c_customer_id#63, c_first_name#64, c_last_name#65, c_preferred_cust_flag#66, c_birth_country#60, c_login#67, c_email_address#68, d_year#74, 5), ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=7]

(53) CometColumnarToRow [codegen id : 11]
Input [9]: [c_customer_id#63, c_first_name#64, c_last_name#65, c_preferred_cust_flag#66, c_birth_country#60, c_login#67, c_email_address#68, d_year#74, sum#76]

(54) HashAggregate [codegen id : 11]
Input [9]: [c_customer_id#63, c_first_name#64, c_last_name#65, c_preferred_cust_flag#66, c_birth_country#60, c_login#67, c_email_address#68, d_year#74, sum#76]
Keys [8]: [c_customer_id#63, c_first_name#64, c_last_name#65, c_preferred_cust_flag#66, c_birth_country#60, c_login#67, c_email_address#68, d_year#74]
Functions [1]: [sum(UnscaledValue((ws_ext_list_price#71 - ws_ext_discount_amt#70)))]
Aggregate Attributes [1]: [sum(UnscaledValue((ws_ext_list_price#71 - ws_ext_discount_amt#70)))#77]
Results [2]: [c_customer_id#63 AS customer_id#78, MakeDecimal(sum(UnscaledValue((ws_ext_list_price#71 - ws_ext_discount_amt#70)))#77,18,2) AS year_total#79]

(55) Filter [codegen id : 11]
Input [2]: [customer_id#78, year_total#79]
Condition : (isnotnull(year_total#79) AND (year_total#79 > 0.00))

(56) BroadcastExchange
Input [2]: [customer_id#78, year_total#79]
Arguments: HashedRelationBroadcastMode(List(input[0, string, true]),false), [plan_id=8]

(57) BroadcastHashJoin [codegen id : 16]
Left keys [1]: [customer_id#25]
Right keys [1]: [customer_id#78]
Join type: Inner
Join condition: None

(58) Project [codegen id : 16]
Output [8]: [customer_id#25, year_total#26, customer_id#50, customer_first_name#51, customer_last_name#52, customer_email_address#53, year_total#54, year_total#79]
Input [9]: [customer_id#25, year_total#26, customer_id#50, customer_first_name#51, customer_last_name#52, customer_email_address#53, year_total#54, customer_id#78, year_total#79]

(59) CometNativeScan parquet spark_catalog.default.customer
Output [8]: [c_customer_sk#80, c_customer_id#81, c_first_name#82, c_last_name#83, c_preferred_cust_flag#84, c_birth_country#85, c_login#86, c_email_address#87]
Batched: true
Location [not included in comparison]/{warehouse_dir}/customer]
PushedFilters: [IsNotNull(c_customer_sk)]
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>

(60) CometFilter
Input [8]: [c_customer_sk#80, c_customer_id#81, c_first_name#82, c_last_name#83, c_preferred_cust_flag#84, c_birth_country#85, c_login#86, c_email_address#87]
Condition : (isnotnull(c_customer_sk#80) AND isnotnull(static_invoke(CharVarcharCodegenUtils.readSidePadding(c_customer_id#81, 16))))

(61) CometProject
Input [8]: [c_customer_sk#80, c_customer_id#81, c_first_name#82, c_last_name#83, c_preferred_cust_flag#84, c_birth_country#85, c_login#86, c_email_address#87]
Arguments: [c_customer_sk#80, c_customer_id#88, c_first_name#89, c_last_name#90, c_preferred_cust_flag#91, c_birth_country#85, c_login#92, c_email_address#93], [c_customer_sk#80, static_invoke(CharVarcharCodegenUtils.readSidePadding(c_customer_id#81, 16)) AS c_customer_id#88, static_invoke(CharVarcharCodegenUtils.readSidePadding(c_first_name#82, 20)) AS c_first_name#89, static_invoke(CharVarcharCodegenUtils.readSidePadding(c_last_name#83, 30)) AS c_last_name#90, static_invoke(CharVarcharCodegenUtils.readSidePadding(c_preferred_cust_flag#84, 1)) AS c_preferred_cust_flag#91, c_birth_country#85, static_invoke(CharVarcharCodegenUtils.readSidePadding(c_login#86, 13)) AS c_login#92, static_invoke(CharVarcharCodegenUtils.readSidePadding(c_email_address#87, 50)) AS c_email_address#93]

(62) CometColumnarToRow [codegen id : 14]
Input [8]: [c_customer_sk#80, c_customer_id#88, c_first_name#89, c_last_name#90, c_preferred_cust_flag#91, c_birth_country#85, c_login#92, c_email_address#93]

(63) Scan parquet spark_catalog.default.web_sales
Output [4]: [ws_bill_customer_sk#94, ws_ext_discount_amt#95, ws_ext_list_price#96, ws_sold_date_sk#97]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(ws_sold_date_sk#97), dynamicpruningexpression(ws_sold_date_sk#97 IN dynamicpruning#45)]
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)>

(64) ColumnarToRow [codegen id : 12]
Input [4]: [ws_bill_customer_sk#94, ws_ext_discount_amt#95, ws_ext_list_price#96, ws_sold_date_sk#97]

(65) Filter [codegen id : 12]
Input [4]: [ws_bill_customer_sk#94, ws_ext_discount_amt#95, ws_ext_list_price#96, ws_sold_date_sk#97]
Condition : isnotnull(ws_bill_customer_sk#94)

(66) BroadcastExchange
Input [4]: [ws_bill_customer_sk#94, ws_ext_discount_amt#95, ws_ext_list_price#96, ws_sold_date_sk#97]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, false] as bigint)),false), [plan_id=9]

(67) BroadcastHashJoin [codegen id : 14]
Left keys [1]: [c_customer_sk#80]
Right keys [1]: [ws_bill_customer_sk#94]
Join type: Inner
Join condition: None

(68) Project [codegen id : 14]
Output [10]: [c_customer_id#88, c_first_name#89, c_last_name#90, c_preferred_cust_flag#91, c_birth_country#85, c_login#92, c_email_address#93, ws_ext_discount_amt#95, ws_ext_list_price#96, ws_sold_date_sk#97]
Input [12]: [c_customer_sk#80, c_customer_id#88, c_first_name#89, c_last_name#90, c_preferred_cust_flag#91, c_birth_country#85, c_login#92, c_email_address#93, ws_bill_customer_sk#94, ws_ext_discount_amt#95, ws_ext_list_price#96, ws_sold_date_sk#97]

(69) ReusedExchange [Reuses operator id: 87]
Output [2]: [d_date_sk#98, d_year#99]

(70) BroadcastHashJoin [codegen id : 14]
Left keys [1]: [ws_sold_date_sk#97]
Right keys [1]: [d_date_sk#98]
Join type: Inner
Join condition: None

(71) Project [codegen id : 14]
Output [10]: [c_customer_id#88, c_first_name#89, c_last_name#90, c_preferred_cust_flag#91, c_birth_country#85, c_login#92, c_email_address#93, ws_ext_discount_amt#95, ws_ext_list_price#96, d_year#99]
Input [12]: [c_customer_id#88, c_first_name#89, c_last_name#90, c_preferred_cust_flag#91, c_birth_country#85, c_login#92, c_email_address#93, ws_ext_discount_amt#95, ws_ext_list_price#96, ws_sold_date_sk#97, d_date_sk#98, d_year#99]

(72) HashAggregate [codegen id : 14]
Input [10]: [c_customer_id#88, c_first_name#89, c_last_name#90, c_preferred_cust_flag#91, c_birth_country#85, c_login#92, c_email_address#93, ws_ext_discount_amt#95, ws_ext_list_price#96, d_year#99]
Keys [8]: [c_customer_id#88, c_first_name#89, c_last_name#90, c_preferred_cust_flag#91, c_birth_country#85, c_login#92, c_email_address#93, d_year#99]
Functions [1]: [partial_sum(UnscaledValue((ws_ext_list_price#96 - ws_ext_discount_amt#95)))]
Aggregate Attributes [1]: [sum#100]
Results [9]: [c_customer_id#88, c_first_name#89, c_last_name#90, c_preferred_cust_flag#91, c_birth_country#85, c_login#92, c_email_address#93, d_year#99, sum#101]

(73) CometColumnarExchange
Input [9]: [c_customer_id#88, c_first_name#89, c_last_name#90, c_preferred_cust_flag#91, c_birth_country#85, c_login#92, c_email_address#93, d_year#99, sum#101]
Arguments: hashpartitioning(c_customer_id#88, c_first_name#89, c_last_name#90, c_preferred_cust_flag#91, c_birth_country#85, c_login#92, c_email_address#93, d_year#99, 5), ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=10]

(74) CometColumnarToRow [codegen id : 15]
Input [9]: [c_customer_id#88, c_first_name#89, c_last_name#90, c_preferred_cust_flag#91, c_birth_country#85, c_login#92, c_email_address#93, d_year#99, sum#101]

(75) HashAggregate [codegen id : 15]
Input [9]: [c_customer_id#88, c_first_name#89, c_last_name#90, c_preferred_cust_flag#91, c_birth_country#85, c_login#92, c_email_address#93, d_year#99, sum#101]
Keys [8]: [c_customer_id#88, c_first_name#89, c_last_name#90, c_preferred_cust_flag#91, c_birth_country#85, c_login#92, c_email_address#93, d_year#99]
Functions [1]: [sum(UnscaledValue((ws_ext_list_price#96 - ws_ext_discount_amt#95)))]
Aggregate Attributes [1]: [sum(UnscaledValue((ws_ext_list_price#96 - ws_ext_discount_amt#95)))#77]
Results [2]: [c_customer_id#88 AS customer_id#102, MakeDecimal(sum(UnscaledValue((ws_ext_list_price#96 - ws_ext_discount_amt#95)))#77,18,2) AS year_total#103]

(76) BroadcastExchange
Input [2]: [customer_id#102, year_total#103]
Arguments: HashedRelationBroadcastMode(List(input[0, string, true]),false), [plan_id=11]

(77) BroadcastHashJoin [codegen id : 16]
Left keys [1]: [customer_id#25]
Right keys [1]: [customer_id#102]
Join type: Inner
Join condition: (CASE WHEN (year_total#79 > 0.00) THEN (year_total#103 / year_total#79) ELSE 0E-20 END > CASE WHEN (year_total#26 > 0.00) THEN (year_total#54 / year_total#26) ELSE 0E-20 END)

(78) Project [codegen id : 16]
Output [4]: [customer_id#50, customer_first_name#51, customer_last_name#52, customer_email_address#53]
Input [10]: [customer_id#25, year_total#26, customer_id#50, customer_first_name#51, customer_last_name#52, customer_email_address#53, year_total#54, year_total#79, customer_id#102, year_total#103]

(79) TakeOrderedAndProject
Input [4]: [customer_id#50, customer_first_name#51, customer_last_name#52, customer_email_address#53]
Arguments: 100, [customer_id#50 ASC NULLS FIRST, customer_first_name#51 ASC NULLS FIRST, customer_last_name#52 ASC NULLS FIRST, customer_email_address#53 ASC NULLS FIRST], [customer_id#50, customer_first_name#51, customer_last_name#52, customer_email_address#53]

===== Subqueries =====

Subquery:1 Hosting operator id = 5 Hosting Expression = ss_sold_date_sk#18 IN dynamicpruning#19
BroadcastExchange (83)
+- * CometColumnarToRow (82)
   +- CometFilter (81)
      +- CometNativeScan parquet spark_catalog.default.date_dim (80)


(80) CometNativeScan parquet spark_catalog.default.date_dim
Output [2]: [d_date_sk#20, d_year#21]
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>

(81) CometFilter
Input [2]: [d_date_sk#20, d_year#21]
Condition : ((isnotnull(d_year#21) AND (d_year#21 = 2001)) AND isnotnull(d_date_sk#20))

(82) CometColumnarToRow [codegen id : 1]
Input [2]: [d_date_sk#20, d_year#21]

(83) BroadcastExchange
Input [2]: [d_date_sk#20, d_year#21]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, false] as bigint)),false), [plan_id=12]

Subquery:2 Hosting operator id = 23 Hosting Expression = ss_sold_date_sk#44 IN dynamicpruning#45
BroadcastExchange (87)
+- * CometColumnarToRow (86)
   +- CometFilter (85)
      +- CometNativeScan parquet spark_catalog.default.date_dim (84)


(84) CometNativeScan parquet spark_catalog.default.date_dim
Output [2]: [d_date_sk#46, d_year#47]
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>

(85) CometFilter
Input [2]: [d_date_sk#46, d_year#47]
Condition : ((isnotnull(d_year#47) AND (d_year#47 = 2002)) AND isnotnull(d_date_sk#46))

(86) CometColumnarToRow [codegen id : 1]
Input [2]: [d_date_sk#46, d_year#47]

(87) BroadcastExchange
Input [2]: [d_date_sk#46, d_year#47]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, false] as bigint)),false), [plan_id=13]

Subquery:3 Hosting operator id = 42 Hosting Expression = ws_sold_date_sk#72 IN dynamicpruning#19

Subquery:4 Hosting operator id = 63 Hosting Expression = ws_sold_date_sk#97 IN dynamicpruning#45


