== Physical Plan ==
TakeOrderedAndProject (57)
+- * HashAggregate (56)
   +- Exchange (55)
      +- * HashAggregate (54)
         +- * Project (53)
            +- * SortMergeJoin Inner (52)
               :- * Sort (40)
               :  +- Exchange (39)
               :     +- * Project (38)
               :        +- * BroadcastHashJoin Inner BuildRight (37)
               :           :- * Project (31)
               :           :  +- * BroadcastHashJoin Inner BuildRight (30)
               :           :     :- * Project (25)
               :           :     :  +- * BroadcastHashJoin Inner BuildRight (24)
               :           :     :     :- * Project (18)
               :           :     :     :  +- * SortMergeJoin Inner (17)
               :           :     :     :     :- * Sort (11)
               :           :     :     :     :  +- Exchange (10)
               :           :     :     :     :     +- * Project (9)
               :           :     :     :     :        +- * BroadcastHashJoin Inner BuildRight (8)
               :           :     :     :     :           :- * Filter (3)
               :           :     :     :     :           :  +- * ColumnarToRow (2)
               :           :     :     :     :           :     +- Scan parquet default.web_sales (1)
               :           :     :     :     :           +- BroadcastExchange (7)
               :           :     :     :     :              +- * Filter (6)
               :           :     :     :     :                 +- * ColumnarToRow (5)
               :           :     :     :     :                    +- Scan parquet default.web_page (4)
               :           :     :     :     +- * Sort (16)
               :           :     :     :        +- Exchange (15)
               :           :     :     :           +- * Filter (14)
               :           :     :     :              +- * ColumnarToRow (13)
               :           :     :     :                 +- Scan parquet default.web_returns (12)
               :           :     :     +- BroadcastExchange (23)
               :           :     :        +- * Project (22)
               :           :     :           +- * Filter (21)
               :           :     :              +- * ColumnarToRow (20)
               :           :     :                 +- Scan parquet default.date_dim (19)
               :           :     +- BroadcastExchange (29)
               :           :        +- * Filter (28)
               :           :           +- * ColumnarToRow (27)
               :           :              +- Scan parquet default.reason (26)
               :           +- BroadcastExchange (36)
               :              +- * Project (35)
               :                 +- * Filter (34)
               :                    +- * ColumnarToRow (33)
               :                       +- Scan parquet default.customer_address (32)
               +- * Sort (51)
                  +- Exchange (50)
                     +- * Project (49)
                        +- * BroadcastHashJoin Inner BuildLeft (48)
                           :- BroadcastExchange (44)
                           :  +- * Filter (43)
                           :     +- * ColumnarToRow (42)
                           :        +- Scan parquet default.customer_demographics (41)
                           +- * Filter (47)
                              +- * ColumnarToRow (46)
                                 +- Scan parquet default.customer_demographics (45)


(1) Scan parquet default.web_sales
Output [7]: [ws_sold_date_sk#1, ws_item_sk#2, ws_web_page_sk#3, ws_order_number#4, ws_quantity#5, ws_sales_price#6, ws_net_profit#7]
Batched: true
Location [not included in comparison]/{warehouse_dir}/web_sales]
PushedFilters: [IsNotNull(ws_item_sk), IsNotNull(ws_order_number), IsNotNull(ws_web_page_sk), IsNotNull(ws_sold_date_sk), Or(Or(And(GreaterThanOrEqual(ws_sales_price,100.00),LessThanOrEqual(ws_sales_price,150.00)),And(GreaterThanOrEqual(ws_sales_price,50.00),LessThanOrEqual(ws_sales_price,100.00))),And(GreaterThanOrEqual(ws_sales_price,150.00),LessThanOrEqual(ws_sales_price,200.00))), Or(Or(And(GreaterThanOrEqual(ws_net_profit,100.00),LessThanOrEqual(ws_net_profit,200.00)),And(GreaterThanOrEqual(ws_net_profit,150.00),LessThanOrEqual(ws_net_profit,300.00))),And(GreaterThanOrEqual(ws_net_profit,50.00),LessThanOrEqual(ws_net_profit,250.00)))]
ReadSchema: struct<ws_sold_date_sk:int,ws_item_sk:int,ws_web_page_sk:int,ws_order_number:int,ws_quantity:int,ws_sales_price:decimal(7,2),ws_net_profit:decimal(7,2)>

