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


(1) CometScan 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(staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_customer_id#2, 16, true, false, true)))

(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, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_customer_id#2, 16, true, false, true) AS c_customer_id#9, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_first_name#3, 20, true, false, true) AS c_first_name#10, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_last_name#4, 30, true, false, true) AS c_last_name#11, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_preferred_cust_flag#5, 1, true, false, true) AS c_preferred_cust_flag#12, c_birth_country#6, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_login#7, 13, true, false, true) AS c_login#13, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_email_address#8, 50, true, false, true) AS c_email_address#14]

(4) CometScan 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)>

(5) CometFilter
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)

(6) CometBroadcastExchange
Input [4]: [ss_customer_sk#15, ss_ext_discount_amt#16, ss_ext_list_price#17, ss_sold_date_sk#18]
Arguments: [ss_customer_sk#15, ss_ext_discount_amt#16, ss_ext_list_price#17, ss_sold_date_sk#18]

(7) CometBroadcastHashJoin
Left output [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]
Right output [4]: [ss_customer_sk#15, ss_ext_discount_amt#16, ss_ext_list_price#17, ss_sold_date_sk#18]
Arguments: [c_customer_sk#1], [ss_customer_sk#15], Inner, BuildRight

(8) CometProject
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]
Arguments: [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], [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]

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

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

(11) CometBroadcastExchange
Input [2]: [d_date_sk#20, d_year#21]
Arguments: [d_date_sk#20, d_year#21]

(12) CometBroadcastHashJoin
Left 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]
Right output [2]: [d_date_sk#20, d_year#21]
Arguments: [ss_sold_date_sk#18], [d_date_sk#20], Inner, BuildRight

(13) CometProject
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]
Arguments: [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], [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]

(14) CometColumnarToRow [codegen id : 1]
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]

(15) HashAggregate [codegen id : 1]
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]

(16) 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=1]

(17) CometColumnarToRow [codegen id : 8]
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]

(18) HashAggregate [codegen id : 8]
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]

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

(20) CometScan 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>

(21) 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(staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_customer_id#28, 16, true, false, true)))

(22) 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, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_customer_id#28, 16, true, false, true) AS c_customer_id#35, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_first_name#29, 20, true, false, true) AS c_first_name#36, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_last_name#30, 30, true, false, true) AS c_last_name#37, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_preferred_cust_flag#31, 1, true, false, true) AS c_preferred_cust_flag#38, c_birth_country#32, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_login#33, 13, true, false, true) AS c_login#39, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_email_address#34, 50, true, false, true) AS c_email_address#40]

(23) CometScan 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) CometFilter
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)

(25) CometBroadcastExchange
Input [4]: [ss_customer_sk#41, ss_ext_discount_amt#42, ss_ext_list_price#43, ss_sold_date_sk#44]
Arguments: [ss_customer_sk#41, ss_ext_discount_amt#42, ss_ext_list_price#43, ss_sold_date_sk#44]

(26) CometBroadcastHashJoin
Left output [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]
Right output [4]: [ss_customer_sk#41, ss_ext_discount_amt#42, ss_ext_list_price#43, ss_sold_date_sk#44]
Arguments: [c_customer_sk#27], [ss_customer_sk#41], Inner, BuildRight

(27) CometProject
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]
Arguments: [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], [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]

(28) CometScan 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>

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

(30) CometBroadcastExchange
Input [2]: [d_date_sk#46, d_year#47]
Arguments: [d_date_sk#46, d_year#47]

(31) CometBroadcastHashJoin
Left 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]
Right output [2]: [d_date_sk#46, d_year#47]
Arguments: [ss_sold_date_sk#44], [d_date_sk#46], Inner, BuildRight

(32) CometProject
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]
Arguments: [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], [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]

(33) CometColumnarToRow [codegen id : 2]
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]

(34) HashAggregate [codegen id : 2]
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]

(35) 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=2]

(36) CometColumnarToRow [codegen id : 3]
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]

(37) HashAggregate [codegen id : 3]
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]

(38) 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=3]

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

(40) CometScan 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>

(41) 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(staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_customer_id#56, 16, true, false, true)))

(42) 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, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_customer_id#56, 16, true, false, true) AS c_customer_id#63, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_first_name#57, 20, true, false, true) AS c_first_name#64, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_last_name#58, 30, true, false, true) AS c_last_name#65, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_preferred_cust_flag#59, 1, true, false, true) AS c_preferred_cust_flag#66, c_birth_country#60, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_login#61, 13, true, false, true) AS c_login#67, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_email_address#62, 50, true, false, true) AS c_email_address#68]

(43) CometScan 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#73)]
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)>

