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


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

(2) ColumnarToRow [codegen id : 3]
Input [7]: [ss_sold_date_sk#1, ss_item_sk#2, ss_customer_sk#3, ss_ticket_number#4, ss_quantity#5, ss_wholesale_cost#6, ss_sales_price#7]

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

(4) Scan parquet default.store_returns
Output [2]: [sr_item_sk#8, sr_ticket_number#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:bigint,sr_ticket_number:bigint>

(5) ColumnarToRow [codegen id : 1]
Input [2]: [sr_item_sk#8, sr_ticket_number#9]

(6) Filter [codegen id : 1]
Input [2]: [sr_item_sk#8, sr_ticket_number#9]
Condition : (isnotnull(sr_ticket_number#9) AND isnotnull(sr_item_sk#8))

(7) BroadcastExchange
Input [2]: [sr_item_sk#8, sr_ticket_number#9]
Arguments: HashedRelationBroadcastMode(List(input[1, bigint, false], input[0, bigint, false]),false), [id=#10]

(8) BroadcastHashJoin [codegen id : 3]
Left keys [2]: [cast(ss_ticket_number#4 as bigint), cast(ss_item_sk#2 as bigint)]
Right keys [2]: [sr_ticket_number#9, sr_item_sk#8]
Join condition: None

(9) Filter [codegen id : 3]
Input [9]: [ss_sold_date_sk#1, ss_item_sk#2, ss_customer_sk#3, ss_ticket_number#4, ss_quantity#5, ss_wholesale_cost#6, ss_sales_price#7, sr_item_sk#8, sr_ticket_number#9]
Condition : isnull(sr_ticket_number#9)

(10) Project [codegen id : 3]
Output [6]: [ss_sold_date_sk#1, ss_item_sk#2, ss_customer_sk#3, ss_quantity#5, ss_wholesale_cost#6, ss_sales_price#7]
Input [9]: [ss_sold_date_sk#1, ss_item_sk#2, ss_customer_sk#3, ss_ticket_number#4, ss_quantity#5, ss_wholesale_cost#6, ss_sales_price#7, sr_item_sk#8, sr_ticket_number#9]

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

(12) ColumnarToRow [codegen id : 2]
Input [2]: [d_date_sk#11, d_year#12]

(13) Filter [codegen id : 2]
Input [2]: [d_date_sk#11, d_year#12]
Condition : ((isnotnull(d_year#12) AND (d_year#12 = 2000)) AND isnotnull(d_date_sk#11))

(14) BroadcastExchange
Input [2]: [d_date_sk#11, d_year#12]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, false] as bigint)),false), [id=#13]

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

(16) Project [codegen id : 3]
Output [6]: [ss_item_sk#2, ss_customer_sk#3, ss_quantity#5, ss_wholesale_cost#6, ss_sales_price#7, d_year#12]
Input [8]: [ss_sold_date_sk#1, ss_item_sk#2, ss_customer_sk#3, ss_quantity#5, ss_wholesale_cost#6, ss_sales_price#7, d_date_sk#11, d_year#12]

(17) HashAggregate [codegen id : 3]
Input [6]: [ss_item_sk#2, ss_customer_sk#3, ss_quantity#5, ss_wholesale_cost#6, ss_sales_price#7, d_year#12]
Keys [3]: [d_year#12, ss_item_sk#2, ss_customer_sk#3]
Functions [3]: [partial_sum(cast(ss_quantity#5 as bigint)), partial_sum(UnscaledValue(ss_wholesale_cost#6)), partial_sum(UnscaledValue(ss_sales_price#7))]
Aggregate Attributes [3]: [sum#14, sum#15, sum#16]
Results [6]: [d_year#12, ss_item_sk#2, ss_customer_sk#3, sum#17, sum#18, sum#19]

(18) Exchange
Input [6]: [d_year#12, ss_item_sk#2, ss_customer_sk#3, sum#17, sum#18, sum#19]
Arguments: hashpartitioning(d_year#12, ss_item_sk#2, ss_customer_sk#3, 5), true, [id=#20]

(19) HashAggregate [codegen id : 12]
Input [6]: [d_year#12, ss_item_sk#2, ss_customer_sk#3, sum#17, sum#18, sum#19]
Keys [3]: [d_year#12, ss_item_sk#2, ss_customer_sk#3]
Functions [3]: [sum(cast(ss_quantity#5 as bigint)), sum(UnscaledValue(ss_wholesale_cost#6)), sum(UnscaledValue(ss_sales_price#7))]
Aggregate Attributes [3]: [sum(cast(ss_quantity#5 as bigint))#21, sum(UnscaledValue(ss_wholesale_cost#6))#22, sum(UnscaledValue(ss_sales_price#7))#23]
Results [6]: [d_year#12 AS ss_sold_year#24, ss_item_sk#2, ss_customer_sk#3, sum(cast(ss_quantity#5 as bigint))#21 AS ss_qty#25, MakeDecimal(sum(UnscaledValue(ss_wholesale_cost#6))#22,17,2) AS ss_wc#26, MakeDecimal(sum(UnscaledValue(ss_sales_price#7))#23,17,2) AS ss_sp#27]

(20) Scan parquet default.web_sales
Output [7]: [ws_sold_date_sk#28, ws_item_sk#29, ws_bill_customer_sk#30, ws_order_number#31, ws_quantity#32, ws_wholesale_cost#33, ws_sales_price#34]
Batched: true
Location [not included in comparison]/{warehouse_dir}/web_sales]
PushedFilters: [IsNotNull(ws_sold_date_sk), IsNotNull(ws_item_sk), IsNotNull(ws_bill_customer_sk)]
ReadSchema: struct<ws_sold_date_sk:int,ws_item_sk:int,ws_bill_customer_sk:int,ws_order_number:int,ws_quantity:int,ws_wholesale_cost:decimal(7,2),ws_sales_price:decimal(7,2)>

(21) ColumnarToRow [codegen id : 6]
Input [7]: [ws_sold_date_sk#28, ws_item_sk#29, ws_bill_customer_sk#30, ws_order_number#31, ws_quantity#32, ws_wholesale_cost#33, ws_sales_price#34]

(22) Filter [codegen id : 6]
Input [7]: [ws_sold_date_sk#28, ws_item_sk#29, ws_bill_customer_sk#30, ws_order_number#31, ws_quantity#32, ws_wholesale_cost#33, ws_sales_price#34]
Condition : ((isnotnull(ws_sold_date_sk#28) AND isnotnull(ws_item_sk#29)) AND isnotnull(ws_bill_customer_sk#30))

(23) Scan parquet default.web_returns
Output [2]: [wr_item_sk#35, wr_order_number#36]
Batched: true
Location [not included in comparison]/{warehouse_dir}/web_returns]
PushedFilters: [IsNotNull(wr_order_number), IsNotNull(wr_item_sk)]
ReadSchema: struct<wr_item_sk:bigint,wr_order_number:bigint>

(24) ColumnarToRow [codegen id : 4]
Input [2]: [wr_item_sk#35, wr_order_number#36]

(25) Filter [codegen id : 4]
Input [2]: [wr_item_sk#35, wr_order_number#36]
Condition : (isnotnull(wr_order_number#36) AND isnotnull(wr_item_sk#35))

(26) BroadcastExchange
Input [2]: [wr_item_sk#35, wr_order_number#36]
Arguments: HashedRelationBroadcastMode(List(input[1, bigint, false], input[0, bigint, false]),false), [id=#37]

(27) BroadcastHashJoin [codegen id : 6]
Left keys [2]: [cast(ws_order_number#31 as bigint), cast(ws_item_sk#29 as bigint)]
Right keys [2]: [wr_order_number#36, wr_item_sk#35]
Join condition: None

(28) Filter [codegen id : 6]
Input [9]: [ws_sold_date_sk#28, ws_item_sk#29, ws_bill_customer_sk#30, ws_order_number#31, ws_quantity#32, ws_wholesale_cost#33, ws_sales_price#34, wr_item_sk#35, wr_order_number#36]
Condition : isnull(wr_order_number#36)

(29) Project [codegen id : 6]
Output [6]: [ws_sold_date_sk#28, ws_item_sk#29, ws_bill_customer_sk#30, ws_quantity#32, ws_wholesale_cost#33, ws_sales_price#34]
Input [9]: [ws_sold_date_sk#28, ws_item_sk#29, ws_bill_customer_sk#30, ws_order_number#31, ws_quantity#32, ws_wholesale_cost#33, ws_sales_price#34, wr_item_sk#35, wr_order_number#36]

(30) ReusedExchange [Reuses operator id: 14]
Output [2]: [d_date_sk#11, d_year#12]

(31) BroadcastHashJoin [codegen id : 6]
Left keys [1]: [ws_sold_date_sk#28]
Right keys [1]: [d_date_sk#11]
Join condition: None

(32) Project [codegen id : 6]
Output [6]: [ws_item_sk#29, ws_bill_customer_sk#30, ws_quantity#32, ws_wholesale_cost#33, ws_sales_price#34, d_year#12]
Input [8]: [ws_sold_date_sk#28, ws_item_sk#29, ws_bill_customer_sk#30, ws_quantity#32, ws_wholesale_cost#33, ws_sales_price#34, d_date_sk#11, d_year#12]

(33) HashAggregate [codegen id : 6]
Input [6]: [ws_item_sk#29, ws_bill_customer_sk#30, ws_quantity#32, ws_wholesale_cost#33, ws_sales_price#34, d_year#12]
Keys [3]: [d_year#12, ws_item_sk#29, ws_bill_customer_sk#30]
Functions [3]: [partial_sum(cast(ws_quantity#32 as bigint)), partial_sum(UnscaledValue(ws_wholesale_cost#33)), partial_sum(UnscaledValue(ws_sales_price#34))]
Aggregate Attributes [3]: [sum#38, sum#39, sum#40]
Results [6]: [d_year#12, ws_item_sk#29, ws_bill_customer_sk#30, sum#41, sum#42, sum#43]

(34) Exchange
Input [6]: [d_year#12, ws_item_sk#29, ws_bill_customer_sk#30, sum#41, sum#42, sum#43]
Arguments: hashpartitioning(d_year#12, ws_item_sk#29, ws_bill_customer_sk#30, 5), true, [id=#44]

(35) HashAggregate [codegen id : 7]
Input [6]: [d_year#12, ws_item_sk#29, ws_bill_customer_sk#30, sum#41, sum#42, sum#43]
Keys [3]: [d_year#12, ws_item_sk#29, ws_bill_customer_sk#30]
Functions [3]: [sum(cast(ws_quantity#32 as bigint)), sum(UnscaledValue(ws_wholesale_cost#33)), sum(UnscaledValue(ws_sales_price#34))]
Aggregate Attributes [3]: [sum(cast(ws_quantity#32 as bigint))#45, sum(UnscaledValue(ws_wholesale_cost#33))#46, sum(UnscaledValue(ws_sales_price#34))#47]
Results [6]: [d_year#12 AS ws_sold_year#48, ws_item_sk#29, ws_bill_customer_sk#30 AS ws_customer_sk#49, sum(cast(ws_quantity#32 as bigint))#45 AS ws_qty#50, MakeDecimal(sum(UnscaledValue(ws_wholesale_cost#33))#46,17,2) AS ws_wc#51, MakeDecimal(sum(UnscaledValue(ws_sales_price#34))#47,17,2) AS ws_sp#52]

(36) Filter [codegen id : 7]
Input [6]: [ws_sold_year#48, ws_item_sk#29, ws_customer_sk#49, ws_qty#50, ws_wc#51, ws_sp#52]
Condition : (coalesce(ws_qty#50, 0) > 0)

(37) BroadcastExchange
Input [6]: [ws_sold_year#48, ws_item_sk#29, ws_customer_sk#49, ws_qty#50, ws_wc#51, ws_sp#52]
Arguments: HashedRelationBroadcastMode(List(input[0, int, true], input[1, int, true], input[2, int, true]),false), [id=#53]

(38) BroadcastHashJoin [codegen id : 12]
Left keys [3]: [ss_sold_year#24, ss_item_sk#2, ss_customer_sk#3]
Right keys [3]: [ws_sold_year#48, ws_item_sk#29, ws_customer_sk#49]
Join condition: None

(39) Project [codegen id : 12]
Output [9]: [ss_sold_year#24, ss_item_sk#2, ss_customer_sk#3, ss_qty#25, ss_wc#26, ss_sp#27, ws_qty#50, ws_wc#51, ws_sp#52]
Input [12]: [ss_sold_year#24, ss_item_sk#2, ss_customer_sk#3, ss_qty#25, ss_wc#26, ss_sp#27, ws_sold_year#48, ws_item_sk#29, ws_customer_sk#49, ws_qty#50, ws_wc#51, ws_sp#52]

(40) Scan parquet default.catalog_sales
Output [7]: [cs_sold_date_sk#54, cs_bill_customer_sk#55, cs_item_sk#56, cs_order_number#57, cs_quantity#58, cs_wholesale_cost#59, cs_sales_price#60]
Batched: true
Location [not included in comparison]/{warehouse_dir}/catalog_sales]
PushedFilters: [IsNotNull(cs_sold_date_sk), IsNotNull(cs_item_sk), IsNotNull(cs_bill_customer_sk)]
ReadSchema: struct<cs_sold_date_sk:int,cs_bill_customer_sk:int,cs_item_sk:int,cs_order_number:int,cs_quantity:int,cs_wholesale_cost:decimal(7,2),cs_sales_price:decimal(7,2)>

(41) ColumnarToRow [codegen id : 10]
Input [7]: [cs_sold_date_sk#54, cs_bill_customer_sk#55, cs_item_sk#56, cs_order_number#57, cs_quantity#58, cs_wholesale_cost#59, cs_sales_price#60]

(42) Filter [codegen id : 10]
Input [7]: [cs_sold_date_sk#54, cs_bill_customer_sk#55, cs_item_sk#56, cs_order_number#57, cs_quantity#58, cs_wholesale_cost#59, cs_sales_price#60]
Condition : ((isnotnull(cs_sold_date_sk#54) AND isnotnull(cs_item_sk#56)) AND isnotnull(cs_bill_customer_sk#55))

(43) Scan parquet default.catalog_returns
Output [2]: [cr_item_sk#61, cr_order_number#62]
Batched: true
Location [not included in comparison]/{warehouse_dir}/catalog_returns]
PushedFilters: [IsNotNull(cr_order_number), IsNotNull(cr_item_sk)]
ReadSchema: struct<cr_item_sk:int,cr_order_number:int>

(44) ColumnarToRow [codegen id : 8]
Input [2]: [cr_item_sk#61, cr_order_number#62]

(45) Filter [codegen id : 8]
Input [2]: [cr_item_sk#61, cr_order_number#62]
Condition : (isnotnull(cr_order_number#62) AND isnotnull(cr_item_sk#61))

(46) BroadcastExchange
Input [2]: [cr_item_sk#61, cr_order_number#62]
Arguments: HashedRelationBroadcastMode(List((shiftleft(cast(input[1, int, false] as bigint), 32) | (cast(input[0, int, false] as bigint) & 4294967295))),false), [id=#63]

(47) BroadcastHashJoin [codegen id : 10]
Left keys [2]: [cs_order_number#57, cs_item_sk#56]
Right keys [2]: [cr_order_number#62, cr_item_sk#61]
Join condition: None

(48) Filter [codegen id : 10]
Input [9]: [cs_sold_date_sk#54, cs_bill_customer_sk#55, cs_item_sk#56, cs_order_number#57, cs_quantity#58, cs_wholesale_cost#59, cs_sales_price#60, cr_item_sk#61, cr_order_number#62]
Condition : isnull(cr_order_number#62)

(49) Project [codegen id : 10]
Output [6]: [cs_sold_date_sk#54, cs_bill_customer_sk#55, cs_item_sk#56, cs_quantity#58, cs_wholesale_cost#59, cs_sales_price#60]
Input [9]: [cs_sold_date_sk#54, cs_bill_customer_sk#55, cs_item_sk#56, cs_order_number#57, cs_quantity#58, cs_wholesale_cost#59, cs_sales_price#60, cr_item_sk#61, cr_order_number#62]

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

(51) BroadcastHashJoin [codegen id : 10]
Left keys [1]: [cs_sold_date_sk#54]
Right keys [1]: [d_date_sk#11]
Join condition: None

(52) Project [codegen id : 10]
Output [6]: [cs_bill_customer_sk#55, cs_item_sk#56, cs_quantity#58, cs_wholesale_cost#59, cs_sales_price#60, d_year#12]
Input [8]: [cs_sold_date_sk#54, cs_bill_customer_sk#55, cs_item_sk#56, cs_quantity#58, cs_wholesale_cost#59, cs_sales_price#60, d_date_sk#11, d_year#12]

(53) HashAggregate [codegen id : 10]
Input [6]: [cs_bill_customer_sk#55, cs_item_sk#56, cs_quantity#58, cs_wholesale_cost#59, cs_sales_price#60, d_year#12]
Keys [3]: [d_year#12, cs_item_sk#56, cs_bill_customer_sk#55]
Functions [3]: [partial_sum(cast(cs_quantity#58 as bigint)), partial_sum(UnscaledValue(cs_wholesale_cost#59)), partial_sum(UnscaledValue(cs_sales_price#60))]
Aggregate Attributes [3]: [sum#64, sum#65, sum#66]
Results [6]: [d_year#12, cs_item_sk#56, cs_bill_customer_sk#55, sum#67, sum#68, sum#69]

(54) Exchange
Input [6]: [d_year#12, cs_item_sk#56, cs_bill_customer_sk#55, sum#67, sum#68, sum#69]
Arguments: hashpartitioning(d_year#12, cs_item_sk#56, cs_bill_customer_sk#55, 5), true, [id=#70]

(55) HashAggregate [codegen id : 11]
Input [6]: [d_year#12, cs_item_sk#56, cs_bill_customer_sk#55, sum#67, sum#68, sum#69]
Keys [3]: [d_year#12, cs_item_sk#56, cs_bill_customer_sk#55]
Functions [3]: [sum(cast(cs_quantity#58 as bigint)), sum(UnscaledValue(cs_wholesale_cost#59)), sum(UnscaledValue(cs_sales_price#60))]
Aggregate Attributes [3]: [sum(cast(cs_quantity#58 as bigint))#71, sum(UnscaledValue(cs_wholesale_cost#59))#72, sum(UnscaledValue(cs_sales_price#60))#73]
Results [6]: [d_year#12 AS cs_sold_year#74, cs_item_sk#56, cs_bill_customer_sk#55 AS cs_customer_sk#75, sum(cast(cs_quantity#58 as bigint))#71 AS cs_qty#76, MakeDecimal(sum(UnscaledValue(cs_wholesale_cost#59))#72,17,2) AS cs_wc#77, MakeDecimal(sum(UnscaledValue(cs_sales_price#60))#73,17,2) AS cs_sp#78]

(56) Filter [codegen id : 11]
Input [6]: [cs_sold_year#74, cs_item_sk#56, cs_customer_sk#75, cs_qty#76, cs_wc#77, cs_sp#78]
Condition : (coalesce(cs_qty#76, 0) > 0)

(57) BroadcastExchange
Input [6]: [cs_sold_year#74, cs_item_sk#56, cs_customer_sk#75, cs_qty#76, cs_wc#77, cs_sp#78]
Arguments: HashedRelationBroadcastMode(List(input[0, int, true], input[1, int, true], input[2, int, true]),false), [id=#79]

(58) BroadcastHashJoin [codegen id : 12]
Left keys [3]: [ss_sold_year#24, ss_item_sk#2, ss_customer_sk#3]
Right keys [3]: [cs_sold_year#74, cs_item_sk#56, cs_customer_sk#75]
Join condition: None

(59) Project [codegen id : 12]
Output [13]: [round((cast(ss_qty#25 as double) / cast(coalesce((ws_qty#50 + cs_qty#76), 1) as double)), 2) AS ratio#80, ss_qty#25 AS store_qty#81, ss_wc#26 AS store_wholesale_cost#82, ss_sp#27 AS store_sales_price#83, (coalesce(ws_qty#50, 0) + coalesce(cs_qty#76, 0)) AS other_chan_qty#84, CheckOverflow((promote_precision(cast(coalesce(ws_wc#51, 0.00) as decimal(18,2))) + promote_precision(cast(coalesce(cs_wc#77, 0.00) as decimal(18,2)))), DecimalType(18,2), true) AS other_chan_wholesale_cost#85, CheckOverflow((promote_precision(cast(coalesce(ws_sp#52, 0.00) as decimal(18,2))) + promote_precision(cast(coalesce(cs_sp#78, 0.00) as decimal(18,2)))), DecimalType(18,2), true) AS other_chan_sales_price#86, ss_sold_year#24, ss_item_sk#2, ss_customer_sk#3, ss_qty#25, ss_wc#26, ss_sp#27]
Input [15]: [ss_sold_year#24, ss_item_sk#2, ss_customer_sk#3, ss_qty#25, ss_wc#26, ss_sp#27, ws_qty#50, ws_wc#51, ws_sp#52, cs_sold_year#74, cs_item_sk#56, cs_customer_sk#75, cs_qty#76, cs_wc#77, cs_sp#78]

(60) TakeOrderedAndProject
Input [13]: [ratio#80, store_qty#81, store_wholesale_cost#82, store_sales_price#83, other_chan_qty#84, other_chan_wholesale_cost#85, other_chan_sales_price#86, ss_sold_year#24, ss_item_sk#2, ss_customer_sk#3, ss_qty#25, ss_wc#26, ss_sp#27]
Arguments: 100, [ss_sold_year#24 ASC NULLS FIRST, ss_item_sk#2 ASC NULLS FIRST, ss_customer_sk#3 ASC NULLS FIRST, ss_qty#25 DESC NULLS LAST, ss_wc#26 DESC NULLS LAST, ss_sp#27 DESC NULLS LAST, other_chan_qty#84 ASC NULLS FIRST, other_chan_wholesale_cost#85 ASC NULLS FIRST, other_chan_sales_price#86 ASC NULLS FIRST, ratio#80 ASC NULLS FIRST], [ratio#80, store_qty#81, store_wholesale_cost#82, store_sales_price#83, other_chan_qty#84, other_chan_wholesale_cost#85, other_chan_sales_price#86]

