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


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

(2) ColumnarToRow [codegen id : 2]
Input [3]: [ss_customer_sk#1, ss_net_paid#2, ss_sold_date_sk#3]

(3) Filter [codegen id : 2]
Input [3]: [ss_customer_sk#1, ss_net_paid#2, ss_sold_date_sk#3]
Condition : isnotnull(ss_customer_sk#1)

(4) ReusedExchange [Reuses operator id: 84]
Output [2]: [d_date_sk#5, d_year#6]

(5) BroadcastHashJoin [codegen id : 2]
Left keys [1]: [ss_sold_date_sk#3]
Right keys [1]: [d_date_sk#5]
Join condition: None

(6) Project [codegen id : 2]
Output [3]: [ss_customer_sk#1, ss_net_paid#2, d_year#6]
Input [5]: [ss_customer_sk#1, ss_net_paid#2, ss_sold_date_sk#3, d_date_sk#5, d_year#6]

(7) Exchange
Input [3]: [ss_customer_sk#1, ss_net_paid#2, d_year#6]
Arguments: hashpartitioning(ss_customer_sk#1, 5), ENSURE_REQUIREMENTS, [plan_id=1]

(8) Sort [codegen id : 3]
Input [3]: [ss_customer_sk#1, ss_net_paid#2, d_year#6]
Arguments: [ss_customer_sk#1 ASC NULLS FIRST], false, 0

(9) Scan parquet default.customer
Output [4]: [c_customer_sk#7, c_customer_id#8, c_first_name#9, c_last_name#10]
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>

(10) ColumnarToRow [codegen id : 4]
Input [4]: [c_customer_sk#7, c_customer_id#8, c_first_name#9, c_last_name#10]

(11) Filter [codegen id : 4]
Input [4]: [c_customer_sk#7, c_customer_id#8, c_first_name#9, c_last_name#10]
Condition : (isnotnull(c_customer_sk#7) AND isnotnull(c_customer_id#8))

(12) Exchange
Input [4]: [c_customer_sk#7, c_customer_id#8, c_first_name#9, c_last_name#10]
Arguments: hashpartitioning(c_customer_sk#7, 5), ENSURE_REQUIREMENTS, [plan_id=2]

(13) Sort [codegen id : 5]
Input [4]: [c_customer_sk#7, c_customer_id#8, c_first_name#9, c_last_name#10]
Arguments: [c_customer_sk#7 ASC NULLS FIRST], false, 0

(14) SortMergeJoin [codegen id : 6]
Left keys [1]: [ss_customer_sk#1]
Right keys [1]: [c_customer_sk#7]
Join condition: None

(15) Project [codegen id : 6]
Output [5]: [c_customer_id#8, c_first_name#9, c_last_name#10, ss_net_paid#2, d_year#6]
Input [7]: [ss_customer_sk#1, ss_net_paid#2, d_year#6, c_customer_sk#7, c_customer_id#8, c_first_name#9, c_last_name#10]

(16) HashAggregate [codegen id : 6]
Input [5]: [c_customer_id#8, c_first_name#9, c_last_name#10, ss_net_paid#2, d_year#6]
Keys [4]: [c_customer_id#8, c_first_name#9, c_last_name#10, d_year#6]
Functions [1]: [partial_sum(UnscaledValue(ss_net_paid#2))]
Aggregate Attributes [1]: [sum#11]
Results [5]: [c_customer_id#8, c_first_name#9, c_last_name#10, d_year#6, sum#12]

(17) Exchange
Input [5]: [c_customer_id#8, c_first_name#9, c_last_name#10, d_year#6, sum#12]
Arguments: hashpartitioning(c_customer_id#8, c_first_name#9, c_last_name#10, d_year#6, 5), ENSURE_REQUIREMENTS, [plan_id=3]

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

(19) Filter [codegen id : 7]
Input [2]: [customer_id#14, year_total#15]
Condition : (isnotnull(year_total#15) AND (year_total#15 > 0.00))

(20) Exchange
Input [2]: [customer_id#14, year_total#15]
Arguments: hashpartitioning(customer_id#14, 5), ENSURE_REQUIREMENTS, [plan_id=4]

(21) Sort [codegen id : 8]
Input [2]: [customer_id#14, year_total#15]
Arguments: [customer_id#14 ASC NULLS FIRST], false, 0

(22) Scan parquet default.store_sales
Output [3]: [ss_customer_sk#16, ss_net_paid#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_net_paid:decimal(7,2)>

(23) ColumnarToRow [codegen id : 10]
Input [3]: [ss_customer_sk#16, ss_net_paid#17, ss_sold_date_sk#18]

(24) Filter [codegen id : 10]
Input [3]: [ss_customer_sk#16, ss_net_paid#17, ss_sold_date_sk#18]
Condition : isnotnull(ss_customer_sk#16)

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

(26) BroadcastHashJoin [codegen id : 10]
Left keys [1]: [ss_sold_date_sk#18]
Right keys [1]: [d_date_sk#20]
Join condition: None

(27) Project [codegen id : 10]
Output [3]: [ss_customer_sk#16, ss_net_paid#17, d_year#21]
Input [5]: [ss_customer_sk#16, ss_net_paid#17, ss_sold_date_sk#18, d_date_sk#20, d_year#21]

(28) Exchange
Input [3]: [ss_customer_sk#16, ss_net_paid#17, d_year#21]
Arguments: hashpartitioning(ss_customer_sk#16, 5), ENSURE_REQUIREMENTS, [plan_id=5]

(29) Sort [codegen id : 11]
Input [3]: [ss_customer_sk#16, ss_net_paid#17, d_year#21]
Arguments: [ss_customer_sk#16 ASC NULLS FIRST], false, 0

(30) ReusedExchange [Reuses operator id: 12]
Output [4]: [c_customer_sk#22, c_customer_id#23, c_first_name#24, c_last_name#25]

(31) Sort [codegen id : 13]
Input [4]: [c_customer_sk#22, c_customer_id#23, c_first_name#24, c_last_name#25]
Arguments: [c_customer_sk#22 ASC NULLS FIRST], false, 0

(32) SortMergeJoin [codegen id : 14]
Left keys [1]: [ss_customer_sk#16]
Right keys [1]: [c_customer_sk#22]
Join condition: None

(33) Project [codegen id : 14]
Output [5]: [c_customer_id#23, c_first_name#24, c_last_name#25, ss_net_paid#17, d_year#21]
Input [7]: [ss_customer_sk#16, ss_net_paid#17, d_year#21, c_customer_sk#22, c_customer_id#23, c_first_name#24, c_last_name#25]

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

(35) Exchange
Input [5]: [c_customer_id#23, c_first_name#24, c_last_name#25, d_year#21, sum#27]
Arguments: hashpartitioning(c_customer_id#23, c_first_name#24, c_last_name#25, d_year#21, 5), ENSURE_REQUIREMENTS, [plan_id=6]

(36) HashAggregate [codegen id : 15]
Input [5]: [c_customer_id#23, c_first_name#24, c_last_name#25, d_year#21, sum#27]
Keys [4]: [c_customer_id#23, c_first_name#24, c_last_name#25, d_year#21]
Functions [1]: [sum(UnscaledValue(ss_net_paid#17))]
Aggregate Attributes [1]: [sum(UnscaledValue(ss_net_paid#17))#13]
Results [4]: [c_customer_id#23 AS customer_id#28, c_first_name#24 AS customer_first_name#29, c_last_name#25 AS customer_last_name#30, MakeDecimal(sum(UnscaledValue(ss_net_paid#17))#13,17,2) AS year_total#31]

(37) Exchange
Input [4]: [customer_id#28, customer_first_name#29, customer_last_name#30, year_total#31]
Arguments: hashpartitioning(customer_id#28, 5), ENSURE_REQUIREMENTS, [plan_id=7]

(38) Sort [codegen id : 16]
Input [4]: [customer_id#28, customer_first_name#29, customer_last_name#30, year_total#31]
Arguments: [customer_id#28 ASC NULLS FIRST], false, 0

(39) SortMergeJoin [codegen id : 17]
Left keys [1]: [customer_id#14]
Right keys [1]: [customer_id#28]
Join condition: None

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

(41) ColumnarToRow [codegen id : 19]
Input [3]: [ws_bill_customer_sk#32, ws_net_paid#33, ws_sold_date_sk#34]

(42) Filter [codegen id : 19]
Input [3]: [ws_bill_customer_sk#32, ws_net_paid#33, ws_sold_date_sk#34]
Condition : isnotnull(ws_bill_customer_sk#32)

(43) ReusedExchange [Reuses operator id: 84]
Output [2]: [d_date_sk#35, d_year#36]

(44) BroadcastHashJoin [codegen id : 19]
Left keys [1]: [ws_sold_date_sk#34]
Right keys [1]: [d_date_sk#35]
Join condition: None

(45) Project [codegen id : 19]
Output [3]: [ws_bill_customer_sk#32, ws_net_paid#33, d_year#36]
Input [5]: [ws_bill_customer_sk#32, ws_net_paid#33, ws_sold_date_sk#34, d_date_sk#35, d_year#36]

(46) Exchange
Input [3]: [ws_bill_customer_sk#32, ws_net_paid#33, d_year#36]
Arguments: hashpartitioning(ws_bill_customer_sk#32, 5), ENSURE_REQUIREMENTS, [plan_id=8]

(47) Sort [codegen id : 20]
Input [3]: [ws_bill_customer_sk#32, ws_net_paid#33, d_year#36]
Arguments: [ws_bill_customer_sk#32 ASC NULLS FIRST], false, 0

(48) ReusedExchange [Reuses operator id: 12]
Output [4]: [c_customer_sk#37, c_customer_id#38, c_first_name#39, c_last_name#40]

(49) Sort [codegen id : 22]
Input [4]: [c_customer_sk#37, c_customer_id#38, c_first_name#39, c_last_name#40]
Arguments: [c_customer_sk#37 ASC NULLS FIRST], false, 0

(50) SortMergeJoin [codegen id : 23]
Left keys [1]: [ws_bill_customer_sk#32]
Right keys [1]: [c_customer_sk#37]
Join condition: None

(51) Project [codegen id : 23]
Output [5]: [c_customer_id#38, c_first_name#39, c_last_name#40, ws_net_paid#33, d_year#36]
Input [7]: [ws_bill_customer_sk#32, ws_net_paid#33, d_year#36, c_customer_sk#37, c_customer_id#38, c_first_name#39, c_last_name#40]

(52) HashAggregate [codegen id : 23]
Input [5]: [c_customer_id#38, c_first_name#39, c_last_name#40, ws_net_paid#33, d_year#36]
Keys [4]: [c_customer_id#38, c_first_name#39, c_last_name#40, d_year#36]
Functions [1]: [partial_sum(UnscaledValue(ws_net_paid#33))]
Aggregate Attributes [1]: [sum#41]
Results [5]: [c_customer_id#38, c_first_name#39, c_last_name#40, d_year#36, sum#42]

(53) Exchange
Input [5]: [c_customer_id#38, c_first_name#39, c_last_name#40, d_year#36, sum#42]
Arguments: hashpartitioning(c_customer_id#38, c_first_name#39, c_last_name#40, d_year#36, 5), ENSURE_REQUIREMENTS, [plan_id=9]

(54) HashAggregate [codegen id : 24]
Input [5]: [c_customer_id#38, c_first_name#39, c_last_name#40, d_year#36, sum#42]
Keys [4]: [c_customer_id#38, c_first_name#39, c_last_name#40, d_year#36]
Functions [1]: [sum(UnscaledValue(ws_net_paid#33))]
Aggregate Attributes [1]: [sum(UnscaledValue(ws_net_paid#33))#43]
Results [2]: [c_customer_id#38 AS customer_id#44, MakeDecimal(sum(UnscaledValue(ws_net_paid#33))#43,17,2) AS year_total#45]

(55) Filter [codegen id : 24]
Input [2]: [customer_id#44, year_total#45]
Condition : (isnotnull(year_total#45) AND (year_total#45 > 0.00))

(56) Project [codegen id : 24]
Output [2]: [customer_id#44 AS customer_id#46, year_total#45 AS year_total#47]
Input [2]: [customer_id#44, year_total#45]

(57) Exchange
Input [2]: [customer_id#46, year_total#47]
Arguments: hashpartitioning(customer_id#46, 5), ENSURE_REQUIREMENTS, [plan_id=10]

(58) Sort [codegen id : 25]
Input [2]: [customer_id#46, year_total#47]
Arguments: [customer_id#46 ASC NULLS FIRST], false, 0

(59) SortMergeJoin [codegen id : 26]
Left keys [1]: [customer_id#14]
Right keys [1]: [customer_id#46]
Join condition: None

(60) Project [codegen id : 26]
Output [7]: [customer_id#14, year_total#15, customer_id#28, customer_first_name#29, customer_last_name#30, year_total#31, year_total#47]
Input [8]: [customer_id#14, year_total#15, customer_id#28, customer_first_name#29, customer_last_name#30, year_total#31, customer_id#46, year_total#47]

(61) Scan parquet 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#19)]
PushedFilters: [IsNotNull(ws_bill_customer_sk)]
ReadSchema: struct<ws_bill_customer_sk:int,ws_net_paid:decimal(7,2)>

(62) ColumnarToRow [codegen id : 28]
Input [3]: [ws_bill_customer_sk#48, ws_net_paid#49, ws_sold_date_sk#50]

(63) Filter [codegen id : 28]
Input [3]: [ws_bill_customer_sk#48, ws_net_paid#49, ws_sold_date_sk#50]
Condition : isnotnull(ws_bill_customer_sk#48)

(64) ReusedExchange [Reuses operator id: 88]
Output [2]: [d_date_sk#51, d_year#52]

(65) BroadcastHashJoin [codegen id : 28]
Left keys [1]: [ws_sold_date_sk#50]
Right keys [1]: [d_date_sk#51]
Join condition: None

(66) Project [codegen id : 28]
Output [3]: [ws_bill_customer_sk#48, ws_net_paid#49, d_year#52]
Input [5]: [ws_bill_customer_sk#48, ws_net_paid#49, ws_sold_date_sk#50, d_date_sk#51, d_year#52]

(67) Exchange
Input [3]: [ws_bill_customer_sk#48, ws_net_paid#49, d_year#52]
Arguments: hashpartitioning(ws_bill_customer_sk#48, 5), ENSURE_REQUIREMENTS, [plan_id=11]

(68) Sort [codegen id : 29]
Input [3]: [ws_bill_customer_sk#48, ws_net_paid#49, d_year#52]
Arguments: [ws_bill_customer_sk#48 ASC NULLS FIRST], false, 0

(69) ReusedExchange [Reuses operator id: 12]
Output [4]: [c_customer_sk#53, c_customer_id#54, c_first_name#55, c_last_name#56]

(70) Sort [codegen id : 31]
Input [4]: [c_customer_sk#53, c_customer_id#54, c_first_name#55, c_last_name#56]
Arguments: [c_customer_sk#53 ASC NULLS FIRST], false, 0

(71) SortMergeJoin [codegen id : 32]
Left keys [1]: [ws_bill_customer_sk#48]
Right keys [1]: [c_customer_sk#53]
Join condition: None

(72) Project [codegen id : 32]
Output [5]: [c_customer_id#54, c_first_name#55, c_last_name#56, ws_net_paid#49, d_year#52]
Input [7]: [ws_bill_customer_sk#48, ws_net_paid#49, d_year#52, c_customer_sk#53, c_customer_id#54, c_first_name#55, c_last_name#56]

(73) HashAggregate [codegen id : 32]
Input [5]: [c_customer_id#54, c_first_name#55, c_last_name#56, ws_net_paid#49, d_year#52]
Keys [4]: [c_customer_id#54, c_first_name#55, c_last_name#56, d_year#52]
Functions [1]: [partial_sum(UnscaledValue(ws_net_paid#49))]
Aggregate Attributes [1]: [sum#57]
Results [5]: [c_customer_id#54, c_first_name#55, c_last_name#56, d_year#52, sum#58]

(74) Exchange
Input [5]: [c_customer_id#54, c_first_name#55, c_last_name#56, d_year#52, sum#58]
Arguments: hashpartitioning(c_customer_id#54, c_first_name#55, c_last_name#56, d_year#52, 5), ENSURE_REQUIREMENTS, [plan_id=12]

(75) HashAggregate [codegen id : 33]
Input [5]: [c_customer_id#54, c_first_name#55, c_last_name#56, d_year#52, sum#58]
Keys [4]: [c_customer_id#54, c_first_name#55, c_last_name#56, d_year#52]
Functions [1]: [sum(UnscaledValue(ws_net_paid#49))]
Aggregate Attributes [1]: [sum(UnscaledValue(ws_net_paid#49))#43]
Results [2]: [c_customer_id#54 AS customer_id#59, MakeDecimal(sum(UnscaledValue(ws_net_paid#49))#43,17,2) AS year_total#60]

(76) Exchange
Input [2]: [customer_id#59, year_total#60]
Arguments: hashpartitioning(customer_id#59, 5), ENSURE_REQUIREMENTS, [plan_id=13]

(77) Sort [codegen id : 34]
Input [2]: [customer_id#59, year_total#60]
Arguments: [customer_id#59 ASC NULLS FIRST], false, 0

(78) SortMergeJoin [codegen id : 35]
Left keys [1]: [customer_id#14]
Right keys [1]: [customer_id#59]
Join condition: (CASE WHEN (year_total#47 > 0.00) THEN CheckOverflow((promote_precision(year_total#60) / promote_precision(year_total#47)), DecimalType(37,20), true) END > CASE WHEN (year_total#15 > 0.00) THEN CheckOverflow((promote_precision(year_total#31) / promote_precision(year_total#15)), DecimalType(37,20), true) END)

(79) Project [codegen id : 35]
Output [3]: [customer_id#28, customer_first_name#29, customer_last_name#30]
Input [9]: [customer_id#14, year_total#15, customer_id#28, customer_first_name#29, customer_last_name#30, year_total#31, year_total#47, customer_id#59, year_total#60]

(80) TakeOrderedAndProject
Input [3]: [customer_id#28, customer_first_name#29, customer_last_name#30]
Arguments: 100, [customer_first_name#29 ASC NULLS FIRST, customer_id#28 ASC NULLS FIRST, customer_last_name#30 ASC NULLS FIRST], [customer_id#28, customer_first_name#29, customer_last_name#30]

===== Subqueries =====

Subquery:1 Hosting operator id = 1 Hosting Expression = ss_sold_date_sk#3 IN dynamicpruning#4
BroadcastExchange (84)
+- * Filter (83)
   +- * ColumnarToRow (82)
      +- Scan parquet default.date_dim (81)


(81) Scan parquet default.date_dim
Output [2]: [d_date_sk#5, d_year#6]
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>

(82) ColumnarToRow [codegen id : 1]
Input [2]: [d_date_sk#5, d_year#6]

(83) Filter [codegen id : 1]
Input [2]: [d_date_sk#5, d_year#6]
Condition : (((isnotnull(d_year#6) AND (d_year#6 = 2001)) AND d_year#6 IN (2001,2002)) AND isnotnull(d_date_sk#5))

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

Subquery:2 Hosting operator id = 22 Hosting Expression = ss_sold_date_sk#18 IN dynamicpruning#19
BroadcastExchange (88)
+- * Filter (87)
   +- * ColumnarToRow (86)
      +- Scan parquet default.date_dim (85)


(85) Scan parquet 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,2002), In(d_year, [2001,2002]), IsNotNull(d_date_sk)]
ReadSchema: struct<d_date_sk:int,d_year:int>

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

(87) Filter [codegen id : 1]
Input [2]: [d_date_sk#20, d_year#21]
Condition : (((isnotnull(d_year#21) AND (d_year#21 = 2002)) AND d_year#21 IN (2001,2002)) AND isnotnull(d_date_sk#20))

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

Subquery:3 Hosting operator id = 40 Hosting Expression = ws_sold_date_sk#34 IN dynamicpruning#4

Subquery:4 Hosting operator id = 61 Hosting Expression = ws_sold_date_sk#50 IN dynamicpruning#19


