== Physical Plan ==
AdaptiveSparkPlan (261)
+- == Final Plan ==
   NativeTakeOrdered (166)
   +- NativeProject (165)
      +- NativeHashAggregate (164)
         +- InputAdapter (163)
            +- AQEShuffleRead (162)
               +- ShuffleQueryStage (161), Statistics(X)
                  +- NativeShuffleExchange (160)
                     +- NativeHashAggregate (159)
                        +- NativeExpand (158)
                           +- InputAdapter (157)
                              +- NativeUnion (156)
                                 :- NativeProject (49)
                                 :  +- NativeHashAggregate (48)
                                 :     +- InputAdapter (47)
                                 :        +- AQEShuffleRead (46)
                                 :           +- ShuffleQueryStage (45), Statistics(X)
                                 :              +- NativeShuffleExchange (44)
                                 :                 +- NativeHashAggregate (43)
                                 :                    +- NativeProject (42)
                                 :                       +- NativeProject (41)
                                 :                          +- NativeSortMergeJoin Inner (40)
                                 :                             :- NativeSort (31)
                                 :                             :  +- InputAdapter (30)
                                 :                             :     +- AQEShuffleRead (29)
                                 :                             :        +- ShuffleQueryStage (28), Statistics(X)
                                 :                             :           +- NativeShuffleExchange (27)
                                 :                             :              +- NativeProject (26)
                                 :                             :                 +- NativeSortMergeJoin Inner (25)
                                 :                             :                    :- NativeSort (15)
                                 :                             :                    :  +- InputAdapter (14)
                                 :                             :                    :     +- AQEShuffleRead (13)
                                 :                             :                    :        +- ShuffleQueryStage (12), Statistics(X)
                                 :                             :                    :           +- NativeShuffleExchange (11)
                                 :                             :                    :              +- InputAdapter (10)
                                 :                             :                    :                 +- NativeUnion (9)
                                 :                             :                    :                    :- NativeProject (4)
                                 :                             :                    :                    :  +- NativeFilter (3)
                                 :                             :                    :                    :     +- InputAdapter (2)
                                 :                             :                    :                    :        +- NativeParquetScan  (1)
                                 :                             :                    :                    +- NativeProject (8)
                                 :                             :                    :                       +- NativeFilter (7)
                                 :                             :                    :                          +- InputAdapter (6)
                                 :                             :                    :                             +- NativeParquetScan  (5)
                                 :                             :                    +- NativeSort (24)
                                 :                             :                       +- InputAdapter (23)
                                 :                             :                          +- AQEShuffleRead (22)
                                 :                             :                             +- ShuffleQueryStage (21), Statistics(X)
                                 :                             :                                +- NativeShuffleExchange (20)
                                 :                             :                                   +- NativeProject (19)
                                 :                             :                                      +- NativeFilter (18)
                                 :                             :                                         +- InputAdapter (17)
                                 :                             :                                            +- NativeParquetScan  (16)
                                 :                             +- NativeSort (39)
                                 :                                +- InputAdapter (38)
                                 :                                   +- AQEShuffleRead (37)
                                 :                                      +- ShuffleQueryStage (36), Statistics(X)
                                 :                                         +- NativeShuffleExchange (35)
                                 :                                            +- NativeFilter (34)
                                 :                                               +- InputAdapter (33)
                                 :                                                  +- NativeParquetScan  (32)
                                 :- NativeProject (95)
                                 :  +- NativeHashAggregate (94)
                                 :     +- InputAdapter (93)
                                 :        +- AQEShuffleRead (92)
                                 :           +- ShuffleQueryStage (91), Statistics(X)
                                 :              +- NativeShuffleExchange (90)
                                 :                 +- NativeHashAggregate (89)
                                 :                    +- NativeProject (88)
                                 :                       +- NativeProject (87)
                                 :                          +- NativeSortMergeJoin Inner (86)
                                 :                             :- NativeSort (77)
                                 :                             :  +- InputAdapter (76)
                                 :                             :     +- AQEShuffleRead (75)
                                 :                             :        +- ShuffleQueryStage (74), Statistics(X)
                                 :                             :           +- NativeShuffleExchange (73)
                                 :                             :              +- NativeProject (72)
                                 :                             :                 +- NativeSortMergeJoin Inner (71)
                                 :                             :                    :- NativeSort (64)
                                 :                             :                    :  +- InputAdapter (63)
                                 :                             :                    :     +- AQEShuffleRead (62)
                                 :                             :                    :        +- ShuffleQueryStage (61), Statistics(X)
                                 :                             :                    :           +- NativeShuffleExchange (60)
                                 :                             :                    :              +- InputAdapter (59)
                                 :                             :                    :                 +- NativeUnion (58)
                                 :                             :                    :                    :- NativeProject (53)
                                 :                             :                    :                    :  +- NativeFilter (52)
                                 :                             :                    :                    :     +- InputAdapter (51)
                                 :                             :                    :                    :        +- NativeParquetScan  (50)
                                 :                             :                    :                    +- NativeProject (57)
                                 :                             :                    :                       +- NativeFilter (56)
                                 :                             :                    :                          +- InputAdapter (55)
                                 :                             :                    :                             +- NativeParquetScan  (54)
                                 :                             :                    +- NativeSort (70)
                                 :                             :                       +- InputAdapter (69)
                                 :                             :                          +- InputAdapter (68)
                                 :                             :                             +- AQEShuffleRead (67)
                                 :                             :                                +- ShuffleQueryStage (66), Statistics(X)
                                 :                             :                                   +- ReusedExchange (65)
                                 :                             +- NativeSort (85)
                                 :                                +- InputAdapter (84)
                                 :                                   +- AQEShuffleRead (83)
                                 :                                      +- ShuffleQueryStage (82), Statistics(X)
                                 :                                         +- NativeShuffleExchange (81)
                                 :                                            +- NativeFilter (80)
                                 :                                               +- InputAdapter (79)
                                 :                                                  +- NativeParquetScan  (78)
                                 +- NativeProject (155)
                                    +- NativeHashAggregate (154)
                                       +- InputAdapter (153)
                                          +- AQEShuffleRead (152)
                                             +- ShuffleQueryStage (151), Statistics(X)
                                                +- NativeShuffleExchange (150)
                                                   +- NativeHashAggregate (149)
                                                      +- NativeProject (148)
                                                         +- NativeProject (147)
                                                            +- NativeSortMergeJoin Inner (146)
                                                               :- NativeSort (137)
                                                               :  +- InputAdapter (136)
                                                               :     +- AQEShuffleRead (135)
                                                               :        +- ShuffleQueryStage (134), Statistics(X)
                                                               :           +- NativeShuffleExchange (133)
                                                               :              +- NativeProject (132)
                                                               :                 +- NativeSortMergeJoin Inner (131)
                                                               :                    :- NativeSort (124)
                                                               :                    :  +- InputAdapter (123)
                                                               :                    :     +- AQEShuffleRead (122)
                                                               :                    :        +- ShuffleQueryStage (121), Statistics(X)
                                                               :                    :           +- NativeShuffleExchange (120)
                                                               :                    :              +- InputAdapter (119)
                                                               :                    :                 +- NativeUnion (118)
                                                               :                    :                    :- NativeProject (99)
                                                               :                    :                    :  +- NativeFilter (98)
                                                               :                    :                    :     +- InputAdapter (97)
                                                               :                    :                    :        +- NativeParquetScan  (96)
                                                               :                    :                    +- NativeProject (117)
                                                               :                    :                       +- NativeSortMergeJoin Inner (116)
                                                               :                    :                          :- NativeSort (107)
                                                               :                    :                          :  +- InputAdapter (106)
                                                               :                    :                          :     +- AQEShuffleRead (105)
                                                               :                    :                          :        +- ShuffleQueryStage (104), Statistics(X)
                                                               :                    :                          :           +- NativeShuffleExchange (103)
                                                               :                    :                          :              +- NativeFilter (102)
                                                               :                    :                          :                 +- InputAdapter (101)
                                                               :                    :                          :                    +- NativeParquetScan  (100)
                                                               :                    :                          +- NativeSort (115)
                                                               :                    :                             +- InputAdapter (114)
                                                               :                    :                                +- AQEShuffleRead (113)
                                                               :                    :                                   +- ShuffleQueryStage (112), Statistics(X)
                                                               :                    :                                      +- NativeShuffleExchange (111)
                                                               :                    :                                         +- NativeFilter (110)
                                                               :                    :                                            +- InputAdapter (109)
                                                               :                    :                                               +- NativeParquetScan  (108)
                                                               :                    +- NativeSort (130)
                                                               :                       +- InputAdapter (129)
                                                               :                          +- InputAdapter (128)
                                                               :                             +- AQEShuffleRead (127)
                                                               :                                +- ShuffleQueryStage (126), Statistics(X)
                                                               :                                   +- ReusedExchange (125)
                                                               +- NativeSort (145)
                                                                  +- InputAdapter (144)
                                                                     +- AQEShuffleRead (143)
                                                                        +- ShuffleQueryStage (142), Statistics(X)
                                                                           +- NativeShuffleExchange (141)
                                                                              +- NativeFilter (140)
                                                                                 +- InputAdapter (139)
                                                                                    +- NativeParquetScan  (138)
