== Physical Plan ==
* Sort (48)
+- Exchange (47)
   +- * Filter (46)
      +- * HashAggregate (45)
         +- Exchange (44)
            +- * HashAggregate (43)
               +- * HashAggregate (42)
                  +- Exchange (41)
                     +- * HashAggregate (40)
                        +- * Project (39)
                           +- * BroadcastHashJoin Inner BuildRight (38)
                              :- * Project (33)
                              :  +- * BroadcastHashJoin Inner BuildRight (32)
                              :     :- * Project (27)
                              :     :  +- * BroadcastHashJoin Inner BuildRight (26)
                              :     :     :- * Project (21)
                              :     :     :  +- * BroadcastHashJoin Inner BuildRight (20)
                              :     :     :     :- * Project (14)
                              :     :     :     :  +- * SortMergeJoin Inner (13)
                              :     :     :     :     :- * Sort (6)
                              :     :     :     :     :  +- Exchange (5)
                              :     :     :     :     :     +- * Project (4)
                              :     :     :     :     :        +- * Filter (3)
                              :     :     :     :     :           +- * ColumnarToRow (2)
                              :     :     :     :     :              +- Scan parquet spark_catalog.default.store_sales (1)
                              :     :     :     :     +- * Sort (12)
                              :     :     :     :        +- Exchange (11)
                              :     :     :     :           +- * Project (10)
                              :     :     :     :              +- * Filter (9)
                              :     :     :     :                 +- * ColumnarToRow (8)
                              :     :     :     :                    +- Scan parquet spark_catalog.default.store_returns (7)
                              :     :     :     +- BroadcastExchange (19)
                              :     :     :        +- * Project (18)
                              :     :     :           +- * Filter (17)
                              :     :     :              +- * ColumnarToRow (16)
                              :     :     :                 +- Scan parquet spark_catalog.default.store (15)
                              :     :     +- BroadcastExchange (25)
                              :     :        +- * Filter (24)
                              :     :           +- * ColumnarToRow (23)
                              :     :              +- Scan parquet spark_catalog.default.item (22)
                              :     +- BroadcastExchange (31)
                              :        +- * Filter (30)
                              :           +- * ColumnarToRow (29)
                              :              +- Scan parquet spark_catalog.default.customer (28)
                              +- BroadcastExchange (37)
                                 +- * Filter (36)
                                    +- * ColumnarToRow (35)
                                       +- Scan parquet spark_catalog.default.customer_address (34)


(1) Scan parquet spark_catalog.default.store_sales
Output [6]: [ss_item_sk#1, ss_customer_sk#2, ss_store_sk#3, ss_ticket_number#4, ss_net_paid#5, ss_sold_date_sk#6]
Batched: true
Location [not included in comparison]/{warehouse_dir}/store_sales]
PushedFilters: [IsNotNull(ss_ticket_number), IsNotNull(ss_item_sk), IsNotNull(ss_store_sk), IsNotNull(ss_customer_sk)]
ReadSchema: struct<ss_item_sk:int,ss_customer_sk:int,ss_store_sk:int,ss_ticket_number:int,ss_net_paid:decimal(7,2)>

