== Physical Plan ==
TakeOrderedAndProject (71)
+- * Project (70)
   +- * BroadcastHashJoin Inner BuildRight (69)
      :- * Project (53)
      :  +- * BroadcastHashJoin Inner BuildRight (52)
      :     :- * BroadcastHashJoin Inner BuildRight (35)
      :     :  :- * Filter (17)
      :     :  :  +- * HashAggregate (16)
      :     :  :     +- Exchange (15)
      :     :  :        +- * ColumnarToRow (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)
      :     :  +- BroadcastExchange (34)
      :     :     +- * HashAggregate (33)
      :     :        +- Exchange (32)
      :     :           +- * ColumnarToRow (31)
      :     :              +- CometHashAggregate (30)
      :     :                 +- CometProject (29)
      :     :                    +- CometBroadcastHashJoin (28)
      :     :                       :- CometProject (24)
      :     :                       :  +- CometBroadcastHashJoin (23)
      :     :                       :     :- CometFilter (19)
      :     :                       :     :  +- CometScan parquet spark_catalog.default.customer (18)
      :     :                       :     +- CometBroadcastExchange (22)
      :     :                       :        +- CometFilter (21)
      :     :                       :           +- CometScan parquet spark_catalog.default.store_sales (20)
      :     :                       +- CometBroadcastExchange (27)
      :     :                          +- CometFilter (26)
      :     :                             +- CometScan parquet spark_catalog.default.date_dim (25)
      :     +- BroadcastExchange (51)
      :        +- * Filter (50)
      :           +- * HashAggregate (49)
      :              +- Exchange (48)
      :                 +- * ColumnarToRow (47)
      :                    +- CometHashAggregate (46)
      :                       +- CometProject (45)
      :                          +- CometBroadcastHashJoin (44)
      :                             :- CometProject (42)
      :                             :  +- CometBroadcastHashJoin (41)
      :                             :     :- CometFilter (37)
      :                             :     :  +- CometScan parquet spark_catalog.default.customer (36)
      :                             :     +- CometBroadcastExchange (40)
      :                             :        +- CometFilter (39)
      :                             :           +- CometScan parquet spark_catalog.default.web_sales (38)
      :                             +- ReusedExchange (43)
      +- BroadcastExchange (68)
         +- * HashAggregate (67)
            +- Exchange (66)
               +- * ColumnarToRow (65)
                  +- CometHashAggregate (64)
                     +- CometProject (63)
                        +- CometBroadcastHashJoin (62)
                           :- CometProject (60)
                           :  +- CometBroadcastHashJoin (59)
                           :     :- CometFilter (55)
                           :     :  +- CometScan parquet spark_catalog.default.customer (54)
                           :     +- CometBroadcastExchange (58)
                           :        +- CometFilter (57)
                           :           +- CometScan parquet spark_catalog.default.web_sales (56)
                           +- ReusedExchange (61)


