== Physical Plan ==
TakeOrderedAndProject (108)
+- * HashAggregate (107)
   +- Exchange (106)
      +- * HashAggregate (105)
         +- Union (104)
            :- * HashAggregate (98)
            :  +- Exchange (97)
            :     +- * HashAggregate (96)
            :        +- Union (95)
            :           :- * HashAggregate (89)
            :           :  +- Exchange (88)
            :           :     +- * HashAggregate (87)
            :           :        +- Union (86)
            :           :           :- * Project (34)
            :           :           :  +- * BroadcastHashJoin LeftOuter BuildRight (33)
            :           :           :     :- * HashAggregate (19)
            :           :           :     :  +- Exchange (18)
            :           :           :     :     +- * HashAggregate (17)
            :           :           :     :        +- * Project (16)
            :           :           :     :           +- * BroadcastHashJoin Inner BuildRight (15)
            :           :           :     :              :- * Project (10)
            :           :           :     :              :  +- * BroadcastHashJoin Inner BuildRight (9)
            :           :           :     :              :     :- * Filter (3)
            :           :           :     :              :     :  +- * ColumnarToRow (2)
            :           :           :     :              :     :     +- Scan parquet default.store_sales (1)
            :           :           :     :              :     +- BroadcastExchange (8)
            :           :           :     :              :        +- * Project (7)
            :           :           :     :              :           +- * Filter (6)
            :           :           :     :              :              +- * ColumnarToRow (5)
            :           :           :     :              :                 +- Scan parquet default.date_dim (4)
            :           :           :     :              +- BroadcastExchange (14)
            :           :           :     :                 +- * Filter (13)
            :           :           :     :                    +- * ColumnarToRow (12)
            :           :           :     :                       +- Scan parquet default.store (11)
            :           :           :     +- BroadcastExchange (32)
            :           :           :        +- * HashAggregate (31)
            :           :           :           +- Exchange (30)
            :           :           :              +- * HashAggregate (29)
            :           :           :                 +- * Project (28)
            :           :           :                    +- * BroadcastHashJoin Inner BuildRight (27)
            :           :           :                       :- * Project (25)
            :           :           :                       :  +- * BroadcastHashJoin Inner BuildRight (24)
            :           :           :                       :     :- * Filter (22)
            :           :           :                       :     :  +- * ColumnarToRow (21)
            :           :           :                       :     :     +- Scan parquet default.store_returns (20)
            :           :           :                       :     +- ReusedExchange (23)
            :           :           :                       +- ReusedExchange (26)
            :           :           :- * Project (55)
            :           :           :  +- BroadcastNestedLoopJoin Inner BuildRight (54)
            :           :           :     :- * HashAggregate (43)
            :           :           :     :  +- Exchange (42)
            :           :           :     :     +- * HashAggregate (41)
            :           :           :     :        +- * Project (40)
            :           :           :     :           +- * BroadcastHashJoin Inner BuildRight (39)
            :           :           :     :              :- * Filter (37)
            :           :           :     :              :  +- * ColumnarToRow (36)
            :           :           :     :              :     +- Scan parquet default.catalog_sales (35)
            :           :           :     :              +- ReusedExchange (38)
            :           :           :     +- BroadcastExchange (53)
            :           :           :        +- * HashAggregate (52)
            :           :           :           +- Exchange (51)
            :           :           :              +- * HashAggregate (50)
            :           :           :                 +- * Project (49)
            :           :           :                    +- * BroadcastHashJoin Inner BuildRight (48)
            :           :           :                       :- * Filter (46)
            :           :           :                       :  +- * ColumnarToRow (45)
            :           :           :                       :     +- Scan parquet default.catalog_returns (44)
            :           :           :                       +- ReusedExchange (47)
            :           :           +- * Project (85)
            :           :              +- * BroadcastHashJoin LeftOuter BuildRight (84)
            :           :                 :- * HashAggregate (70)
            :           :                 :  +- Exchange (69)
            :           :                 :     +- * HashAggregate (68)
            :           :                 :        +- * Project (67)
            :           :                 :           +- * BroadcastHashJoin Inner BuildRight (66)
            :           :                 :              :- * Project (61)
            :           :                 :              :  +- * BroadcastHashJoin Inner BuildRight (60)
            :           :                 :              :     :- * Filter (58)
            :           :                 :              :     :  +- * ColumnarToRow (57)
            :           :                 :              :     :     +- Scan parquet default.web_sales (56)
            :           :                 :              :     +- ReusedExchange (59)
            :           :                 :              +- BroadcastExchange (65)
            :           :                 :                 +- * Filter (64)
            :           :                 :                    +- * ColumnarToRow (63)
            :           :                 :                       +- Scan parquet default.web_page (62)
            :           :                 +- BroadcastExchange (83)
            :           :                    +- * HashAggregate (82)
            :           :                       +- Exchange (81)
            :           :                          +- * HashAggregate (80)
            :           :                             +- * Project (79)
            :           :                                +- * BroadcastHashJoin Inner BuildRight (78)
            :           :                                   :- * Project (76)
            :           :                                   :  +- * BroadcastHashJoin Inner BuildRight (75)
            :           :                                   :     :- * Filter (73)
            :           :                                   :     :  +- * ColumnarToRow (72)
            :           :                                   :     :     +- Scan parquet default.web_returns (71)
            :           :                                   :     +- ReusedExchange (74)
            :           :                                   +- ReusedExchange (77)
            :           +- * HashAggregate (94)
            :              +- Exchange (93)
            :                 +- * HashAggregate (92)
            :                    +- * HashAggregate (91)
            :                       +- ReusedExchange (90)
            +- * HashAggregate (103)
               +- Exchange (102)
                  +- * HashAggregate (101)
                     +- * HashAggregate (100)
                        +- ReusedExchange (99)


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

