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

(3) CometProject
Input [4]: [c_customer_sk#1, c_customer_id#2, c_first_name#3, c_last_name#4]
Arguments: [c_customer_sk#1, c_customer_id#5, c_first_name#6, c_last_name#7], [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#5, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_first_name#3, 20, true, false, true) AS c_first_name#6, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_last_name#4, 30, true, false, true) AS c_last_name#7]

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

(5) CometFilter
Input [3]: [ss_customer_sk#8, ss_net_paid#9, ss_sold_date_sk#10]
Condition : isnotnull(ss_customer_sk#8)

(6) CometBroadcastExchange
Input [3]: [ss_customer_sk#8, ss_net_paid#9, ss_sold_date_sk#10]
Arguments: [ss_customer_sk#8, ss_net_paid#9, ss_sold_date_sk#10]

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

(8) CometProject
Input [7]: [c_customer_sk#1, c_customer_id#5, c_first_name#6, c_last_name#7, ss_customer_sk#8, ss_net_paid#9, ss_sold_date_sk#10]
Arguments: [c_customer_id#5, c_first_name#6, c_last_name#7, ss_net_paid#9, ss_sold_date_sk#10], [c_customer_id#5, c_first_name#6, c_last_name#7, ss_net_paid#9, ss_sold_date_sk#10]

(9) CometScan parquet spark_catalog.default.date_dim
Output [2]: [d_date_sk#12, d_year#13]
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>

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

(11) CometBroadcastExchange
Input [2]: [d_date_sk#12, d_year#13]
Arguments: [d_date_sk#12, d_year#13]

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

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

(14) CometColumnarToRow [codegen id : 1]
Input [5]: [c_customer_id#5, c_first_name#6, c_last_name#7, ss_net_paid#9, d_year#13]

(15) HashAggregate [codegen id : 1]
Input [5]: [c_customer_id#5, c_first_name#6, c_last_name#7, ss_net_paid#9, d_year#13]
Keys [4]: [c_customer_id#5, c_first_name#6, c_last_name#7, d_year#13]
Functions [1]: [partial_sum(UnscaledValue(ss_net_paid#9))]
Aggregate Attributes [1]: [sum#14]
Results [5]: [c_customer_id#5, c_first_name#6, c_last_name#7, d_year#13, sum#15]

(16) CometColumnarExchange
Input [5]: [c_customer_id#5, c_first_name#6, c_last_name#7, d_year#13, sum#15]
Arguments: hashpartitioning(c_customer_id#5, c_first_name#6, c_last_name#7, d_year#13, 5), ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=1]

(17) CometColumnarToRow [codegen id : 8]
Input [5]: [c_customer_id#5, c_first_name#6, c_last_name#7, d_year#13, sum#15]

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

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

(20) CometScan parquet spark_catalog.default.customer
Output [4]: [c_customer_sk#19, c_customer_id#20, c_first_name#21, c_last_name#22]
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>

(21) CometFilter
Input [4]: [c_customer_sk#19, c_customer_id#20, c_first_name#21, c_last_name#22]
Condition : (isnotnull(c_customer_sk#19) AND isnotnull(staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_customer_id#20, 16, true, false, true)))

(22) CometProject
Input [4]: [c_customer_sk#19, c_customer_id#20, c_first_name#21, c_last_name#22]
Arguments: [c_customer_sk#19, c_customer_id#23, c_first_name#24, c_last_name#25], [c_customer_sk#19, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_customer_id#20, 16, true, false, true) AS c_customer_id#23, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_first_name#21, 20, true, false, true) AS c_first_name#24, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_last_name#22, 30, true, false, true) AS c_last_name#25]

(23) CometScan parquet spark_catalog.default.store_sales
Output [3]: [ss_customer_sk#26, ss_net_paid#27, ss_sold_date_sk#28]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(ss_sold_date_sk#28), dynamicpruningexpression(ss_sold_date_sk#28 IN dynamicpruning#29)]
PushedFilters: [IsNotNull(ss_customer_sk)]
ReadSchema: struct<ss_customer_sk:int,ss_net_paid:decimal(7,2)>

(24) CometFilter
Input [3]: [ss_customer_sk#26, ss_net_paid#27, ss_sold_date_sk#28]
Condition : isnotnull(ss_customer_sk#26)

(25) CometBroadcastExchange
Input [3]: [ss_customer_sk#26, ss_net_paid#27, ss_sold_date_sk#28]
Arguments: [ss_customer_sk#26, ss_net_paid#27, ss_sold_date_sk#28]

(26) CometBroadcastHashJoin
Left output [4]: [c_customer_sk#19, c_customer_id#23, c_first_name#24, c_last_name#25]
Right output [3]: [ss_customer_sk#26, ss_net_paid#27, ss_sold_date_sk#28]
Arguments: [c_customer_sk#19], [ss_customer_sk#26], Inner, BuildRight

(27) CometProject
Input [7]: [c_customer_sk#19, c_customer_id#23, c_first_name#24, c_last_name#25, ss_customer_sk#26, ss_net_paid#27, ss_sold_date_sk#28]
Arguments: [c_customer_id#23, c_first_name#24, c_last_name#25, ss_net_paid#27, ss_sold_date_sk#28], [c_customer_id#23, c_first_name#24, c_last_name#25, ss_net_paid#27, ss_sold_date_sk#28]

(28) CometScan parquet spark_catalog.default.date_dim
Output [2]: [d_date_sk#30, d_year#31]
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>

(29) CometFilter
Input [2]: [d_date_sk#30, d_year#31]
Condition : (((isnotnull(d_year#31) AND (d_year#31 = 2002)) AND d_year#31 IN (2001,2002)) AND isnotnull(d_date_sk#30))

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

(31) CometBroadcastHashJoin
Left output [5]: [c_customer_id#23, c_first_name#24, c_last_name#25, ss_net_paid#27, ss_sold_date_sk#28]
Right output [2]: [d_date_sk#30, d_year#31]
Arguments: [ss_sold_date_sk#28], [d_date_sk#30], Inner, BuildRight

(32) CometProject
Input [7]: [c_customer_id#23, c_first_name#24, c_last_name#25, ss_net_paid#27, ss_sold_date_sk#28, d_date_sk#30, d_year#31]
Arguments: [c_customer_id#23, c_first_name#24, c_last_name#25, ss_net_paid#27, d_year#31], [c_customer_id#23, c_first_name#24, c_last_name#25, ss_net_paid#27, d_year#31]

(33) CometColumnarToRow [codegen id : 2]
Input [5]: [c_customer_id#23, c_first_name#24, c_last_name#25, ss_net_paid#27, d_year#31]

(34) HashAggregate [codegen id : 2]
Input [5]: [c_customer_id#23, c_first_name#24, c_last_name#25, ss_net_paid#27, d_year#31]
Keys [4]: [c_customer_id#23, c_first_name#24, c_last_name#25, d_year#31]
Functions [1]: [partial_sum(UnscaledValue(ss_net_paid#27))]
Aggregate Attributes [1]: [sum#32]
Results [5]: [c_customer_id#23, c_first_name#24, c_last_name#25, d_year#31, sum#33]

(35) CometColumnarExchange
Input [5]: [c_customer_id#23, c_first_name#24, c_last_name#25, d_year#31, sum#33]
Arguments: hashpartitioning(c_customer_id#23, c_first_name#24, c_last_name#25, d_year#31, 5), ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=2]

(36) CometColumnarToRow [codegen id : 3]
Input [5]: [c_customer_id#23, c_first_name#24, c_last_name#25, d_year#31, sum#33]

(37) HashAggregate [codegen id : 3]
Input [5]: [c_customer_id#23, c_first_name#24, c_last_name#25, d_year#31, sum#33]
Keys [4]: [c_customer_id#23, c_first_name#24, c_last_name#25, d_year#31]
Functions [1]: [sum(UnscaledValue(ss_net_paid#27))]
Aggregate Attributes [1]: [sum(UnscaledValue(ss_net_paid#27))#16]
Results [4]: [c_customer_id#23 AS customer_id#34, c_first_name#24 AS customer_first_name#35, c_last_name#25 AS customer_last_name#36, MakeDecimal(sum(UnscaledValue(ss_net_paid#27))#16,17,2) AS year_total#37]

(38) BroadcastExchange
Input [4]: [customer_id#34, customer_first_name#35, customer_last_name#36, year_total#37]
Arguments: HashedRelationBroadcastMode(List(input[0, string, true]),false), [plan_id=3]

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

(40) CometScan parquet spark_catalog.default.customer
Output [4]: [c_customer_sk#38, c_customer_id#39, c_first_name#40, c_last_name#41]
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>

(41) CometFilter
Input [4]: [c_customer_sk#38, c_customer_id#39, c_first_name#40, c_last_name#41]
Condition : (isnotnull(c_customer_sk#38) AND isnotnull(staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_customer_id#39, 16, true, false, true)))

(42) CometProject
Input [4]: [c_customer_sk#38, c_customer_id#39, c_first_name#40, c_last_name#41]
Arguments: [c_customer_sk#38, c_customer_id#42, c_first_name#43, c_last_name#44], [c_customer_sk#38, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_customer_id#39, 16, true, false, true) AS c_customer_id#42, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_first_name#40, 20, true, false, true) AS c_first_name#43, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_last_name#41, 30, true, false, true) AS c_last_name#44]

(43) CometScan parquet spark_catalog.default.web_sales
Output [3]: [ws_bill_customer_sk#45, ws_net_paid#46, ws_sold_date_sk#47]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(ws_sold_date_sk#47), dynamicpruningexpression(ws_sold_date_sk#47 IN dynamicpruning#48)]
PushedFilters: [IsNotNull(ws_bill_customer_sk)]
ReadSchema: struct<ws_bill_customer_sk:int,ws_net_paid:decimal(7,2)>

(44) CometFilter
Input [3]: [ws_bill_customer_sk#45, ws_net_paid#46, ws_sold_date_sk#47]
Condition : isnotnull(ws_bill_customer_sk#45)

(45) CometBroadcastExchange
Input [3]: [ws_bill_customer_sk#45, ws_net_paid#46, ws_sold_date_sk#47]
Arguments: [ws_bill_customer_sk#45, ws_net_paid#46, ws_sold_date_sk#47]

(46) CometBroadcastHashJoin
Left output [4]: [c_customer_sk#38, c_customer_id#42, c_first_name#43, c_last_name#44]
Right output [3]: [ws_bill_customer_sk#45, ws_net_paid#46, ws_sold_date_sk#47]
Arguments: [c_customer_sk#38], [ws_bill_customer_sk#45], Inner, BuildRight

(47) CometProject
Input [7]: [c_customer_sk#38, c_customer_id#42, c_first_name#43, c_last_name#44, ws_bill_customer_sk#45, ws_net_paid#46, ws_sold_date_sk#47]
Arguments: [c_customer_id#42, c_first_name#43, c_last_name#44, ws_net_paid#46, ws_sold_date_sk#47], [c_customer_id#42, c_first_name#43, c_last_name#44, ws_net_paid#46, ws_sold_date_sk#47]

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

(49) CometBroadcastHashJoin
Left output [5]: [c_customer_id#42, c_first_name#43, c_last_name#44, ws_net_paid#46, ws_sold_date_sk#47]
Right output [2]: [d_date_sk#49, d_year#50]
Arguments: [ws_sold_date_sk#47], [d_date_sk#49], Inner, BuildRight

(50) CometProject
Input [7]: [c_customer_id#42, c_first_name#43, c_last_name#44, ws_net_paid#46, ws_sold_date_sk#47, d_date_sk#49, d_year#50]
Arguments: [c_customer_id#42, c_first_name#43, c_last_name#44, ws_net_paid#46, d_year#50], [c_customer_id#42, c_first_name#43, c_last_name#44, ws_net_paid#46, d_year#50]

(51) CometColumnarToRow [codegen id : 4]
Input [5]: [c_customer_id#42, c_first_name#43, c_last_name#44, ws_net_paid#46, d_year#50]

(52) HashAggregate [codegen id : 4]
Input [5]: [c_customer_id#42, c_first_name#43, c_last_name#44, ws_net_paid#46, d_year#50]
Keys [4]: [c_customer_id#42, c_first_name#43, c_last_name#44, d_year#50]
Functions [1]: [partial_sum(UnscaledValue(ws_net_paid#46))]
Aggregate Attributes [1]: [sum#51]
Results [5]: [c_customer_id#42, c_first_name#43, c_last_name#44, d_year#50, sum#52]

(53) CometColumnarExchange
Input [5]: [c_customer_id#42, c_first_name#43, c_last_name#44, d_year#50, sum#52]
Arguments: hashpartitioning(c_customer_id#42, c_first_name#43, c_last_name#44, d_year#50, 5), ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=4]

(54) CometColumnarToRow [codegen id : 5]
Input [5]: [c_customer_id#42, c_first_name#43, c_last_name#44, d_year#50, sum#52]

(55) HashAggregate [codegen id : 5]
Input [5]: [c_customer_id#42, c_first_name#43, c_last_name#44, d_year#50, sum#52]
Keys [4]: [c_customer_id#42, c_first_name#43, c_last_name#44, d_year#50]
Functions [1]: [sum(UnscaledValue(ws_net_paid#46))]
Aggregate Attributes [1]: [sum(UnscaledValue(ws_net_paid#46))#53]
Results [2]: [c_customer_id#42 AS customer_id#54, MakeDecimal(sum(UnscaledValue(ws_net_paid#46))#53,17,2) AS year_total#55]

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

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

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

(59) Project [codegen id : 8]
Output [7]: [customer_id#17, year_total#18, customer_id#34, customer_first_name#35, customer_last_name#36, year_total#37, year_total#55]
Input [8]: [customer_id#17, year_total#18, customer_id#34, customer_first_name#35, customer_last_name#36, year_total#37, customer_id#54, year_total#55]

(60) CometScan parquet spark_catalog.default.customer
Output [4]: [c_customer_sk#56, c_customer_id#57, c_first_name#58, c_last_name#59]
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>

(61) CometFilter
Input [4]: [c_customer_sk#56, c_customer_id#57, c_first_name#58, c_last_name#59]
Condition : (isnotnull(c_customer_sk#56) AND isnotnull(staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_customer_id#57, 16, true, false, true)))

(62) CometProject
Input [4]: [c_customer_sk#56, c_customer_id#57, c_first_name#58, c_last_name#59]
Arguments: [c_customer_sk#56, c_customer_id#60, c_first_name#61, c_last_name#62], [c_customer_sk#56, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_customer_id#57, 16, true, false, true) AS c_customer_id#60, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_first_name#58, 20, true, false, true) AS c_first_name#61, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, c_last_name#59, 30, true, false, true) AS c_last_name#62]

(63) CometScan parquet spark_catalog.default.web_sales
Output [3]: [ws_bill_customer_sk#63, ws_net_paid#64, ws_sold_date_sk#65]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(ws_sold_date_sk#65), dynamicpruningexpression(ws_sold_date_sk#65 IN dynamicpruning#66)]
PushedFilters: [IsNotNull(ws_bill_customer_sk)]
ReadSchema: struct<ws_bill_customer_sk:int,ws_net_paid:decimal(7,2)>

(64) CometFilter
Input [3]: [ws_bill_customer_sk#63, ws_net_paid#64, ws_sold_date_sk#65]
Condition : isnotnull(ws_bill_customer_sk#63)

(65) CometBroadcastExchange
Input [3]: [ws_bill_customer_sk#63, ws_net_paid#64, ws_sold_date_sk#65]
Arguments: [ws_bill_customer_sk#63, ws_net_paid#64, ws_sold_date_sk#65]

(66) CometBroadcastHashJoin
Left output [4]: [c_customer_sk#56, c_customer_id#60, c_first_name#61, c_last_name#62]
Right output [3]: [ws_bill_customer_sk#63, ws_net_paid#64, ws_sold_date_sk#65]
Arguments: [c_customer_sk#56], [ws_bill_customer_sk#63], Inner, BuildRight

(67) CometProject
Input [7]: [c_customer_sk#56, c_customer_id#60, c_first_name#61, c_last_name#62, ws_bill_customer_sk#63, ws_net_paid#64, ws_sold_date_sk#65]
Arguments: [c_customer_id#60, c_first_name#61, c_last_name#62, ws_net_paid#64, ws_sold_date_sk#65], [c_customer_id#60, c_first_name#61, c_last_name#62, ws_net_paid#64, ws_sold_date_sk#65]

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

(69) CometBroadcastHashJoin
Left output [5]: [c_customer_id#60, c_first_name#61, c_last_name#62, ws_net_paid#64, ws_sold_date_sk#65]
Right output [2]: [d_date_sk#67, d_year#68]
Arguments: [ws_sold_date_sk#65], [d_date_sk#67], Inner, BuildRight

(70) CometProject
Input [7]: [c_customer_id#60, c_first_name#61, c_last_name#62, ws_net_paid#64, ws_sold_date_sk#65, d_date_sk#67, d_year#68]
Arguments: [c_customer_id#60, c_first_name#61, c_last_name#62, ws_net_paid#64, d_year#68], [c_customer_id#60, c_first_name#61, c_last_name#62, ws_net_paid#64, d_year#68]

(71) CometColumnarToRow [codegen id : 6]
Input [5]: [c_customer_id#60, c_first_name#61, c_last_name#62, ws_net_paid#64, d_year#68]

(72) HashAggregate [codegen id : 6]
Input [5]: [c_customer_id#60, c_first_name#61, c_last_name#62, ws_net_paid#64, d_year#68]
Keys [4]: [c_customer_id#60, c_first_name#61, c_last_name#62, d_year#68]
Functions [1]: [partial_sum(UnscaledValue(ws_net_paid#64))]
Aggregate Attributes [1]: [sum#69]
Results [5]: [c_customer_id#60, c_first_name#61, c_last_name#62, d_year#68, sum#70]

(73) CometColumnarExchange
Input [5]: [c_customer_id#60, c_first_name#61, c_last_name#62, d_year#68, sum#70]
Arguments: hashpartitioning(c_customer_id#60, c_first_name#61, c_last_name#62, d_year#68, 5), ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=6]

(74) CometColumnarToRow [codegen id : 7]
Input [5]: [c_customer_id#60, c_first_name#61, c_last_name#62, d_year#68, sum#70]

(75) HashAggregate [codegen id : 7]
Input [5]: [c_customer_id#60, c_first_name#61, c_last_name#62, d_year#68, sum#70]
Keys [4]: [c_customer_id#60, c_first_name#61, c_last_name#62, d_year#68]
Functions [1]: [sum(UnscaledValue(ws_net_paid#64))]
Aggregate Attributes [1]: [sum(UnscaledValue(ws_net_paid#64))#53]
Results [2]: [c_customer_id#60 AS customer_id#71, MakeDecimal(sum(UnscaledValue(ws_net_paid#64))#53,17,2) AS year_total#72]

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

(77) BroadcastHashJoin [codegen id : 8]
Left keys [1]: [customer_id#17]
Right keys [1]: [customer_id#71]
Join type: Inner
Join condition: (CASE WHEN (year_total#55 > 0.00) THEN (year_total#72 / year_total#55) END > CASE WHEN (year_total#18 > 0.00) THEN (year_total#37 / year_total#18) END)

(78) Project [codegen id : 8]
Output [3]: [customer_id#34, customer_first_name#35, customer_last_name#36]
Input [9]: [customer_id#17, year_total#18, customer_id#34, customer_first_name#35, customer_last_name#36, year_total#37, year_total#55, customer_id#71, year_total#72]

(79) TakeOrderedAndProject
Input [3]: [customer_id#34, customer_first_name#35, customer_last_name#36]
Arguments: 100, [customer_id#34 ASC NULLS FIRST, customer_id#34 ASC NULLS FIRST, customer_id#34 ASC NULLS FIRST], [customer_id#34, customer_first_name#35, customer_last_name#36]

===== Subqueries =====

Subquery:1 Hosting operator id = 4 Hosting Expression = ss_sold_date_sk#10 IN dynamicpruning#11
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#12, d_year#13]
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>

(81) CometFilter
Input [2]: [d_date_sk#12, d_year#13]
Condition : (((isnotnull(d_year#13) AND (d_year#13 = 2001)) AND d_year#13 IN (2001,2002)) AND isnotnull(d_date_sk#12))

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

(83) BroadcastExchange
Input [2]: [d_date_sk#12, d_year#13]
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#28 IN dynamicpruning#29
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#30, d_year#31]
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>

(85) CometFilter
Input [2]: [d_date_sk#30, d_year#31]
Condition : (((isnotnull(d_year#31) AND (d_year#31 = 2002)) AND d_year#31 IN (2001,2002)) AND isnotnull(d_date_sk#30))

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

(87) BroadcastExchange
Input [2]: [d_date_sk#30, d_year#31]
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#47 IN dynamicpruning#11

Subquery:4 Hosting operator id = 63 Hosting Expression = ws_sold_date_sk#65 IN dynamicpruning#29