(1) Scan parquet spark_catalog.default.customer
Output [4]: [c_customer_sk#1, c_customer_id#2, c_first_name#3, c_last_name#4]
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>

(2) CometFilter
Input [4]: [c_customer_sk#1, c_customer_id#2, c_first_name#3, c_last_name#4]
Condition : (isnotnull(c_customer_sk#1) AND isnotnull(c_customer_id#2))

(3) Scan parquet spark_catalog.default.store_sales
Output [3]: [ss_customer_sk#5, ss_net_paid#6, ss_sold_date_sk#7]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(ss_sold_date_sk#7), dynamicpruningexpression(ss_sold_date_sk#7 IN dynamicpruning#8)]
PushedFilters: [IsNotNull(ss_customer_sk)]
ReadSchema: struct<ss_customer_sk:int,ss_net_paid:decimal(7,2)>

(4) CometFilter
Input [3]: [ss_customer_sk#5, ss_net_paid#6, ss_sold_date_sk#7]
Condition : isnotnull(ss_customer_sk#5)

(5) CometBroadcastExchange
Input [3]: [ss_customer_sk#5, ss_net_paid#6, ss_sold_date_sk#7]
Arguments: [ss_customer_sk#5, ss_net_paid#6, ss_sold_date_sk#7]

(6) CometBroadcastHashJoin
Left output [4]: [c_customer_sk#1, c_customer_id#2, c_first_name#3, c_last_name#4]
Right output [3]: [ss_customer_sk#5, ss_net_paid#6, ss_sold_date_sk#7]
Arguments: [c_customer_sk#1], [ss_customer_sk#5], Inner, BuildRight

(7) CometProject
Input [7]: [c_customer_sk#1, c_customer_id#2, c_first_name#3, c_last_name#4, ss_customer_sk#5, ss_net_paid#6, ss_sold_date_sk#7]
Arguments: [c_customer_id#2, c_first_name#3, c_last_name#4, ss_net_paid#6, ss_sold_date_sk#7], [c_customer_id#2, c_first_name#3, c_last_name#4, ss_net_paid#6, ss_sold_date_sk#7]

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

(9) CometFilter
Input [2]: [d_date_sk#9, d_year#10]
Condition : (((isnotnull(d_year#10) AND (d_year#10 = 2001)) AND d_year#10 IN (2001,2002)) AND isnotnull(d_date_sk#9))

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

(11) CometBroadcastHashJoin
Left output [5]: [c_customer_id#2, c_first_name#3, c_last_name#4, ss_net_paid#6, ss_sold_date_sk#7]
Right output [2]: [d_date_sk#9, d_year#10]
Arguments: [ss_sold_date_sk#7], [d_date_sk#9], Inner, BuildRight

(12) CometProject
Input [7]: [c_customer_id#2, c_first_name#3, c_last_name#4, ss_net_paid#6, ss_sold_date_sk#7, d_date_sk#9, d_year#10]
Arguments: [c_customer_id#2, c_first_name#3, c_last_name#4, ss_net_paid#6, d_year#10], [c_customer_id#2, c_first_name#3, c_last_name#4, ss_net_paid#6, d_year#10]

(13) CometHashAggregate
Input [5]: [c_customer_id#2, c_first_name#3, c_last_name#4, ss_net_paid#6, d_year#10]
Keys [4]: [c_customer_id#2, c_first_name#3, c_last_name#4, d_year#10]
Functions [1]: [partial_sum(UnscaledValue(ss_net_paid#6))]

(14) ColumnarToRow [codegen id : 1]
Input [5]: [c_customer_id#2, c_first_name#3, c_last_name#4, d_year#10, sum#11]

(15) Exchange
Input [5]: [c_customer_id#2, c_first_name#3, c_last_name#4, d_year#10, sum#11]
Arguments: hashpartitioning(c_customer_id#2, c_first_name#3, c_last_name#4, d_year#10, 5), ENSURE_REQUIREMENTS, [plan_id=1]

(16) HashAggregate [codegen id : 8]
Input [5]: [c_customer_id#2, c_first_name#3, c_last_name#4, d_year#10, sum#11]
Keys [4]: [c_customer_id#2, c_first_name#3, c_last_name#4, d_year#10]
Functions [1]: [sum(UnscaledValue(ss_net_paid#6))]
Aggregate Attributes [1]: [sum(UnscaledValue(ss_net_paid#6))#12]
Results [2]: [c_customer_id#2 AS customer_id#13, MakeDecimal(sum(UnscaledValue(ss_net_paid#6))#12,17,2) AS year_total#14]

(17) Filter [codegen id : 8]
Input [2]: [customer_id#13, year_total#14]
Condition : (isnotnull(year_total#14) AND (year_total#14 > 0.00))

(18) Scan parquet spark_catalog.default.customer
Output [4]: [c_customer_sk#15, c_customer_id#16, c_first_name#17, c_last_name#18]
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>

(19) CometFilter
Input [4]: [c_customer_sk#15, c_customer_id#16, c_first_name#17, c_last_name#18]
Condition : (isnotnull(c_customer_sk#15) AND isnotnull(c_customer_id#16))

(20) Scan parquet spark_catalog.default.store_sales
Output [3]: [ss_customer_sk#19, ss_net_paid#20, ss_sold_date_sk#21]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(ss_sold_date_sk#21), dynamicpruningexpression(ss_sold_date_sk#21 IN dynamicpruning#22)]
PushedFilters: [IsNotNull(ss_customer_sk)]
ReadSchema: struct<ss_customer_sk:int,ss_net_paid:decimal(7,2)>

(21) CometFilter
Input [3]: [ss_customer_sk#19, ss_net_paid#20, ss_sold_date_sk#21]
Condition : isnotnull(ss_customer_sk#19)

(22) CometBroadcastExchange
Input [3]: [ss_customer_sk#19, ss_net_paid#20, ss_sold_date_sk#21]
Arguments: [ss_customer_sk#19, ss_net_paid#20, ss_sold_date_sk#21]

(23) CometBroadcastHashJoin
Left output [4]: [c_customer_sk#15, c_customer_id#16, c_first_name#17, c_last_name#18]
Right output [3]: [ss_customer_sk#19, ss_net_paid#20, ss_sold_date_sk#21]
Arguments: [c_customer_sk#15], [ss_customer_sk#19], Inner, BuildRight

(24) CometProject
Input [7]: [c_customer_sk#15, c_customer_id#16, c_first_name#17, c_last_name#18, ss_customer_sk#19, ss_net_paid#20, ss_sold_date_sk#21]
Arguments: [c_customer_id#16, c_first_name#17, c_last_name#18, ss_net_paid#20, ss_sold_date_sk#21], [c_customer_id#16, c_first_name#17, c_last_name#18, ss_net_paid#20, ss_sold_date_sk#21]

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

(26) CometFilter
Input [2]: [d_date_sk#23, d_year#24]
Condition : (((isnotnull(d_year#24) AND (d_year#24 = 2002)) AND d_year#24 IN (2001,2002)) AND isnotnull(d_date_sk#23))

(27) CometBroadcastExchange
Input [2]: [d_date_sk#23, d_year#24]
Arguments: [d_date_sk#23, d_year#24]

(28) CometBroadcastHashJoin
Left output [5]: [c_customer_id#16, c_first_name#17, c_last_name#18, ss_net_paid#20, ss_sold_date_sk#21]
Right output [2]: [d_date_sk#23, d_year#24]
Arguments: [ss_sold_date_sk#21], [d_date_sk#23], Inner, BuildRight

(29) CometProject
Input [7]: [c_customer_id#16, c_first_name#17, c_last_name#18, ss_net_paid#20, ss_sold_date_sk#21, d_date_sk#23, d_year#24]
Arguments: [c_customer_id#16, c_first_name#17, c_last_name#18, ss_net_paid#20, d_year#24], [c_customer_id#16, c_first_name#17, c_last_name#18, ss_net_paid#20, d_year#24]

(30) CometHashAggregate
Input [5]: [c_customer_id#16, c_first_name#17, c_last_name#18, ss_net_paid#20, d_year#24]
Keys [4]: [c_customer_id#16, c_first_name#17, c_last_name#18, d_year#24]
Functions [1]: [partial_sum(UnscaledValue(ss_net_paid#20))]

(31) ColumnarToRow [codegen id : 2]
Input [5]: [c_customer_id#16, c_first_name#17, c_last_name#18, d_year#24, sum#25]

(32) Exchange
Input [5]: [c_customer_id#16, c_first_name#17, c_last_name#18, d_year#24, sum#25]
Arguments: hashpartitioning(c_customer_id#16, c_first_name#17, c_last_name#18, d_year#24, 5), ENSURE_REQUIREMENTS, [plan_id=2]

(33) HashAggregate [codegen id : 3]
Input [5]: [c_customer_id#16, c_first_name#17, c_last_name#18, d_year#24, sum#25]
Keys [4]: [c_customer_id#16, c_first_name#17, c_last_name#18, d_year#24]
Functions [1]: [sum(UnscaledValue(ss_net_paid#20))]
Aggregate Attributes [1]: [sum(UnscaledValue(ss_net_paid#20))#12]
Results [4]: [c_customer_id#16 AS customer_id#26, c_first_name#17 AS customer_first_name#27, c_last_name#18 AS customer_last_name#28, MakeDecimal(sum(UnscaledValue(ss_net_paid#20))#12,17,2) AS year_total#29]

(34) BroadcastExchange
Input [4]: [customer_id#26, customer_first_name#27, customer_last_name#28, year_total#29]
Arguments: HashedRelationBroadcastMode(List(input[0, string, true]),false), [plan_id=3]

(35) BroadcastHashJoin [codegen id : 8]
Left keys [1]: [customer_id#13]
Right keys [1]: [customer_id#26]
Join type: Inner
Join condition: None

(36) Scan parquet spark_catalog.default.customer
Output [4]: [c_customer_sk#30, c_customer_id#31, c_first_name#32, c_last_name#33]
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>

(37) CometFilter
Input [4]: [c_customer_sk#30, c_customer_id#31, c_first_name#32, c_last_name#33]
Condition : (isnotnull(c_customer_sk#30) AND isnotnull(c_customer_id#31))

(38) Scan parquet spark_catalog.default.web_sales
Output [3]: [ws_bill_customer_sk#34, ws_net_paid#35, ws_sold_date_sk#36]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(ws_sold_date_sk#36), dynamicpruningexpression(ws_sold_date_sk#36 IN dynamicpruning#37)]
PushedFilters: [IsNotNull(ws_bill_customer_sk)]
ReadSchema: struct<ws_bill_customer_sk:int,ws_net_paid:decimal(7,2)>

(39) CometFilter
Input [3]: [ws_bill_customer_sk#34, ws_net_paid#35, ws_sold_date_sk#36]
Condition : isnotnull(ws_bill_customer_sk#34)

(40) CometBroadcastExchange
Input [3]: [ws_bill_customer_sk#34, ws_net_paid#35, ws_sold_date_sk#36]
Arguments: [ws_bill_customer_sk#34, ws_net_paid#35, ws_sold_date_sk#36]

(41) CometBroadcastHashJoin
Left output [4]: [c_customer_sk#30, c_customer_id#31, c_first_name#32, c_last_name#33]
Right output [3]: [ws_bill_customer_sk#34, ws_net_paid#35, ws_sold_date_sk#36]
Arguments: [c_customer_sk#30], [ws_bill_customer_sk#34], Inner, BuildRight

(42) CometProject
Input [7]: [c_customer_sk#30, c_customer_id#31, c_first_name#32, c_last_name#33, ws_bill_customer_sk#34, ws_net_paid#35, ws_sold_date_sk#36]
Arguments: [c_customer_id#31, c_first_name#32, c_last_name#33, ws_net_paid#35, ws_sold_date_sk#36], [c_customer_id#31, c_first_name#32, c_last_name#33, ws_net_paid#35, ws_sold_date_sk#36]

(43) ReusedExchange [Reuses operator id: 10]
Output [2]: [d_date_sk#38, d_year#39]

(44) CometBroadcastHashJoin
Left output [5]: [c_customer_id#31, c_first_name#32, c_last_name#33, ws_net_paid#35, ws_sold_date_sk#36]
Right output [2]: [d_date_sk#38, d_year#39]
Arguments: [ws_sold_date_sk#36], [d_date_sk#38], Inner, BuildRight

(45) CometProject
Input [7]: [c_customer_id#31, c_first_name#32, c_last_name#33, ws_net_paid#35, ws_sold_date_sk#36, d_date_sk#38, d_year#39]
Arguments: [c_customer_id#31, c_first_name#32, c_last_name#33, ws_net_paid#35, d_year#39], [c_customer_id#31, c_first_name#32, c_last_name#33, ws_net_paid#35, d_year#39]

(46) CometHashAggregate
Input [5]: [c_customer_id#31, c_first_name#32, c_last_name#33, ws_net_paid#35, d_year#39]
Keys [4]: [c_customer_id#31, c_first_name#32, c_last_name#33, d_year#39]
Functions [1]: [partial_sum(UnscaledValue(ws_net_paid#35))]

(47) ColumnarToRow [codegen id : 4]
Input [5]: [c_customer_id#31, c_first_name#32, c_last_name#33, d_year#39, sum#40]

(48) Exchange
Input [5]: [c_customer_id#31, c_first_name#32, c_last_name#33, d_year#39, sum#40]
Arguments: hashpartitioning(c_customer_id#31, c_first_name#32, c_last_name#33, d_year#39, 5), ENSURE_REQUIREMENTS, [plan_id=4]

(49) HashAggregate [codegen id : 5]
Input [5]: [c_customer_id#31, c_first_name#32, c_last_name#33, d_year#39, sum#40]
Keys [4]: [c_customer_id#31, c_first_name#32, c_last_name#33, d_year#39]
Functions [1]: [sum(UnscaledValue(ws_net_paid#35))]
Aggregate Attributes [1]: [sum(UnscaledValue(ws_net_paid#35))#41]
Results [2]: [c_customer_id#31 AS customer_id#42, MakeDecimal(sum(UnscaledValue(ws_net_paid#35))#41,17,2) AS year_total#43]

(50) Filter [codegen id : 5]
Input [2]: [customer_id#42, year_total#43]
Condition : (isnotnull(year_total#43) AND (year_total#43 > 0.00))

(51) BroadcastExchange
Input [2]: [customer_id#42, year_total#43]
Arguments: HashedRelationBroadcastMode(List(input[0, string, true]),false), [plan_id=5]

(52) BroadcastHashJoin [codegen id : 8]
Left keys [1]: [customer_id#13]
Right keys [1]: [customer_id#42]
Join type: Inner
Join condition: None

(53) Project [codegen id : 8]
Output [7]: [customer_id#13, year_total#14, customer_id#26, customer_first_name#27, customer_last_name#28, year_total#29, year_total#43]
Input [8]: [customer_id#13, year_total#14, customer_id#26, customer_first_name#27, customer_last_name#28, year_total#29, customer_id#42, year_total#43]

(54) Scan parquet spark_catalog.default.customer
Output [4]: [c_customer_sk#44, c_customer_id#45, c_first_name#46, c_last_name#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>

(55) CometFilter
Input [4]: [c_customer_sk#44, c_customer_id#45, c_first_name#46, c_last_name#47]
Condition : (isnotnull(c_customer_sk#44) AND isnotnull(c_customer_id#45))

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

(57) CometFilter
Input [3]: [ws_bill_customer_sk#48, ws_net_paid#49, ws_sold_date_sk#50]
Condition : isnotnull(ws_bill_customer_sk#48)

(58) CometBroadcastExchange
Input [3]: [ws_bill_customer_sk#48, ws_net_paid#49, ws_sold_date_sk#50]
Arguments: [ws_bill_customer_sk#48, ws_net_paid#49, ws_sold_date_sk#50]

(59) CometBroadcastHashJoin
Left output [4]: [c_customer_sk#44, c_customer_id#45, c_first_name#46, c_last_name#47]
Right output [3]: [ws_bill_customer_sk#48, ws_net_paid#49, ws_sold_date_sk#50]
Arguments: [c_customer_sk#44], [ws_bill_customer_sk#48], Inner, BuildRight

(60) CometProject
Input [7]: [c_customer_sk#44, c_customer_id#45, c_first_name#46, c_last_name#47, ws_bill_customer_sk#48, ws_net_paid#49, ws_sold_date_sk#50]
Arguments: [c_customer_id#45, c_first_name#46, c_last_name#47, ws_net_paid#49, ws_sold_date_sk#50], [c_customer_id#45, c_first_name#46, c_last_name#47, ws_net_paid#49, ws_sold_date_sk#50]

(61) ReusedExchange [Reuses operator id: 27]
Output [2]: [d_date_sk#52, d_year#53]

(62) CometBroadcastHashJoin
Left output [5]: [c_customer_id#45, c_first_name#46, c_last_name#47, ws_net_paid#49, ws_sold_date_sk#50]
Right output [2]: [d_date_sk#52, d_year#53]
Arguments: [ws_sold_date_sk#50], [d_date_sk#52], Inner, BuildRight

(63) CometProject
Input [7]: [c_customer_id#45, c_first_name#46, c_last_name#47, ws_net_paid#49, ws_sold_date_sk#50, d_date_sk#52, d_year#53]
Arguments: [c_customer_id#45, c_first_name#46, c_last_name#47, ws_net_paid#49, d_year#53], [c_customer_id#45, c_first_name#46, c_last_name#47, ws_net_paid#49, d_year#53]

(64) CometHashAggregate
Input [5]: [c_customer_id#45, c_first_name#46, c_last_name#47, ws_net_paid#49, d_year#53]
Keys [4]: [c_customer_id#45, c_first_name#46, c_last_name#47, d_year#53]
Functions [1]: [partial_sum(UnscaledValue(ws_net_paid#49))]

(65) ColumnarToRow [codegen id : 6]
Input [5]: [c_customer_id#45, c_first_name#46, c_last_name#47, d_year#53, sum#54]

(66) Exchange
Input [5]: [c_customer_id#45, c_first_name#46, c_last_name#47, d_year#53, sum#54]
Arguments: hashpartitioning(c_customer_id#45, c_first_name#46, c_last_name#47, d_year#53, 5), ENSURE_REQUIREMENTS, [plan_id=6]

(67) HashAggregate [codegen id : 7]
Input [5]: [c_customer_id#45, c_first_name#46, c_last_name#47, d_year#53, sum#54]
Keys [4]: [c_customer_id#45, c_first_name#46, c_last_name#47, d_year#53]
Functions [1]: [sum(UnscaledValue(ws_net_paid#49))]
Aggregate Attributes [1]: [sum(UnscaledValue(ws_net_paid#49))#41]
Results [2]: [c_customer_id#45 AS customer_id#55, MakeDecimal(sum(UnscaledValue(ws_net_paid#49))#41,17,2) AS year_total#56]

(68) BroadcastExchange
Input [2]: [customer_id#55, year_total#56]
Arguments: HashedRelationBroadcastMode(List(input[0, string, true]),false), [plan_id=7]

(69) BroadcastHashJoin [codegen id : 8]
Left keys [1]: [customer_id#13]
Right keys [1]: [customer_id#55]
Join type: Inner
Join condition: (CASE WHEN (year_total#43 > 0.00) THEN (year_total#56 / year_total#43) END > CASE WHEN (year_total#14 > 0.00) THEN (year_total#29 / year_total#14) END)

(70) Project [codegen id : 8]
Output [3]: [customer_id#26, customer_first_name#27, customer_last_name#28]
Input [9]: [customer_id#13, year_total#14, customer_id#26, customer_first_name#27, customer_last_name#28, year_total#29, year_total#43, customer_id#55, year_total#56]

(71) TakeOrderedAndProject
Input [3]: [customer_id#26, customer_first_name#27, customer_last_name#28]
Arguments: 100, [customer_id#26 ASC NULLS FIRST, customer_id#26 ASC NULLS FIRST, customer_id#26 ASC NULLS FIRST], [customer_id#26, customer_first_name#27, customer_last_name#28]

===== Subqueries =====

Subquery:1 Hosting operator id = 3 Hosting Expression = ss_sold_date_sk#7 IN dynamicpruning#8
BroadcastExchange (75)
+- * ColumnarToRow (74)
   +- CometFilter (73)
      +- CometScan parquet spark_catalog.default.date_dim (72)


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

(73) CometFilter
Input [2]: [d_date_sk#9, d_year#10]
Condition : (((isnotnull(d_year#10) AND (d_year#10 = 2001)) AND d_year#10 IN (2001,2002)) AND isnotnull(d_date_sk#9))

(74) ColumnarToRow [codegen id : 1]
Input [2]: [d_date_sk#9, d_year#10]

(75) BroadcastExchange
Input [2]: [d_date_sk#9, d_year#10]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, false] as bigint)),false), [plan_id=8]

Subquery:2 Hosting operator id = 20 Hosting Expression = ss_sold_date_sk#21 IN dynamicpruning#22
BroadcastExchange (79)
+- * ColumnarToRow (78)
   +- CometFilter (77)
      +- CometScan parquet spark_catalog.default.date_dim (76)


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

(77) CometFilter
Input [2]: [d_date_sk#23, d_year#24]
Condition : (((isnotnull(d_year#24) AND (d_year#24 = 2002)) AND d_year#24 IN (2001,2002)) AND isnotnull(d_date_sk#23))

(78) ColumnarToRow [codegen id : 1]
Input [2]: [d_date_sk#23, d_year#24]

(79) BroadcastExchange
Input [2]: [d_date_sk#23, d_year#24]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, false] as bigint)),false), [plan_id=9]

Subquery:3 Hosting operator id = 38 Hosting Expression = ws_sold_date_sk#36 IN dynamicpruning#8

Subquery:4 Hosting operator id = 56 Hosting Expression = ws_sold_date_sk#50 IN dynamicpruning#22