+- == Initial Plan ==
   TakeOrderedAndProject (260)
   +- HashAggregate (259)
      +- Exchange (258)
         +- HashAggregate (257)
            +- Expand (256)
               +- Union (255)
                  :- HashAggregate (193)
                  :  +- Exchange (192)
                  :     +- HashAggregate (191)
                  :        +- Project (190)
                  :           +- SortMergeJoin Inner (189)
                  :              :- Sort (184)
                  :              :  +- Exchange (183)
                  :              :     +- Project (182)
                  :              :        +- SortMergeJoin Inner (181)
                  :              :           :- Sort (175)
                  :              :           :  +- Exchange (174)
                  :              :           :     +- Union (173)
                  :              :           :        :- Project (169)
                  :              :           :        :  +- Filter (168)
                  :              :           :        :     +- Scan parquet (167)
                  :              :           :        +- Project (172)
                  :              :           :           +- Filter (171)
                  :              :           :              +- Scan parquet (170)
                  :              :           +- Sort (180)
                  :              :              +- Exchange (179)
                  :              :                 +- Project (178)
                  :              :                    +- Filter (177)
                  :              :                       +- Scan parquet (176)
                  :              +- Sort (188)
                  :                 +- Exchange (187)
                  :                    +- Filter (186)
                  :                       +- Scan parquet (185)
                  :- HashAggregate (220)
                  :  +- Exchange (219)
                  :     +- HashAggregate (218)
                  :        +- Project (217)
                  :           +- SortMergeJoin Inner (216)
                  :              :- Sort (211)
                  :              :  +- Exchange (210)
                  :              :     +- Project (209)
                  :              :        +- SortMergeJoin Inner (208)
                  :              :           :- Sort (202)
                  :              :           :  +- Exchange (201)
                  :              :           :     +- Union (200)
                  :              :           :        :- Project (196)
                  :              :           :        :  +- Filter (195)
                  :              :           :        :     +- Scan parquet (194)
                  :              :           :        +- Project (199)
                  :              :           :           +- Filter (198)
                  :              :           :              +- Scan parquet (197)
                  :              :           +- Sort (207)
                  :              :              +- Exchange (206)
                  :              :                 +- Project (205)
                  :              :                    +- Filter (204)
                  :              :                       +- Scan parquet (203)
                  :              +- Sort (215)
                  :                 +- Exchange (214)
                  :                    +- Filter (213)
                  :                       +- Scan parquet (212)
                  +- HashAggregate (254)
                     +- Exchange (253)
                        +- HashAggregate (252)
                           +- Project (251)
                              +- SortMergeJoin Inner (250)
                                 :- Sort (245)
                                 :  +- Exchange (244)
                                 :     +- Project (243)
                                 :        +- SortMergeJoin Inner (242)
                                 :           :- Sort (236)
                                 :           :  +- Exchange (235)
                                 :           :     +- Union (234)
                                 :           :        :- Project (223)
                                 :           :        :  +- Filter (222)
                                 :           :        :     +- Scan parquet (221)
                                 :           :        +- Project (233)
                                 :           :           +- SortMergeJoin Inner (232)
                                 :           :              :- Sort (227)
                                 :           :              :  +- Exchange (226)
                                 :           :              :     +- Filter (225)
                                 :           :              :        +- Scan parquet (224)
                                 :           :              +- Sort (231)
                                 :           :                 +- Exchange (230)
                                 :           :                    +- Filter (229)
                                 :           :                       +- Scan parquet (228)
                                 :           +- Sort (241)
                                 :              +- Exchange (240)
                                 :                 +- Project (239)
                                 :                    +- Filter (238)
                                 :                       +- Scan parquet (237)
                                 +- Sort (249)
                                    +- Exchange (248)
                                       +- Filter (247)
                                          +- Scan parquet (246)