(2) ColumnarToRow [codegen id : 2]
Input [7]: [ws_sold_date_sk#1, ws_item_sk#2, ws_web_page_sk#3, ws_order_number#4, ws_quantity#5, ws_sales_price#6, ws_net_profit#7]

(3) Filter [codegen id : 2]
Input [7]: [ws_sold_date_sk#1, ws_item_sk#2, ws_web_page_sk#3, ws_order_number#4, ws_quantity#5, ws_sales_price#6, ws_net_profit#7]
Condition : (((((isnotnull(ws_item_sk#2) AND isnotnull(ws_order_number#4)) AND isnotnull(ws_web_page_sk#3)) AND isnotnull(ws_sold_date_sk#1)) AND ((((ws_sales_price#6 >= 100.00) AND (ws_sales_price#6 <= 150.00)) OR ((ws_sales_price#6 >= 50.00) AND (ws_sales_price#6 <= 100.00))) OR ((ws_sales_price#6 >= 150.00) AND (ws_sales_price#6 <= 200.00)))) AND ((((ws_net_profit#7 >= 100.00) AND (ws_net_profit#7 <= 200.00)) OR ((ws_net_profit#7 >= 150.00) AND (ws_net_profit#7 <= 300.00))) OR ((ws_net_profit#7 >= 50.00) AND (ws_net_profit#7 <= 250.00))))

(4) Scan parquet default.web_page
Output [1]: [wp_web_page_sk#8]
Batched: true
Location [not included in comparison]/{warehouse_dir}/web_page]
PushedFilters: [IsNotNull(wp_web_page_sk)]
ReadSchema: struct<wp_web_page_sk:int>

(5) ColumnarToRow [codegen id : 1]
Input [1]: [wp_web_page_sk#8]

(6) Filter [codegen id : 1]
Input [1]: [wp_web_page_sk#8]
Condition : isnotnull(wp_web_page_sk#8)

(7) BroadcastExchange
Input [1]: [wp_web_page_sk#8]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, false] as bigint)),false), [id=#9]

(8) BroadcastHashJoin [codegen id : 2]
Left keys [1]: [ws_web_page_sk#3]
Right keys [1]: [wp_web_page_sk#8]
Join condition: None

(9) Project [codegen id : 2]
Output [6]: [ws_sold_date_sk#1, ws_item_sk#2, ws_order_number#4, ws_quantity#5, ws_sales_price#6, ws_net_profit#7]
Input [8]: [ws_sold_date_sk#1, ws_item_sk#2, ws_web_page_sk#3, ws_order_number#4, ws_quantity#5, ws_sales_price#6, ws_net_profit#7, wp_web_page_sk#8]

(10) Exchange
Input [6]: [ws_sold_date_sk#1, ws_item_sk#2, ws_order_number#4, ws_quantity#5, ws_sales_price#6, ws_net_profit#7]
Arguments: hashpartitioning(cast(ws_item_sk#2 as bigint), cast(ws_order_number#4 as bigint), 5), ENSURE_REQUIREMENTS, [id=#10]

(11) Sort [codegen id : 3]
Input [6]: [ws_sold_date_sk#1, ws_item_sk#2, ws_order_number#4, ws_quantity#5, ws_sales_price#6, ws_net_profit#7]
Arguments: [cast(ws_item_sk#2 as bigint) ASC NULLS FIRST, cast(ws_order_number#4 as bigint) ASC NULLS FIRST], false, 0

(12) Scan parquet default.web_returns
Output [8]: [wr_item_sk#11, wr_refunded_cdemo_sk#12, wr_refunded_addr_sk#13, wr_returning_cdemo_sk#14, wr_reason_sk#15, wr_order_number#16, wr_fee#17, wr_refunded_cash#18]
Batched: true
Location [not included in comparison]/{warehouse_dir}/web_returns]
PushedFilters: [IsNotNull(wr_item_sk), IsNotNull(wr_order_number), IsNotNull(wr_refunded_cdemo_sk), IsNotNull(wr_returning_cdemo_sk), IsNotNull(wr_refunded_addr_sk), IsNotNull(wr_reason_sk)]
ReadSchema: struct<wr_item_sk:bigint,wr_refunded_cdemo_sk:bigint,wr_refunded_addr_sk:bigint,wr_returning_cdemo_sk:bigint,wr_reason_sk:bigint,wr_order_number:bigint,wr_fee:decimal(7,2),wr_refunded_cash:decimal(7,2)>

(13) ColumnarToRow [codegen id : 4]
Input [8]: [wr_item_sk#11, wr_refunded_cdemo_sk#12, wr_refunded_addr_sk#13, wr_returning_cdemo_sk#14, wr_reason_sk#15, wr_order_number#16, wr_fee#17, wr_refunded_cash#18]

(14) Filter [codegen id : 4]
Input [8]: [wr_item_sk#11, wr_refunded_cdemo_sk#12, wr_refunded_addr_sk#13, wr_returning_cdemo_sk#14, wr_reason_sk#15, wr_order_number#16, wr_fee#17, wr_refunded_cash#18]
Condition : (((((isnotnull(wr_item_sk#11) AND isnotnull(wr_order_number#16)) AND isnotnull(wr_refunded_cdemo_sk#12)) AND isnotnull(wr_returning_cdemo_sk#14)) AND isnotnull(wr_refunded_addr_sk#13)) AND isnotnull(wr_reason_sk#15))

(15) Exchange
Input [8]: [wr_item_sk#11, wr_refunded_cdemo_sk#12, wr_refunded_addr_sk#13, wr_returning_cdemo_sk#14, wr_reason_sk#15, wr_order_number#16, wr_fee#17, wr_refunded_cash#18]
Arguments: hashpartitioning(wr_item_sk#11, wr_order_number#16, 5), ENSURE_REQUIREMENTS, [id=#19]

(16) Sort [codegen id : 5]
Input [8]: [wr_item_sk#11, wr_refunded_cdemo_sk#12, wr_refunded_addr_sk#13, wr_returning_cdemo_sk#14, wr_reason_sk#15, wr_order_number#16, wr_fee#17, wr_refunded_cash#18]
Arguments: [wr_item_sk#11 ASC NULLS FIRST, wr_order_number#16 ASC NULLS FIRST], false, 0

(17) SortMergeJoin [codegen id : 9]
Left keys [2]: [cast(ws_item_sk#2 as bigint), cast(ws_order_number#4 as bigint)]
Right keys [2]: [wr_item_sk#11, wr_order_number#16]
Join condition: None

(18) Project [codegen id : 9]
Output [10]: [ws_sold_date_sk#1, ws_quantity#5, ws_sales_price#6, ws_net_profit#7, wr_refunded_cdemo_sk#12, wr_refunded_addr_sk#13, wr_returning_cdemo_sk#14, wr_reason_sk#15, wr_fee#17, wr_refunded_cash#18]
Input [14]: [ws_sold_date_sk#1, ws_item_sk#2, ws_order_number#4, ws_quantity#5, ws_sales_price#6, ws_net_profit#7, wr_item_sk#11, wr_refunded_cdemo_sk#12, wr_refunded_addr_sk#13, wr_returning_cdemo_sk#14, wr_reason_sk#15, wr_order_number#16, wr_fee#17, wr_refunded_cash#18]

(19) 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,2000), IsNotNull(d_date_sk)]
ReadSchema: struct<d_date_sk:int,d_year:int>

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

(21) Filter [codegen id : 6]
Input [2]: [d_date_sk#20, d_year#21]
Condition : ((isnotnull(d_year#21) AND (d_year#21 = 2000)) AND isnotnull(d_date_sk#20))

(22) Project [codegen id : 6]
Output [1]: [d_date_sk#20]
Input [2]: [d_date_sk#20, d_year#21]

(23) BroadcastExchange
Input [1]: [d_date_sk#20]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, true] as bigint)),false), [id=#22]

(24) BroadcastHashJoin [codegen id : 9]
Left keys [1]: [ws_sold_date_sk#1]
Right keys [1]: [d_date_sk#20]
Join condition: None

(25) Project [codegen id : 9]
Output [9]: [ws_quantity#5, ws_sales_price#6, ws_net_profit#7, wr_refunded_cdemo_sk#12, wr_refunded_addr_sk#13, wr_returning_cdemo_sk#14, wr_reason_sk#15, wr_fee#17, wr_refunded_cash#18]
Input [11]: [ws_sold_date_sk#1, ws_quantity#5, ws_sales_price#6, ws_net_profit#7, wr_refunded_cdemo_sk#12, wr_refunded_addr_sk#13, wr_returning_cdemo_sk#14, wr_reason_sk#15, wr_fee#17, wr_refunded_cash#18, d_date_sk#20]

(26) Scan parquet default.reason
Output [2]: [r_reason_sk#23, r_reason_desc#24]
Batched: true
Location [not included in comparison]/{warehouse_dir}/reason]
PushedFilters: [IsNotNull(r_reason_sk)]
ReadSchema: struct<r_reason_sk:int,r_reason_desc:string>

(27) ColumnarToRow [codegen id : 7]
Input [2]: [r_reason_sk#23, r_reason_desc#24]

(28) Filter [codegen id : 7]
Input [2]: [r_reason_sk#23, r_reason_desc#24]
Condition : isnotnull(r_reason_sk#23)

(29) BroadcastExchange
Input [2]: [r_reason_sk#23, r_reason_desc#24]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, false] as bigint)),false), [id=#25]

(30) BroadcastHashJoin [codegen id : 9]
Left keys [1]: [wr_reason_sk#15]
Right keys [1]: [cast(r_reason_sk#23 as bigint)]
Join condition: None

(31) Project [codegen id : 9]
Output [9]: [ws_quantity#5, ws_sales_price#6, ws_net_profit#7, wr_refunded_cdemo_sk#12, wr_refunded_addr_sk#13, wr_returning_cdemo_sk#14, wr_fee#17, wr_refunded_cash#18, r_reason_desc#24]
Input [11]: [ws_quantity#5, ws_sales_price#6, ws_net_profit#7, wr_refunded_cdemo_sk#12, wr_refunded_addr_sk#13, wr_returning_cdemo_sk#14, wr_reason_sk#15, wr_fee#17, wr_refunded_cash#18, r_reason_sk#23, r_reason_desc#24]

(32) Scan parquet default.customer_address
Output [3]: [ca_address_sk#26, ca_state#27, ca_country#28]
Batched: true
Location [not included in comparison]/{warehouse_dir}/customer_address]
PushedFilters: [IsNotNull(ca_country), EqualTo(ca_country,United States), IsNotNull(ca_address_sk), Or(Or(In(ca_state, [IN,OH,NJ]),In(ca_state, [WI,CT,KY])),In(ca_state, [LA,IA,AR]))]
ReadSchema: struct<ca_address_sk:int,ca_state:string,ca_country:string>

(33) ColumnarToRow [codegen id : 8]
Input [3]: [ca_address_sk#26, ca_state#27, ca_country#28]

(34) Filter [codegen id : 8]
Input [3]: [ca_address_sk#26, ca_state#27, ca_country#28]
Condition : (((isnotnull(ca_country#28) AND (ca_country#28 = United States)) AND isnotnull(ca_address_sk#26)) AND ((ca_state#27 IN (IN,OH,NJ) OR ca_state#27 IN (WI,CT,KY)) OR ca_state#27 IN (LA,IA,AR)))

(35) Project [codegen id : 8]
Output [2]: [ca_address_sk#26, ca_state#27]
Input [3]: [ca_address_sk#26, ca_state#27, ca_country#28]

(36) BroadcastExchange
Input [2]: [ca_address_sk#26, ca_state#27]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, true] as bigint)),false), [id=#29]

(37) BroadcastHashJoin [codegen id : 9]
Left keys [1]: [wr_refunded_addr_sk#13]
Right keys [1]: [cast(ca_address_sk#26 as bigint)]
Join condition: ((((ca_state#27 IN (IN,OH,NJ) AND (ws_net_profit#7 >= 100.00)) AND (ws_net_profit#7 <= 200.00)) OR ((ca_state#27 IN (WI,CT,KY) AND (ws_net_profit#7 >= 150.00)) AND (ws_net_profit#7 <= 300.00))) OR ((ca_state#27 IN (LA,IA,AR) AND (ws_net_profit#7 >= 50.00)) AND (ws_net_profit#7 <= 250.00)))

(38) Project [codegen id : 9]
Output [7]: [ws_quantity#5, ws_sales_price#6, wr_refunded_cdemo_sk#12, wr_returning_cdemo_sk#14, wr_fee#17, wr_refunded_cash#18, r_reason_desc#24]
Input [11]: [ws_quantity#5, ws_sales_price#6, ws_net_profit#7, wr_refunded_cdemo_sk#12, wr_refunded_addr_sk#13, wr_returning_cdemo_sk#14, wr_fee#17, wr_refunded_cash#18, r_reason_desc#24, ca_address_sk#26, ca_state#27]

(39) Exchange
Input [7]: [ws_quantity#5, ws_sales_price#6, wr_refunded_cdemo_sk#12, wr_returning_cdemo_sk#14, wr_fee#17, wr_refunded_cash#18, r_reason_desc#24]
Arguments: hashpartitioning(wr_refunded_cdemo_sk#12, wr_returning_cdemo_sk#14, 5), ENSURE_REQUIREMENTS, [id=#30]

(40) Sort [codegen id : 10]
Input [7]: [ws_quantity#5, ws_sales_price#6, wr_refunded_cdemo_sk#12, wr_returning_cdemo_sk#14, wr_fee#17, wr_refunded_cash#18, r_reason_desc#24]
Arguments: [wr_refunded_cdemo_sk#12 ASC NULLS FIRST, wr_returning_cdemo_sk#14 ASC NULLS FIRST], false, 0

(41) Scan parquet default.customer_demographics
Output [3]: [cd_demo_sk#31, cd_marital_status#32, cd_education_status#33]
Batched: true
Location [not included in comparison]/{warehouse_dir}/customer_demographics]
PushedFilters: [IsNotNull(cd_demo_sk), IsNotNull(cd_marital_status), IsNotNull(cd_education_status), Or(Or(And(EqualTo(cd_marital_status,M),EqualTo(cd_education_status,Advanced Degree)),And(EqualTo(cd_marital_status,S),EqualTo(cd_education_status,College))),And(EqualTo(cd_marital_status,W),EqualTo(cd_education_status,2 yr Degree)))]
ReadSchema: struct<cd_demo_sk:int,cd_marital_status:string,cd_education_status:string>

(42) ColumnarToRow [codegen id : 11]
Input [3]: [cd_demo_sk#31, cd_marital_status#32, cd_education_status#33]

(43) Filter [codegen id : 11]
Input [3]: [cd_demo_sk#31, cd_marital_status#32, cd_education_status#33]
Condition : (((isnotnull(cd_demo_sk#31) AND isnotnull(cd_marital_status#32)) AND isnotnull(cd_education_status#33)) AND ((((cd_marital_status#32 = M) AND (cd_education_status#33 = Advanced Degree)) OR ((cd_marital_status#32 = S) AND (cd_education_status#33 = College))) OR ((cd_marital_status#32 = W) AND (cd_education_status#33 = 2 yr Degree))))

(44) BroadcastExchange
Input [3]: [cd_demo_sk#31, cd_marital_status#32, cd_education_status#33]
Arguments: HashedRelationBroadcastMode(List(input[1, string, false], input[2, string, false]),false), [id=#34]

(45) Scan parquet default.customer_demographics
Output [3]: [cd_demo_sk#35, cd_marital_status#36, cd_education_status#37]
Batched: true
Location [not included in comparison]/{warehouse_dir}/customer_demographics]
PushedFilters: [IsNotNull(cd_demo_sk), IsNotNull(cd_marital_status), IsNotNull(cd_education_status)]
ReadSchema: struct<cd_demo_sk:int,cd_marital_status:string,cd_education_status:string>

(46) ColumnarToRow
Input [3]: [cd_demo_sk#35, cd_marital_status#36, cd_education_status#37]

(47) Filter
Input [3]: [cd_demo_sk#35, cd_marital_status#36, cd_education_status#37]
Condition : ((isnotnull(cd_demo_sk#35) AND isnotnull(cd_marital_status#36)) AND isnotnull(cd_education_status#37))

(48) BroadcastHashJoin [codegen id : 12]
Left keys [2]: [cd_marital_status#32, cd_education_status#33]
Right keys [2]: [cd_marital_status#36, cd_education_status#37]
Join condition: None

(49) Project [codegen id : 12]
Output [4]: [cd_demo_sk#31, cd_marital_status#32, cd_education_status#33, cd_demo_sk#35]
Input [6]: [cd_demo_sk#31, cd_marital_status#32, cd_education_status#33, cd_demo_sk#35, cd_marital_status#36, cd_education_status#37]

(50) Exchange
Input [4]: [cd_demo_sk#31, cd_marital_status#32, cd_education_status#33, cd_demo_sk#35]
Arguments: hashpartitioning(cast(cd_demo_sk#31 as bigint), cast(cd_demo_sk#35 as bigint), 5), ENSURE_REQUIREMENTS, [id=#38]

(51) Sort [codegen id : 13]
Input [4]: [cd_demo_sk#31, cd_marital_status#32, cd_education_status#33, cd_demo_sk#35]
Arguments: [cast(cd_demo_sk#31 as bigint) ASC NULLS FIRST, cast(cd_demo_sk#35 as bigint) ASC NULLS FIRST], false, 0

(52) SortMergeJoin [codegen id : 14]
Left keys [2]: [wr_refunded_cdemo_sk#12, wr_returning_cdemo_sk#14]
Right keys [2]: [cast(cd_demo_sk#31 as bigint), cast(cd_demo_sk#35 as bigint)]
Join condition: ((((((cd_marital_status#32 = M) AND (cd_education_status#33 = Advanced Degree)) AND (ws_sales_price#6 >= 100.00)) AND (ws_sales_price#6 <= 150.00)) OR ((((cd_marital_status#32 = S) AND (cd_education_status#33 = College)) AND (ws_sales_price#6 >= 50.00)) AND (ws_sales_price#6 <= 100.00))) OR ((((cd_marital_status#32 = W) AND (cd_education_status#33 = 2 yr Degree)) AND (ws_sales_price#6 >= 150.00)) AND (ws_sales_price#6 <= 200.00)))

(53) Project [codegen id : 14]
Output [4]: [ws_quantity#5, wr_fee#17, wr_refunded_cash#18, r_reason_desc#24]
Input [11]: [ws_quantity#5, ws_sales_price#6, wr_refunded_cdemo_sk#12, wr_returning_cdemo_sk#14, wr_fee#17, wr_refunded_cash#18, r_reason_desc#24, cd_demo_sk#31, cd_marital_status#32, cd_education_status#33, cd_demo_sk#35]

(54) HashAggregate [codegen id : 14]
Input [4]: [ws_quantity#5, wr_fee#17, wr_refunded_cash#18, r_reason_desc#24]
Keys [1]: [r_reason_desc#24]
Functions [3]: [partial_avg(cast(ws_quantity#5 as bigint)), partial_avg(UnscaledValue(wr_refunded_cash#18)), partial_avg(UnscaledValue(wr_fee#17))]
Aggregate Attributes [6]: [sum#39, count#40, sum#41, count#42, sum#43, count#44]
Results [7]: [r_reason_desc#24, sum#45, count#46, sum#47, count#48, sum#49, count#50]

(55) Exchange
Input [7]: [r_reason_desc#24, sum#45, count#46, sum#47, count#48, sum#49, count#50]
Arguments: hashpartitioning(r_reason_desc#24, 5), ENSURE_REQUIREMENTS, [id=#51]

(56) HashAggregate [codegen id : 15]
Input [7]: [r_reason_desc#24, sum#45, count#46, sum#47, count#48, sum#49, count#50]
Keys [1]: [r_reason_desc#24]
Functions [3]: [avg(cast(ws_quantity#5 as bigint)), avg(UnscaledValue(wr_refunded_cash#18)), avg(UnscaledValue(wr_fee#17))]
Aggregate Attributes [3]: [avg(cast(ws_quantity#5 as bigint))#52, avg(UnscaledValue(wr_refunded_cash#18))#53, avg(UnscaledValue(wr_fee#17))#54]
Results [4]: [substr(r_reason_desc#24, 1, 20) AS substr(r_reason_desc, 1, 20)#55, avg(cast(ws_quantity#5 as bigint))#52 AS avg(ws_quantity)#56, cast((avg(UnscaledValue(wr_refunded_cash#18))#53 / 100.0) as decimal(11,6)) AS avg(wr_refunded_cash)#57, cast((avg(UnscaledValue(wr_fee#17))#54 / 100.0) as decimal(11,6)) AS avg(wr_fee)#58]

(57) TakeOrderedAndProject
Input [4]: [substr(r_reason_desc, 1, 20)#55, avg(ws_quantity)#56, avg(wr_refunded_cash)#57, avg(wr_fee)#58]
Arguments: 100, [substr(r_reason_desc, 1, 20)#55 ASC NULLS FIRST, avg(ws_quantity)#56 ASC NULLS FIRST, avg(wr_refunded_cash)#57 ASC NULLS FIRST, avg(wr_fee)#58 ASC NULLS FIRST], [substr(r_reason_desc, 1, 20)#55, avg(ws_quantity)#56, avg(wr_refunded_cash)#57, avg(wr_fee)#58]

