== Physical Plan ==
TakeOrderedAndProject (202)
+- * HashAggregate (201)
   +- Exchange (200)
      +- * HashAggregate (199)
         +- Union (198)
            :- * HashAggregate (105)
            :  +- Exchange (104)
            :     +- * HashAggregate (103)
            :        +- Union (102)
            :           :- * HashAggregate (39)
            :           :  +- Exchange (38)
            :           :     +- * HashAggregate (37)
            :           :        +- * Project (36)
            :           :           +- * BroadcastHashJoin Inner BuildRight (35)
            :           :              :- * Project (30)
            :           :              :  +- * BroadcastHashJoin Inner BuildRight (29)
            :           :              :     :- * Project (27)
            :           :              :     :  +- * BroadcastHashJoin Inner BuildRight (26)
            :           :              :     :     :- * Project (20)
            :           :              :     :     :  +- * BroadcastHashJoin Inner BuildRight (19)
            :           :              :     :     :     :- * Project (13)
            :           :              :     :     :     :  +- * SortMergeJoin LeftOuter (12)
            :           :              :     :     :     :     :- * Sort (5)
            :           :              :     :     :     :     :  +- Exchange (4)
            :           :              :     :     :     :     :     +- * Filter (3)
            :           :              :     :     :     :     :        +- * ColumnarToRow (2)
            :           :              :     :     :     :     :           +- Scan parquet spark_catalog.default.store_sales (1)
            :           :              :     :     :     :     +- * Sort (11)
            :           :              :     :     :     :        +- Exchange (10)
            :           :              :     :     :     :           +- * Project (9)
            :           :              :     :     :     :              +- * Filter (8)
            :           :              :     :     :     :                 +- * ColumnarToRow (7)
            :           :              :     :     :     :                    +- Scan parquet spark_catalog.default.store_returns (6)
            :           :              :     :     :     +- BroadcastExchange (18)
            :           :              :     :     :        +- * Project (17)
            :           :              :     :     :           +- * Filter (16)
            :           :              :     :     :              +- * ColumnarToRow (15)
            :           :              :     :     :                 +- Scan parquet spark_catalog.default.item (14)
            :           :              :     :     +- BroadcastExchange (25)
            :           :              :     :        +- * Project (24)
            :           :              :     :           +- * Filter (23)
            :           :              :     :              +- * ColumnarToRow (22)
            :           :              :     :                 +- Scan parquet spark_catalog.default.promotion (21)
            :           :              :     +- ReusedExchange (28)
            :           :              +- BroadcastExchange (34)
            :           :                 +- * Filter (33)
            :           :                    +- * ColumnarToRow (32)
            :           :                       +- Scan parquet spark_catalog.default.store (31)
            :           :- * HashAggregate (70)
            :           :  +- Exchange (69)
            :           :     +- * HashAggregate (68)
            :           :        +- * Project (67)
            :           :           +- * BroadcastHashJoin Inner BuildRight (66)
            :           :              :- * Project (61)
            :           :              :  +- * BroadcastHashJoin Inner BuildRight (60)
            :           :              :     :- * Project (58)
            :           :              :     :  +- * BroadcastHashJoin Inner BuildRight (57)
            :           :              :     :     :- * Project (55)
            :           :              :     :     :  +- * BroadcastHashJoin Inner BuildRight (54)
            :           :              :     :     :     :- * Project (52)
            :           :              :     :     :     :  +- * SortMergeJoin LeftOuter (51)
            :           :              :     :     :     :     :- * Sort (44)
            :           :              :     :     :     :     :  +- Exchange (43)
            :           :              :     :     :     :     :     +- * Filter (42)
            :           :              :     :     :     :     :        +- * ColumnarToRow (41)
            :           :              :     :     :     :     :           +- Scan parquet spark_catalog.default.catalog_sales (40)
            :           :              :     :     :     :     +- * Sort (50)
            :           :              :     :     :     :        +- Exchange (49)
            :           :              :     :     :     :           +- * Project (48)
            :           :              :     :     :     :              +- * Filter (47)
            :           :              :     :     :     :                 +- * ColumnarToRow (46)
            :           :              :     :     :     :                    +- Scan parquet spark_catalog.default.catalog_returns (45)
            :           :              :     :     :     +- ReusedExchange (53)
            :           :              :     :     +- ReusedExchange (56)
            :           :              :     +- ReusedExchange (59)
            :           :              +- BroadcastExchange (65)
            :           :                 +- * Filter (64)
            :           :                    +- * ColumnarToRow (63)
            :           :                       +- Scan parquet spark_catalog.default.catalog_page (62)
            :           +- * HashAggregate (101)
            :              +- Exchange (100)
            :                 +- * HashAggregate (99)
            :                    +- * Project (98)
            :                       +- * BroadcastHashJoin Inner BuildRight (97)
            :                          :- * Project (92)
            :                          :  +- * BroadcastHashJoin Inner BuildRight (91)
            :                          :     :- * Project (89)
            :                          :     :  +- * BroadcastHashJoin Inner BuildRight (88)
            :                          :     :     :- * Project (86)
            :                          :     :     :  +- * BroadcastHashJoin Inner BuildRight (85)
            :                          :     :     :     :- * Project (83)
            :                          :     :     :     :  +- * SortMergeJoin LeftOuter (82)
            :                          :     :     :     :     :- * Sort (75)
            :                          :     :     :     :     :  +- Exchange (74)
            :                          :     :     :     :     :     +- * Filter (73)
            :                          :     :     :     :     :        +- * ColumnarToRow (72)
            :                          :     :     :     :     :           +- Scan parquet spark_catalog.default.web_sales (71)
            :                          :     :     :     :     +- * Sort (81)
            :                          :     :     :     :        +- Exchange (80)
            :                          :     :     :     :           +- * Project (79)
            :                          :     :     :     :              +- * Filter (78)
            :                          :     :     :     :                 +- * ColumnarToRow (77)
            :                          :     :     :     :                    +- Scan parquet spark_catalog.default.web_returns (76)
            :                          :     :     :     +- ReusedExchange (84)
            :                          :     :     +- ReusedExchange (87)
            :                          :     +- ReusedExchange (90)
            :                          +- BroadcastExchange (96)
            :                             +- * Filter (95)
            :                                +- * ColumnarToRow (94)
            :                                   +- Scan parquet spark_catalog.default.web_site (93)
            :- * HashAggregate (140)
            :  +- Exchange (139)
            :     +- * HashAggregate (138)
            :        +- * HashAggregate (137)
            :           +- Exchange (136)
            :              +- * HashAggregate (135)
            :                 +- Union (134)
            :                    :- * HashAggregate (107)
            :                    :  +- ReusedExchange (106)
            :                    :- * HashAggregate (109)
            :                    :  +- ReusedExchange (108)
            :                    +- * HashAggregate (133)
            :                       +- Exchange (132)
            :                          +- * HashAggregate (131)
            :                             +- * Project (130)
            :                                +- * BroadcastHashJoin Inner BuildRight (129)
            :                                   :- * Project (127)
            :                                   :  +- * BroadcastHashJoin Inner BuildRight (126)
            :                                   :     :- * Project (124)
            :                                   :     :  +- * BroadcastHashJoin Inner BuildRight (123)
            :                                   :     :     :- * Project (121)
            :                                   :     :     :  +- * BroadcastHashJoin Inner BuildRight (120)
            :                                   :     :     :     :- * Project (118)
            :                                   :     :     :     :  +- * SortMergeJoin LeftOuter (117)
            :                                   :     :     :     :     :- * Sort (114)
            :                                   :     :     :     :     :  +- Exchange (113)
            :                                   :     :     :     :     :     +- * Filter (112)
            :                                   :     :     :     :     :        +- * ColumnarToRow (111)
            :                                   :     :     :     :     :           +- Scan parquet spark_catalog.default.web_sales (110)
            :                                   :     :     :     :     +- * Sort (116)
            :                                   :     :     :     :        +- ReusedExchange (115)
            :                                   :     :     :     +- ReusedExchange (119)
            :                                   :     :     +- ReusedExchange (122)
            :                                   :     +- ReusedExchange (125)
            :                                   +- ReusedExchange (128)
            +- * HashAggregate (197)
               +- Exchange (196)
                  +- * HashAggregate (195)
                     +- * HashAggregate (194)
                        +- Exchange (193)
                           +- * HashAggregate (192)
                              +- Union (191)
                                 :- * HashAggregate (164)
                                 :  +- Exchange (163)
                                 :     +- * HashAggregate (162)
                                 :        +- * Project (161)
                                 :           +- * BroadcastHashJoin Inner BuildRight (160)
                                 :              :- * Project (158)
                                 :              :  +- * BroadcastHashJoin Inner BuildRight (157)
                                 :              :     :- * Project (155)
                                 :              :     :  +- * BroadcastHashJoin Inner BuildRight (154)
                                 :              :     :     :- * Project (152)
                                 :              :     :     :  +- * BroadcastHashJoin Inner BuildRight (151)
                                 :              :     :     :     :- * Project (149)
                                 :              :     :     :     :  +- * SortMergeJoin LeftOuter (148)
                                 :              :     :     :     :     :- * Sort (145)
                                 :              :     :     :     :     :  +- Exchange (144)
                                 :              :     :     :     :     :     +- * Filter (143)
                                 :              :     :     :     :     :        +- * ColumnarToRow (142)
                                 :              :     :     :     :     :           +- Scan parquet spark_catalog.default.store_sales (141)
                                 :              :     :     :     :     +- * Sort (147)
                                 :              :     :     :     :        +- ReusedExchange (146)
                                 :              :     :     :     +- ReusedExchange (150)
                                 :              :     :     +- ReusedExchange (153)
                                 :              :     +- ReusedExchange (156)
                                 :              +- ReusedExchange (159)
                                 :- * HashAggregate (188)
                                 :  +- Exchange (187)
                                 :     +- * HashAggregate (186)
                                 :        +- * Project (185)
                                 :           +- * BroadcastHashJoin Inner BuildRight (184)
                                 :              :- * Project (182)
                                 :              :  +- * BroadcastHashJoin Inner BuildRight (181)
                                 :              :     :- * Project (179)
                                 :              :     :  +- * BroadcastHashJoin Inner BuildRight (178)
                                 :              :     :     :- * Project (176)
                                 :              :     :     :  +- * BroadcastHashJoin Inner BuildRight (175)
                                 :              :     :     :     :- * Project (173)
                                 :              :     :     :     :  +- * SortMergeJoin LeftOuter (172)
                                 :              :     :     :     :     :- * Sort (169)
                                 :              :     :     :     :     :  +- Exchange (168)
                                 :              :     :     :     :     :     +- * Filter (167)
                                 :              :     :     :     :     :        +- * ColumnarToRow (166)
                                 :              :     :     :     :     :           +- Scan parquet spark_catalog.default.catalog_sales (165)
                                 :              :     :     :     :     +- * Sort (171)
                                 :              :     :     :     :        +- ReusedExchange (170)
                                 :              :     :     :     +- ReusedExchange (174)
                                 :              :     :     +- ReusedExchange (177)
                                 :              :     +- ReusedExchange (180)
                                 :              +- ReusedExchange (183)
                                 +- * HashAggregate (190)
                                    +- ReusedExchange (189)