(2) ColumnarToRow [codegen id : 1]
Input [6]: [ss_item_sk#1, ss_customer_sk#2, ss_store_sk#3, ss_ticket_number#4, ss_net_paid#5, ss_sold_date_sk#6]

(3) Filter [codegen id : 1]
Input [6]: [ss_item_sk#1, ss_customer_sk#2, ss_store_sk#3, ss_ticket_number#4, ss_net_paid#5, ss_sold_date_sk#6]
Condition : (((isnotnull(ss_ticket_number#4) AND isnotnull(ss_item_sk#1)) AND isnotnull(ss_store_sk#3)) AND isnotnull(ss_customer_sk#2))

(4) Project [codegen id : 1]
Output [5]: [ss_item_sk#1, ss_customer_sk#2, ss_store_sk#3, ss_ticket_number#4, ss_net_paid#5]
Input [6]: [ss_item_sk#1, ss_customer_sk#2, ss_store_sk#3, ss_ticket_number#4, ss_net_paid#5, ss_sold_date_sk#6]

(5) Exchange
Input [5]: [ss_item_sk#1, ss_customer_sk#2, ss_store_sk#3, ss_ticket_number#4, ss_net_paid#5]
Arguments: hashpartitioning(ss_ticket_number#4, ss_item_sk#1, 5), ENSURE_REQUIREMENTS, [plan_id=1]

(6) Sort [codegen id : 2]
Input [5]: [ss_item_sk#1, ss_customer_sk#2, ss_store_sk#3, ss_ticket_number#4, ss_net_paid#5]
Arguments: [ss_ticket_number#4 ASC NULLS FIRST, ss_item_sk#1 ASC NULLS FIRST], false, 0

(7) Scan parquet spark_catalog.default.store_returns
Output [3]: [sr_item_sk#7, sr_ticket_number#8, sr_returned_date_sk#9]
Batched: true
Location [not included in comparison]/{warehouse_dir}/store_returns]
PushedFilters: [IsNotNull(sr_ticket_number), IsNotNull(sr_item_sk)]
ReadSchema: struct<sr_item_sk:int,sr_ticket_number:int>

(8) ColumnarToRow [codegen id : 3]
Input [3]: [sr_item_sk#7, sr_ticket_number#8, sr_returned_date_sk#9]

(9) Filter [codegen id : 3]
Input [3]: [sr_item_sk#7, sr_ticket_number#8, sr_returned_date_sk#9]
Condition : (isnotnull(sr_ticket_number#8) AND isnotnull(sr_item_sk#7))

(10) Project [codegen id : 3]
Output [2]: [sr_item_sk#7, sr_ticket_number#8]
Input [3]: [sr_item_sk#7, sr_ticket_number#8, sr_returned_date_sk#9]

(11) Exchange
Input [2]: [sr_item_sk#7, sr_ticket_number#8]
Arguments: hashpartitioning(sr_ticket_number#8, sr_item_sk#7, 5), ENSURE_REQUIREMENTS, [plan_id=2]

(12) Sort [codegen id : 4]
Input [2]: [sr_item_sk#7, sr_ticket_number#8]
Arguments: [sr_ticket_number#8 ASC NULLS FIRST, sr_item_sk#7 ASC NULLS FIRST], false, 0

(13) SortMergeJoin [codegen id : 9]
Left keys [2]: [ss_ticket_number#4, ss_item_sk#1]
Right keys [2]: [sr_ticket_number#8, sr_item_sk#7]
Join type: Inner
Join condition: None

(14) Project [codegen id : 9]
Output [4]: [ss_item_sk#1, ss_customer_sk#2, ss_store_sk#3, ss_net_paid#5]
Input [7]: [ss_item_sk#1, ss_customer_sk#2, ss_store_sk#3, ss_ticket_number#4, ss_net_paid#5, sr_item_sk#7, sr_ticket_number#8]

(15) Scan parquet spark_catalog.default.store
Output [5]: [s_store_sk#10, s_store_name#11, s_market_id#12, s_state#13, s_zip#14]
Batched: true
Location [not included in comparison]/{warehouse_dir}/store]
PushedFilters: [IsNotNull(s_market_id), EqualTo(s_market_id,8), IsNotNull(s_store_sk), IsNotNull(s_zip)]
ReadSchema: struct<s_store_sk:int,s_store_name:string,s_market_id:int,s_state:string,s_zip:string>

(16) ColumnarToRow [codegen id : 5]
Input [5]: [s_store_sk#10, s_store_name#11, s_market_id#12, s_state#13, s_zip#14]

(17) Filter [codegen id : 5]
Input [5]: [s_store_sk#10, s_store_name#11, s_market_id#12, s_state#13, s_zip#14]
Condition : (((isnotnull(s_market_id#12) AND (s_market_id#12 = 8)) AND isnotnull(s_store_sk#10)) AND isnotnull(s_zip#14))

(18) Project [codegen id : 5]
Output [4]: [s_store_sk#10, s_store_name#11, s_state#13, s_zip#14]
Input [5]: [s_store_sk#10, s_store_name#11, s_market_id#12, s_state#13, s_zip#14]

(19) BroadcastExchange
Input [4]: [s_store_sk#10, s_store_name#11, s_state#13, s_zip#14]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, true] as bigint)),false), [plan_id=3]

(20) BroadcastHashJoin [codegen id : 9]
Left keys [1]: [ss_store_sk#3]
Right keys [1]: [s_store_sk#10]
Join type: Inner
Join condition: None

(21) Project [codegen id : 9]
Output [6]: [ss_item_sk#1, ss_customer_sk#2, ss_net_paid#5, s_store_name#11, s_state#13, s_zip#14]
Input [8]: [ss_item_sk#1, ss_customer_sk#2, ss_store_sk#3, ss_net_paid#5, s_store_sk#10, s_store_name#11, s_state#13, s_zip#14]

(22) Scan parquet spark_catalog.default.item
Output [6]: [i_item_sk#15, i_current_price#16, i_size#17, i_color#18, i_units#19, i_manager_id#20]
Batched: true
Location [not included in comparison]/{warehouse_dir}/item]
PushedFilters: [IsNotNull(i_color), EqualTo(i_color,pale                ), IsNotNull(i_item_sk)]
ReadSchema: struct<i_item_sk:int,i_current_price:decimal(7,2),i_size:string,i_color:string,i_units:string,i_manager_id:int>

(23) ColumnarToRow [codegen id : 6]
Input [6]: [i_item_sk#15, i_current_price#16, i_size#17, i_color#18, i_units#19, i_manager_id#20]

(24) Filter [codegen id : 6]
Input [6]: [i_item_sk#15, i_current_price#16, i_size#17, i_color#18, i_units#19, i_manager_id#20]
Condition : ((isnotnull(i_color#18) AND (i_color#18 = pale                )) AND isnotnull(i_item_sk#15))

(25) BroadcastExchange
Input [6]: [i_item_sk#15, i_current_price#16, i_size#17, i_color#18, i_units#19, i_manager_id#20]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, false] as bigint)),false), [plan_id=4]

(26) BroadcastHashJoin [codegen id : 9]
Left keys [1]: [ss_item_sk#1]
Right keys [1]: [i_item_sk#15]
Join type: Inner
Join condition: None

(27) Project [codegen id : 9]
Output [10]: [ss_customer_sk#2, ss_net_paid#5, s_store_name#11, s_state#13, s_zip#14, i_current_price#16, i_size#17, i_color#18, i_units#19, i_manager_id#20]
Input [12]: [ss_item_sk#1, ss_customer_sk#2, ss_net_paid#5, s_store_name#11, s_state#13, s_zip#14, i_item_sk#15, i_current_price#16, i_size#17, i_color#18, i_units#19, i_manager_id#20]

(28) Scan parquet spark_catalog.default.customer
Output [5]: [c_customer_sk#21, c_current_addr_sk#22, c_first_name#23, c_last_name#24, c_birth_country#25]
Batched: true
Location [not included in comparison]/{warehouse_dir}/customer]
PushedFilters: [IsNotNull(c_customer_sk), IsNotNull(c_current_addr_sk), IsNotNull(c_birth_country)]
ReadSchema: struct<c_customer_sk:int,c_current_addr_sk:int,c_first_name:string,c_last_name:string,c_birth_country:string>

(29) ColumnarToRow [codegen id : 7]
Input [5]: [c_customer_sk#21, c_current_addr_sk#22, c_first_name#23, c_last_name#24, c_birth_country#25]

(30) Filter [codegen id : 7]
Input [5]: [c_customer_sk#21, c_current_addr_sk#22, c_first_name#23, c_last_name#24, c_birth_country#25]
Condition : ((isnotnull(c_customer_sk#21) AND isnotnull(c_current_addr_sk#22)) AND isnotnull(c_birth_country#25))

(31) BroadcastExchange
Input [5]: [c_customer_sk#21, c_current_addr_sk#22, c_first_name#23, c_last_name#24, c_birth_country#25]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, false] as bigint)),false), [plan_id=5]

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

(33) Project [codegen id : 9]
Output [13]: [ss_net_paid#5, s_store_name#11, s_state#13, s_zip#14, i_current_price#16, i_size#17, i_color#18, i_units#19, i_manager_id#20, c_current_addr_sk#22, c_first_name#23, c_last_name#24, c_birth_country#25]
Input [15]: [ss_customer_sk#2, ss_net_paid#5, s_store_name#11, s_state#13, s_zip#14, i_current_price#16, i_size#17, i_color#18, i_units#19, i_manager_id#20, c_customer_sk#21, c_current_addr_sk#22, c_first_name#23, c_last_name#24, c_birth_country#25]

(34) Scan parquet spark_catalog.default.customer_address
Output [4]: [ca_address_sk#26, ca_state#27, ca_zip#28, ca_country#29]
Batched: true
Location [not included in comparison]/{warehouse_dir}/customer_address]
PushedFilters: [IsNotNull(ca_address_sk), IsNotNull(ca_country), IsNotNull(ca_zip)]
ReadSchema: struct<ca_address_sk:int,ca_state:string,ca_zip:string,ca_country:string>

(35) ColumnarToRow [codegen id : 8]
Input [4]: [ca_address_sk#26, ca_state#27, ca_zip#28, ca_country#29]

(36) Filter [codegen id : 8]
Input [4]: [ca_address_sk#26, ca_state#27, ca_zip#28, ca_country#29]
Condition : ((isnotnull(ca_address_sk#26) AND isnotnull(ca_country#29)) AND isnotnull(ca_zip#28))

(37) BroadcastExchange
Input [4]: [ca_address_sk#26, ca_state#27, ca_zip#28, ca_country#29]
Arguments: HashedRelationBroadcastMode(List(input[0, int, false], upper(input[3, string, false]), input[2, string, false]),false), [plan_id=6]

(38) BroadcastHashJoin [codegen id : 9]
Left keys [3]: [c_current_addr_sk#22, c_birth_country#25, s_zip#14]
Right keys [3]: [ca_address_sk#26, upper(ca_country#29), ca_zip#28]
Join type: Inner
Join condition: None

(39) Project [codegen id : 9]
Output [11]: [ss_net_paid#5, s_store_name#11, s_state#13, i_current_price#16, i_size#17, i_color#18, i_units#19, i_manager_id#20, c_first_name#23, c_last_name#24, ca_state#27]
Input [17]: [ss_net_paid#5, s_store_name#11, s_state#13, s_zip#14, i_current_price#16, i_size#17, i_color#18, i_units#19, i_manager_id#20, c_current_addr_sk#22, c_first_name#23, c_last_name#24, c_birth_country#25, ca_address_sk#26, ca_state#27, ca_zip#28, ca_country#29]

(40) HashAggregate [codegen id : 9]
Input [11]: [ss_net_paid#5, s_store_name#11, s_state#13, i_current_price#16, i_size#17, i_color#18, i_units#19, i_manager_id#20, c_first_name#23, c_last_name#24, ca_state#27]
Keys [10]: [c_last_name#24, c_first_name#23, s_store_name#11, ca_state#27, s_state#13, i_color#18, i_current_price#16, i_manager_id#20, i_units#19, i_size#17]
Functions [1]: [partial_sum(UnscaledValue(ss_net_paid#5))]
Aggregate Attributes [1]: [sum#30]
Results [11]: [c_last_name#24, c_first_name#23, s_store_name#11, ca_state#27, s_state#13, i_color#18, i_current_price#16, i_manager_id#20, i_units#19, i_size#17, sum#31]

(41) Exchange
Input [11]: [c_last_name#24, c_first_name#23, s_store_name#11, ca_state#27, s_state#13, i_color#18, i_current_price#16, i_manager_id#20, i_units#19, i_size#17, sum#31]
Arguments: hashpartitioning(c_last_name#24, c_first_name#23, s_store_name#11, ca_state#27, s_state#13, i_color#18, i_current_price#16, i_manager_id#20, i_units#19, i_size#17, 5), ENSURE_REQUIREMENTS, [plan_id=7]

(42) HashAggregate [codegen id : 10]
Input [11]: [c_last_name#24, c_first_name#23, s_store_name#11, ca_state#27, s_state#13, i_color#18, i_current_price#16, i_manager_id#20, i_units#19, i_size#17, sum#31]
Keys [10]: [c_last_name#24, c_first_name#23, s_store_name#11, ca_state#27, s_state#13, i_color#18, i_current_price#16, i_manager_id#20, i_units#19, i_size#17]
Functions [1]: [sum(UnscaledValue(ss_net_paid#5))]
Aggregate Attributes [1]: [sum(UnscaledValue(ss_net_paid#5))#32]
Results [4]: [c_last_name#24, c_first_name#23, s_store_name#11, MakeDecimal(sum(UnscaledValue(ss_net_paid#5))#32,17,2) AS netpaid#33]

(43) HashAggregate [codegen id : 10]
Input [4]: [c_last_name#24, c_first_name#23, s_store_name#11, netpaid#33]
Keys [3]: [c_last_name#24, c_first_name#23, s_store_name#11]
Functions [1]: [partial_sum(netpaid#33)]
Aggregate Attributes [2]: [sum#34, isEmpty#35]
Results [5]: [c_last_name#24, c_first_name#23, s_store_name#11, sum#36, isEmpty#37]

(44) Exchange
Input [5]: [c_last_name#24, c_first_name#23, s_store_name#11, sum#36, isEmpty#37]
Arguments: hashpartitioning(c_last_name#24, c_first_name#23, s_store_name#11, 5), ENSURE_REQUIREMENTS, [plan_id=8]

(45) HashAggregate [codegen id : 11]
Input [5]: [c_last_name#24, c_first_name#23, s_store_name#11, sum#36, isEmpty#37]
Keys [3]: [c_last_name#24, c_first_name#23, s_store_name#11]
Functions [1]: [sum(netpaid#33)]
Aggregate Attributes [1]: [sum(netpaid#33)#38]
Results [4]: [c_last_name#24, c_first_name#23, s_store_name#11, sum(netpaid#33)#38 AS paid#39]

(46) Filter [codegen id : 11]
Input [4]: [c_last_name#24, c_first_name#23, s_store_name#11, paid#39]
Condition : (isnotnull(paid#39) AND (cast(paid#39 as decimal(33,8)) > cast(Subquery scalar-subquery#40, [id=#41] as decimal(33,8))))

(47) Exchange
Input [4]: [c_last_name#24, c_first_name#23, s_store_name#11, paid#39]
Arguments: rangepartitioning(c_last_name#24 ASC NULLS FIRST, c_first_name#23 ASC NULLS FIRST, s_store_name#11 ASC NULLS FIRST, 5), ENSURE_REQUIREMENTS, [plan_id=9]

(48) Sort [codegen id : 12]
Input [4]: [c_last_name#24, c_first_name#23, s_store_name#11, paid#39]
Arguments: [c_last_name#24 ASC NULLS FIRST, c_first_name#23 ASC NULLS FIRST, s_store_name#11 ASC NULLS FIRST], true, 0

===== Subqueries =====

Subquery:1 Hosting operator id = 46 Hosting Expression = Subquery scalar-subquery#40, [id=#41]
* HashAggregate (75)
+- Exchange (74)
   +- * HashAggregate (73)
      +- * HashAggregate (72)
         +- Exchange (71)
            +- * HashAggregate (70)
               +- * Project (69)
                  +- * BroadcastHashJoin Inner BuildRight (68)
                     :- * Project (66)
                     :  +- * BroadcastHashJoin Inner BuildRight (65)
                     :     :- * Project (63)
                     :     :  +- * BroadcastHashJoin Inner BuildRight (62)
                     :     :     :- * Project (57)
                     :     :     :  +- * BroadcastHashJoin Inner BuildRight (56)
                     :     :     :     :- * Project (54)
                     :     :     :     :  +- * SortMergeJoin Inner (53)
                     :     :     :     :     :- * Sort (50)
                     :     :     :     :     :  +- ReusedExchange (49)
                     :     :     :     :     +- * Sort (52)
                     :     :     :     :        +- ReusedExchange (51)
                     :     :     :     +- ReusedExchange (55)
                     :     :     +- BroadcastExchange (61)
                     :     :        +- * Filter (60)
                     :     :           +- * ColumnarToRow (59)
                     :     :              +- Scan parquet spark_catalog.default.item (58)
                     :     +- ReusedExchange (64)
                     +- ReusedExchange (67)


(49) ReusedExchange [Reuses operator id: 5]
Output [5]: [ss_item_sk#42, ss_customer_sk#43, ss_store_sk#44, ss_ticket_number#45, ss_net_paid#46]

(50) Sort [codegen id : 2]
Input [5]: [ss_item_sk#42, ss_customer_sk#43, ss_store_sk#44, ss_ticket_number#45, ss_net_paid#46]
Arguments: [ss_ticket_number#45 ASC NULLS FIRST, ss_item_sk#42 ASC NULLS FIRST], false, 0

(51) ReusedExchange [Reuses operator id: 11]
Output [2]: [sr_item_sk#47, sr_ticket_number#48]

(52) Sort [codegen id : 4]
Input [2]: [sr_item_sk#47, sr_ticket_number#48]
Arguments: [sr_ticket_number#48 ASC NULLS FIRST, sr_item_sk#47 ASC NULLS FIRST], false, 0

(53) SortMergeJoin [codegen id : 9]
Left keys [2]: [ss_ticket_number#45, ss_item_sk#42]
Right keys [2]: [sr_ticket_number#48, sr_item_sk#47]
Join type: Inner
Join condition: None

(54) Project [codegen id : 9]
Output [4]: [ss_item_sk#42, ss_customer_sk#43, ss_store_sk#44, ss_net_paid#46]
Input [7]: [ss_item_sk#42, ss_customer_sk#43, ss_store_sk#44, ss_ticket_number#45, ss_net_paid#46, sr_item_sk#47, sr_ticket_number#48]

(55) ReusedExchange [Reuses operator id: 19]
Output [4]: [s_store_sk#49, s_store_name#50, s_state#51, s_zip#52]

(56) BroadcastHashJoin [codegen id : 9]
Left keys [1]: [ss_store_sk#44]
Right keys [1]: [s_store_sk#49]
Join type: Inner
Join condition: None

(57) Project [codegen id : 9]
Output [6]: [ss_item_sk#42, ss_customer_sk#43, ss_net_paid#46, s_store_name#50, s_state#51, s_zip#52]
Input [8]: [ss_item_sk#42, ss_customer_sk#43, ss_store_sk#44, ss_net_paid#46, s_store_sk#49, s_store_name#50, s_state#51, s_zip#52]

(58) Scan parquet spark_catalog.default.item
Output [6]: [i_item_sk#53, i_current_price#54, i_size#55, i_color#56, i_units#57, i_manager_id#58]
Batched: true
Location [not included in comparison]/{warehouse_dir}/item]
PushedFilters: [IsNotNull(i_item_sk)]
ReadSchema: struct<i_item_sk:int,i_current_price:decimal(7,2),i_size:string,i_color:string,i_units:string,i_manager_id:int>

(59) ColumnarToRow [codegen id : 6]
Input [6]: [i_item_sk#53, i_current_price#54, i_size#55, i_color#56, i_units#57, i_manager_id#58]

(60) Filter [codegen id : 6]
Input [6]: [i_item_sk#53, i_current_price#54, i_size#55, i_color#56, i_units#57, i_manager_id#58]
Condition : isnotnull(i_item_sk#53)

(61) BroadcastExchange
Input [6]: [i_item_sk#53, i_current_price#54, i_size#55, i_color#56, i_units#57, i_manager_id#58]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, false] as bigint)),false), [plan_id=10]

(62) BroadcastHashJoin [codegen id : 9]
Left keys [1]: [ss_item_sk#42]
Right keys [1]: [i_item_sk#53]
Join type: Inner
Join condition: None

(63) Project [codegen id : 9]
Output [10]: [ss_customer_sk#43, ss_net_paid#46, s_store_name#50, s_state#51, s_zip#52, i_current_price#54, i_size#55, i_color#56, i_units#57, i_manager_id#58]
Input [12]: [ss_item_sk#42, ss_customer_sk#43, ss_net_paid#46, s_store_name#50, s_state#51, s_zip#52, i_item_sk#53, i_current_price#54, i_size#55, i_color#56, i_units#57, i_manager_id#58]

(64) ReusedExchange [Reuses operator id: 31]
Output [5]: [c_customer_sk#59, c_current_addr_sk#60, c_first_name#61, c_last_name#62, c_birth_country#63]

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

(66) Project [codegen id : 9]
Output [13]: [ss_net_paid#46, s_store_name#50, s_state#51, s_zip#52, i_current_price#54, i_size#55, i_color#56, i_units#57, i_manager_id#58, c_current_addr_sk#60, c_first_name#61, c_last_name#62, c_birth_country#63]
Input [15]: [ss_customer_sk#43, ss_net_paid#46, s_store_name#50, s_state#51, s_zip#52, i_current_price#54, i_size#55, i_color#56, i_units#57, i_manager_id#58, c_customer_sk#59, c_current_addr_sk#60, c_first_name#61, c_last_name#62, c_birth_country#63]

(67) ReusedExchange [Reuses operator id: 37]
Output [4]: [ca_address_sk#64, ca_state#65, ca_zip#66, ca_country#67]

(68) BroadcastHashJoin [codegen id : 9]
Left keys [3]: [c_current_addr_sk#60, c_birth_country#63, s_zip#52]
Right keys [3]: [ca_address_sk#64, upper(ca_country#67), ca_zip#66]
Join type: Inner
Join condition: None

(69) Project [codegen id : 9]
Output [11]: [ss_net_paid#46, s_store_name#50, s_state#51, i_current_price#54, i_size#55, i_color#56, i_units#57, i_manager_id#58, c_first_name#61, c_last_name#62, ca_state#65]
Input [17]: [ss_net_paid#46, s_store_name#50, s_state#51, s_zip#52, i_current_price#54, i_size#55, i_color#56, i_units#57, i_manager_id#58, c_current_addr_sk#60, c_first_name#61, c_last_name#62, c_birth_country#63, ca_address_sk#64, ca_state#65, ca_zip#66, ca_country#67]

(70) HashAggregate [codegen id : 9]
Input [11]: [ss_net_paid#46, s_store_name#50, s_state#51, i_current_price#54, i_size#55, i_color#56, i_units#57, i_manager_id#58, c_first_name#61, c_last_name#62, ca_state#65]
Keys [10]: [c_last_name#62, c_first_name#61, s_store_name#50, ca_state#65, s_state#51, i_color#56, i_current_price#54, i_manager_id#58, i_units#57, i_size#55]
Functions [1]: [partial_sum(UnscaledValue(ss_net_paid#46))]
Aggregate Attributes [1]: [sum#68]
Results [11]: [c_last_name#62, c_first_name#61, s_store_name#50, ca_state#65, s_state#51, i_color#56, i_current_price#54, i_manager_id#58, i_units#57, i_size#55, sum#69]

(71) Exchange
Input [11]: [c_last_name#62, c_first_name#61, s_store_name#50, ca_state#65, s_state#51, i_color#56, i_current_price#54, i_manager_id#58, i_units#57, i_size#55, sum#69]
Arguments: hashpartitioning(c_last_name#62, c_first_name#61, s_store_name#50, ca_state#65, s_state#51, i_color#56, i_current_price#54, i_manager_id#58, i_units#57, i_size#55, 5), ENSURE_REQUIREMENTS, [plan_id=11]

(72) HashAggregate [codegen id : 10]
Input [11]: [c_last_name#62, c_first_name#61, s_store_name#50, ca_state#65, s_state#51, i_color#56, i_current_price#54, i_manager_id#58, i_units#57, i_size#55, sum#69]
Keys [10]: [c_last_name#62, c_first_name#61, s_store_name#50, ca_state#65, s_state#51, i_color#56, i_current_price#54, i_manager_id#58, i_units#57, i_size#55]
Functions [1]: [sum(UnscaledValue(ss_net_paid#46))]
Aggregate Attributes [1]: [sum(UnscaledValue(ss_net_paid#46))#32]
Results [1]: [MakeDecimal(sum(UnscaledValue(ss_net_paid#46))#32,17,2) AS netpaid#70]

(73) HashAggregate [codegen id : 10]
Input [1]: [netpaid#70]
Keys: []
Functions [1]: [partial_avg(netpaid#70)]
Aggregate Attributes [2]: [sum#71, count#72]
Results [2]: [sum#73, count#74]

(74) Exchange
Input [2]: [sum#73, count#74]
Arguments: SinglePartition, ENSURE_REQUIREMENTS, [plan_id=12]

(75) HashAggregate [codegen id : 11]
Input [2]: [sum#73, count#74]
Keys: []
Functions [1]: [avg(netpaid#70)]
Aggregate Attributes [1]: [avg(netpaid#70)#75]
Results [1]: [(0.05 * avg(netpaid#70)#75) AS (0.05 * avg(netpaid))#76]