(44) CometFilter
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) CometBroadcastExchange
Input [4]: [ws_bill_customer_sk#69, ws_ext_discount_amt#70, ws_ext_list_price#71, ws_sold_date_sk#72]
Arguments: [ws_bill_customer_sk#69, ws_ext_discount_amt#70, ws_ext_list_price#71, ws_sold_date_sk#72]

(46) CometBroadcastHashJoin
Left output [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]
Right output [4]: [ws_bill_customer_sk#69, ws_ext_discount_amt#70, ws_ext_list_price#71, ws_sold_date_sk#72]
Arguments: [c_customer_sk#55], [ws_bill_customer_sk#69], Inner, BuildRight

(47) CometProject
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]
Arguments: [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], [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]

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

(49) CometBroadcastHashJoin
Left 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]
Right output [2]: [d_date_sk#74, d_year#75]
Arguments: [ws_sold_date_sk#72], [d_date_sk#74], Inner, BuildRight

(50) CometProject
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#74, d_year#75]
Arguments: [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#75], [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#75]

(51) CometColumnarToRow [codegen id : 4]
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#75]

(52) HashAggregate [codegen id : 4]
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#75]
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#75]
Functions [1]: [partial_sum(UnscaledValue((ws_ext_list_price#71 - ws_ext_discount_amt#70)))]
Aggregate Attributes [1]: [sum#76]
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#75, sum#77]

(53) 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#75, sum#77]
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#75, 5), ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=4]

(54) CometColumnarToRow [codegen id : 5]
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#75, sum#77]

(55) HashAggregate [codegen id : 5]
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#75, sum#77]
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#75]
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)))#78]
Results [2]: [c_customer_id#63 AS customer_id#79, MakeDecimal(sum(UnscaledValue((ws_ext_list_price#71 - ws_ext_discount_amt#70)))#78,18,2) AS year_total#80]

(56) Filter [codegen id : 5]
Input [2]: [customer_id#79, year_total#80]
Condition : (isnotnull(year_total#80) AND (year_total#80 > 0.00))

(57) BroadcastExchange
Input [2]: [customer_id#79, year_total#80]
Arguments: HashedRelationBroadcastMode(List(input[0, string, true]),false), [plan_id=5]

(58) BroadcastHashJoin [codegen id : 8]
Left keys [1]: [customer_id#25]
Right keys [1]: [customer_id#79]
Join type: Inner
Join condition: None

(59) Project [codegen id : 8]
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#80]
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#79, year_total#80]

(60) CometScan parquet spark_catalog.default.customer
Output [8]: [c_customer_sk#81, c_customer_id#82, c_first_name#83, c_last_name#84, c_preferred_cust_flag#85, c_birth_country#86, c_login#87, c_email_address#88]
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>

(61) CometFilter
Input [8]: [c_customer_sk#81, c_customer_id#82, c_first_name#83, c_last_name#84, c_preferred_cust_flag#85, c_birth_country#86, c_login#87, c_email_address#88]
Condition : (isnotnull(c_customer_sk#81) AND isnotnull(staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_customer_id#82, 16, true, false, true)))

(62) CometProject
Input [8]: [c_customer_sk#81, c_customer_id#82, c_first_name#83, c_last_name#84, c_preferred_cust_flag#85, c_birth_country#86, c_login#87, c_email_address#88]
Arguments: [c_customer_sk#81, c_customer_id#89, c_first_name#90, c_last_name#91, c_preferred_cust_flag#92, c_birth_country#86, c_login#93, c_email_address#94], [c_customer_sk#81, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_customer_id#82, 16, true, false, true) AS c_customer_id#89, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_first_name#83, 20, true, false, true) AS c_first_name#90, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_last_name#84, 30, true, false, true) AS c_last_name#91, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_preferred_cust_flag#85, 1, true, false, true) AS c_preferred_cust_flag#92, c_birth_country#86, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_login#87, 13, true, false, true) AS c_login#93, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_email_address#88, 50, true, false, true) AS c_email_address#94]

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

(65) CometBroadcastExchange
Input [4]: [ws_bill_customer_sk#95, ws_ext_discount_amt#96, ws_ext_list_price#97, ws_sold_date_sk#98]
Arguments: [ws_bill_customer_sk#95, ws_ext_discount_amt#96, ws_ext_list_price#97, ws_sold_date_sk#98]

(66) CometBroadcastHashJoin
Left output [8]: [c_customer_sk#81, c_customer_id#89, c_first_name#90, c_last_name#91, c_preferred_cust_flag#92, c_birth_country#86, c_login#93, c_email_address#94]
Right output [4]: [ws_bill_customer_sk#95, ws_ext_discount_amt#96, ws_ext_list_price#97, ws_sold_date_sk#98]
Arguments: [c_customer_sk#81], [ws_bill_customer_sk#95], Inner, BuildRight

(67) CometProject
Input [12]: [c_customer_sk#81, c_customer_id#89, c_first_name#90, c_last_name#91, c_preferred_cust_flag#92, c_birth_country#86, c_login#93, c_email_address#94, ws_bill_customer_sk#95, ws_ext_discount_amt#96, ws_ext_list_price#97, ws_sold_date_sk#98]
Arguments: [c_customer_id#89, c_first_name#90, c_last_name#91, c_preferred_cust_flag#92, c_birth_country#86, c_login#93, c_email_address#94, ws_ext_discount_amt#96, ws_ext_list_price#97, ws_sold_date_sk#98], [c_customer_id#89, c_first_name#90, c_last_name#91, c_preferred_cust_flag#92, c_birth_country#86, c_login#93, c_email_address#94, ws_ext_discount_amt#96, ws_ext_list_price#97, ws_sold_date_sk#98]

(68) ReusedExchange [Reuses operator id: 30]
Output [2]: [d_date_sk#100, d_year#101]

(69) CometBroadcastHashJoin
Left output [10]: [c_customer_id#89, c_first_name#90, c_last_name#91, c_preferred_cust_flag#92, c_birth_country#86, c_login#93, c_email_address#94, ws_ext_discount_amt#96, ws_ext_list_price#97, ws_sold_date_sk#98]
Right output [2]: [d_date_sk#100, d_year#101]
Arguments: [ws_sold_date_sk#98], [d_date_sk#100], Inner, BuildRight

(70) CometProject
Input [12]: [c_customer_id#89, c_first_name#90, c_last_name#91, c_preferred_cust_flag#92, c_birth_country#86, c_login#93, c_email_address#94, ws_ext_discount_amt#96, ws_ext_list_price#97, ws_sold_date_sk#98, d_date_sk#100, d_year#101]
Arguments: [c_customer_id#89, c_first_name#90, c_last_name#91, c_preferred_cust_flag#92, c_birth_country#86, c_login#93, c_email_address#94, ws_ext_discount_amt#96, ws_ext_list_price#97, d_year#101], [c_customer_id#89, c_first_name#90, c_last_name#91, c_preferred_cust_flag#92, c_birth_country#86, c_login#93, c_email_address#94, ws_ext_discount_amt#96, ws_ext_list_price#97, d_year#101]

(71) CometColumnarToRow [codegen id : 6]
Input [10]: [c_customer_id#89, c_first_name#90, c_last_name#91, c_preferred_cust_flag#92, c_birth_country#86, c_login#93, c_email_address#94, ws_ext_discount_amt#96, ws_ext_list_price#97, d_year#101]

(72) HashAggregate [codegen id : 6]
Input [10]: [c_customer_id#89, c_first_name#90, c_last_name#91, c_preferred_cust_flag#92, c_birth_country#86, c_login#93, c_email_address#94, ws_ext_discount_amt#96, ws_ext_list_price#97, d_year#101]
Keys [8]: [c_customer_id#89, c_first_name#90, c_last_name#91, c_preferred_cust_flag#92, c_birth_country#86, c_login#93, c_email_address#94, d_year#101]
Functions [1]: [partial_sum(UnscaledValue((ws_ext_list_price#97 - ws_ext_discount_amt#96)))]
Aggregate Attributes [1]: [sum#102]
Results [9]: [c_customer_id#89, c_first_name#90, c_last_name#91, c_preferred_cust_flag#92, c_birth_country#86, c_login#93, c_email_address#94, d_year#101, sum#103]

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

(74) CometColumnarToRow [codegen id : 7]
Input [9]: [c_customer_id#89, c_first_name#90, c_last_name#91, c_preferred_cust_flag#92, c_birth_country#86, c_login#93, c_email_address#94, d_year#101, sum#103]

(75) HashAggregate [codegen id : 7]
Input [9]: [c_customer_id#89, c_first_name#90, c_last_name#91, c_preferred_cust_flag#92, c_birth_country#86, c_login#93, c_email_address#94, d_year#101, sum#103]
Keys [8]: [c_customer_id#89, c_first_name#90, c_last_name#91, c_preferred_cust_flag#92, c_birth_country#86, c_login#93, c_email_address#94, d_year#101]
Functions [1]: [sum(UnscaledValue((ws_ext_list_price#97 - ws_ext_discount_amt#96)))]
Aggregate Attributes [1]: [sum(UnscaledValue((ws_ext_list_price#97 - ws_ext_discount_amt#96)))#78]
Results [2]: [c_customer_id#89 AS customer_id#104, MakeDecimal(sum(UnscaledValue((ws_ext_list_price#97 - ws_ext_discount_amt#96)))#78,18,2) AS year_total#105]

(76) BroadcastExchange
Input [2]: [customer_id#104, year_total#105]
Arguments: HashedRelationBroadcastMode(List(input[0, string, true]),false), [plan_id=7]

(77) BroadcastHashJoin [codegen id : 8]
Left keys [1]: [customer_id#25]
Right keys [1]: [customer_id#104]
Join type: Inner
Join condition: (CASE WHEN (year_total#80 > 0.00) THEN (year_total#105 / year_total#80) 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 : 8]
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#80, customer_id#104, year_total#105]

(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 = 4 Hosting Expression = ss_sold_date_sk#18 IN dynamicpruning#19
BroadcastExchange (83)
+- * CometColumnarToRow (82)
   +- CometFilter (81)
      +- CometScan parquet spark_catalog.default.date_dim (80)


(80) CometScan 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=8]

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


(84) CometScan 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=9]

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

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