(1) Scan parquet spark_catalog.default.store_sales
Output [7]: [ss_item_sk#1, ss_store_sk#2, ss_promo_sk#3, ss_ticket_number#4, ss_ext_sales_price#5, ss_net_profit#6, ss_sold_date_sk#7]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(ss_sold_date_sk#7), dynamicpruningexpression(ss_sold_date_sk#7 IN dynamicpruning#8)]
PushedFilters: [IsNotNull(ss_store_sk), IsNotNull(ss_item_sk), IsNotNull(ss_promo_sk)]
ReadSchema: struct<ss_item_sk:int,ss_store_sk:int,ss_promo_sk:int,ss_ticket_number:int,ss_ext_sales_price:decimal(7,2),ss_net_profit:decimal(7,2)>

(2) ColumnarToRow [codegen id : 1]
Input [7]: [ss_item_sk#1, ss_store_sk#2, ss_promo_sk#3, ss_ticket_number#4, ss_ext_sales_price#5, ss_net_profit#6, ss_sold_date_sk#7]

(3) Filter [codegen id : 1]
Input [7]: [ss_item_sk#1, ss_store_sk#2, ss_promo_sk#3, ss_ticket_number#4, ss_ext_sales_price#5, ss_net_profit#6, ss_sold_date_sk#7]
Condition : ((((isnotnull(ss_store_sk#2) AND isnotnull(ss_item_sk#1)) AND isnotnull(ss_promo_sk#3)) AND might_contain(Subquery scalar-subquery#9, [id=#1], xxhash64(ss_item_sk#1, 42))) AND might_contain(Subquery scalar-subquery#10, [id=#2], xxhash64(ss_promo_sk#3, 42)))

(4) Exchange
Input [7]: [ss_item_sk#1, ss_store_sk#2, ss_promo_sk#3, ss_ticket_number#4, ss_ext_sales_price#5, ss_net_profit#6, ss_sold_date_sk#7]
Arguments: hashpartitioning(ss_item_sk#1, ss_ticket_number#4, 5), ENSURE_REQUIREMENTS, [plan_id=3]

(5) Sort [codegen id : 2]
Input [7]: [ss_item_sk#1, ss_store_sk#2, ss_promo_sk#3, ss_ticket_number#4, ss_ext_sales_price#5, ss_net_profit#6, ss_sold_date_sk#7]
Arguments: [ss_item_sk#1 ASC NULLS FIRST, ss_ticket_number#4 ASC NULLS FIRST], false, 0

(6) Scan parquet spark_catalog.default.store_returns
Output [5]: [sr_item_sk#11, sr_ticket_number#12, sr_return_amt#13, sr_net_loss#14, sr_returned_date_sk#15]
Batched: true
Location [not included in comparison]/{warehouse_dir}/store_returns]
PushedFilters: [IsNotNull(sr_item_sk), IsNotNull(sr_ticket_number)]
ReadSchema: struct<sr_item_sk:int,sr_ticket_number:int,sr_return_amt:decimal(7,2),sr_net_loss:decimal(7,2)>

(7) ColumnarToRow [codegen id : 3]
Input [5]: [sr_item_sk#11, sr_ticket_number#12, sr_return_amt#13, sr_net_loss#14, sr_returned_date_sk#15]

(8) Filter [codegen id : 3]
Input [5]: [sr_item_sk#11, sr_ticket_number#12, sr_return_amt#13, sr_net_loss#14, sr_returned_date_sk#15]
Condition : (isnotnull(sr_item_sk#11) AND isnotnull(sr_ticket_number#12))

(9) Project [codegen id : 3]
Output [4]: [sr_item_sk#11, sr_ticket_number#12, sr_return_amt#13, sr_net_loss#14]
Input [5]: [sr_item_sk#11, sr_ticket_number#12, sr_return_amt#13, sr_net_loss#14, sr_returned_date_sk#15]

(10) Exchange
Input [4]: [sr_item_sk#11, sr_ticket_number#12, sr_return_amt#13, sr_net_loss#14]
Arguments: hashpartitioning(sr_item_sk#11, sr_ticket_number#12, 5), ENSURE_REQUIREMENTS, [plan_id=4]

(11) Sort [codegen id : 4]
Input [4]: [sr_item_sk#11, sr_ticket_number#12, sr_return_amt#13, sr_net_loss#14]
Arguments: [sr_item_sk#11 ASC NULLS FIRST, sr_ticket_number#12 ASC NULLS FIRST], false, 0

(12) SortMergeJoin [codegen id : 9]
Left keys [2]: [ss_item_sk#1, ss_ticket_number#4]
Right keys [2]: [sr_item_sk#11, sr_ticket_number#12]
Join type: LeftOuter
Join condition: None

(13) Project [codegen id : 9]
Output [8]: [ss_item_sk#1, ss_store_sk#2, ss_promo_sk#3, ss_ext_sales_price#5, ss_net_profit#6, ss_sold_date_sk#7, sr_return_amt#13, sr_net_loss#14]
Input [11]: [ss_item_sk#1, ss_store_sk#2, ss_promo_sk#3, ss_ticket_number#4, ss_ext_sales_price#5, ss_net_profit#6, ss_sold_date_sk#7, sr_item_sk#11, sr_ticket_number#12, sr_return_amt#13, sr_net_loss#14]

(14) Scan parquet spark_catalog.default.item
Output [2]: [i_item_sk#16, i_current_price#17]
Batched: true
Location [not included in comparison]/{warehouse_dir}/item]
PushedFilters: [IsNotNull(i_current_price), GreaterThan(i_current_price,50.00), IsNotNull(i_item_sk)]
ReadSchema: struct<i_item_sk:int,i_current_price:decimal(7,2)>

(15) ColumnarToRow [codegen id : 5]
Input [2]: [i_item_sk#16, i_current_price#17]

(16) Filter [codegen id : 5]
Input [2]: [i_item_sk#16, i_current_price#17]
Condition : ((isnotnull(i_current_price#17) AND (i_current_price#17 > 50.00)) AND isnotnull(i_item_sk#16))

(17) Project [codegen id : 5]
Output [1]: [i_item_sk#16]
Input [2]: [i_item_sk#16, i_current_price#17]

(18) BroadcastExchange
Input [1]: [i_item_sk#16]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, true] as bigint)),false), [plan_id=5]

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

(20) Project [codegen id : 9]
Output [7]: [ss_store_sk#2, ss_promo_sk#3, ss_ext_sales_price#5, ss_net_profit#6, ss_sold_date_sk#7, sr_return_amt#13, sr_net_loss#14]
Input [9]: [ss_item_sk#1, ss_store_sk#2, ss_promo_sk#3, ss_ext_sales_price#5, ss_net_profit#6, ss_sold_date_sk#7, sr_return_amt#13, sr_net_loss#14, i_item_sk#16]

(21) Scan parquet spark_catalog.default.promotion
Output [2]: [p_promo_sk#18, p_channel_tv#19]
Batched: true
Location [not included in comparison]/{warehouse_dir}/promotion]
PushedFilters: [IsNotNull(p_channel_tv), EqualTo(p_channel_tv,N), IsNotNull(p_promo_sk)]
ReadSchema: struct<p_promo_sk:int,p_channel_tv:string>

(22) ColumnarToRow [codegen id : 6]
Input [2]: [p_promo_sk#18, p_channel_tv#19]

(23) Filter [codegen id : 6]
Input [2]: [p_promo_sk#18, p_channel_tv#19]
Condition : ((isnotnull(p_channel_tv#19) AND (p_channel_tv#19 = N)) AND isnotnull(p_promo_sk#18))

(24) Project [codegen id : 6]
Output [1]: [p_promo_sk#18]
Input [2]: [p_promo_sk#18, p_channel_tv#19]

(25) BroadcastExchange
Input [1]: [p_promo_sk#18]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, true] as bigint)),false), [plan_id=6]

(26) BroadcastHashJoin [codegen id : 9]
Left keys [1]: [ss_promo_sk#3]
Right keys [1]: [p_promo_sk#18]
Join type: Inner
Join condition: None

(27) Project [codegen id : 9]
Output [6]: [ss_store_sk#2, ss_ext_sales_price#5, ss_net_profit#6, ss_sold_date_sk#7, sr_return_amt#13, sr_net_loss#14]
Input [8]: [ss_store_sk#2, ss_promo_sk#3, ss_ext_sales_price#5, ss_net_profit#6, ss_sold_date_sk#7, sr_return_amt#13, sr_net_loss#14, p_promo_sk#18]

(28) ReusedExchange [Reuses operator id: 221]
Output [1]: [d_date_sk#20]

(29) BroadcastHashJoin [codegen id : 9]
Left keys [1]: [ss_sold_date_sk#7]
Right keys [1]: [d_date_sk#20]
Join type: Inner
Join condition: None

(30) Project [codegen id : 9]
Output [5]: [ss_store_sk#2, ss_ext_sales_price#5, ss_net_profit#6, sr_return_amt#13, sr_net_loss#14]
Input [7]: [ss_store_sk#2, ss_ext_sales_price#5, ss_net_profit#6, ss_sold_date_sk#7, sr_return_amt#13, sr_net_loss#14, d_date_sk#20]

(31) Scan parquet spark_catalog.default.store
Output [2]: [s_store_sk#21, s_store_id#22]
Batched: true
Location [not included in comparison]/{warehouse_dir}/store]
PushedFilters: [IsNotNull(s_store_sk)]
ReadSchema: struct<s_store_sk:int,s_store_id:string>

(32) ColumnarToRow [codegen id : 8]
Input [2]: [s_store_sk#21, s_store_id#22]

(33) Filter [codegen id : 8]
Input [2]: [s_store_sk#21, s_store_id#22]
Condition : isnotnull(s_store_sk#21)

(34) BroadcastExchange
Input [2]: [s_store_sk#21, s_store_id#22]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, false] as bigint)),false), [plan_id=7]

(35) BroadcastHashJoin [codegen id : 9]
Left keys [1]: [ss_store_sk#2]
Right keys [1]: [s_store_sk#21]
Join type: Inner
Join condition: None

(36) Project [codegen id : 9]
Output [5]: [ss_ext_sales_price#5, ss_net_profit#6, sr_return_amt#13, sr_net_loss#14, s_store_id#22]
Input [7]: [ss_store_sk#2, ss_ext_sales_price#5, ss_net_profit#6, sr_return_amt#13, sr_net_loss#14, s_store_sk#21, s_store_id#22]

(37) HashAggregate [codegen id : 9]
Input [5]: [ss_ext_sales_price#5, ss_net_profit#6, sr_return_amt#13, sr_net_loss#14, s_store_id#22]
Keys [1]: [s_store_id#22]
Functions [3]: [partial_sum(UnscaledValue(ss_ext_sales_price#5)), partial_sum(coalesce(cast(sr_return_amt#13 as decimal(12,2)), 0.00)), partial_sum((ss_net_profit#6 - coalesce(cast(sr_net_loss#14 as decimal(12,2)), 0.00)))]
Aggregate Attributes [5]: [sum#23, sum#24, isEmpty#25, sum#26, isEmpty#27]
Results [6]: [s_store_id#22, sum#28, sum#29, isEmpty#30, sum#31, isEmpty#32]

(38) Exchange
Input [6]: [s_store_id#22, sum#28, sum#29, isEmpty#30, sum#31, isEmpty#32]
Arguments: hashpartitioning(s_store_id#22, 5), ENSURE_REQUIREMENTS, [plan_id=8]

(39) HashAggregate [codegen id : 10]
Input [6]: [s_store_id#22, sum#28, sum#29, isEmpty#30, sum#31, isEmpty#32]
Keys [1]: [s_store_id#22]
Functions [3]: [sum(UnscaledValue(ss_ext_sales_price#5)), sum(coalesce(cast(sr_return_amt#13 as decimal(12,2)), 0.00)), sum((ss_net_profit#6 - coalesce(cast(sr_net_loss#14 as decimal(12,2)), 0.00)))]
Aggregate Attributes [3]: [sum(UnscaledValue(ss_ext_sales_price#5))#33, sum(coalesce(cast(sr_return_amt#13 as decimal(12,2)), 0.00))#34, sum((ss_net_profit#6 - coalesce(cast(sr_net_loss#14 as decimal(12,2)), 0.00)))#35]
Results [5]: [store channel AS channel#36, concat(store, s_store_id#22) AS id#37, MakeDecimal(sum(UnscaledValue(ss_ext_sales_price#5))#33,17,2) AS sales#38, sum(coalesce(cast(sr_return_amt#13 as decimal(12,2)), 0.00))#34 AS returns#39, sum((ss_net_profit#6 - coalesce(cast(sr_net_loss#14 as decimal(12,2)), 0.00)))#35 AS profit#40]

(40) Scan parquet spark_catalog.default.catalog_sales
Output [7]: [cs_catalog_page_sk#41, cs_item_sk#42, cs_promo_sk#43, cs_order_number#44, cs_ext_sales_price#45, cs_net_profit#46, cs_sold_date_sk#47]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(cs_sold_date_sk#47), dynamicpruningexpression(cs_sold_date_sk#47 IN dynamicpruning#8)]
PushedFilters: [IsNotNull(cs_catalog_page_sk), IsNotNull(cs_item_sk), IsNotNull(cs_promo_sk)]
ReadSchema: struct<cs_catalog_page_sk:int,cs_item_sk:int,cs_promo_sk:int,cs_order_number:int,cs_ext_sales_price:decimal(7,2),cs_net_profit:decimal(7,2)>

(41) ColumnarToRow [codegen id : 11]
Input [7]: [cs_catalog_page_sk#41, cs_item_sk#42, cs_promo_sk#43, cs_order_number#44, cs_ext_sales_price#45, cs_net_profit#46, cs_sold_date_sk#47]

(42) Filter [codegen id : 11]
Input [7]: [cs_catalog_page_sk#41, cs_item_sk#42, cs_promo_sk#43, cs_order_number#44, cs_ext_sales_price#45, cs_net_profit#46, cs_sold_date_sk#47]
Condition : ((((isnotnull(cs_catalog_page_sk#41) AND isnotnull(cs_item_sk#42)) AND isnotnull(cs_promo_sk#43)) AND might_contain(ReusedSubquery Subquery scalar-subquery#9, [id=#1], xxhash64(cs_item_sk#42, 42))) AND might_contain(ReusedSubquery Subquery scalar-subquery#10, [id=#2], xxhash64(cs_promo_sk#43, 42)))

(43) Exchange
Input [7]: [cs_catalog_page_sk#41, cs_item_sk#42, cs_promo_sk#43, cs_order_number#44, cs_ext_sales_price#45, cs_net_profit#46, cs_sold_date_sk#47]
Arguments: hashpartitioning(cs_item_sk#42, cs_order_number#44, 5), ENSURE_REQUIREMENTS, [plan_id=9]

(44) Sort [codegen id : 12]
Input [7]: [cs_catalog_page_sk#41, cs_item_sk#42, cs_promo_sk#43, cs_order_number#44, cs_ext_sales_price#45, cs_net_profit#46, cs_sold_date_sk#47]
Arguments: [cs_item_sk#42 ASC NULLS FIRST, cs_order_number#44 ASC NULLS FIRST], false, 0

(45) Scan parquet spark_catalog.default.catalog_returns
Output [5]: [cr_item_sk#48, cr_order_number#49, cr_return_amount#50, cr_net_loss#51, cr_returned_date_sk#52]
Batched: true
Location [not included in comparison]/{warehouse_dir}/catalog_returns]
PushedFilters: [IsNotNull(cr_item_sk), IsNotNull(cr_order_number)]
ReadSchema: struct<cr_item_sk:int,cr_order_number:int,cr_return_amount:decimal(7,2),cr_net_loss:decimal(7,2)>

(46) ColumnarToRow [codegen id : 13]
Input [5]: [cr_item_sk#48, cr_order_number#49, cr_return_amount#50, cr_net_loss#51, cr_returned_date_sk#52]

(47) Filter [codegen id : 13]
Input [5]: [cr_item_sk#48, cr_order_number#49, cr_return_amount#50, cr_net_loss#51, cr_returned_date_sk#52]
Condition : (isnotnull(cr_item_sk#48) AND isnotnull(cr_order_number#49))

(48) Project [codegen id : 13]
Output [4]: [cr_item_sk#48, cr_order_number#49, cr_return_amount#50, cr_net_loss#51]
Input [5]: [cr_item_sk#48, cr_order_number#49, cr_return_amount#50, cr_net_loss#51, cr_returned_date_sk#52]

(49) Exchange
Input [4]: [cr_item_sk#48, cr_order_number#49, cr_return_amount#50, cr_net_loss#51]
Arguments: hashpartitioning(cr_item_sk#48, cr_order_number#49, 5), ENSURE_REQUIREMENTS, [plan_id=10]

(50) Sort [codegen id : 14]
Input [4]: [cr_item_sk#48, cr_order_number#49, cr_return_amount#50, cr_net_loss#51]
Arguments: [cr_item_sk#48 ASC NULLS FIRST, cr_order_number#49 ASC NULLS FIRST], false, 0

(51) SortMergeJoin [codegen id : 19]
Left keys [2]: [cs_item_sk#42, cs_order_number#44]
Right keys [2]: [cr_item_sk#48, cr_order_number#49]
Join type: LeftOuter
Join condition: None

(52) Project [codegen id : 19]
Output [8]: [cs_catalog_page_sk#41, cs_item_sk#42, cs_promo_sk#43, cs_ext_sales_price#45, cs_net_profit#46, cs_sold_date_sk#47, cr_return_amount#50, cr_net_loss#51]
Input [11]: [cs_catalog_page_sk#41, cs_item_sk#42, cs_promo_sk#43, cs_order_number#44, cs_ext_sales_price#45, cs_net_profit#46, cs_sold_date_sk#47, cr_item_sk#48, cr_order_number#49, cr_return_amount#50, cr_net_loss#51]

(53) ReusedExchange [Reuses operator id: 18]
Output [1]: [i_item_sk#53]

(54) BroadcastHashJoin [codegen id : 19]
Left keys [1]: [cs_item_sk#42]
Right keys [1]: [i_item_sk#53]
Join type: Inner
Join condition: None

(55) Project [codegen id : 19]
Output [7]: [cs_catalog_page_sk#41, cs_promo_sk#43, cs_ext_sales_price#45, cs_net_profit#46, cs_sold_date_sk#47, cr_return_amount#50, cr_net_loss#51]
Input [9]: [cs_catalog_page_sk#41, cs_item_sk#42, cs_promo_sk#43, cs_ext_sales_price#45, cs_net_profit#46, cs_sold_date_sk#47, cr_return_amount#50, cr_net_loss#51, i_item_sk#53]

(56) ReusedExchange [Reuses operator id: 25]
Output [1]: [p_promo_sk#54]

(57) BroadcastHashJoin [codegen id : 19]
Left keys [1]: [cs_promo_sk#43]
Right keys [1]: [p_promo_sk#54]
Join type: Inner
Join condition: None

(58) Project [codegen id : 19]
Output [6]: [cs_catalog_page_sk#41, cs_ext_sales_price#45, cs_net_profit#46, cs_sold_date_sk#47, cr_return_amount#50, cr_net_loss#51]
Input [8]: [cs_catalog_page_sk#41, cs_promo_sk#43, cs_ext_sales_price#45, cs_net_profit#46, cs_sold_date_sk#47, cr_return_amount#50, cr_net_loss#51, p_promo_sk#54]

(59) ReusedExchange [Reuses operator id: 221]
Output [1]: [d_date_sk#55]

(60) BroadcastHashJoin [codegen id : 19]
Left keys [1]: [cs_sold_date_sk#47]
Right keys [1]: [d_date_sk#55]
Join type: Inner
Join condition: None

(61) Project [codegen id : 19]
Output [5]: [cs_catalog_page_sk#41, cs_ext_sales_price#45, cs_net_profit#46, cr_return_amount#50, cr_net_loss#51]
Input [7]: [cs_catalog_page_sk#41, cs_ext_sales_price#45, cs_net_profit#46, cs_sold_date_sk#47, cr_return_amount#50, cr_net_loss#51, d_date_sk#55]

(62) Scan parquet spark_catalog.default.catalog_page
Output [2]: [cp_catalog_page_sk#56, cp_catalog_page_id#57]
Batched: true
Location [not included in comparison]/{warehouse_dir}/catalog_page]
PushedFilters: [IsNotNull(cp_catalog_page_sk)]
ReadSchema: struct<cp_catalog_page_sk:int,cp_catalog_page_id:string>

(63) ColumnarToRow [codegen id : 18]
Input [2]: [cp_catalog_page_sk#56, cp_catalog_page_id#57]

(64) Filter [codegen id : 18]
Input [2]: [cp_catalog_page_sk#56, cp_catalog_page_id#57]
Condition : isnotnull(cp_catalog_page_sk#56)

(65) BroadcastExchange
Input [2]: [cp_catalog_page_sk#56, cp_catalog_page_id#57]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, false] as bigint)),false), [plan_id=11]

(66) BroadcastHashJoin [codegen id : 19]
Left keys [1]: [cs_catalog_page_sk#41]
Right keys [1]: [cp_catalog_page_sk#56]
Join type: Inner
Join condition: None

(67) Project [codegen id : 19]
Output [5]: [cs_ext_sales_price#45, cs_net_profit#46, cr_return_amount#50, cr_net_loss#51, cp_catalog_page_id#57]
Input [7]: [cs_catalog_page_sk#41, cs_ext_sales_price#45, cs_net_profit#46, cr_return_amount#50, cr_net_loss#51, cp_catalog_page_sk#56, cp_catalog_page_id#57]

(68) HashAggregate [codegen id : 19]
Input [5]: [cs_ext_sales_price#45, cs_net_profit#46, cr_return_amount#50, cr_net_loss#51, cp_catalog_page_id#57]
Keys [1]: [cp_catalog_page_id#57]
Functions [3]: [partial_sum(UnscaledValue(cs_ext_sales_price#45)), partial_sum(coalesce(cast(cr_return_amount#50 as decimal(12,2)), 0.00)), partial_sum((cs_net_profit#46 - coalesce(cast(cr_net_loss#51 as decimal(12,2)), 0.00)))]
Aggregate Attributes [5]: [sum#58, sum#59, isEmpty#60, sum#61, isEmpty#62]
Results [6]: [cp_catalog_page_id#57, sum#63, sum#64, isEmpty#65, sum#66, isEmpty#67]

(69) Exchange
Input [6]: [cp_catalog_page_id#57, sum#63, sum#64, isEmpty#65, sum#66, isEmpty#67]
Arguments: hashpartitioning(cp_catalog_page_id#57, 5), ENSURE_REQUIREMENTS, [plan_id=12]

(70) HashAggregate [codegen id : 20]
Input [6]: [cp_catalog_page_id#57, sum#63, sum#64, isEmpty#65, sum#66, isEmpty#67]
Keys [1]: [cp_catalog_page_id#57]
Functions [3]: [sum(UnscaledValue(cs_ext_sales_price#45)), sum(coalesce(cast(cr_return_amount#50 as decimal(12,2)), 0.00)), sum((cs_net_profit#46 - coalesce(cast(cr_net_loss#51 as decimal(12,2)), 0.00)))]
Aggregate Attributes [3]: [sum(UnscaledValue(cs_ext_sales_price#45))#68, sum(coalesce(cast(cr_return_amount#50 as decimal(12,2)), 0.00))#69, sum((cs_net_profit#46 - coalesce(cast(cr_net_loss#51 as decimal(12,2)), 0.00)))#70]
Results [5]: [catalog channel AS channel#71, concat(catalog_page, cp_catalog_page_id#57) AS id#72, MakeDecimal(sum(UnscaledValue(cs_ext_sales_price#45))#68,17,2) AS sales#73, sum(coalesce(cast(cr_return_amount#50 as decimal(12,2)), 0.00))#69 AS returns#74, sum((cs_net_profit#46 - coalesce(cast(cr_net_loss#51 as decimal(12,2)), 0.00)))#70 AS profit#75]

(71) Scan parquet spark_catalog.default.web_sales
Output [7]: [ws_item_sk#76, ws_web_site_sk#77, ws_promo_sk#78, ws_order_number#79, ws_ext_sales_price#80, ws_net_profit#81, ws_sold_date_sk#82]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(ws_sold_date_sk#82), dynamicpruningexpression(ws_sold_date_sk#82 IN dynamicpruning#8)]
PushedFilters: [IsNotNull(ws_web_site_sk), IsNotNull(ws_item_sk), IsNotNull(ws_promo_sk)]
ReadSchema: struct<ws_item_sk:int,ws_web_site_sk:int,ws_promo_sk:int,ws_order_number:int,ws_ext_sales_price:decimal(7,2),ws_net_profit:decimal(7,2)>

(72) ColumnarToRow [codegen id : 21]
Input [7]: [ws_item_sk#76, ws_web_site_sk#77, ws_promo_sk#78, ws_order_number#79, ws_ext_sales_price#80, ws_net_profit#81, ws_sold_date_sk#82]

(73) Filter [codegen id : 21]
Input [7]: [ws_item_sk#76, ws_web_site_sk#77, ws_promo_sk#78, ws_order_number#79, ws_ext_sales_price#80, ws_net_profit#81, ws_sold_date_sk#82]
Condition : ((((isnotnull(ws_web_site_sk#77) AND isnotnull(ws_item_sk#76)) AND isnotnull(ws_promo_sk#78)) AND might_contain(ReusedSubquery Subquery scalar-subquery#9, [id=#1], xxhash64(ws_item_sk#76, 42))) AND might_contain(ReusedSubquery Subquery scalar-subquery#10, [id=#2], xxhash64(ws_promo_sk#78, 42)))

(74) Exchange
Input [7]: [ws_item_sk#76, ws_web_site_sk#77, ws_promo_sk#78, ws_order_number#79, ws_ext_sales_price#80, ws_net_profit#81, ws_sold_date_sk#82]
Arguments: hashpartitioning(ws_item_sk#76, ws_order_number#79, 5), ENSURE_REQUIREMENTS, [plan_id=13]

(75) Sort [codegen id : 22]
Input [7]: [ws_item_sk#76, ws_web_site_sk#77, ws_promo_sk#78, ws_order_number#79, ws_ext_sales_price#80, ws_net_profit#81, ws_sold_date_sk#82]
Arguments: [ws_item_sk#76 ASC NULLS FIRST, ws_order_number#79 ASC NULLS FIRST], false, 0

(76) Scan parquet spark_catalog.default.web_returns
Output [5]: [wr_item_sk#83, wr_order_number#84, wr_return_amt#85, wr_net_loss#86, wr_returned_date_sk#87]
Batched: true
Location [not included in comparison]/{warehouse_dir}/web_returns]
PushedFilters: [IsNotNull(wr_item_sk), IsNotNull(wr_order_number)]
ReadSchema: struct<wr_item_sk:int,wr_order_number:int,wr_return_amt:decimal(7,2),wr_net_loss:decimal(7,2)>

(77) ColumnarToRow [codegen id : 23]
Input [5]: [wr_item_sk#83, wr_order_number#84, wr_return_amt#85, wr_net_loss#86, wr_returned_date_sk#87]

(78) Filter [codegen id : 23]
Input [5]: [wr_item_sk#83, wr_order_number#84, wr_return_amt#85, wr_net_loss#86, wr_returned_date_sk#87]
Condition : (isnotnull(wr_item_sk#83) AND isnotnull(wr_order_number#84))

(79) Project [codegen id : 23]
Output [4]: [wr_item_sk#83, wr_order_number#84, wr_return_amt#85, wr_net_loss#86]
Input [5]: [wr_item_sk#83, wr_order_number#84, wr_return_amt#85, wr_net_loss#86, wr_returned_date_sk#87]

(80) Exchange
Input [4]: [wr_item_sk#83, wr_order_number#84, wr_return_amt#85, wr_net_loss#86]
Arguments: hashpartitioning(wr_item_sk#83, wr_order_number#84, 5), ENSURE_REQUIREMENTS, [plan_id=14]

(81) Sort [codegen id : 24]
Input [4]: [wr_item_sk#83, wr_order_number#84, wr_return_amt#85, wr_net_loss#86]
Arguments: [wr_item_sk#83 ASC NULLS FIRST, wr_order_number#84 ASC NULLS FIRST], false, 0

(82) SortMergeJoin [codegen id : 29]
Left keys [2]: [ws_item_sk#76, ws_order_number#79]
Right keys [2]: [wr_item_sk#83, wr_order_number#84]
Join type: LeftOuter
Join condition: None

(83) Project [codegen id : 29]
Output [8]: [ws_item_sk#76, ws_web_site_sk#77, ws_promo_sk#78, ws_ext_sales_price#80, ws_net_profit#81, ws_sold_date_sk#82, wr_return_amt#85, wr_net_loss#86]
Input [11]: [ws_item_sk#76, ws_web_site_sk#77, ws_promo_sk#78, ws_order_number#79, ws_ext_sales_price#80, ws_net_profit#81, ws_sold_date_sk#82, wr_item_sk#83, wr_order_number#84, wr_return_amt#85, wr_net_loss#86]

(84) ReusedExchange [Reuses operator id: 18]
Output [1]: [i_item_sk#88]

(85) BroadcastHashJoin [codegen id : 29]
Left keys [1]: [ws_item_sk#76]
Right keys [1]: [i_item_sk#88]
Join type: Inner
Join condition: None

(86) Project [codegen id : 29]
Output [7]: [ws_web_site_sk#77, ws_promo_sk#78, ws_ext_sales_price#80, ws_net_profit#81, ws_sold_date_sk#82, wr_return_amt#85, wr_net_loss#86]
Input [9]: [ws_item_sk#76, ws_web_site_sk#77, ws_promo_sk#78, ws_ext_sales_price#80, ws_net_profit#81, ws_sold_date_sk#82, wr_return_amt#85, wr_net_loss#86, i_item_sk#88]

(87) ReusedExchange [Reuses operator id: 25]
Output [1]: [p_promo_sk#89]

(88) BroadcastHashJoin [codegen id : 29]
Left keys [1]: [ws_promo_sk#78]
Right keys [1]: [p_promo_sk#89]
Join type: Inner
Join condition: None

(89) Project [codegen id : 29]
Output [6]: [ws_web_site_sk#77, ws_ext_sales_price#80, ws_net_profit#81, ws_sold_date_sk#82, wr_return_amt#85, wr_net_loss#86]
Input [8]: [ws_web_site_sk#77, ws_promo_sk#78, ws_ext_sales_price#80, ws_net_profit#81, ws_sold_date_sk#82, wr_return_amt#85, wr_net_loss#86, p_promo_sk#89]

(90) ReusedExchange [Reuses operator id: 221]
Output [1]: [d_date_sk#90]

(91) BroadcastHashJoin [codegen id : 29]
Left keys [1]: [ws_sold_date_sk#82]
Right keys [1]: [d_date_sk#90]
Join type: Inner
Join condition: None

(92) Project [codegen id : 29]
Output [5]: [ws_web_site_sk#77, ws_ext_sales_price#80, ws_net_profit#81, wr_return_amt#85, wr_net_loss#86]
Input [7]: [ws_web_site_sk#77, ws_ext_sales_price#80, ws_net_profit#81, ws_sold_date_sk#82, wr_return_amt#85, wr_net_loss#86, d_date_sk#90]

(93) Scan parquet spark_catalog.default.web_site
Output [2]: [web_site_sk#91, web_site_id#92]
Batched: true
Location [not included in comparison]/{warehouse_dir}/web_site]
PushedFilters: [IsNotNull(web_site_sk)]
ReadSchema: struct<web_site_sk:int,web_site_id:string>

(94) ColumnarToRow [codegen id : 28]
Input [2]: [web_site_sk#91, web_site_id#92]

(95) Filter [codegen id : 28]
Input [2]: [web_site_sk#91, web_site_id#92]
Condition : isnotnull(web_site_sk#91)

(96) BroadcastExchange
Input [2]: [web_site_sk#91, web_site_id#92]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, false] as bigint)),false), [plan_id=15]

(97) BroadcastHashJoin [codegen id : 29]
Left keys [1]: [ws_web_site_sk#77]
Right keys [1]: [web_site_sk#91]
Join type: Inner
Join condition: None

(98) Project [codegen id : 29]
Output [5]: [ws_ext_sales_price#80, ws_net_profit#81, wr_return_amt#85, wr_net_loss#86, web_site_id#92]
Input [7]: [ws_web_site_sk#77, ws_ext_sales_price#80, ws_net_profit#81, wr_return_amt#85, wr_net_loss#86, web_site_sk#91, web_site_id#92]

(99) HashAggregate [codegen id : 29]
Input [5]: [ws_ext_sales_price#80, ws_net_profit#81, wr_return_amt#85, wr_net_loss#86, web_site_id#92]
Keys [1]: [web_site_id#92]
Functions [3]: [partial_sum(UnscaledValue(ws_ext_sales_price#80)), partial_sum(coalesce(cast(wr_return_amt#85 as decimal(12,2)), 0.00)), partial_sum((ws_net_profit#81 - coalesce(cast(wr_net_loss#86 as decimal(12,2)), 0.00)))]
Aggregate Attributes [5]: [sum#93, sum#94, isEmpty#95, sum#96, isEmpty#97]
Results [6]: [web_site_id#92, sum#98, sum#99, isEmpty#100, sum#101, isEmpty#102]

(100) Exchange
Input [6]: [web_site_id#92, sum#98, sum#99, isEmpty#100, sum#101, isEmpty#102]
Arguments: hashpartitioning(web_site_id#92, 5), ENSURE_REQUIREMENTS, [plan_id=16]

(101) HashAggregate [codegen id : 30]
Input [6]: [web_site_id#92, sum#98, sum#99, isEmpty#100, sum#101, isEmpty#102]
Keys [1]: [web_site_id#92]
Functions [3]: [sum(UnscaledValue(ws_ext_sales_price#80)), sum(coalesce(cast(wr_return_amt#85 as decimal(12,2)), 0.00)), sum((ws_net_profit#81 - coalesce(cast(wr_net_loss#86 as decimal(12,2)), 0.00)))]
Aggregate Attributes [3]: [sum(UnscaledValue(ws_ext_sales_price#80))#103, sum(coalesce(cast(wr_return_amt#85 as decimal(12,2)), 0.00))#104, sum((ws_net_profit#81 - coalesce(cast(wr_net_loss#86 as decimal(12,2)), 0.00)))#105]
Results [5]: [web channel AS channel#106, concat(web_site, web_site_id#92) AS id#107, MakeDecimal(sum(UnscaledValue(ws_ext_sales_price#80))#103,17,2) AS sales#108, sum(coalesce(cast(wr_return_amt#85 as decimal(12,2)), 0.00))#104 AS returns#109, sum((ws_net_profit#81 - coalesce(cast(wr_net_loss#86 as decimal(12,2)), 0.00)))#105 AS profit#110]

(102) Union

(103) HashAggregate [codegen id : 31]
Input [5]: [channel#36, id#37, sales#38, returns#39, profit#40]
Keys [2]: [channel#36, id#37]
Functions [3]: [partial_sum(sales#38), partial_sum(returns#39), partial_sum(profit#40)]
Aggregate Attributes [6]: [sum#111, isEmpty#112, sum#113, isEmpty#114, sum#115, isEmpty#116]
Results [8]: [channel#36, id#37, sum#117, isEmpty#118, sum#119, isEmpty#120, sum#121, isEmpty#122]

(104) Exchange
Input [8]: [channel#36, id#37, sum#117, isEmpty#118, sum#119, isEmpty#120, sum#121, isEmpty#122]
Arguments: hashpartitioning(channel#36, id#37, 5), ENSURE_REQUIREMENTS, [plan_id=17]

(105) HashAggregate [codegen id : 32]
Input [8]: [channel#36, id#37, sum#117, isEmpty#118, sum#119, isEmpty#120, sum#121, isEmpty#122]
Keys [2]: [channel#36, id#37]
Functions [3]: [sum(sales#38), sum(returns#39), sum(profit#40)]
Aggregate Attributes [3]: [sum(sales#38)#123, sum(returns#39)#124, sum(profit#40)#125]
Results [5]: [channel#36, id#37, cast(sum(sales#38)#123 as decimal(37,2)) AS sales#126, cast(sum(returns#39)#124 as decimal(38,2)) AS returns#127, cast(sum(profit#40)#125 as decimal(38,2)) AS profit#128]

(106) ReusedExchange [Reuses operator id: 38]
Output [6]: [s_store_id#129, sum#130, sum#131, isEmpty#132, sum#133, isEmpty#134]

(107) HashAggregate [codegen id : 42]
Input [6]: [s_store_id#129, sum#130, sum#131, isEmpty#132, sum#133, isEmpty#134]
Keys [1]: [s_store_id#129]
Functions [3]: [sum(UnscaledValue(ss_ext_sales_price#135)), sum(coalesce(cast(sr_return_amt#136 as decimal(12,2)), 0.00)), sum((ss_net_profit#137 - coalesce(cast(sr_net_loss#138 as decimal(12,2)), 0.00)))]
Aggregate Attributes [3]: [sum(UnscaledValue(ss_ext_sales_price#135))#33, sum(coalesce(cast(sr_return_amt#136 as decimal(12,2)), 0.00))#34, sum((ss_net_profit#137 - coalesce(cast(sr_net_loss#138 as decimal(12,2)), 0.00)))#35]
Results [5]: [store channel AS channel#139, concat(store, s_store_id#129) AS id#140, MakeDecimal(sum(UnscaledValue(ss_ext_sales_price#135))#33,17,2) AS sales#141, sum(coalesce(cast(sr_return_amt#136 as decimal(12,2)), 0.00))#34 AS returns#142, sum((ss_net_profit#137 - coalesce(cast(sr_net_loss#138 as decimal(12,2)), 0.00)))#35 AS profit#143]

(108) ReusedExchange [Reuses operator id: 69]
Output [6]: [cp_catalog_page_id#144, sum#145, sum#146, isEmpty#147, sum#148, isEmpty#149]

(109) HashAggregate [codegen id : 52]
Input [6]: [cp_catalog_page_id#144, sum#145, sum#146, isEmpty#147, sum#148, isEmpty#149]
Keys [1]: [cp_catalog_page_id#144]
Functions [3]: [sum(UnscaledValue(cs_ext_sales_price#150)), sum(coalesce(cast(cr_return_amount#151 as decimal(12,2)), 0.00)), sum((cs_net_profit#152 - coalesce(cast(cr_net_loss#153 as decimal(12,2)), 0.00)))]
Aggregate Attributes [3]: [sum(UnscaledValue(cs_ext_sales_price#150))#68, sum(coalesce(cast(cr_return_amount#151 as decimal(12,2)), 0.00))#69, sum((cs_net_profit#152 - coalesce(cast(cr_net_loss#153 as decimal(12,2)), 0.00)))#70]
Results [5]: [catalog channel AS channel#154, concat(catalog_page, cp_catalog_page_id#144) AS id#155, MakeDecimal(sum(UnscaledValue(cs_ext_sales_price#150))#68,17,2) AS sales#156, sum(coalesce(cast(cr_return_amount#151 as decimal(12,2)), 0.00))#69 AS returns#157, sum((cs_net_profit#152 - coalesce(cast(cr_net_loss#153 as decimal(12,2)), 0.00)))#70 AS profit#158]

(110) Scan parquet spark_catalog.default.web_sales
Output [7]: [ws_item_sk#159, ws_web_site_sk#160, ws_promo_sk#161, ws_order_number#162, ws_ext_sales_price#163, ws_net_profit#164, ws_sold_date_sk#165]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(ws_sold_date_sk#165), dynamicpruningexpression(ws_sold_date_sk#165 IN dynamicpruning#8)]
PushedFilters: [IsNotNull(ws_web_site_sk), IsNotNull(ws_item_sk), IsNotNull(ws_promo_sk)]
ReadSchema: struct<ws_item_sk:int,ws_web_site_sk:int,ws_promo_sk:int,ws_order_number:int,ws_ext_sales_price:decimal(7,2),ws_net_profit:decimal(7,2)>

(111) ColumnarToRow [codegen id : 53]
Input [7]: [ws_item_sk#159, ws_web_site_sk#160, ws_promo_sk#161, ws_order_number#162, ws_ext_sales_price#163, ws_net_profit#164, ws_sold_date_sk#165]

(112) Filter [codegen id : 53]
Input [7]: [ws_item_sk#159, ws_web_site_sk#160, ws_promo_sk#161, ws_order_number#162, ws_ext_sales_price#163, ws_net_profit#164, ws_sold_date_sk#165]
Condition : ((isnotnull(ws_web_site_sk#160) AND isnotnull(ws_item_sk#159)) AND isnotnull(ws_promo_sk#161))

(113) Exchange
Input [7]: [ws_item_sk#159, ws_web_site_sk#160, ws_promo_sk#161, ws_order_number#162, ws_ext_sales_price#163, ws_net_profit#164, ws_sold_date_sk#165]
Arguments: hashpartitioning(ws_item_sk#159, ws_order_number#162, 5), ENSURE_REQUIREMENTS, [plan_id=18]

(114) Sort [codegen id : 54]
Input [7]: [ws_item_sk#159, ws_web_site_sk#160, ws_promo_sk#161, ws_order_number#162, ws_ext_sales_price#163, ws_net_profit#164, ws_sold_date_sk#165]
Arguments: [ws_item_sk#159 ASC NULLS FIRST, ws_order_number#162 ASC NULLS FIRST], false, 0

(115) ReusedExchange [Reuses operator id: 80]
Output [4]: [wr_item_sk#166, wr_order_number#167, wr_return_amt#168, wr_net_loss#169]

(116) Sort [codegen id : 56]
Input [4]: [wr_item_sk#166, wr_order_number#167, wr_return_amt#168, wr_net_loss#169]
Arguments: [wr_item_sk#166 ASC NULLS FIRST, wr_order_number#167 ASC NULLS FIRST], false, 0

(117) SortMergeJoin [codegen id : 61]
Left keys [2]: [ws_item_sk#159, ws_order_number#162]
Right keys [2]: [wr_item_sk#166, wr_order_number#167]
Join type: LeftOuter
Join condition: None

(118) Project [codegen id : 61]
Output [8]: [ws_item_sk#159, ws_web_site_sk#160, ws_promo_sk#161, ws_ext_sales_price#163, ws_net_profit#164, ws_sold_date_sk#165, wr_return_amt#168, wr_net_loss#169]
Input [11]: [ws_item_sk#159, ws_web_site_sk#160, ws_promo_sk#161, ws_order_number#162, ws_ext_sales_price#163, ws_net_profit#164, ws_sold_date_sk#165, wr_item_sk#166, wr_order_number#167, wr_return_amt#168, wr_net_loss#169]

(119) ReusedExchange [Reuses operator id: 18]
Output [1]: [i_item_sk#170]

(120) BroadcastHashJoin [codegen id : 61]
Left keys [1]: [ws_item_sk#159]
Right keys [1]: [i_item_sk#170]
Join type: Inner
Join condition: None

(121) Project [codegen id : 61]
Output [7]: [ws_web_site_sk#160, ws_promo_sk#161, ws_ext_sales_price#163, ws_net_profit#164, ws_sold_date_sk#165, wr_return_amt#168, wr_net_loss#169]
Input [9]: [ws_item_sk#159, ws_web_site_sk#160, ws_promo_sk#161, ws_ext_sales_price#163, ws_net_profit#164, ws_sold_date_sk#165, wr_return_amt#168, wr_net_loss#169, i_item_sk#170]

(122) ReusedExchange [Reuses operator id: 25]
Output [1]: [p_promo_sk#171]

(123) BroadcastHashJoin [codegen id : 61]
Left keys [1]: [ws_promo_sk#161]
Right keys [1]: [p_promo_sk#171]
Join type: Inner
Join condition: None

(124) Project [codegen id : 61]
Output [6]: [ws_web_site_sk#160, ws_ext_sales_price#163, ws_net_profit#164, ws_sold_date_sk#165, wr_return_amt#168, wr_net_loss#169]
Input [8]: [ws_web_site_sk#160, ws_promo_sk#161, ws_ext_sales_price#163, ws_net_profit#164, ws_sold_date_sk#165, wr_return_amt#168, wr_net_loss#169, p_promo_sk#171]

(125) ReusedExchange [Reuses operator id: 221]
Output [1]: [d_date_sk#172]

(126) BroadcastHashJoin [codegen id : 61]
Left keys [1]: [ws_sold_date_sk#165]
Right keys [1]: [d_date_sk#172]
Join type: Inner
Join condition: None

(127) Project [codegen id : 61]
Output [5]: [ws_web_site_sk#160, ws_ext_sales_price#163, ws_net_profit#164, wr_return_amt#168, wr_net_loss#169]
Input [7]: [ws_web_site_sk#160, ws_ext_sales_price#163, ws_net_profit#164, ws_sold_date_sk#165, wr_return_amt#168, wr_net_loss#169, d_date_sk#172]

(128) ReusedExchange [Reuses operator id: 96]
Output [2]: [web_site_sk#173, web_site_id#174]

(129) BroadcastHashJoin [codegen id : 61]
Left keys [1]: [ws_web_site_sk#160]
Right keys [1]: [web_site_sk#173]
Join type: Inner
Join condition: None

(130) Project [codegen id : 61]
Output [5]: [ws_ext_sales_price#163, ws_net_profit#164, wr_return_amt#168, wr_net_loss#169, web_site_id#174]
Input [7]: [ws_web_site_sk#160, ws_ext_sales_price#163, ws_net_profit#164, wr_return_amt#168, wr_net_loss#169, web_site_sk#173, web_site_id#174]

(131) HashAggregate [codegen id : 61]
Input [5]: [ws_ext_sales_price#163, ws_net_profit#164, wr_return_amt#168, wr_net_loss#169, web_site_id#174]
Keys [1]: [web_site_id#174]
Functions [3]: [partial_sum(UnscaledValue(ws_ext_sales_price#163)), partial_sum(coalesce(cast(wr_return_amt#168 as decimal(12,2)), 0.00)), partial_sum((ws_net_profit#164 - coalesce(cast(wr_net_loss#169 as decimal(12,2)), 0.00)))]
Aggregate Attributes [5]: [sum#175, sum#176, isEmpty#177, sum#178, isEmpty#179]
Results [6]: [web_site_id#174, sum#180, sum#181, isEmpty#182, sum#183, isEmpty#184]

(132) Exchange
Input [6]: [web_site_id#174, sum#180, sum#181, isEmpty#182, sum#183, isEmpty#184]
Arguments: hashpartitioning(web_site_id#174, 5), ENSURE_REQUIREMENTS, [plan_id=19]

(133) HashAggregate [codegen id : 62]
Input [6]: [web_site_id#174, sum#180, sum#181, isEmpty#182, sum#183, isEmpty#184]
Keys [1]: [web_site_id#174]
Functions [3]: [sum(UnscaledValue(ws_ext_sales_price#163)), sum(coalesce(cast(wr_return_amt#168 as decimal(12,2)), 0.00)), sum((ws_net_profit#164 - coalesce(cast(wr_net_loss#169 as decimal(12,2)), 0.00)))]
Aggregate Attributes [3]: [sum(UnscaledValue(ws_ext_sales_price#163))#103, sum(coalesce(cast(wr_return_amt#168 as decimal(12,2)), 0.00))#104, sum((ws_net_profit#164 - coalesce(cast(wr_net_loss#169 as decimal(12,2)), 0.00)))#105]
Results [5]: [web channel AS channel#185, concat(web_site, web_site_id#174) AS id#186, MakeDecimal(sum(UnscaledValue(ws_ext_sales_price#163))#103,17,2) AS sales#187, sum(coalesce(cast(wr_return_amt#168 as decimal(12,2)), 0.00))#104 AS returns#188, sum((ws_net_profit#164 - coalesce(cast(wr_net_loss#169 as decimal(12,2)), 0.00)))#105 AS profit#189]

(134) Union

(135) HashAggregate [codegen id : 63]
Input [5]: [channel#139, id#140, sales#141, returns#142, profit#143]
Keys [2]: [channel#139, id#140]
Functions [3]: [partial_sum(sales#141), partial_sum(returns#142), partial_sum(profit#143)]
Aggregate Attributes [6]: [sum#190, isEmpty#191, sum#192, isEmpty#193, sum#194, isEmpty#195]
Results [8]: [channel#139, id#140, sum#196, isEmpty#197, sum#198, isEmpty#199, sum#200, isEmpty#201]

(136) Exchange
Input [8]: [channel#139, id#140, sum#196, isEmpty#197, sum#198, isEmpty#199, sum#200, isEmpty#201]
Arguments: hashpartitioning(channel#139, id#140, 5), ENSURE_REQUIREMENTS, [plan_id=20]

(137) HashAggregate [codegen id : 64]
Input [8]: [channel#139, id#140, sum#196, isEmpty#197, sum#198, isEmpty#199, sum#200, isEmpty#201]
Keys [2]: [channel#139, id#140]
Functions [3]: [sum(sales#141), sum(returns#142), sum(profit#143)]
Aggregate Attributes [3]: [sum(sales#141)#123, sum(returns#142)#124, sum(profit#143)#125]
Results [4]: [channel#139, sum(sales#141)#123 AS sales#202, sum(returns#142)#124 AS returns#203, sum(profit#143)#125 AS profit#204]

(138) HashAggregate [codegen id : 64]
Input [4]: [channel#139, sales#202, returns#203, profit#204]
Keys [1]: [channel#139]
Functions [3]: [partial_sum(sales#202), partial_sum(returns#203), partial_sum(profit#204)]
Aggregate Attributes [6]: [sum#205, isEmpty#206, sum#207, isEmpty#208, sum#209, isEmpty#210]
Results [7]: [channel#139, sum#211, isEmpty#212, sum#213, isEmpty#214, sum#215, isEmpty#216]

(139) Exchange
Input [7]: [channel#139, sum#211, isEmpty#212, sum#213, isEmpty#214, sum#215, isEmpty#216]
Arguments: hashpartitioning(channel#139, 5), ENSURE_REQUIREMENTS, [plan_id=21]

(140) HashAggregate [codegen id : 65]
Input [7]: [channel#139, sum#211, isEmpty#212, sum#213, isEmpty#214, sum#215, isEmpty#216]
Keys [1]: [channel#139]
Functions [3]: [sum(sales#202), sum(returns#203), sum(profit#204)]
Aggregate Attributes [3]: [sum(sales#202)#217, sum(returns#203)#218, sum(profit#204)#219]
Results [5]: [channel#139, null AS id#220, sum(sales#202)#217 AS sales#221, sum(returns#203)#218 AS returns#222, sum(profit#204)#219 AS profit#223]

(141) Scan parquet spark_catalog.default.store_sales
Output [7]: [ss_item_sk#224, ss_store_sk#225, ss_promo_sk#226, ss_ticket_number#227, ss_ext_sales_price#228, ss_net_profit#229, ss_sold_date_sk#230]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(ss_sold_date_sk#230), dynamicpruningexpression(ss_sold_date_sk#230 IN dynamicpruning#8)]
PushedFilters: [IsNotNull(ss_store_sk), IsNotNull(ss_item_sk), IsNotNull(ss_promo_sk)]
ReadSchema: struct<ss_item_sk:int,ss_store_sk:int,ss_promo_sk:int,ss_ticket_number:int,ss_ext_sales_price:decimal(7,2),ss_net_profit:decimal(7,2)>

(142) ColumnarToRow [codegen id : 66]
Input [7]: [ss_item_sk#224, ss_store_sk#225, ss_promo_sk#226, ss_ticket_number#227, ss_ext_sales_price#228, ss_net_profit#229, ss_sold_date_sk#230]

(143) Filter [codegen id : 66]
Input [7]: [ss_item_sk#224, ss_store_sk#225, ss_promo_sk#226, ss_ticket_number#227, ss_ext_sales_price#228, ss_net_profit#229, ss_sold_date_sk#230]
Condition : ((isnotnull(ss_store_sk#225) AND isnotnull(ss_item_sk#224)) AND isnotnull(ss_promo_sk#226))

(144) Exchange
Input [7]: [ss_item_sk#224, ss_store_sk#225, ss_promo_sk#226, ss_ticket_number#227, ss_ext_sales_price#228, ss_net_profit#229, ss_sold_date_sk#230]
Arguments: hashpartitioning(ss_item_sk#224, ss_ticket_number#227, 5), ENSURE_REQUIREMENTS, [plan_id=22]

(145) Sort [codegen id : 67]
Input [7]: [ss_item_sk#224, ss_store_sk#225, ss_promo_sk#226, ss_ticket_number#227, ss_ext_sales_price#228, ss_net_profit#229, ss_sold_date_sk#230]
Arguments: [ss_item_sk#224 ASC NULLS FIRST, ss_ticket_number#227 ASC NULLS FIRST], false, 0

(146) ReusedExchange [Reuses operator id: 10]
Output [4]: [sr_item_sk#231, sr_ticket_number#232, sr_return_amt#233, sr_net_loss#234]

(147) Sort [codegen id : 69]
Input [4]: [sr_item_sk#231, sr_ticket_number#232, sr_return_amt#233, sr_net_loss#234]
Arguments: [sr_item_sk#231 ASC NULLS FIRST, sr_ticket_number#232 ASC NULLS FIRST], false, 0

(148) SortMergeJoin [codegen id : 74]
Left keys [2]: [ss_item_sk#224, ss_ticket_number#227]
Right keys [2]: [sr_item_sk#231, sr_ticket_number#232]
Join type: LeftOuter
Join condition: None

(149) Project [codegen id : 74]
Output [8]: [ss_item_sk#224, ss_store_sk#225, ss_promo_sk#226, ss_ext_sales_price#228, ss_net_profit#229, ss_sold_date_sk#230, sr_return_amt#233, sr_net_loss#234]
Input [11]: [ss_item_sk#224, ss_store_sk#225, ss_promo_sk#226, ss_ticket_number#227, ss_ext_sales_price#228, ss_net_profit#229, ss_sold_date_sk#230, sr_item_sk#231, sr_ticket_number#232, sr_return_amt#233, sr_net_loss#234]

(150) ReusedExchange [Reuses operator id: 18]
Output [1]: [i_item_sk#235]

(151) BroadcastHashJoin [codegen id : 74]
Left keys [1]: [ss_item_sk#224]
Right keys [1]: [i_item_sk#235]
Join type: Inner
Join condition: None

(152) Project [codegen id : 74]
Output [7]: [ss_store_sk#225, ss_promo_sk#226, ss_ext_sales_price#228, ss_net_profit#229, ss_sold_date_sk#230, sr_return_amt#233, sr_net_loss#234]
Input [9]: [ss_item_sk#224, ss_store_sk#225, ss_promo_sk#226, ss_ext_sales_price#228, ss_net_profit#229, ss_sold_date_sk#230, sr_return_amt#233, sr_net_loss#234, i_item_sk#235]

(153) ReusedExchange [Reuses operator id: 25]
Output [1]: [p_promo_sk#236]

(154) BroadcastHashJoin [codegen id : 74]
Left keys [1]: [ss_promo_sk#226]
Right keys [1]: [p_promo_sk#236]
Join type: Inner
Join condition: None

(155) Project [codegen id : 74]
Output [6]: [ss_store_sk#225, ss_ext_sales_price#228, ss_net_profit#229, ss_sold_date_sk#230, sr_return_amt#233, sr_net_loss#234]
Input [8]: [ss_store_sk#225, ss_promo_sk#226, ss_ext_sales_price#228, ss_net_profit#229, ss_sold_date_sk#230, sr_return_amt#233, sr_net_loss#234, p_promo_sk#236]

(156) ReusedExchange [Reuses operator id: 221]
Output [1]: [d_date_sk#237]

(157) BroadcastHashJoin [codegen id : 74]
Left keys [1]: [ss_sold_date_sk#230]
Right keys [1]: [d_date_sk#237]
Join type: Inner
Join condition: None

(158) Project [codegen id : 74]
Output [5]: [ss_store_sk#225, ss_ext_sales_price#228, ss_net_profit#229, sr_return_amt#233, sr_net_loss#234]
Input [7]: [ss_store_sk#225, ss_ext_sales_price#228, ss_net_profit#229, ss_sold_date_sk#230, sr_return_amt#233, sr_net_loss#234, d_date_sk#237]

(159) ReusedExchange [Reuses operator id: 34]
Output [2]: [s_store_sk#238, s_store_id#239]

(160) BroadcastHashJoin [codegen id : 74]
Left keys [1]: [ss_store_sk#225]
Right keys [1]: [s_store_sk#238]
Join type: Inner
Join condition: None

(161) Project [codegen id : 74]
Output [5]: [ss_ext_sales_price#228, ss_net_profit#229, sr_return_amt#233, sr_net_loss#234, s_store_id#239]
Input [7]: [ss_store_sk#225, ss_ext_sales_price#228, ss_net_profit#229, sr_return_amt#233, sr_net_loss#234, s_store_sk#238, s_store_id#239]

(162) HashAggregate [codegen id : 74]
Input [5]: [ss_ext_sales_price#228, ss_net_profit#229, sr_return_amt#233, sr_net_loss#234, s_store_id#239]
Keys [1]: [s_store_id#239]
Functions [3]: [partial_sum(UnscaledValue(ss_ext_sales_price#228)), partial_sum(coalesce(cast(sr_return_amt#233 as decimal(12,2)), 0.00)), partial_sum((ss_net_profit#229 - coalesce(cast(sr_net_loss#234 as decimal(12,2)), 0.00)))]
Aggregate Attributes [5]: [sum#240, sum#241, isEmpty#242, sum#243, isEmpty#244]
Results [6]: [s_store_id#239, sum#245, sum#246, isEmpty#247, sum#248, isEmpty#249]

(163) Exchange
Input [6]: [s_store_id#239, sum#245, sum#246, isEmpty#247, sum#248, isEmpty#249]
Arguments: hashpartitioning(s_store_id#239, 5), ENSURE_REQUIREMENTS, [plan_id=23]

(164) HashAggregate [codegen id : 75]
Input [6]: [s_store_id#239, sum#245, sum#246, isEmpty#247, sum#248, isEmpty#249]
Keys [1]: [s_store_id#239]
Functions [3]: [sum(UnscaledValue(ss_ext_sales_price#228)), sum(coalesce(cast(sr_return_amt#233 as decimal(12,2)), 0.00)), sum((ss_net_profit#229 - coalesce(cast(sr_net_loss#234 as decimal(12,2)), 0.00)))]
Aggregate Attributes [3]: [sum(UnscaledValue(ss_ext_sales_price#228))#33, sum(coalesce(cast(sr_return_amt#233 as decimal(12,2)), 0.00))#34, sum((ss_net_profit#229 - coalesce(cast(sr_net_loss#234 as decimal(12,2)), 0.00)))#35]
Results [5]: [store channel AS channel#250, concat(store, s_store_id#239) AS id#251, MakeDecimal(sum(UnscaledValue(ss_ext_sales_price#228))#33,17,2) AS sales#252, sum(coalesce(cast(sr_return_amt#233 as decimal(12,2)), 0.00))#34 AS returns#253, sum((ss_net_profit#229 - coalesce(cast(sr_net_loss#234 as decimal(12,2)), 0.00)))#35 AS profit#254]

(165) Scan parquet spark_catalog.default.catalog_sales
Output [7]: [cs_catalog_page_sk#255, cs_item_sk#256, cs_promo_sk#257, cs_order_number#258, cs_ext_sales_price#259, cs_net_profit#260, cs_sold_date_sk#261]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(cs_sold_date_sk#261), dynamicpruningexpression(cs_sold_date_sk#261 IN dynamicpruning#8)]
PushedFilters: [IsNotNull(cs_catalog_page_sk), IsNotNull(cs_item_sk), IsNotNull(cs_promo_sk)]
ReadSchema: struct<cs_catalog_page_sk:int,cs_item_sk:int,cs_promo_sk:int,cs_order_number:int,cs_ext_sales_price:decimal(7,2),cs_net_profit:decimal(7,2)>

(166) ColumnarToRow [codegen id : 76]
Input [7]: [cs_catalog_page_sk#255, cs_item_sk#256, cs_promo_sk#257, cs_order_number#258, cs_ext_sales_price#259, cs_net_profit#260, cs_sold_date_sk#261]

(167) Filter [codegen id : 76]
Input [7]: [cs_catalog_page_sk#255, cs_item_sk#256, cs_promo_sk#257, cs_order_number#258, cs_ext_sales_price#259, cs_net_profit#260, cs_sold_date_sk#261]
Condition : ((isnotnull(cs_catalog_page_sk#255) AND isnotnull(cs_item_sk#256)) AND isnotnull(cs_promo_sk#257))

(168) Exchange
Input [7]: [cs_catalog_page_sk#255, cs_item_sk#256, cs_promo_sk#257, cs_order_number#258, cs_ext_sales_price#259, cs_net_profit#260, cs_sold_date_sk#261]
Arguments: hashpartitioning(cs_item_sk#256, cs_order_number#258, 5), ENSURE_REQUIREMENTS, [plan_id=24]

(169) Sort [codegen id : 77]
Input [7]: [cs_catalog_page_sk#255, cs_item_sk#256, cs_promo_sk#257, cs_order_number#258, cs_ext_sales_price#259, cs_net_profit#260, cs_sold_date_sk#261]
Arguments: [cs_item_sk#256 ASC NULLS FIRST, cs_order_number#258 ASC NULLS FIRST], false, 0

(170) ReusedExchange [Reuses operator id: 49]
Output [4]: [cr_item_sk#262, cr_order_number#263, cr_return_amount#264, cr_net_loss#265]

(171) Sort [codegen id : 79]
Input [4]: [cr_item_sk#262, cr_order_number#263, cr_return_amount#264, cr_net_loss#265]
Arguments: [cr_item_sk#262 ASC NULLS FIRST, cr_order_number#263 ASC NULLS FIRST], false, 0

(172) SortMergeJoin [codegen id : 84]
Left keys [2]: [cs_item_sk#256, cs_order_number#258]
Right keys [2]: [cr_item_sk#262, cr_order_number#263]
Join type: LeftOuter
Join condition: None

(173) Project [codegen id : 84]
Output [8]: [cs_catalog_page_sk#255, cs_item_sk#256, cs_promo_sk#257, cs_ext_sales_price#259, cs_net_profit#260, cs_sold_date_sk#261, cr_return_amount#264, cr_net_loss#265]
Input [11]: [cs_catalog_page_sk#255, cs_item_sk#256, cs_promo_sk#257, cs_order_number#258, cs_ext_sales_price#259, cs_net_profit#260, cs_sold_date_sk#261, cr_item_sk#262, cr_order_number#263, cr_return_amount#264, cr_net_loss#265]

(174) ReusedExchange [Reuses operator id: 18]
Output [1]: [i_item_sk#266]

(175) BroadcastHashJoin [codegen id : 84]
Left keys [1]: [cs_item_sk#256]
Right keys [1]: [i_item_sk#266]
Join type: Inner
Join condition: None

(176) Project [codegen id : 84]
Output [7]: [cs_catalog_page_sk#255, cs_promo_sk#257, cs_ext_sales_price#259, cs_net_profit#260, cs_sold_date_sk#261, cr_return_amount#264, cr_net_loss#265]
Input [9]: [cs_catalog_page_sk#255, cs_item_sk#256, cs_promo_sk#257, cs_ext_sales_price#259, cs_net_profit#260, cs_sold_date_sk#261, cr_return_amount#264, cr_net_loss#265, i_item_sk#266]

(177) ReusedExchange [Reuses operator id: 25]
Output [1]: [p_promo_sk#267]

(178) BroadcastHashJoin [codegen id : 84]
Left keys [1]: [cs_promo_sk#257]
Right keys [1]: [p_promo_sk#267]
Join type: Inner
Join condition: None

(179) Project [codegen id : 84]
Output [6]: [cs_catalog_page_sk#255, cs_ext_sales_price#259, cs_net_profit#260, cs_sold_date_sk#261, cr_return_amount#264, cr_net_loss#265]
Input [8]: [cs_catalog_page_sk#255, cs_promo_sk#257, cs_ext_sales_price#259, cs_net_profit#260, cs_sold_date_sk#261, cr_return_amount#264, cr_net_loss#265, p_promo_sk#267]

(180) ReusedExchange [Reuses operator id: 221]
Output [1]: [d_date_sk#268]

(181) BroadcastHashJoin [codegen id : 84]
Left keys [1]: [cs_sold_date_sk#261]
Right keys [1]: [d_date_sk#268]
Join type: Inner
Join condition: None

(182) Project [codegen id : 84]
Output [5]: [cs_catalog_page_sk#255, cs_ext_sales_price#259, cs_net_profit#260, cr_return_amount#264, cr_net_loss#265]
Input [7]: [cs_catalog_page_sk#255, cs_ext_sales_price#259, cs_net_profit#260, cs_sold_date_sk#261, cr_return_amount#264, cr_net_loss#265, d_date_sk#268]

(183) ReusedExchange [Reuses operator id: 65]
Output [2]: [cp_catalog_page_sk#269, cp_catalog_page_id#270]

(184) BroadcastHashJoin [codegen id : 84]
Left keys [1]: [cs_catalog_page_sk#255]
Right keys [1]: [cp_catalog_page_sk#269]
Join type: Inner
Join condition: None

(185) Project [codegen id : 84]
Output [5]: [cs_ext_sales_price#259, cs_net_profit#260, cr_return_amount#264, cr_net_loss#265, cp_catalog_page_id#270]
Input [7]: [cs_catalog_page_sk#255, cs_ext_sales_price#259, cs_net_profit#260, cr_return_amount#264, cr_net_loss#265, cp_catalog_page_sk#269, cp_catalog_page_id#270]

(186) HashAggregate [codegen id : 84]
Input [5]: [cs_ext_sales_price#259, cs_net_profit#260, cr_return_amount#264, cr_net_loss#265, cp_catalog_page_id#270]
Keys [1]: [cp_catalog_page_id#270]
Functions [3]: [partial_sum(UnscaledValue(cs_ext_sales_price#259)), partial_sum(coalesce(cast(cr_return_amount#264 as decimal(12,2)), 0.00)), partial_sum((cs_net_profit#260 - coalesce(cast(cr_net_loss#265 as decimal(12,2)), 0.00)))]
Aggregate Attributes [5]: [sum#271, sum#272, isEmpty#273, sum#274, isEmpty#275]
Results [6]: [cp_catalog_page_id#270, sum#276, sum#277, isEmpty#278, sum#279, isEmpty#280]

(187) Exchange
Input [6]: [cp_catalog_page_id#270, sum#276, sum#277, isEmpty#278, sum#279, isEmpty#280]
Arguments: hashpartitioning(cp_catalog_page_id#270, 5), ENSURE_REQUIREMENTS, [plan_id=25]

(188) HashAggregate [codegen id : 85]
Input [6]: [cp_catalog_page_id#270, sum#276, sum#277, isEmpty#278, sum#279, isEmpty#280]
Keys [1]: [cp_catalog_page_id#270]
Functions [3]: [sum(UnscaledValue(cs_ext_sales_price#259)), sum(coalesce(cast(cr_return_amount#264 as decimal(12,2)), 0.00)), sum((cs_net_profit#260 - coalesce(cast(cr_net_loss#265 as decimal(12,2)), 0.00)))]
Aggregate Attributes [3]: [sum(UnscaledValue(cs_ext_sales_price#259))#68, sum(coalesce(cast(cr_return_amount#264 as decimal(12,2)), 0.00))#69, sum((cs_net_profit#260 - coalesce(cast(cr_net_loss#265 as decimal(12,2)), 0.00)))#70]
Results [5]: [catalog channel AS channel#281, concat(catalog_page, cp_catalog_page_id#270) AS id#282, MakeDecimal(sum(UnscaledValue(cs_ext_sales_price#259))#68,17,2) AS sales#283, sum(coalesce(cast(cr_return_amount#264 as decimal(12,2)), 0.00))#69 AS returns#284, sum((cs_net_profit#260 - coalesce(cast(cr_net_loss#265 as decimal(12,2)), 0.00)))#70 AS profit#285]

(189) ReusedExchange [Reuses operator id: 132]
Output [6]: [web_site_id#286, sum#287, sum#288, isEmpty#289, sum#290, isEmpty#291]

(190) HashAggregate [codegen id : 95]
Input [6]: [web_site_id#286, sum#287, sum#288, isEmpty#289, sum#290, isEmpty#291]
Keys [1]: [web_site_id#286]
Functions [3]: [sum(UnscaledValue(ws_ext_sales_price#292)), sum(coalesce(cast(wr_return_amt#293 as decimal(12,2)), 0.00)), sum((ws_net_profit#294 - coalesce(cast(wr_net_loss#295 as decimal(12,2)), 0.00)))]
Aggregate Attributes [3]: [sum(UnscaledValue(ws_ext_sales_price#292))#103, sum(coalesce(cast(wr_return_amt#293 as decimal(12,2)), 0.00))#104, sum((ws_net_profit#294 - coalesce(cast(wr_net_loss#295 as decimal(12,2)), 0.00)))#105]
Results [5]: [web channel AS channel#296, concat(web_site, web_site_id#286) AS id#297, MakeDecimal(sum(UnscaledValue(ws_ext_sales_price#292))#103,17,2) AS sales#298, sum(coalesce(cast(wr_return_amt#293 as decimal(12,2)), 0.00))#104 AS returns#299, sum((ws_net_profit#294 - coalesce(cast(wr_net_loss#295 as decimal(12,2)), 0.00)))#105 AS profit#300]

(191) Union

(192) HashAggregate [codegen id : 96]
Input [5]: [channel#250, id#251, sales#252, returns#253, profit#254]
Keys [2]: [channel#250, id#251]
Functions [3]: [partial_sum(sales#252), partial_sum(returns#253), partial_sum(profit#254)]
Aggregate Attributes [6]: [sum#301, isEmpty#302, sum#303, isEmpty#304, sum#305, isEmpty#306]
Results [8]: [channel#250, id#251, sum#307, isEmpty#308, sum#309, isEmpty#310, sum#311, isEmpty#312]

(193) Exchange
Input [8]: [channel#250, id#251, sum#307, isEmpty#308, sum#309, isEmpty#310, sum#311, isEmpty#312]
Arguments: hashpartitioning(channel#250, id#251, 5), ENSURE_REQUIREMENTS, [plan_id=26]

(194) HashAggregate [codegen id : 97]
Input [8]: [channel#250, id#251, sum#307, isEmpty#308, sum#309, isEmpty#310, sum#311, isEmpty#312]
Keys [2]: [channel#250, id#251]
Functions [3]: [sum(sales#252), sum(returns#253), sum(profit#254)]
Aggregate Attributes [3]: [sum(sales#252)#123, sum(returns#253)#124, sum(profit#254)#125]
Results [3]: [sum(sales#252)#123 AS sales#313, sum(returns#253)#124 AS returns#314, sum(profit#254)#125 AS profit#315]

(195) HashAggregate [codegen id : 97]
Input [3]: [sales#313, returns#314, profit#315]
Keys: []
Functions [3]: [partial_sum(sales#313), partial_sum(returns#314), partial_sum(profit#315)]
Aggregate Attributes [6]: [sum#316, isEmpty#317, sum#318, isEmpty#319, sum#320, isEmpty#321]
Results [6]: [sum#322, isEmpty#323, sum#324, isEmpty#325, sum#326, isEmpty#327]

(196) Exchange
Input [6]: [sum#322, isEmpty#323, sum#324, isEmpty#325, sum#326, isEmpty#327]
Arguments: SinglePartition, ENSURE_REQUIREMENTS, [plan_id=27]

(197) HashAggregate [codegen id : 98]
Input [6]: [sum#322, isEmpty#323, sum#324, isEmpty#325, sum#326, isEmpty#327]
Keys: []
Functions [3]: [sum(sales#313), sum(returns#314), sum(profit#315)]
Aggregate Attributes [3]: [sum(sales#313)#328, sum(returns#314)#329, sum(profit#315)#330]
Results [5]: [null AS channel#331, null AS id#332, sum(sales#313)#328 AS sales#333, sum(returns#314)#329 AS returns#334, sum(profit#315)#330 AS profit#335]

(198) Union

(199) HashAggregate [codegen id : 99]
Input [5]: [channel#36, id#37, sales#126, returns#127, profit#128]
Keys [5]: [channel#36, id#37, sales#126, returns#127, profit#128]
Functions: []
Aggregate Attributes: []
Results [5]: [channel#36, id#37, sales#126, returns#127, profit#128]

(200) Exchange
Input [5]: [channel#36, id#37, sales#126, returns#127, profit#128]
Arguments: hashpartitioning(channel#36, id#37, sales#126, returns#127, profit#128, 5), ENSURE_REQUIREMENTS, [plan_id=28]

(201) HashAggregate [codegen id : 100]
Input [5]: [channel#36, id#37, sales#126, returns#127, profit#128]
Keys [5]: [channel#36, id#37, sales#126, returns#127, profit#128]
Functions: []
Aggregate Attributes: []
Results [5]: [channel#36, id#37, sales#126, returns#127, profit#128]

(202) TakeOrderedAndProject
Input [5]: [channel#36, id#37, sales#126, returns#127, profit#128]
Arguments: 100, [channel#36 ASC NULLS FIRST, id#37 ASC NULLS FIRST], [channel#36, id#37, sales#126, returns#127, profit#128]

===== Subqueries =====

Subquery:1 Hosting operator id = 3 Hosting Expression = Subquery scalar-subquery#9, [id=#1]
ObjectHashAggregate (209)
+- Exchange (208)
   +- ObjectHashAggregate (207)
      +- * Project (206)
         +- * Filter (205)
            +- * ColumnarToRow (204)
               +- Scan parquet spark_catalog.default.item (203)


(203) Scan parquet spark_catalog.default.item
Output [2]: [i_item_sk#16, i_current_price#17]
Batched: true
Location [not included in comparison]/{warehouse_dir}/item]
PushedFilters: [IsNotNull(i_current_price), GreaterThan(i_current_price,50.00), IsNotNull(i_item_sk)]
ReadSchema: struct<i_item_sk:int,i_current_price:decimal(7,2)>

(204) ColumnarToRow [codegen id : 1]
Input [2]: [i_item_sk#16, i_current_price#17]

(205) Filter [codegen id : 1]
Input [2]: [i_item_sk#16, i_current_price#17]
Condition : ((isnotnull(i_current_price#17) AND (i_current_price#17 > 50.00)) AND isnotnull(i_item_sk#16))

(206) Project [codegen id : 1]
Output [1]: [i_item_sk#16]
Input [2]: [i_item_sk#16, i_current_price#17]

(207) ObjectHashAggregate
Input [1]: [i_item_sk#16]
Keys: []
Functions [1]: [partial_bloom_filter_agg(xxhash64(i_item_sk#16, 42), 101823, 1521109, 0, 0)]
Aggregate Attributes [1]: [buf#336]
Results [1]: [buf#337]

(208) Exchange
Input [1]: [buf#337]
Arguments: SinglePartition, ENSURE_REQUIREMENTS, [plan_id=29]

(209) ObjectHashAggregate
Input [1]: [buf#337]
Keys: []
Functions [1]: [bloom_filter_agg(xxhash64(i_item_sk#16, 42), 101823, 1521109, 0, 0)]
Aggregate Attributes [1]: [bloom_filter_agg(xxhash64(i_item_sk#16, 42), 101823, 1521109, 0, 0)#338]
Results [1]: [bloom_filter_agg(xxhash64(i_item_sk#16, 42), 101823, 1521109, 0, 0)#338 AS bloomFilter#339]

Subquery:2 Hosting operator id = 3 Hosting Expression = Subquery scalar-subquery#10, [id=#2]
ObjectHashAggregate (216)
+- Exchange (215)
   +- ObjectHashAggregate (214)
      +- * Project (213)
         +- * Filter (212)
            +- * ColumnarToRow (211)
               +- Scan parquet spark_catalog.default.promotion (210)


(210) Scan parquet spark_catalog.default.promotion
Output [2]: [p_promo_sk#18, p_channel_tv#19]
Batched: true
Location [not included in comparison]/{warehouse_dir}/promotion]
PushedFilters: [IsNotNull(p_channel_tv), EqualTo(p_channel_tv,N), IsNotNull(p_promo_sk)]
ReadSchema: struct<p_promo_sk:int,p_channel_tv:string>

(211) ColumnarToRow [codegen id : 1]
Input [2]: [p_promo_sk#18, p_channel_tv#19]

(212) Filter [codegen id : 1]
Input [2]: [p_promo_sk#18, p_channel_tv#19]
Condition : ((isnotnull(p_channel_tv#19) AND (p_channel_tv#19 = N)) AND isnotnull(p_promo_sk#18))

(213) Project [codegen id : 1]
Output [1]: [p_promo_sk#18]
Input [2]: [p_promo_sk#18, p_channel_tv#19]

(214) ObjectHashAggregate
Input [1]: [p_promo_sk#18]
Keys: []
Functions [1]: [partial_bloom_filter_agg(xxhash64(p_promo_sk#18, 42), 986, 24246, 0, 0)]
Aggregate Attributes [1]: [buf#340]
Results [1]: [buf#341]

(215) Exchange
Input [1]: [buf#341]
Arguments: SinglePartition, ENSURE_REQUIREMENTS, [plan_id=30]

(216) ObjectHashAggregate
Input [1]: [buf#341]
Keys: []
Functions [1]: [bloom_filter_agg(xxhash64(p_promo_sk#18, 42), 986, 24246, 0, 0)]
Aggregate Attributes [1]: [bloom_filter_agg(xxhash64(p_promo_sk#18, 42), 986, 24246, 0, 0)#342]
Results [1]: [bloom_filter_agg(xxhash64(p_promo_sk#18, 42), 986, 24246, 0, 0)#342 AS bloomFilter#343]

Subquery:3 Hosting operator id = 1 Hosting Expression = ss_sold_date_sk#7 IN dynamicpruning#8
BroadcastExchange (221)
+- * Project (220)
   +- * Filter (219)
      +- * ColumnarToRow (218)
         +- Scan parquet spark_catalog.default.date_dim (217)


(217) Scan parquet spark_catalog.default.date_dim
Output [2]: [d_date_sk#20, d_date#344]
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>

(218) ColumnarToRow [codegen id : 1]
Input [2]: [d_date_sk#20, d_date#344]

(219) Filter [codegen id : 1]
Input [2]: [d_date_sk#20, d_date#344]
Condition : (((isnotnull(d_date#344) AND (d_date#344 >= 1998-08-04)) AND (d_date#344 <= 1998-09-03)) AND isnotnull(d_date_sk#20))

(220) Project [codegen id : 1]
Output [1]: [d_date_sk#20]
Input [2]: [d_date_sk#20, d_date#344]

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

Subquery:4 Hosting operator id = 42 Hosting Expression = ReusedSubquery Subquery scalar-subquery#9, [id=#1]

Subquery:5 Hosting operator id = 42 Hosting Expression = ReusedSubquery Subquery scalar-subquery#10, [id=#2]

Subquery:6 Hosting operator id = 40 Hosting Expression = cs_sold_date_sk#47 IN dynamicpruning#8

Subquery:7 Hosting operator id = 73 Hosting Expression = ReusedSubquery Subquery scalar-subquery#9, [id=#1]

Subquery:8 Hosting operator id = 73 Hosting Expression = ReusedSubquery Subquery scalar-subquery#10, [id=#2]

Subquery:9 Hosting operator id = 71 Hosting Expression = ws_sold_date_sk#82 IN dynamicpruning#8

Subquery:10 Hosting operator id = 110 Hosting Expression = ws_sold_date_sk#165 IN dynamicpruning#8

Subquery:11 Hosting operator id = 141 Hosting Expression = ss_sold_date_sk#230 IN dynamicpruning#8

Subquery:12 Hosting operator id = 165 Hosting Expression = cs_sold_date_sk#261 IN dynamicpruning#8