(167) Scan parquet
Output [4]: [ss_sold_date_sk#1, ss_store_sk#2, ss_ext_sales_price#3, ss_net_profit#4]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
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) InputAdapter
Input [4]: [ss_sold_date_sk#1, ss_store_sk#2, ss_ext_sales_price#3, ss_net_profit#4]
Arguments: [#1, #2, #3, #4]

(3) NativeFilter
Input [4]: [#1#1, #2#2, #3#3, #4#4]
Condition : (isnotnull(ss_sold_date_sk#1) AND isnotnull(ss_store_sk#2))

(4) NativeProject
Output [6]: [ss_store_sk#2 AS store_sk#5, ss_sold_date_sk#1 AS date_sk#6, ss_ext_sales_price#3 AS sales_price#7, ss_net_profit#4 AS profit#8, 0.00 AS return_amt#9, 0.00 AS net_loss#10]
Input [4]: [#1#1, #2#2, #3#3, #4#4]

(170) Scan parquet
Output [4]: [sr_returned_date_sk#11, sr_store_sk#12, sr_return_amt#13, sr_net_loss#14]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(sr_returned_date_sk), IsNotNull(sr_store_sk)]
ReadSchema: struct<sr_returned_date_sk:int,sr_store_sk:int,sr_return_amt:decimal(7,2),sr_net_loss:decimal(7,2)>

(6) InputAdapter
Input [4]: [sr_returned_date_sk#11, sr_store_sk#12, sr_return_amt#13, sr_net_loss#14]
Arguments: [#11, #12, #13, #14]

(7) NativeFilter
Input [4]: [#11#11, #12#12, #13#13, #14#14]
Condition : (isnotnull(sr_returned_date_sk#11) AND isnotnull(sr_store_sk#12))

(8) NativeProject
Output [6]: [sr_store_sk#12 AS store_sk#15, sr_returned_date_sk#11 AS date_sk#16, 0.00 AS sales_price#17, 0.00 AS profit#18, sr_return_amt#13 AS return_amt#19, sr_net_loss#14 AS net_loss#20]
Input [4]: [#11#11, #12#12, #13#13, #14#14]

(9) NativeUnion
Arguments: [store_sk#5, date_sk#6, sales_price#7, profit#8, return_amt#9, net_loss#10]

(10) InputAdapter
Input [6]: [store_sk#5, date_sk#6, sales_price#7, profit#8, return_amt#9, net_loss#10]
Arguments: [#5, #6, #7, #8, #9, #10]

(11) NativeShuffleExchange
Input [6]: [#5#5, #6#6, #7#7, #8#8, #9#9, #10#10]
Arguments: hashpartitioning(date_sk#6, 100), ENSURE_REQUIREMENTS, [plan_id=1]

(12) ShuffleQueryStage
Output [6]: [#5#5, #6#6, #7#7, #8#8, #9#9, #10#10]
Arguments: X

(13) AQEShuffleRead
Input [6]: [#5#5, #6#6, #7#7, #8#8, #9#9, #10#10]
Arguments: coalesced

(14) InputAdapter
Input [6]: [#5#5, #6#6, #7#7, #8#8, #9#9, #10#10]

(15) NativeSort
Input [6]: [#5#5, #6#6, #7#7, #8#8, #9#9, #10#10]
Arguments: [date_sk#6 ASC NULLS FIRST], false

(176) Scan parquet
Output [2]: [d_date_sk#21, d_date#22]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(d_date), GreaterThanOrEqual(d_date,2000-08-23), LessThanOrEqual(d_date,2000-09-06), IsNotNull(d_date_sk)]
ReadSchema: struct<d_date_sk:int,d_date:date>

(17) InputAdapter
Input [2]: [d_date_sk#21, d_date#22]
Arguments: [#21, #22]

(18) NativeFilter
Input [2]: [#21#21, #22#22]
Condition : (((isnotnull(d_date#22) AND (d_date#22 >= 2000-08-23)) AND (d_date#22 <= 2000-09-06)) AND isnotnull(d_date_sk#21))

(19) NativeProject
Output [1]: [d_date_sk#21]
Input [2]: [#21#21, #22#22]

(20) NativeShuffleExchange
Input [1]: [d_date_sk#21]
Arguments: hashpartitioning(d_date_sk#21, 100), ENSURE_REQUIREMENTS, [plan_id=2]

(21) ShuffleQueryStage
Output [1]: [d_date_sk#21]
Arguments: X

(22) AQEShuffleRead
Input [1]: [d_date_sk#21]
Arguments: coalesced

(23) InputAdapter
Input [1]: [d_date_sk#21]

(24) NativeSort
Input [1]: [d_date_sk#21]
Arguments: [d_date_sk#21 ASC NULLS FIRST], false

(25) NativeSortMergeJoin
Left keys [1]: [date_sk#6]
Right keys [1]: [d_date_sk#21]
Join type: Inner
Join condition: None

(26) NativeProject
Output [5]: [store_sk#5, sales_price#7, profit#8, return_amt#9, net_loss#10]
Input [7]: [#5#5, #6#6, #7#7, #8#8, #9#9, #10#10, d_date_sk#21]

(27) NativeShuffleExchange
Input [5]: [store_sk#5, sales_price#7, profit#8, return_amt#9, net_loss#10]
Arguments: hashpartitioning(store_sk#5, 100), ENSURE_REQUIREMENTS, [plan_id=3]

(28) ShuffleQueryStage
Output [5]: [store_sk#5, sales_price#7, profit#8, return_amt#9, net_loss#10]
Arguments: X

(29) AQEShuffleRead
Input [5]: [store_sk#5, sales_price#7, profit#8, return_amt#9, net_loss#10]
Arguments: coalesced

(30) InputAdapter
Input [5]: [store_sk#5, sales_price#7, profit#8, return_amt#9, net_loss#10]

(31) NativeSort
Input [5]: [store_sk#5, sales_price#7, profit#8, return_amt#9, net_loss#10]
Arguments: [store_sk#5 ASC NULLS FIRST], false

(185) Scan parquet
Output [2]: [s_store_sk#23, s_store_id#24]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(s_store_sk)]
ReadSchema: struct<s_store_sk:int,s_store_id:string>

(33) InputAdapter
Input [2]: [s_store_sk#23, s_store_id#24]
Arguments: [#23, #24]

(34) NativeFilter
Input [2]: [#23#23, #24#24]
Condition : isnotnull(s_store_sk#23)

(35) NativeShuffleExchange
Input [2]: [#23#23, #24#24]
Arguments: hashpartitioning(s_store_sk#23, 100), ENSURE_REQUIREMENTS, [plan_id=4]

(36) ShuffleQueryStage
Output [2]: [#23#23, #24#24]
Arguments: X

(37) AQEShuffleRead
Input [2]: [#23#23, #24#24]
Arguments: coalesced

(38) InputAdapter
Input [2]: [#23#23, #24#24]

(39) NativeSort
Input [2]: [#23#23, #24#24]
Arguments: [s_store_sk#23 ASC NULLS FIRST], false

(40) NativeSortMergeJoin
Left keys [1]: [store_sk#5]
Right keys [1]: [s_store_sk#23]
Join type: Inner
Join condition: None

(41) NativeProject
Output [5]: [sales_price#7, profit#8, return_amt#9, net_loss#10, s_store_id#24]
Input [7]: [store_sk#5, sales_price#7, profit#8, return_amt#9, net_loss#10, #23#23, #24#24]

(42) NativeProject
Output [5]: [s_store_id#24 AS s_store_id#24, UnscaledValue(sales_price#7) AS _c1#25, UnscaledValue(return_amt#9) AS _c2#26, UnscaledValue(profit#8) AS _c3#27, UnscaledValue(net_loss#10) AS _c4#28]
Input [5]: [sales_price#7, profit#8, return_amt#9, net_loss#10, s_store_id#24]

(43) NativeHashAggregate
Input [5]: [s_store_id#24, _c1#25, _c2#26, _c3#27, _c4#28]
Keys [1]: [s_store_id#24]
Functions [4]: [partial_sum(_c1#25), partial_sum(_c2#26), partial_sum(_c3#27), partial_sum(_c4#28)]
Aggregate Attributes [4]: [sum#29, sum#30, sum#31, sum#32]
Results [5]: [s_store_id#24, #33, #33, #33, #33]

(44) NativeShuffleExchange
Input [5]: [s_store_id#24, #33, #33, #33, #33]
Arguments: hashpartitioning(s_store_id#24, 100), ENSURE_REQUIREMENTS, [plan_id=5]

(45) ShuffleQueryStage
Output [5]: [s_store_id#24, #33, #33, #33, #33]
Arguments: X

(46) AQEShuffleRead
Input [5]: [s_store_id#24, #33, #33, #33, #33]
Arguments: coalesced

(47) InputAdapter
Input [5]: [s_store_id#24, #33, #33, #33, #33]

(48) NativeHashAggregate
Input [5]: [s_store_id#24, #33, #33, #33, #33]
Keys [1]: [s_store_id#24]
Functions [4]: [sum(UnscaledValue(sales_price#7)), sum(UnscaledValue(return_amt#9)), sum(UnscaledValue(profit#8)), sum(UnscaledValue(net_loss#10))]
Aggregate Attributes [4]: [sum(UnscaledValue(sales_price#7))#34, sum(UnscaledValue(return_amt#9))#35, sum(UnscaledValue(profit#8))#36, sum(UnscaledValue(net_loss#10))#37]
Results [5]: [s_store_id#24, sum(UnscaledValue(sales_price#7))#34, sum(UnscaledValue(return_amt#9))#35, sum(UnscaledValue(profit#8))#36, sum(UnscaledValue(net_loss#10))#37]

(49) NativeProject
Output [5]: [MakeDecimal(sum(UnscaledValue(sales_price#7))#34,17,2) AS sales#38, MakeDecimal(sum(UnscaledValue(return_amt#9))#35,17,2) AS returns#39, (MakeDecimal(sum(UnscaledValue(profit#8))#36,17,2) - MakeDecimal(sum(UnscaledValue(net_loss#10))#37,17,2)) AS profit#40, store channel AS channel#41, concat(store, s_store_id#24) AS id#42]
Input [5]: [s_store_id#24, sum(UnscaledValue(sales_price#7))#34, sum(UnscaledValue(return_amt#9))#35, sum(UnscaledValue(profit#8))#36, sum(UnscaledValue(net_loss#10))#37]

(194) Scan parquet
Output [4]: [cs_sold_date_sk#43, cs_catalog_page_sk#44, cs_ext_sales_price#45, cs_net_profit#46]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(cs_sold_date_sk), IsNotNull(cs_catalog_page_sk)]
ReadSchema: struct<cs_sold_date_sk:int,cs_catalog_page_sk:int,cs_ext_sales_price:decimal(7,2),cs_net_profit:decimal(7,2)>

(51) InputAdapter
Input [4]: [cs_sold_date_sk#43, cs_catalog_page_sk#44, cs_ext_sales_price#45, cs_net_profit#46]
Arguments: [#43, #44, #45, #46]

(52) NativeFilter
Input [4]: [#43#43, #44#44, #45#45, #46#46]
Condition : (isnotnull(cs_sold_date_sk#43) AND isnotnull(cs_catalog_page_sk#44))

(53) NativeProject
Output [6]: [cs_catalog_page_sk#44 AS page_sk#47, cs_sold_date_sk#43 AS date_sk#48, cs_ext_sales_price#45 AS sales_price#49, cs_net_profit#46 AS profit#50, 0.00 AS return_amt#51, 0.00 AS net_loss#52]
Input [4]: [#43#43, #44#44, #45#45, #46#46]

(197) Scan parquet
Output [4]: [cr_returned_date_sk#53, cr_catalog_page_sk#54, cr_return_amount#55, cr_net_loss#56]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(cr_returned_date_sk), IsNotNull(cr_catalog_page_sk)]
ReadSchema: struct<cr_returned_date_sk:int,cr_catalog_page_sk:int,cr_return_amount:decimal(7,2),cr_net_loss:decimal(7,2)>

(55) InputAdapter
Input [4]: [cr_returned_date_sk#53, cr_catalog_page_sk#54, cr_return_amount#55, cr_net_loss#56]
Arguments: [#53, #54, #55, #56]

(56) NativeFilter
Input [4]: [#53#53, #54#54, #55#55, #56#56]
Condition : (isnotnull(cr_returned_date_sk#53) AND isnotnull(cr_catalog_page_sk#54))

(57) NativeProject
Output [6]: [cr_catalog_page_sk#54 AS page_sk#57, cr_returned_date_sk#53 AS date_sk#58, 0.00 AS sales_price#59, 0.00 AS profit#60, cr_return_amount#55 AS return_amt#61, cr_net_loss#56 AS net_loss#62]
Input [4]: [#53#53, #54#54, #55#55, #56#56]

(58) NativeUnion
Arguments: [page_sk#47, date_sk#48, sales_price#49, profit#50, return_amt#51, net_loss#52]

(59) InputAdapter
Input [6]: [page_sk#47, date_sk#48, sales_price#49, profit#50, return_amt#51, net_loss#52]
Arguments: [#47, #48, #49, #50, #51, #52]

(60) NativeShuffleExchange
Input [6]: [#47#47, #48#48, #49#49, #50#50, #51#51, #52#52]
Arguments: hashpartitioning(date_sk#48, 100), ENSURE_REQUIREMENTS, [plan_id=6]

(61) ShuffleQueryStage
Output [6]: [#47#47, #48#48, #49#49, #50#50, #51#51, #52#52]
Arguments: X

(62) AQEShuffleRead
Input [6]: [#47#47, #48#48, #49#49, #50#50, #51#51, #52#52]
Arguments: coalesced

(63) InputAdapter
Input [6]: [#47#47, #48#48, #49#49, #50#50, #51#51, #52#52]

(64) NativeSort
Input [6]: [#47#47, #48#48, #49#49, #50#50, #51#51, #52#52]
Arguments: [date_sk#48 ASC NULLS FIRST], false

(65) ReusedExchange [Reuses operator id: 20]
Output [1]: [d_date_sk#63]

(66) ShuffleQueryStage
Output [1]: [d_date_sk#63]
Arguments: X

(67) AQEShuffleRead
Input [1]: [d_date_sk#63]
Arguments: coalesced

(68) InputAdapter
Input [1]: [d_date_sk#63]
Arguments: [#63]

(69) InputAdapter
Input [1]: [#63#63]

(70) NativeSort
Input [1]: [#63#63]
Arguments: [d_date_sk#63 ASC NULLS FIRST], false

(71) NativeSortMergeJoin
Left keys [1]: [date_sk#48]
Right keys [1]: [d_date_sk#63]
Join type: Inner
Join condition: None

(72) NativeProject
Output [5]: [page_sk#47, sales_price#49, profit#50, return_amt#51, net_loss#52]
Input [7]: [#47#47, #48#48, #49#49, #50#50, #51#51, #52#52, #63#63]

(73) NativeShuffleExchange
Input [5]: [page_sk#47, sales_price#49, profit#50, return_amt#51, net_loss#52]
Arguments: hashpartitioning(page_sk#47, 100), ENSURE_REQUIREMENTS, [plan_id=7]

(74) ShuffleQueryStage
Output [5]: [page_sk#47, sales_price#49, profit#50, return_amt#51, net_loss#52]
Arguments: X

(75) AQEShuffleRead
Input [5]: [page_sk#47, sales_price#49, profit#50, return_amt#51, net_loss#52]
Arguments: coalesced

(76) InputAdapter
Input [5]: [page_sk#47, sales_price#49, profit#50, return_amt#51, net_loss#52]

(77) NativeSort
Input [5]: [page_sk#47, sales_price#49, profit#50, return_amt#51, net_loss#52]
Arguments: [page_sk#47 ASC NULLS FIRST], false

(212) Scan parquet
Output [2]: [cp_catalog_page_sk#64, cp_catalog_page_id#65]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(cp_catalog_page_sk)]
ReadSchema: struct<cp_catalog_page_sk:int,cp_catalog_page_id:string>

(79) InputAdapter
Input [2]: [cp_catalog_page_sk#64, cp_catalog_page_id#65]
Arguments: [#64, #65]

(80) NativeFilter
Input [2]: [#64#64, #65#65]
Condition : isnotnull(cp_catalog_page_sk#64)

(81) NativeShuffleExchange
Input [2]: [#64#64, #65#65]
Arguments: hashpartitioning(cp_catalog_page_sk#64, 100), ENSURE_REQUIREMENTS, [plan_id=8]

(82) ShuffleQueryStage
Output [2]: [#64#64, #65#65]
Arguments: X

(83) AQEShuffleRead
Input [2]: [#64#64, #65#65]
Arguments: coalesced

(84) InputAdapter
Input [2]: [#64#64, #65#65]

(85) NativeSort
Input [2]: [#64#64, #65#65]
Arguments: [cp_catalog_page_sk#64 ASC NULLS FIRST], false

(86) NativeSortMergeJoin
Left keys [1]: [page_sk#47]
Right keys [1]: [cp_catalog_page_sk#64]
Join type: Inner
Join condition: None

(87) NativeProject
Output [5]: [sales_price#49, profit#50, return_amt#51, net_loss#52, cp_catalog_page_id#65]
Input [7]: [page_sk#47, sales_price#49, profit#50, return_amt#51, net_loss#52, #64#64, #65#65]

(88) NativeProject
Output [5]: [cp_catalog_page_id#65 AS cp_catalog_page_id#65, UnscaledValue(sales_price#49) AS _c1#66, UnscaledValue(return_amt#51) AS _c2#67, UnscaledValue(profit#50) AS _c3#68, UnscaledValue(net_loss#52) AS _c4#69]
Input [5]: [sales_price#49, profit#50, return_amt#51, net_loss#52, cp_catalog_page_id#65]

(89) NativeHashAggregate
Input [5]: [cp_catalog_page_id#65, _c1#66, _c2#67, _c3#68, _c4#69]
Keys [1]: [cp_catalog_page_id#65]
Functions [4]: [partial_sum(_c1#66), partial_sum(_c2#67), partial_sum(_c3#68), partial_sum(_c4#69)]
Aggregate Attributes [4]: [sum#70, sum#71, sum#72, sum#73]
Results [5]: [cp_catalog_page_id#65, #33, #33, #33, #33]

(90) NativeShuffleExchange
Input [5]: [cp_catalog_page_id#65, #33, #33, #33, #33]
Arguments: hashpartitioning(cp_catalog_page_id#65, 100), ENSURE_REQUIREMENTS, [plan_id=9]

(91) ShuffleQueryStage
Output [5]: [cp_catalog_page_id#65, #33, #33, #33, #33]
Arguments: X

(92) AQEShuffleRead
Input [5]: [cp_catalog_page_id#65, #33, #33, #33, #33]
Arguments: coalesced

(93) InputAdapter
Input [5]: [cp_catalog_page_id#65, #33, #33, #33, #33]

(94) NativeHashAggregate
Input [5]: [cp_catalog_page_id#65, #33, #33, #33, #33]
Keys [1]: [cp_catalog_page_id#65]
Functions [4]: [sum(UnscaledValue(sales_price#49)), sum(UnscaledValue(return_amt#51)), sum(UnscaledValue(profit#50)), sum(UnscaledValue(net_loss#52))]
Aggregate Attributes [4]: [sum(UnscaledValue(sales_price#49))#74, sum(UnscaledValue(return_amt#51))#75, sum(UnscaledValue(profit#50))#76, sum(UnscaledValue(net_loss#52))#77]
Results [5]: [cp_catalog_page_id#65, sum(UnscaledValue(sales_price#49))#74, sum(UnscaledValue(return_amt#51))#75, sum(UnscaledValue(profit#50))#76, sum(UnscaledValue(net_loss#52))#77]

(95) NativeProject
Output [5]: [MakeDecimal(sum(UnscaledValue(sales_price#49))#74,17,2) AS sales#78, MakeDecimal(sum(UnscaledValue(return_amt#51))#75,17,2) AS returns#79, (MakeDecimal(sum(UnscaledValue(profit#50))#76,17,2) - MakeDecimal(sum(UnscaledValue(net_loss#52))#77,17,2)) AS profit#80, catalog channel AS channel#81, concat(catalog_page, cp_catalog_page_id#65) AS id#82]
Input [5]: [cp_catalog_page_id#65, sum(UnscaledValue(sales_price#49))#74, sum(UnscaledValue(return_amt#51))#75, sum(UnscaledValue(profit#50))#76, sum(UnscaledValue(net_loss#52))#77]

(221) Scan parquet
Output [4]: [ws_sold_date_sk#83, ws_web_site_sk#84, ws_ext_sales_price#85, ws_net_profit#86]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(ws_sold_date_sk), IsNotNull(ws_web_site_sk)]
ReadSchema: struct<ws_sold_date_sk:int,ws_web_site_sk:int,ws_ext_sales_price:decimal(7,2),ws_net_profit:decimal(7,2)>

(97) InputAdapter
Input [4]: [ws_sold_date_sk#83, ws_web_site_sk#84, ws_ext_sales_price#85, ws_net_profit#86]
Arguments: [#83, #84, #85, #86]

(98) NativeFilter
Input [4]: [#83#83, #84#84, #85#85, #86#86]
Condition : (isnotnull(ws_sold_date_sk#83) AND isnotnull(ws_web_site_sk#84))

(99) NativeProject
Output [6]: [ws_web_site_sk#84 AS wsr_web_site_sk#87, ws_sold_date_sk#83 AS date_sk#88, ws_ext_sales_price#85 AS sales_price#89, ws_net_profit#86 AS profit#90, 0.00 AS return_amt#91, 0.00 AS net_loss#92]
Input [4]: [#83#83, #84#84, #85#85, #86#86]

(224) Scan parquet
Output [5]: [wr_returned_date_sk#93, wr_item_sk#94, wr_order_number#95, wr_return_amt#96, wr_net_loss#97]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(wr_returned_date_sk)]
ReadSchema: struct<wr_returned_date_sk:int,wr_item_sk:int,wr_order_number:int,wr_return_amt:decimal(7,2),wr_net_loss:decimal(7,2)>

(101) InputAdapter
Input [5]: [wr_returned_date_sk#93, wr_item_sk#94, wr_order_number#95, wr_return_amt#96, wr_net_loss#97]
Arguments: [#93, #94, #95, #96, #97]

(102) NativeFilter
Input [5]: [#93#93, #94#94, #95#95, #96#96, #97#97]
Condition : isnotnull(wr_returned_date_sk#93)

(103) NativeShuffleExchange
Input [5]: [#93#93, #94#94, #95#95, #96#96, #97#97]
Arguments: hashpartitioning(wr_item_sk#94, wr_order_number#95, 100), ENSURE_REQUIREMENTS, [plan_id=10]

(104) ShuffleQueryStage
Output [5]: [#93#93, #94#94, #95#95, #96#96, #97#97]
Arguments: X

(105) AQEShuffleRead
Input [5]: [#93#93, #94#94, #95#95, #96#96, #97#97]
Arguments: coalesced

(106) InputAdapter
Input [5]: [#93#93, #94#94, #95#95, #96#96, #97#97]

(107) NativeSort
Input [5]: [#93#93, #94#94, #95#95, #96#96, #97#97]
Arguments: [wr_item_sk#94 ASC NULLS FIRST, wr_order_number#95 ASC NULLS FIRST], false

(228) Scan parquet
Output [3]: [ws_item_sk#98, ws_web_site_sk#99, ws_order_number#100]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(ws_item_sk), IsNotNull(ws_order_number), IsNotNull(ws_web_site_sk)]
ReadSchema: struct<ws_item_sk:int,ws_web_site_sk:int,ws_order_number:int>

(109) InputAdapter
Input [3]: [ws_item_sk#98, ws_web_site_sk#99, ws_order_number#100]
Arguments: [#98, #99, #100]

(110) NativeFilter
Input [3]: [#98#98, #99#99, #100#100]
Condition : ((isnotnull(ws_item_sk#98) AND isnotnull(ws_order_number#100)) AND isnotnull(ws_web_site_sk#99))

(111) NativeShuffleExchange
Input [3]: [#98#98, #99#99, #100#100]
Arguments: hashpartitioning(ws_item_sk#98, ws_order_number#100, 100), ENSURE_REQUIREMENTS, [plan_id=11]

(112) ShuffleQueryStage
Output [3]: [#98#98, #99#99, #100#100]
Arguments: X

(113) AQEShuffleRead
Input [3]: [#98#98, #99#99, #100#100]
Arguments: coalesced

(114) InputAdapter
Input [3]: [#98#98, #99#99, #100#100]

(115) NativeSort
Input [3]: [#98#98, #99#99, #100#100]
Arguments: [ws_item_sk#98 ASC NULLS FIRST, ws_order_number#100 ASC NULLS FIRST], false

(116) NativeSortMergeJoin
Left keys [2]: [wr_item_sk#94, wr_order_number#95]
Right keys [2]: [ws_item_sk#98, ws_order_number#100]
Join type: Inner
Join condition: None

(117) NativeProject
Output [6]: [ws_web_site_sk#99 AS wsr_web_site_sk#101, wr_returned_date_sk#93 AS date_sk#102, 0.00 AS sales_price#103, 0.00 AS profit#104, wr_return_amt#96 AS return_amt#105, wr_net_loss#97 AS net_loss#106]
Input [8]: [#93#93, #94#94, #95#95, #96#96, #97#97, #98#98, #99#99, #100#100]

(118) NativeUnion
Arguments: [wsr_web_site_sk#87, date_sk#88, sales_price#89, profit#90, return_amt#91, net_loss#92]

(119) InputAdapter
Input [6]: [wsr_web_site_sk#87, date_sk#88, sales_price#89, profit#90, return_amt#91, net_loss#92]
Arguments: [#87, #88, #89, #90, #91, #92]

(120) NativeShuffleExchange
Input [6]: [#87#87, #88#88, #89#89, #90#90, #91#91, #92#92]
Arguments: hashpartitioning(date_sk#88, 100), ENSURE_REQUIREMENTS, [plan_id=12]

(121) ShuffleQueryStage
Output [6]: [#87#87, #88#88, #89#89, #90#90, #91#91, #92#92]
Arguments: X

(122) AQEShuffleRead
Input [6]: [#87#87, #88#88, #89#89, #90#90, #91#91, #92#92]
Arguments: coalesced

(123) InputAdapter
Input [6]: [#87#87, #88#88, #89#89, #90#90, #91#91, #92#92]

(124) NativeSort
Input [6]: [#87#87, #88#88, #89#89, #90#90, #91#91, #92#92]
Arguments: [date_sk#88 ASC NULLS FIRST], false

(125) ReusedExchange [Reuses operator id: 20]
Output [1]: [d_date_sk#107]

(126) ShuffleQueryStage
Output [1]: [d_date_sk#107]
Arguments: X

(127) AQEShuffleRead
Input [1]: [d_date_sk#107]
Arguments: coalesced

(128) InputAdapter
Input [1]: [d_date_sk#107]
Arguments: [#107]

(129) InputAdapter
Input [1]: [#107#107]

(130) NativeSort
Input [1]: [#107#107]
Arguments: [d_date_sk#107 ASC NULLS FIRST], false

(131) NativeSortMergeJoin
Left keys [1]: [date_sk#88]
Right keys [1]: [d_date_sk#107]
Join type: Inner
Join condition: None

(132) NativeProject
Output [5]: [wsr_web_site_sk#87, sales_price#89, profit#90, return_amt#91, net_loss#92]
Input [7]: [#87#87, #88#88, #89#89, #90#90, #91#91, #92#92, #107#107]

(133) NativeShuffleExchange
Input [5]: [wsr_web_site_sk#87, sales_price#89, profit#90, return_amt#91, net_loss#92]
Arguments: hashpartitioning(wsr_web_site_sk#87, 100), ENSURE_REQUIREMENTS, [plan_id=13]

(134) ShuffleQueryStage
Output [5]: [wsr_web_site_sk#87, sales_price#89, profit#90, return_amt#91, net_loss#92]
Arguments: X

(135) AQEShuffleRead
Input [5]: [wsr_web_site_sk#87, sales_price#89, profit#90, return_amt#91, net_loss#92]
Arguments: coalesced

(136) InputAdapter
Input [5]: [wsr_web_site_sk#87, sales_price#89, profit#90, return_amt#91, net_loss#92]

(137) NativeSort
Input [5]: [wsr_web_site_sk#87, sales_price#89, profit#90, return_amt#91, net_loss#92]
Arguments: [wsr_web_site_sk#87 ASC NULLS FIRST], false

(246) Scan parquet
Output [2]: [web_site_sk#108, web_site_id#109]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(web_site_sk)]
ReadSchema: struct<web_site_sk:int,web_site_id:string>

(139) InputAdapter
Input [2]: [web_site_sk#108, web_site_id#109]
Arguments: [#108, #109]

(140) NativeFilter
Input [2]: [#108#108, #109#109]
Condition : isnotnull(web_site_sk#108)

(141) NativeShuffleExchange
Input [2]: [#108#108, #109#109]
Arguments: hashpartitioning(web_site_sk#108, 100), ENSURE_REQUIREMENTS, [plan_id=14]

(142) ShuffleQueryStage
Output [2]: [#108#108, #109#109]
Arguments: X

(143) AQEShuffleRead
Input [2]: [#108#108, #109#109]
Arguments: coalesced

(144) InputAdapter
Input [2]: [#108#108, #109#109]

(145) NativeSort
Input [2]: [#108#108, #109#109]
Arguments: [web_site_sk#108 ASC NULLS FIRST], false

(146) NativeSortMergeJoin
Left keys [1]: [wsr_web_site_sk#87]
Right keys [1]: [web_site_sk#108]
Join type: Inner
Join condition: None

(147) NativeProject
Output [5]: [sales_price#89, profit#90, return_amt#91, net_loss#92, web_site_id#109]
Input [7]: [wsr_web_site_sk#87, sales_price#89, profit#90, return_amt#91, net_loss#92, #108#108, #109#109]

(148) NativeProject
Output [5]: [web_site_id#109 AS web_site_id#109, UnscaledValue(sales_price#89) AS _c1#110, UnscaledValue(return_amt#91) AS _c2#111, UnscaledValue(profit#90) AS _c3#112, UnscaledValue(net_loss#92) AS _c4#113]
Input [5]: [sales_price#89, profit#90, return_amt#91, net_loss#92, web_site_id#109]

(149) NativeHashAggregate
Input [5]: [web_site_id#109, _c1#110, _c2#111, _c3#112, _c4#113]
Keys [1]: [web_site_id#109]
Functions [4]: [partial_sum(_c1#110), partial_sum(_c2#111), partial_sum(_c3#112), partial_sum(_c4#113)]
Aggregate Attributes [4]: [sum#114, sum#115, sum#116, sum#117]
Results [5]: [web_site_id#109, #33, #33, #33, #33]

(150) NativeShuffleExchange
Input [5]: [web_site_id#109, #33, #33, #33, #33]
Arguments: hashpartitioning(web_site_id#109, 100), ENSURE_REQUIREMENTS, [plan_id=15]

(151) ShuffleQueryStage
Output [5]: [web_site_id#109, #33, #33, #33, #33]
Arguments: X

(152) AQEShuffleRead
Input [5]: [web_site_id#109, #33, #33, #33, #33]
Arguments: coalesced

(153) InputAdapter
Input [5]: [web_site_id#109, #33, #33, #33, #33]

(154) NativeHashAggregate
Input [5]: [web_site_id#109, #33, #33, #33, #33]
Keys [1]: [web_site_id#109]
Functions [4]: [sum(UnscaledValue(sales_price#89)), sum(UnscaledValue(return_amt#91)), sum(UnscaledValue(profit#90)), sum(UnscaledValue(net_loss#92))]
Aggregate Attributes [4]: [sum(UnscaledValue(sales_price#89))#118, sum(UnscaledValue(return_amt#91))#119, sum(UnscaledValue(profit#90))#120, sum(UnscaledValue(net_loss#92))#121]
Results [5]: [web_site_id#109, sum(UnscaledValue(sales_price#89))#118, sum(UnscaledValue(return_amt#91))#119, sum(UnscaledValue(profit#90))#120, sum(UnscaledValue(net_loss#92))#121]

(155) NativeProject
Output [5]: [MakeDecimal(sum(UnscaledValue(sales_price#89))#118,17,2) AS sales#122, MakeDecimal(sum(UnscaledValue(return_amt#91))#119,17,2) AS returns#123, (MakeDecimal(sum(UnscaledValue(profit#90))#120,17,2) - MakeDecimal(sum(UnscaledValue(net_loss#92))#121,17,2)) AS profit#124, web channel AS channel#125, concat(web_site, web_site_id#109) AS id#126]
Input [5]: [web_site_id#109, sum(UnscaledValue(sales_price#89))#118, sum(UnscaledValue(return_amt#91))#119, sum(UnscaledValue(profit#90))#120, sum(UnscaledValue(net_loss#92))#121]

(156) NativeUnion
Arguments: [sales#38, returns#39, profit#40, channel#41, id#42]

(157) InputAdapter
Input [5]: [sales#38, returns#39, profit#40, channel#41, id#42]
Arguments: [#38, #39, #40, #41, #42]

(158) NativeExpand
Input [5]: [#38#38, #39#39, #40#40, #41#41, #42#42]
Arguments: [[sales#38, returns#39, profit#40, channel#41, id#42, 0], [sales#38, returns#39, profit#40, channel#41, null, 1], [sales#38, returns#39, profit#40, null, null, 3]], [sales#38, returns#39, profit#40, channel#127, id#128, spark_grouping_id#129]

(159) NativeHashAggregate
Input [6]: [sales#38, returns#39, profit#40, channel#127, id#128, spark_grouping_id#129]
Keys [3]: [channel#127, id#128, spark_grouping_id#129]
Functions [3]: [partial_sum(sales#38), partial_sum(returns#39), partial_sum(profit#40)]
Aggregate Attributes [6]: [sum#130, isEmpty#131, sum#132, isEmpty#133, sum#134, isEmpty#135]
Results [6]: [channel#127, id#128, spark_grouping_id#129, #64, #64, #64]

(160) NativeShuffleExchange
Input [6]: [channel#127, id#128, spark_grouping_id#129, #64, #64, #64]
Arguments: hashpartitioning(channel#127, id#128, spark_grouping_id#129, 100), ENSURE_REQUIREMENTS, [plan_id=16]

(161) ShuffleQueryStage
Output [6]: [channel#127, id#128, spark_grouping_id#129, #64, #64, #64]
Arguments: X

(162) AQEShuffleRead
Input [6]: [channel#127, id#128, spark_grouping_id#129, #64, #64, #64]
Arguments: coalesced

(163) InputAdapter
Input [6]: [channel#127, id#128, spark_grouping_id#129, #64, #64, #64]

(164) NativeHashAggregate
Input [6]: [channel#127, id#128, spark_grouping_id#129, #64, #64, #64]
Keys [3]: [channel#127, id#128, spark_grouping_id#129]
Functions [3]: [sum(sales#38), sum(returns#39), sum(profit#40)]
Aggregate Attributes [3]: [sum(sales#38)#136, sum(returns#39)#137, sum(profit#40)#138]
Results [6]: [channel#127, id#128, spark_grouping_id#129, sum(sales#38)#136, sum(returns#39)#137, sum(profit#40)#138]

(165) NativeProject
Output [5]: [channel#127, id#128, sum(sales#38)#136 AS sales#139, sum(returns#39)#137 AS returns#140, sum(profit#40)#138 AS profit#141]
Input [6]: [channel#127, id#128, spark_grouping_id#129, sum(sales#38)#136, sum(returns#39)#137, sum(profit#40)#138]

(166) NativeTakeOrdered
Input [5]: [channel#127, id#128, sales#139, returns#140, profit#141]
Arguments: X, X, [channel#127 ASC NULLS FIRST, id#128 ASC NULLS FIRST]

(167) Scan parquet
Output [4]: [ss_sold_date_sk#1, ss_store_sk#2, ss_ext_sales_price#3, ss_net_profit#4]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
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)>

(168) Filter
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))

(169) Project
Output [6]: [ss_store_sk#2 AS store_sk#5, ss_sold_date_sk#1 AS date_sk#6, ss_ext_sales_price#3 AS sales_price#7, ss_net_profit#4 AS profit#8, 0.00 AS return_amt#9, 0.00 AS net_loss#10]
Input [4]: [ss_sold_date_sk#1, ss_store_sk#2, ss_ext_sales_price#3, ss_net_profit#4]

(170) Scan parquet
Output [4]: [sr_returned_date_sk#11, sr_store_sk#12, sr_return_amt#13, sr_net_loss#14]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(sr_returned_date_sk), IsNotNull(sr_store_sk)]
ReadSchema: struct<sr_returned_date_sk:int,sr_store_sk:int,sr_return_amt:decimal(7,2),sr_net_loss:decimal(7,2)>

(171) Filter
Input [4]: [sr_returned_date_sk#11, sr_store_sk#12, sr_return_amt#13, sr_net_loss#14]
Condition : (isnotnull(sr_returned_date_sk#11) AND isnotnull(sr_store_sk#12))

(172) Project
Output [6]: [sr_store_sk#12 AS store_sk#15, sr_returned_date_sk#11 AS date_sk#16, 0.00 AS sales_price#17, 0.00 AS profit#18, sr_return_amt#13 AS return_amt#19, sr_net_loss#14 AS net_loss#20]
Input [4]: [sr_returned_date_sk#11, sr_store_sk#12, sr_return_amt#13, sr_net_loss#14]

(173) Union

(174) Exchange
Input [6]: [store_sk#5, date_sk#6, sales_price#7, profit#8, return_amt#9, net_loss#10]
Arguments: hashpartitioning(date_sk#6, 100), ENSURE_REQUIREMENTS, [plan_id=17]

(175) Sort
Input [6]: [store_sk#5, date_sk#6, sales_price#7, profit#8, return_amt#9, net_loss#10]
Arguments: [date_sk#6 ASC NULLS FIRST], false, 0

(176) Scan parquet
Output [2]: [d_date_sk#21, d_date#22]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(d_date), GreaterThanOrEqual(d_date,2000-08-23), LessThanOrEqual(d_date,2000-09-06), IsNotNull(d_date_sk)]
ReadSchema: struct<d_date_sk:int,d_date:date>

(177) Filter
Input [2]: [d_date_sk#21, d_date#22]
Condition : (((isnotnull(d_date#22) AND (d_date#22 >= 2000-08-23)) AND (d_date#22 <= 2000-09-06)) AND isnotnull(d_date_sk#21))

(178) Project
Output [1]: [d_date_sk#21]
Input [2]: [d_date_sk#21, d_date#22]

(179) Exchange
Input [1]: [d_date_sk#21]
Arguments: hashpartitioning(d_date_sk#21, 100), ENSURE_REQUIREMENTS, [plan_id=18]

(180) Sort
Input [1]: [d_date_sk#21]
Arguments: [d_date_sk#21 ASC NULLS FIRST], false, 0

(181) SortMergeJoin
Left keys [1]: [date_sk#6]
Right keys [1]: [d_date_sk#21]
Join type: Inner
Join condition: None

(182) Project
Output [5]: [store_sk#5, sales_price#7, profit#8, return_amt#9, net_loss#10]
Input [7]: [store_sk#5, date_sk#6, sales_price#7, profit#8, return_amt#9, net_loss#10, d_date_sk#21]

(183) Exchange
Input [5]: [store_sk#5, sales_price#7, profit#8, return_amt#9, net_loss#10]
Arguments: hashpartitioning(store_sk#5, 100), ENSURE_REQUIREMENTS, [plan_id=19]

(184) Sort
Input [5]: [store_sk#5, sales_price#7, profit#8, return_amt#9, net_loss#10]
Arguments: [store_sk#5 ASC NULLS FIRST], false, 0

(185) Scan parquet
Output [2]: [s_store_sk#23, s_store_id#24]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(s_store_sk)]
ReadSchema: struct<s_store_sk:int,s_store_id:string>

(186) Filter
Input [2]: [s_store_sk#23, s_store_id#24]
Condition : isnotnull(s_store_sk#23)

(187) Exchange
Input [2]: [s_store_sk#23, s_store_id#24]
Arguments: hashpartitioning(s_store_sk#23, 100), ENSURE_REQUIREMENTS, [plan_id=20]

(188) Sort
Input [2]: [s_store_sk#23, s_store_id#24]
Arguments: [s_store_sk#23 ASC NULLS FIRST], false, 0

(189) SortMergeJoin
Left keys [1]: [store_sk#5]
Right keys [1]: [s_store_sk#23]
Join type: Inner
Join condition: None

(190) Project
Output [5]: [sales_price#7, profit#8, return_amt#9, net_loss#10, s_store_id#24]
Input [7]: [store_sk#5, sales_price#7, profit#8, return_amt#9, net_loss#10, s_store_sk#23, s_store_id#24]

(191) HashAggregate
Input [5]: [sales_price#7, profit#8, return_amt#9, net_loss#10, s_store_id#24]
Keys [1]: [s_store_id#24]
Functions [4]: [partial_sum(UnscaledValue(sales_price#7)), partial_sum(UnscaledValue(return_amt#9)), partial_sum(UnscaledValue(profit#8)), partial_sum(UnscaledValue(net_loss#10))]
Aggregate Attributes [4]: [sum#29, sum#30, sum#31, sum#32]
Results [5]: [s_store_id#24, sum#142, sum#143, sum#144, sum#145]

(192) Exchange
Input [5]: [s_store_id#24, sum#142, sum#143, sum#144, sum#145]
Arguments: hashpartitioning(s_store_id#24, 100), ENSURE_REQUIREMENTS, [plan_id=21]

(193) HashAggregate
Input [5]: [s_store_id#24, sum#142, sum#143, sum#144, sum#145]
Keys [1]: [s_store_id#24]
Functions [4]: [sum(UnscaledValue(sales_price#7)), sum(UnscaledValue(return_amt#9)), sum(UnscaledValue(profit#8)), sum(UnscaledValue(net_loss#10))]
Aggregate Attributes [4]: [sum(UnscaledValue(sales_price#7))#34, sum(UnscaledValue(return_amt#9))#35, sum(UnscaledValue(profit#8))#36, sum(UnscaledValue(net_loss#10))#37]
Results [5]: [MakeDecimal(sum(UnscaledValue(sales_price#7))#34,17,2) AS sales#38, MakeDecimal(sum(UnscaledValue(return_amt#9))#35,17,2) AS returns#39, (MakeDecimal(sum(UnscaledValue(profit#8))#36,17,2) - MakeDecimal(sum(UnscaledValue(net_loss#10))#37,17,2)) AS profit#40, store channel AS channel#41, concat(store, s_store_id#24) AS id#42]

(194) Scan parquet
Output [4]: [cs_sold_date_sk#43, cs_catalog_page_sk#44, cs_ext_sales_price#45, cs_net_profit#46]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(cs_sold_date_sk), IsNotNull(cs_catalog_page_sk)]
ReadSchema: struct<cs_sold_date_sk:int,cs_catalog_page_sk:int,cs_ext_sales_price:decimal(7,2),cs_net_profit:decimal(7,2)>

(195) Filter
Input [4]: [cs_sold_date_sk#43, cs_catalog_page_sk#44, cs_ext_sales_price#45, cs_net_profit#46]
Condition : (isnotnull(cs_sold_date_sk#43) AND isnotnull(cs_catalog_page_sk#44))

(196) Project
Output [6]: [cs_catalog_page_sk#44 AS page_sk#47, cs_sold_date_sk#43 AS date_sk#48, cs_ext_sales_price#45 AS sales_price#49, cs_net_profit#46 AS profit#50, 0.00 AS return_amt#51, 0.00 AS net_loss#52]
Input [4]: [cs_sold_date_sk#43, cs_catalog_page_sk#44, cs_ext_sales_price#45, cs_net_profit#46]

(197) Scan parquet
Output [4]: [cr_returned_date_sk#53, cr_catalog_page_sk#54, cr_return_amount#55, cr_net_loss#56]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(cr_returned_date_sk), IsNotNull(cr_catalog_page_sk)]
ReadSchema: struct<cr_returned_date_sk:int,cr_catalog_page_sk:int,cr_return_amount:decimal(7,2),cr_net_loss:decimal(7,2)>

(198) Filter
Input [4]: [cr_returned_date_sk#53, cr_catalog_page_sk#54, cr_return_amount#55, cr_net_loss#56]
Condition : (isnotnull(cr_returned_date_sk#53) AND isnotnull(cr_catalog_page_sk#54))

(199) Project
Output [6]: [cr_catalog_page_sk#54 AS page_sk#57, cr_returned_date_sk#53 AS date_sk#58, 0.00 AS sales_price#59, 0.00 AS profit#60, cr_return_amount#55 AS return_amt#61, cr_net_loss#56 AS net_loss#62]
Input [4]: [cr_returned_date_sk#53, cr_catalog_page_sk#54, cr_return_amount#55, cr_net_loss#56]

(200) Union

(201) Exchange
Input [6]: [page_sk#47, date_sk#48, sales_price#49, profit#50, return_amt#51, net_loss#52]
Arguments: hashpartitioning(date_sk#48, 100), ENSURE_REQUIREMENTS, [plan_id=22]

(202) Sort
Input [6]: [page_sk#47, date_sk#48, sales_price#49, profit#50, return_amt#51, net_loss#52]
Arguments: [date_sk#48 ASC NULLS FIRST], false, 0

(203) Scan parquet
Output [2]: [d_date_sk#63, d_date#146]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(d_date), GreaterThanOrEqual(d_date,2000-08-23), LessThanOrEqual(d_date,2000-09-06), IsNotNull(d_date_sk)]
ReadSchema: struct<d_date_sk:int,d_date:date>

(204) Filter
Input [2]: [d_date_sk#63, d_date#146]
Condition : (((isnotnull(d_date#146) AND (d_date#146 >= 2000-08-23)) AND (d_date#146 <= 2000-09-06)) AND isnotnull(d_date_sk#63))

(205) Project
Output [1]: [d_date_sk#63]
Input [2]: [d_date_sk#63, d_date#146]

(206) Exchange
Input [1]: [d_date_sk#63]
Arguments: hashpartitioning(d_date_sk#63, 100), ENSURE_REQUIREMENTS, [plan_id=23]

(207) Sort
Input [1]: [d_date_sk#63]
Arguments: [d_date_sk#63 ASC NULLS FIRST], false, 0

(208) SortMergeJoin
Left keys [1]: [date_sk#48]
Right keys [1]: [d_date_sk#63]
Join type: Inner
Join condition: None

(209) Project
Output [5]: [page_sk#47, sales_price#49, profit#50, return_amt#51, net_loss#52]
Input [7]: [page_sk#47, date_sk#48, sales_price#49, profit#50, return_amt#51, net_loss#52, d_date_sk#63]

(210) Exchange
Input [5]: [page_sk#47, sales_price#49, profit#50, return_amt#51, net_loss#52]
Arguments: hashpartitioning(page_sk#47, 100), ENSURE_REQUIREMENTS, [plan_id=24]

(211) Sort
Input [5]: [page_sk#47, sales_price#49, profit#50, return_amt#51, net_loss#52]
Arguments: [page_sk#47 ASC NULLS FIRST], false, 0

(212) Scan parquet
Output [2]: [cp_catalog_page_sk#64, cp_catalog_page_id#65]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(cp_catalog_page_sk)]
ReadSchema: struct<cp_catalog_page_sk:int,cp_catalog_page_id:string>

(213) Filter
Input [2]: [cp_catalog_page_sk#64, cp_catalog_page_id#65]
Condition : isnotnull(cp_catalog_page_sk#64)

(214) Exchange
Input [2]: [cp_catalog_page_sk#64, cp_catalog_page_id#65]
Arguments: hashpartitioning(cp_catalog_page_sk#64, 100), ENSURE_REQUIREMENTS, [plan_id=25]

(215) Sort
Input [2]: [cp_catalog_page_sk#64, cp_catalog_page_id#65]
Arguments: [cp_catalog_page_sk#64 ASC NULLS FIRST], false, 0

(216) SortMergeJoin
Left keys [1]: [page_sk#47]
Right keys [1]: [cp_catalog_page_sk#64]
Join type: Inner
Join condition: None

(217) Project
Output [5]: [sales_price#49, profit#50, return_amt#51, net_loss#52, cp_catalog_page_id#65]
Input [7]: [page_sk#47, sales_price#49, profit#50, return_amt#51, net_loss#52, cp_catalog_page_sk#64, cp_catalog_page_id#65]

(218) HashAggregate
Input [5]: [sales_price#49, profit#50, return_amt#51, net_loss#52, cp_catalog_page_id#65]
Keys [1]: [cp_catalog_page_id#65]
Functions [4]: [partial_sum(UnscaledValue(sales_price#49)), partial_sum(UnscaledValue(return_amt#51)), partial_sum(UnscaledValue(profit#50)), partial_sum(UnscaledValue(net_loss#52))]
Aggregate Attributes [4]: [sum#70, sum#71, sum#72, sum#73]
Results [5]: [cp_catalog_page_id#65, sum#147, sum#148, sum#149, sum#150]

(219) Exchange
Input [5]: [cp_catalog_page_id#65, sum#147, sum#148, sum#149, sum#150]
Arguments: hashpartitioning(cp_catalog_page_id#65, 100), ENSURE_REQUIREMENTS, [plan_id=26]

(220) HashAggregate
Input [5]: [cp_catalog_page_id#65, sum#147, sum#148, sum#149, sum#150]
Keys [1]: [cp_catalog_page_id#65]
Functions [4]: [sum(UnscaledValue(sales_price#49)), sum(UnscaledValue(return_amt#51)), sum(UnscaledValue(profit#50)), sum(UnscaledValue(net_loss#52))]
Aggregate Attributes [4]: [sum(UnscaledValue(sales_price#49))#74, sum(UnscaledValue(return_amt#51))#75, sum(UnscaledValue(profit#50))#76, sum(UnscaledValue(net_loss#52))#77]
Results [5]: [MakeDecimal(sum(UnscaledValue(sales_price#49))#74,17,2) AS sales#78, MakeDecimal(sum(UnscaledValue(return_amt#51))#75,17,2) AS returns#79, (MakeDecimal(sum(UnscaledValue(profit#50))#76,17,2) - MakeDecimal(sum(UnscaledValue(net_loss#52))#77,17,2)) AS profit#80, catalog channel AS channel#81, concat(catalog_page, cp_catalog_page_id#65) AS id#82]

(221) Scan parquet
Output [4]: [ws_sold_date_sk#83, ws_web_site_sk#84, ws_ext_sales_price#85, ws_net_profit#86]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(ws_sold_date_sk), IsNotNull(ws_web_site_sk)]
ReadSchema: struct<ws_sold_date_sk:int,ws_web_site_sk:int,ws_ext_sales_price:decimal(7,2),ws_net_profit:decimal(7,2)>

(222) Filter
Input [4]: [ws_sold_date_sk#83, ws_web_site_sk#84, ws_ext_sales_price#85, ws_net_profit#86]
Condition : (isnotnull(ws_sold_date_sk#83) AND isnotnull(ws_web_site_sk#84))

(223) Project
Output [6]: [ws_web_site_sk#84 AS wsr_web_site_sk#87, ws_sold_date_sk#83 AS date_sk#88, ws_ext_sales_price#85 AS sales_price#89, ws_net_profit#86 AS profit#90, 0.00 AS return_amt#91, 0.00 AS net_loss#92]
Input [4]: [ws_sold_date_sk#83, ws_web_site_sk#84, ws_ext_sales_price#85, ws_net_profit#86]

(224) Scan parquet
Output [5]: [wr_returned_date_sk#93, wr_item_sk#94, wr_order_number#95, wr_return_amt#96, wr_net_loss#97]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(wr_returned_date_sk)]
ReadSchema: struct<wr_returned_date_sk:int,wr_item_sk:int,wr_order_number:int,wr_return_amt:decimal(7,2),wr_net_loss:decimal(7,2)>

(225) Filter
Input [5]: [wr_returned_date_sk#93, wr_item_sk#94, wr_order_number#95, wr_return_amt#96, wr_net_loss#97]
Condition : isnotnull(wr_returned_date_sk#93)

(226) Exchange
Input [5]: [wr_returned_date_sk#93, wr_item_sk#94, wr_order_number#95, wr_return_amt#96, wr_net_loss#97]
Arguments: hashpartitioning(wr_item_sk#94, wr_order_number#95, 100), ENSURE_REQUIREMENTS, [plan_id=27]

(227) Sort
Input [5]: [wr_returned_date_sk#93, wr_item_sk#94, wr_order_number#95, wr_return_amt#96, wr_net_loss#97]
Arguments: [wr_item_sk#94 ASC NULLS FIRST, wr_order_number#95 ASC NULLS FIRST], false, 0

(228) Scan parquet
Output [3]: [ws_item_sk#98, ws_web_site_sk#99, ws_order_number#100]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(ws_item_sk), IsNotNull(ws_order_number), IsNotNull(ws_web_site_sk)]
ReadSchema: struct<ws_item_sk:int,ws_web_site_sk:int,ws_order_number:int>

(229) Filter
Input [3]: [ws_item_sk#98, ws_web_site_sk#99, ws_order_number#100]
Condition : ((isnotnull(ws_item_sk#98) AND isnotnull(ws_order_number#100)) AND isnotnull(ws_web_site_sk#99))

(230) Exchange
Input [3]: [ws_item_sk#98, ws_web_site_sk#99, ws_order_number#100]
Arguments: hashpartitioning(ws_item_sk#98, ws_order_number#100, 100), ENSURE_REQUIREMENTS, [plan_id=28]

(231) Sort
Input [3]: [ws_item_sk#98, ws_web_site_sk#99, ws_order_number#100]
Arguments: [ws_item_sk#98 ASC NULLS FIRST, ws_order_number#100 ASC NULLS FIRST], false, 0

(232) SortMergeJoin
Left keys [2]: [wr_item_sk#94, wr_order_number#95]
Right keys [2]: [ws_item_sk#98, ws_order_number#100]
Join type: Inner
Join condition: None

(233) Project
Output [6]: [ws_web_site_sk#99 AS wsr_web_site_sk#101, wr_returned_date_sk#93 AS date_sk#102, 0.00 AS sales_price#103, 0.00 AS profit#104, wr_return_amt#96 AS return_amt#105, wr_net_loss#97 AS net_loss#106]
Input [8]: [wr_returned_date_sk#93, wr_item_sk#94, wr_order_number#95, wr_return_amt#96, wr_net_loss#97, ws_item_sk#98, ws_web_site_sk#99, ws_order_number#100]

(234) Union

(235) Exchange
Input [6]: [wsr_web_site_sk#87, date_sk#88, sales_price#89, profit#90, return_amt#91, net_loss#92]
Arguments: hashpartitioning(date_sk#88, 100), ENSURE_REQUIREMENTS, [plan_id=29]

(236) Sort
Input [6]: [wsr_web_site_sk#87, date_sk#88, sales_price#89, profit#90, return_amt#91, net_loss#92]
Arguments: [date_sk#88 ASC NULLS FIRST], false, 0

(237) Scan parquet
Output [2]: [d_date_sk#107, d_date#151]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(d_date), GreaterThanOrEqual(d_date,2000-08-23), LessThanOrEqual(d_date,2000-09-06), IsNotNull(d_date_sk)]
ReadSchema: struct<d_date_sk:int,d_date:date>

(238) Filter
Input [2]: [d_date_sk#107, d_date#151]
Condition : (((isnotnull(d_date#151) AND (d_date#151 >= 2000-08-23)) AND (d_date#151 <= 2000-09-06)) AND isnotnull(d_date_sk#107))

(239) Project
Output [1]: [d_date_sk#107]
Input [2]: [d_date_sk#107, d_date#151]

(240) Exchange
Input [1]: [d_date_sk#107]
Arguments: hashpartitioning(d_date_sk#107, 100), ENSURE_REQUIREMENTS, [plan_id=30]

(241) Sort
Input [1]: [d_date_sk#107]
Arguments: [d_date_sk#107 ASC NULLS FIRST], false, 0

(242) SortMergeJoin
Left keys [1]: [date_sk#88]
Right keys [1]: [d_date_sk#107]
Join type: Inner
Join condition: None

(243) Project
Output [5]: [wsr_web_site_sk#87, sales_price#89, profit#90, return_amt#91, net_loss#92]
Input [7]: [wsr_web_site_sk#87, date_sk#88, sales_price#89, profit#90, return_amt#91, net_loss#92, d_date_sk#107]

(244) Exchange
Input [5]: [wsr_web_site_sk#87, sales_price#89, profit#90, return_amt#91, net_loss#92]
Arguments: hashpartitioning(wsr_web_site_sk#87, 100), ENSURE_REQUIREMENTS, [plan_id=31]

(245) Sort
Input [5]: [wsr_web_site_sk#87, sales_price#89, profit#90, return_amt#91, net_loss#92]
Arguments: [wsr_web_site_sk#87 ASC NULLS FIRST], false, 0

(246) Scan parquet
Output [2]: [web_site_sk#108, web_site_id#109]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(web_site_sk)]
ReadSchema: struct<web_site_sk:int,web_site_id:string>

(247) Filter
Input [2]: [web_site_sk#108, web_site_id#109]
Condition : isnotnull(web_site_sk#108)

(248) Exchange
Input [2]: [web_site_sk#108, web_site_id#109]
Arguments: hashpartitioning(web_site_sk#108, 100), ENSURE_REQUIREMENTS, [plan_id=32]

(249) Sort
Input [2]: [web_site_sk#108, web_site_id#109]
Arguments: [web_site_sk#108 ASC NULLS FIRST], false, 0

(250) SortMergeJoin
Left keys [1]: [wsr_web_site_sk#87]
Right keys [1]: [web_site_sk#108]
Join type: Inner
Join condition: None

(251) Project
Output [5]: [sales_price#89, profit#90, return_amt#91, net_loss#92, web_site_id#109]
Input [7]: [wsr_web_site_sk#87, sales_price#89, profit#90, return_amt#91, net_loss#92, web_site_sk#108, web_site_id#109]

(252) HashAggregate
Input [5]: [sales_price#89, profit#90, return_amt#91, net_loss#92, web_site_id#109]
Keys [1]: [web_site_id#109]
Functions [4]: [partial_sum(UnscaledValue(sales_price#89)), partial_sum(UnscaledValue(return_amt#91)), partial_sum(UnscaledValue(profit#90)), partial_sum(UnscaledValue(net_loss#92))]
Aggregate Attributes [4]: [sum#114, sum#115, sum#116, sum#117]
Results [5]: [web_site_id#109, sum#152, sum#153, sum#154, sum#155]

(253) Exchange
Input [5]: [web_site_id#109, sum#152, sum#153, sum#154, sum#155]
Arguments: hashpartitioning(web_site_id#109, 100), ENSURE_REQUIREMENTS, [plan_id=33]

(254) HashAggregate
Input [5]: [web_site_id#109, sum#152, sum#153, sum#154, sum#155]
Keys [1]: [web_site_id#109]
Functions [4]: [sum(UnscaledValue(sales_price#89)), sum(UnscaledValue(return_amt#91)), sum(UnscaledValue(profit#90)), sum(UnscaledValue(net_loss#92))]
Aggregate Attributes [4]: [sum(UnscaledValue(sales_price#89))#118, sum(UnscaledValue(return_amt#91))#119, sum(UnscaledValue(profit#90))#120, sum(UnscaledValue(net_loss#92))#121]
Results [5]: [MakeDecimal(sum(UnscaledValue(sales_price#89))#118,17,2) AS sales#122, MakeDecimal(sum(UnscaledValue(return_amt#91))#119,17,2) AS returns#123, (MakeDecimal(sum(UnscaledValue(profit#90))#120,17,2) - MakeDecimal(sum(UnscaledValue(net_loss#92))#121,17,2)) AS profit#124, web channel AS channel#125, concat(web_site, web_site_id#109) AS id#126]

(255) Union

(256) Expand
Input [5]: [sales#38, returns#39, profit#40, channel#41, id#42]
Arguments: [[sales#38, returns#39, profit#40, channel#41, id#42, 0], [sales#38, returns#39, profit#40, channel#41, null, 1], [sales#38, returns#39, profit#40, null, null, 3]], [sales#38, returns#39, profit#40, channel#127, id#128, spark_grouping_id#129]

(257) HashAggregate
Input [6]: [sales#38, returns#39, profit#40, channel#127, id#128, spark_grouping_id#129]
Keys [3]: [channel#127, id#128, spark_grouping_id#129]
Functions [3]: [partial_sum(sales#38), partial_sum(returns#39), partial_sum(profit#40)]
Aggregate Attributes [6]: [sum#130, isEmpty#131, sum#132, isEmpty#133, sum#134, isEmpty#135]
Results [9]: [channel#127, id#128, spark_grouping_id#129, sum#156, isEmpty#157, sum#158, isEmpty#159, sum#160, isEmpty#161]

(258) Exchange
Input [9]: [channel#127, id#128, spark_grouping_id#129, sum#156, isEmpty#157, sum#158, isEmpty#159, sum#160, isEmpty#161]
Arguments: hashpartitioning(channel#127, id#128, spark_grouping_id#129, 100), ENSURE_REQUIREMENTS, [plan_id=34]

(259) HashAggregate
Input [9]: [channel#127, id#128, spark_grouping_id#129, sum#156, isEmpty#157, sum#158, isEmpty#159, sum#160, isEmpty#161]
Keys [3]: [channel#127, id#128, spark_grouping_id#129]
Functions [3]: [sum(sales#38), sum(returns#39), sum(profit#40)]
Aggregate Attributes [3]: [sum(sales#38)#136, sum(returns#39)#137, sum(profit#40)#138]
Results [5]: [channel#127, id#128, sum(sales#38)#136 AS sales#139, sum(returns#39)#137 AS returns#140, sum(profit#40)#138 AS profit#141]

(260) TakeOrderedAndProject
Input [5]: [channel#127, id#128, sales#139, returns#140, profit#141]
Arguments: X, [channel#127 ASC NULLS FIRST, id#128 ASC NULLS FIRST], [channel#127, id#128, sales#139, returns#140, profit#141]

(261) AdaptiveSparkPlan
Output [5]: [channel#127, id#128, sales#139, returns#140, profit#141]
Arguments: isFinalPlan=true