(2) ColumnarToRow [codegen id : 3]
Input [4]: [ss_sold_date_sk#1, ss_store_sk#2, ss_ext_sales_price#3, ss_net_profit#4]

(3) Filter [codegen id : 3]
Input [4]: [ss_sold_date_sk#1, ss_store_sk#2, ss_ext_sales_price#3, ss_net_profit#4]
Condition : (isnotnull(ss_sold_date_sk#1) AND isnotnull(ss_store_sk#2))

(4) Scan parquet default.date_dim
Output [2]: [d_date_sk#5, d_date#6]
Batched: true
Location [not included in comparison]/{warehouse_dir}/date_dim]
PushedFilters: [IsNotNull(d_date), GreaterThanOrEqual(d_date,1998-08-04), LessThanOrEqual(d_date,1998-09-03), IsNotNull(d_date_sk)]
ReadSchema: struct<d_date_sk:int,d_date:date>

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

(6) Filter [codegen id : 1]
Input [2]: [d_date_sk#5, d_date#6]
Condition : (((isnotnull(d_date#6) AND (d_date#6 >= 10442)) AND (d_date#6 <= 10472)) AND isnotnull(d_date_sk#5))

(7) Project [codegen id : 1]
Output [1]: [d_date_sk#5]
Input [2]: [d_date_sk#5, d_date#6]

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

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

(10) Project [codegen id : 3]
Output [3]: [ss_store_sk#2, ss_ext_sales_price#3, ss_net_profit#4]
Input [5]: [ss_sold_date_sk#1, ss_store_sk#2, ss_ext_sales_price#3, ss_net_profit#4, d_date_sk#5]

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

(12) ColumnarToRow [codegen id : 2]
Input [1]: [s_store_sk#8]

(13) Filter [codegen id : 2]
Input [1]: [s_store_sk#8]
Condition : isnotnull(s_store_sk#8)

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

(15) BroadcastHashJoin [codegen id : 3]
Left keys [1]: [ss_store_sk#2]
Right keys [1]: [s_store_sk#8]
Join condition: None

(16) Project [codegen id : 3]
Output [3]: [ss_ext_sales_price#3, ss_net_profit#4, s_store_sk#8]
Input [4]: [ss_store_sk#2, ss_ext_sales_price#3, ss_net_profit#4, s_store_sk#8]

(17) HashAggregate [codegen id : 3]
Input [3]: [ss_ext_sales_price#3, ss_net_profit#4, s_store_sk#8]
Keys [1]: [s_store_sk#8]
Functions [2]: [partial_sum(UnscaledValue(ss_ext_sales_price#3)), partial_sum(UnscaledValue(ss_net_profit#4))]
Aggregate Attributes [2]: [sum#10, sum#11]
Results [3]: [s_store_sk#8, sum#12, sum#13]

(18) Exchange
Input [3]: [s_store_sk#8, sum#12, sum#13]
Arguments: hashpartitioning(s_store_sk#8, 5), true, [id=#14]

(19) HashAggregate [codegen id : 8]
Input [3]: [s_store_sk#8, sum#12, sum#13]
Keys [1]: [s_store_sk#8]
Functions [2]: [sum(UnscaledValue(ss_ext_sales_price#3)), sum(UnscaledValue(ss_net_profit#4))]
Aggregate Attributes [2]: [sum(UnscaledValue(ss_ext_sales_price#3))#15, sum(UnscaledValue(ss_net_profit#4))#16]
Results [3]: [s_store_sk#8, MakeDecimal(sum(UnscaledValue(ss_ext_sales_price#3))#15,17,2) AS sales#17, MakeDecimal(sum(UnscaledValue(ss_net_profit#4))#16,17,2) AS profit#18]

(20) Scan parquet default.store_returns
Output [4]: [sr_returned_date_sk#19, sr_store_sk#20, sr_return_amt#21, sr_net_loss#22]
Batched: true
Location [not included in comparison]/{warehouse_dir}/store_returns]
PushedFilters: [IsNotNull(sr_returned_date_sk), IsNotNull(sr_store_sk)]
ReadSchema: struct<sr_returned_date_sk:bigint,sr_store_sk:bigint,sr_return_amt:decimal(7,2),sr_net_loss:decimal(7,2)>

(21) ColumnarToRow [codegen id : 6]
Input [4]: [sr_returned_date_sk#19, sr_store_sk#20, sr_return_amt#21, sr_net_loss#22]

(22) Filter [codegen id : 6]
Input [4]: [sr_returned_date_sk#19, sr_store_sk#20, sr_return_amt#21, sr_net_loss#22]
Condition : (isnotnull(sr_returned_date_sk#19) AND isnotnull(sr_store_sk#20))

(23) ReusedExchange [Reuses operator id: 14]
Output [1]: [s_store_sk#23]

(24) BroadcastHashJoin [codegen id : 6]
Left keys [1]: [sr_store_sk#20]
Right keys [1]: [cast(s_store_sk#23 as bigint)]
Join condition: None

(25) Project [codegen id : 6]
Output [4]: [sr_returned_date_sk#19, sr_return_amt#21, sr_net_loss#22, s_store_sk#23]
Input [5]: [sr_returned_date_sk#19, sr_store_sk#20, sr_return_amt#21, sr_net_loss#22, s_store_sk#23]

(26) ReusedExchange [Reuses operator id: 8]
Output [1]: [d_date_sk#5]

(27) BroadcastHashJoin [codegen id : 6]
Left keys [1]: [sr_returned_date_sk#19]
Right keys [1]: [cast(d_date_sk#5 as bigint)]
Join condition: None

(28) Project [codegen id : 6]
Output [3]: [sr_return_amt#21, sr_net_loss#22, s_store_sk#23]
Input [5]: [sr_returned_date_sk#19, sr_return_amt#21, sr_net_loss#22, s_store_sk#23, d_date_sk#5]

(29) HashAggregate [codegen id : 6]
Input [3]: [sr_return_amt#21, sr_net_loss#22, s_store_sk#23]
Keys [1]: [s_store_sk#23]
Functions [2]: [partial_sum(UnscaledValue(sr_return_amt#21)), partial_sum(UnscaledValue(sr_net_loss#22))]
Aggregate Attributes [2]: [sum#24, sum#25]
Results [3]: [s_store_sk#23, sum#26, sum#27]

(30) Exchange
Input [3]: [s_store_sk#23, sum#26, sum#27]
Arguments: hashpartitioning(s_store_sk#23, 5), true, [id=#28]

(31) HashAggregate [codegen id : 7]
Input [3]: [s_store_sk#23, sum#26, sum#27]
Keys [1]: [s_store_sk#23]
Functions [2]: [sum(UnscaledValue(sr_return_amt#21)), sum(UnscaledValue(sr_net_loss#22))]
Aggregate Attributes [2]: [sum(UnscaledValue(sr_return_amt#21))#29, sum(UnscaledValue(sr_net_loss#22))#30]
Results [3]: [s_store_sk#23, MakeDecimal(sum(UnscaledValue(sr_return_amt#21))#29,17,2) AS returns#31, MakeDecimal(sum(UnscaledValue(sr_net_loss#22))#30,17,2) AS profit_loss#32]

(32) BroadcastExchange
Input [3]: [s_store_sk#23, returns#31, profit_loss#32]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, true] as bigint)),false), [id=#33]

(33) BroadcastHashJoin [codegen id : 8]
Left keys [1]: [s_store_sk#8]
Right keys [1]: [s_store_sk#23]
Join condition: None

(34) Project [codegen id : 8]
Output [5]: [store channel AS channel#34, s_store_sk#8 AS id#35, sales#17, coalesce(returns#31, 0.00) AS returns#36, CheckOverflow((promote_precision(cast(profit#18 as decimal(18,2))) - promote_precision(cast(coalesce(profit_loss#32, 0.00) as decimal(18,2)))), DecimalType(18,2), true) AS profit#37]
Input [6]: [s_store_sk#8, sales#17, profit#18, s_store_sk#23, returns#31, profit_loss#32]

(35) Scan parquet default.catalog_sales
Output [4]: [cs_sold_date_sk#38, cs_call_center_sk#39, cs_ext_sales_price#40, cs_net_profit#41]
Batched: true
Location [not included in comparison]/{warehouse_dir}/catalog_sales]
PushedFilters: [IsNotNull(cs_sold_date_sk)]
ReadSchema: struct<cs_sold_date_sk:int,cs_call_center_sk:int,cs_ext_sales_price:decimal(7,2),cs_net_profit:decimal(7,2)>

(36) ColumnarToRow [codegen id : 10]
Input [4]: [cs_sold_date_sk#38, cs_call_center_sk#39, cs_ext_sales_price#40, cs_net_profit#41]

(37) Filter [codegen id : 10]
Input [4]: [cs_sold_date_sk#38, cs_call_center_sk#39, cs_ext_sales_price#40, cs_net_profit#41]
Condition : isnotnull(cs_sold_date_sk#38)

(38) ReusedExchange [Reuses operator id: 8]
Output [1]: [d_date_sk#5]

(39) BroadcastHashJoin [codegen id : 10]
Left keys [1]: [cs_sold_date_sk#38]
Right keys [1]: [d_date_sk#5]
Join condition: None

(40) Project [codegen id : 10]
Output [3]: [cs_call_center_sk#39, cs_ext_sales_price#40, cs_net_profit#41]
Input [5]: [cs_sold_date_sk#38, cs_call_center_sk#39, cs_ext_sales_price#40, cs_net_profit#41, d_date_sk#5]

(41) HashAggregate [codegen id : 10]
Input [3]: [cs_call_center_sk#39, cs_ext_sales_price#40, cs_net_profit#41]
Keys [1]: [cs_call_center_sk#39]
Functions [2]: [partial_sum(UnscaledValue(cs_ext_sales_price#40)), partial_sum(UnscaledValue(cs_net_profit#41))]
Aggregate Attributes [2]: [sum#42, sum#43]
Results [3]: [cs_call_center_sk#39, sum#44, sum#45]

(42) Exchange
Input [3]: [cs_call_center_sk#39, sum#44, sum#45]
Arguments: hashpartitioning(cs_call_center_sk#39, 5), true, [id=#46]

(43) HashAggregate [codegen id : 11]
Input [3]: [cs_call_center_sk#39, sum#44, sum#45]
Keys [1]: [cs_call_center_sk#39]
Functions [2]: [sum(UnscaledValue(cs_ext_sales_price#40)), sum(UnscaledValue(cs_net_profit#41))]
Aggregate Attributes [2]: [sum(UnscaledValue(cs_ext_sales_price#40))#47, sum(UnscaledValue(cs_net_profit#41))#48]
Results [3]: [cs_call_center_sk#39, MakeDecimal(sum(UnscaledValue(cs_ext_sales_price#40))#47,17,2) AS sales#49, MakeDecimal(sum(UnscaledValue(cs_net_profit#41))#48,17,2) AS profit#50]

(44) Scan parquet default.catalog_returns
Output [3]: [cr_returned_date_sk#51, cr_return_amount#52, cr_net_loss#53]
Batched: true
Location [not included in comparison]/{warehouse_dir}/catalog_returns]
PushedFilters: [IsNotNull(cr_returned_date_sk)]
ReadSchema: struct<cr_returned_date_sk:int,cr_return_amount:decimal(7,2),cr_net_loss:decimal(7,2)>

(45) ColumnarToRow [codegen id : 13]
Input [3]: [cr_returned_date_sk#51, cr_return_amount#52, cr_net_loss#53]

(46) Filter [codegen id : 13]
Input [3]: [cr_returned_date_sk#51, cr_return_amount#52, cr_net_loss#53]
Condition : isnotnull(cr_returned_date_sk#51)

(47) ReusedExchange [Reuses operator id: 8]
Output [1]: [d_date_sk#5]

(48) BroadcastHashJoin [codegen id : 13]
Left keys [1]: [cr_returned_date_sk#51]
Right keys [1]: [d_date_sk#5]
Join condition: None

(49) Project [codegen id : 13]
Output [2]: [cr_return_amount#52, cr_net_loss#53]
Input [4]: [cr_returned_date_sk#51, cr_return_amount#52, cr_net_loss#53, d_date_sk#5]

(50) HashAggregate [codegen id : 13]
Input [2]: [cr_return_amount#52, cr_net_loss#53]
Keys: []
Functions [2]: [partial_sum(UnscaledValue(cr_return_amount#52)), partial_sum(UnscaledValue(cr_net_loss#53))]
Aggregate Attributes [2]: [sum#54, sum#55]
Results [2]: [sum#56, sum#57]

(51) Exchange
Input [2]: [sum#56, sum#57]
Arguments: SinglePartition, true, [id=#58]

(52) HashAggregate [codegen id : 14]
Input [2]: [sum#56, sum#57]
Keys: []
Functions [2]: [sum(UnscaledValue(cr_return_amount#52)), sum(UnscaledValue(cr_net_loss#53))]
Aggregate Attributes [2]: [sum(UnscaledValue(cr_return_amount#52))#59, sum(UnscaledValue(cr_net_loss#53))#60]
Results [2]: [MakeDecimal(sum(UnscaledValue(cr_return_amount#52))#59,17,2) AS returns#61, MakeDecimal(sum(UnscaledValue(cr_net_loss#53))#60,17,2) AS profit_loss#62]

(53) BroadcastExchange
Input [2]: [returns#61, profit_loss#62]
Arguments: IdentityBroadcastMode, [id=#63]

(54) BroadcastNestedLoopJoin
Join condition: None

(55) Project [codegen id : 15]
Output [5]: [catalog channel AS channel#64, cs_call_center_sk#39 AS id#65, sales#49, returns#61, CheckOverflow((promote_precision(cast(profit#50 as decimal(18,2))) - promote_precision(cast(profit_loss#62 as decimal(18,2)))), DecimalType(18,2), true) AS profit#66]
Input [5]: [cs_call_center_sk#39, sales#49, profit#50, returns#61, profit_loss#62]

(56) Scan parquet default.web_sales
Output [4]: [ws_sold_date_sk#67, ws_web_page_sk#68, ws_ext_sales_price#69, ws_net_profit#70]
Batched: true
Location [not included in comparison]/{warehouse_dir}/web_sales]
PushedFilters: [IsNotNull(ws_sold_date_sk), IsNotNull(ws_web_page_sk)]
ReadSchema: struct<ws_sold_date_sk:int,ws_web_page_sk:int,ws_ext_sales_price:decimal(7,2),ws_net_profit:decimal(7,2)>

(57) ColumnarToRow [codegen id : 18]
Input [4]: [ws_sold_date_sk#67, ws_web_page_sk#68, ws_ext_sales_price#69, ws_net_profit#70]

(58) Filter [codegen id : 18]
Input [4]: [ws_sold_date_sk#67, ws_web_page_sk#68, ws_ext_sales_price#69, ws_net_profit#70]
Condition : (isnotnull(ws_sold_date_sk#67) AND isnotnull(ws_web_page_sk#68))

(59) ReusedExchange [Reuses operator id: 8]
Output [1]: [d_date_sk#5]

(60) BroadcastHashJoin [codegen id : 18]
Left keys [1]: [ws_sold_date_sk#67]
Right keys [1]: [d_date_sk#5]
Join condition: None

(61) Project [codegen id : 18]
Output [3]: [ws_web_page_sk#68, ws_ext_sales_price#69, ws_net_profit#70]
Input [5]: [ws_sold_date_sk#67, ws_web_page_sk#68, ws_ext_sales_price#69, ws_net_profit#70, d_date_sk#5]

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

(63) ColumnarToRow [codegen id : 17]
Input [1]: [wp_web_page_sk#71]

(64) Filter [codegen id : 17]
Input [1]: [wp_web_page_sk#71]
Condition : isnotnull(wp_web_page_sk#71)

(65) BroadcastExchange
Input [1]: [wp_web_page_sk#71]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, false] as bigint)),false), [id=#72]

(66) BroadcastHashJoin [codegen id : 18]
Left keys [1]: [ws_web_page_sk#68]
Right keys [1]: [wp_web_page_sk#71]
Join condition: None

(67) Project [codegen id : 18]
Output [3]: [ws_ext_sales_price#69, ws_net_profit#70, wp_web_page_sk#71]
Input [4]: [ws_web_page_sk#68, ws_ext_sales_price#69, ws_net_profit#70, wp_web_page_sk#71]

(68) HashAggregate [codegen id : 18]
Input [3]: [ws_ext_sales_price#69, ws_net_profit#70, wp_web_page_sk#71]
Keys [1]: [wp_web_page_sk#71]
Functions [2]: [partial_sum(UnscaledValue(ws_ext_sales_price#69)), partial_sum(UnscaledValue(ws_net_profit#70))]
Aggregate Attributes [2]: [sum#73, sum#74]
Results [3]: [wp_web_page_sk#71, sum#75, sum#76]

(69) Exchange
Input [3]: [wp_web_page_sk#71, sum#75, sum#76]
Arguments: hashpartitioning(wp_web_page_sk#71, 5), true, [id=#77]

(70) HashAggregate [codegen id : 23]
Input [3]: [wp_web_page_sk#71, sum#75, sum#76]
Keys [1]: [wp_web_page_sk#71]
Functions [2]: [sum(UnscaledValue(ws_ext_sales_price#69)), sum(UnscaledValue(ws_net_profit#70))]
Aggregate Attributes [2]: [sum(UnscaledValue(ws_ext_sales_price#69))#78, sum(UnscaledValue(ws_net_profit#70))#79]
Results [3]: [wp_web_page_sk#71, MakeDecimal(sum(UnscaledValue(ws_ext_sales_price#69))#78,17,2) AS sales#80, MakeDecimal(sum(UnscaledValue(ws_net_profit#70))#79,17,2) AS profit#81]

(71) Scan parquet default.web_returns
Output [4]: [wr_returned_date_sk#82, wr_web_page_sk#83, wr_return_amt#84, wr_net_loss#85]
Batched: true
Location [not included in comparison]/{warehouse_dir}/web_returns]
PushedFilters: [IsNotNull(wr_returned_date_sk), IsNotNull(wr_web_page_sk)]
ReadSchema: struct<wr_returned_date_sk:bigint,wr_web_page_sk:bigint,wr_return_amt:decimal(7,2),wr_net_loss:decimal(7,2)>

(72) ColumnarToRow [codegen id : 21]
Input [4]: [wr_returned_date_sk#82, wr_web_page_sk#83, wr_return_amt#84, wr_net_loss#85]

(73) Filter [codegen id : 21]
Input [4]: [wr_returned_date_sk#82, wr_web_page_sk#83, wr_return_amt#84, wr_net_loss#85]
Condition : (isnotnull(wr_returned_date_sk#82) AND isnotnull(wr_web_page_sk#83))

(74) ReusedExchange [Reuses operator id: 65]
Output [1]: [wp_web_page_sk#86]

(75) BroadcastHashJoin [codegen id : 21]
Left keys [1]: [wr_web_page_sk#83]
Right keys [1]: [cast(wp_web_page_sk#86 as bigint)]
Join condition: None

(76) Project [codegen id : 21]
Output [4]: [wr_returned_date_sk#82, wr_return_amt#84, wr_net_loss#85, wp_web_page_sk#86]
Input [5]: [wr_returned_date_sk#82, wr_web_page_sk#83, wr_return_amt#84, wr_net_loss#85, wp_web_page_sk#86]

(77) ReusedExchange [Reuses operator id: 8]
Output [1]: [d_date_sk#5]

(78) BroadcastHashJoin [codegen id : 21]
Left keys [1]: [wr_returned_date_sk#82]
Right keys [1]: [cast(d_date_sk#5 as bigint)]
Join condition: None

(79) Project [codegen id : 21]
Output [3]: [wr_return_amt#84, wr_net_loss#85, wp_web_page_sk#86]
Input [5]: [wr_returned_date_sk#82, wr_return_amt#84, wr_net_loss#85, wp_web_page_sk#86, d_date_sk#5]

(80) HashAggregate [codegen id : 21]
Input [3]: [wr_return_amt#84, wr_net_loss#85, wp_web_page_sk#86]
Keys [1]: [wp_web_page_sk#86]
Functions [2]: [partial_sum(UnscaledValue(wr_return_amt#84)), partial_sum(UnscaledValue(wr_net_loss#85))]
Aggregate Attributes [2]: [sum#87, sum#88]
Results [3]: [wp_web_page_sk#86, sum#89, sum#90]

(81) Exchange
Input [3]: [wp_web_page_sk#86, sum#89, sum#90]
Arguments: hashpartitioning(wp_web_page_sk#86, 5), true, [id=#91]

(82) HashAggregate [codegen id : 22]
Input [3]: [wp_web_page_sk#86, sum#89, sum#90]
Keys [1]: [wp_web_page_sk#86]
Functions [2]: [sum(UnscaledValue(wr_return_amt#84)), sum(UnscaledValue(wr_net_loss#85))]
Aggregate Attributes [2]: [sum(UnscaledValue(wr_return_amt#84))#92, sum(UnscaledValue(wr_net_loss#85))#93]
Results [3]: [wp_web_page_sk#86, MakeDecimal(sum(UnscaledValue(wr_return_amt#84))#92,17,2) AS returns#94, MakeDecimal(sum(UnscaledValue(wr_net_loss#85))#93,17,2) AS profit_loss#95]

(83) BroadcastExchange
Input [3]: [wp_web_page_sk#86, returns#94, profit_loss#95]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, true] as bigint)),false), [id=#96]

(84) BroadcastHashJoin [codegen id : 23]
Left keys [1]: [wp_web_page_sk#71]
Right keys [1]: [wp_web_page_sk#86]
Join condition: None

(85) Project [codegen id : 23]
Output [5]: [web channel AS channel#97, wp_web_page_sk#71 AS id#98, sales#80, coalesce(returns#94, 0.00) AS returns#99, CheckOverflow((promote_precision(cast(profit#81 as decimal(18,2))) - promote_precision(cast(coalesce(profit_loss#95, 0.00) as decimal(18,2)))), DecimalType(18,2), true) AS profit#100]
Input [6]: [wp_web_page_sk#71, sales#80, profit#81, wp_web_page_sk#86, returns#94, profit_loss#95]

(86) Union

(87) HashAggregate [codegen id : 24]
Input [5]: [channel#34, id#35, sales#17, returns#36, profit#37]
Keys [2]: [channel#34, id#35]
Functions [3]: [partial_sum(sales#17), partial_sum(returns#36), partial_sum(profit#37)]
Aggregate Attributes [6]: [sum#101, isEmpty#102, sum#103, isEmpty#104, sum#105, isEmpty#106]
Results [8]: [channel#34, id#35, sum#107, isEmpty#108, sum#109, isEmpty#110, sum#111, isEmpty#112]

(88) Exchange
Input [8]: [channel#34, id#35, sum#107, isEmpty#108, sum#109, isEmpty#110, sum#111, isEmpty#112]
Arguments: hashpartitioning(channel#34, id#35, 5), true, [id=#113]

(89) HashAggregate [codegen id : 25]
Input [8]: [channel#34, id#35, sum#107, isEmpty#108, sum#109, isEmpty#110, sum#111, isEmpty#112]
Keys [2]: [channel#34, id#35]
Functions [3]: [sum(sales#17), sum(returns#36), sum(profit#37)]
Aggregate Attributes [3]: [sum(sales#17)#114, sum(returns#36)#115, sum(profit#37)#116]
Results [5]: [channel#34, id#35, cast(sum(sales#17)#114 as decimal(37,2)) AS sales#117, cast(sum(returns#36)#115 as decimal(37,2)) AS returns#118, cast(sum(profit#37)#116 as decimal(38,2)) AS profit#119]

(90) ReusedExchange [Reuses operator id: 88]
Output [8]: [channel#34, id#35, sum#120, isEmpty#121, sum#122, isEmpty#123, sum#124, isEmpty#125]

(91) HashAggregate [codegen id : 50]
Input [8]: [channel#34, id#35, sum#120, isEmpty#121, sum#122, isEmpty#123, sum#124, isEmpty#125]
Keys [2]: [channel#34, id#35]
Functions [3]: [sum(sales#17), sum(returns#36), sum(profit#126)]
Aggregate Attributes [3]: [sum(sales#17)#127, sum(returns#36)#128, sum(profit#126)#129]
Results [4]: [channel#34, sum(sales#17)#127 AS sales#130, sum(returns#36)#128 AS returns#131, sum(profit#126)#129 AS profit#132]

(92) HashAggregate [codegen id : 50]
Input [4]: [channel#34, sales#130, returns#131, profit#132]
Keys [1]: [channel#34]
Functions [3]: [partial_sum(sales#130), partial_sum(returns#131), partial_sum(profit#132)]
Aggregate Attributes [6]: [sum#133, isEmpty#134, sum#135, isEmpty#136, sum#137, isEmpty#138]
Results [7]: [channel#34, sum#139, isEmpty#140, sum#141, isEmpty#142, sum#143, isEmpty#144]

(93) Exchange
Input [7]: [channel#34, sum#139, isEmpty#140, sum#141, isEmpty#142, sum#143, isEmpty#144]
Arguments: hashpartitioning(channel#34, 5), true, [id=#145]

(94) HashAggregate [codegen id : 51]
Input [7]: [channel#34, sum#139, isEmpty#140, sum#141, isEmpty#142, sum#143, isEmpty#144]
Keys [1]: [channel#34]
Functions [3]: [sum(sales#130), sum(returns#131), sum(profit#132)]
Aggregate Attributes [3]: [sum(sales#130)#146, sum(returns#131)#147, sum(profit#132)#148]
Results [5]: [channel#34, null AS id#149, sum(sales#130)#146 AS sales#150, sum(returns#131)#147 AS returns#151, sum(profit#132)#148 AS profit#152]

(95) Union

(96) HashAggregate [codegen id : 52]
Input [5]: [channel#34, id#35, sales#117, returns#118, profit#119]
Keys [5]: [channel#34, id#35, sales#117, returns#118, profit#119]
Functions: []
Aggregate Attributes: []
Results [5]: [channel#34, id#35, sales#117, returns#118, profit#119]

(97) Exchange
Input [5]: [channel#34, id#35, sales#117, returns#118, profit#119]
Arguments: hashpartitioning(channel#34, id#35, sales#117, returns#118, profit#119, 5), true, [id=#153]

(98) HashAggregate [codegen id : 53]
Input [5]: [channel#34, id#35, sales#117, returns#118, profit#119]
Keys [5]: [channel#34, id#35, sales#117, returns#118, profit#119]
Functions: []
Aggregate Attributes: []
Results [5]: [channel#34, id#35, sales#117, returns#118, profit#119]

(99) ReusedExchange [Reuses operator id: 88]
Output [8]: [channel#34, id#35, sum#154, isEmpty#155, sum#156, isEmpty#157, sum#158, isEmpty#159]

(100) HashAggregate [codegen id : 78]
Input [8]: [channel#34, id#35, sum#154, isEmpty#155, sum#156, isEmpty#157, sum#158, isEmpty#159]
Keys [2]: [channel#34, id#35]
Functions [3]: [sum(sales#17), sum(returns#36), sum(profit#160)]
Aggregate Attributes [3]: [sum(sales#17)#161, sum(returns#36)#162, sum(profit#160)#163]
Results [3]: [sum(sales#17)#161 AS sales#130, sum(returns#36)#162 AS returns#131, sum(profit#160)#163 AS profit#132]

(101) HashAggregate [codegen id : 78]
Input [3]: [sales#130, returns#131, profit#132]
Keys: []
Functions [3]: [partial_sum(sales#130), partial_sum(returns#131), partial_sum(profit#132)]
Aggregate Attributes [6]: [sum#164, isEmpty#165, sum#166, isEmpty#167, sum#168, isEmpty#169]
Results [6]: [sum#170, isEmpty#171, sum#172, isEmpty#173, sum#174, isEmpty#175]

(102) Exchange
Input [6]: [sum#170, isEmpty#171, sum#172, isEmpty#173, sum#174, isEmpty#175]
Arguments: SinglePartition, true, [id=#176]

(103) HashAggregate [codegen id : 79]
Input [6]: [sum#170, isEmpty#171, sum#172, isEmpty#173, sum#174, isEmpty#175]
Keys: []
Functions [3]: [sum(sales#130), sum(returns#131), sum(profit#132)]
Aggregate Attributes [3]: [sum(sales#130)#177, sum(returns#131)#178, sum(profit#132)#179]
Results [5]: [null AS channel#180, null AS id#181, sum(sales#130)#177 AS sales#182, sum(returns#131)#178 AS returns#183, sum(profit#132)#179 AS profit#184]

(104) Union

(105) HashAggregate [codegen id : 80]
Input [5]: [channel#34, id#35, sales#117, returns#118, profit#119]
Keys [5]: [channel#34, id#35, sales#117, returns#118, profit#119]
Functions: []
Aggregate Attributes: []
Results [5]: [channel#34, id#35, sales#117, returns#118, profit#119]

(106) Exchange
Input [5]: [channel#34, id#35, sales#117, returns#118, profit#119]
Arguments: hashpartitioning(channel#34, id#35, sales#117, returns#118, profit#119, 5), true, [id=#185]

(107) HashAggregate [codegen id : 81]
Input [5]: [channel#34, id#35, sales#117, returns#118, profit#119]
Keys [5]: [channel#34, id#35, sales#117, returns#118, profit#119]
Functions: []
Aggregate Attributes: []
Results [5]: [channel#34, id#35, sales#117, returns#118, profit#119]

(108) TakeOrderedAndProject
Input [5]: [channel#34, id#35, sales#117, returns#118, profit#119]
Arguments: 100, [channel#34 ASC NULLS FIRST, id#35 ASC NULLS FIRST], [channel#34, id#35, sales#117, returns#118, profit#119]

