== Physical Plan ==
AdaptiveSparkPlan (170)
+- == Final Plan ==
   NativeTakeOrdered (102)
   +- NativeProject (101)
      +- NativeSortMergeJoin Inner (100)
         :- NativeSort (62)
         :  +- InputAdapter (61)
         :     +- AQEShuffleRead (60)
         :        +- ShuffleQueryStage (59), Statistics(X)
         :           +- NativeShuffleExchange (58)
         :              +- NativeProject (57)
         :                 +- NativeSortMergeJoin Inner (56)
         :                    :- NativeSort (46)
         :                    :  +- InputAdapter (45)
         :                    :     +- AQEShuffleRead (44)
         :                    :        +- ShuffleQueryStage (43), Statistics(X)
         :                    :           +- NativeShuffleExchange (42)
         :                    :              +- NativeProject (41)
         :                    :                 +- NativeSortMergeJoin Inner (40)
         :                    :                    :- NativeSort (31)
         :                    :                    :  +- InputAdapter (30)
         :                    :                    :     +- AQEShuffleRead (29)
         :                    :                    :        +- ShuffleQueryStage (28), Statistics(X)
         :                    :                    :           +- NativeShuffleExchange (27)
         :                    :                    :              +- NativeProject (26)
         :                    :                    :                 +- NativeHashAggregate (25)
         :                    :                    :                    +- InputAdapter (24)
         :                    :                    :                       +- AQEShuffleRead (23)
         :                    :                    :                          +- ShuffleQueryStage (22), Statistics(X)
         :                    :                    :                             +- NativeShuffleExchange (21)
         :                    :                    :                                +- NativeHashAggregate (20)
         :                    :                    :                                   +- NativeProject (19)
         :                    :                    :                                      +- NativeProject (18)
         :                    :                    :                                         +- NativeSortMergeJoin Inner (17)
         :                    :                    :                                            :- NativeSort (8)
         :                    :                    :                                            :  +- InputAdapter (7)
         :                    :                    :                                            :     +- AQEShuffleRead (6)
         :                    :                    :                                            :        +- ShuffleQueryStage (5), Statistics(X)
         :                    :                    :                                            :           +- NativeShuffleExchange (4)
         :                    :                    :                                            :              +- NativeFilter (3)
         :                    :                    :                                            :                 +- InputAdapter (2)
         :                    :                    :                                            :                    +- NativeParquetScan  (1)
         :                    :                    :                                            +- NativeSort (16)
         :                    :                    :                                               +- InputAdapter (15)
         :                    :                    :                                                  +- AQEShuffleRead (14)
         :                    :                    :                                                     +- ShuffleQueryStage (13), Statistics(X)
         :                    :                    :                                                        +- NativeShuffleExchange (12)
         :                    :                    :                                                           +- NativeFilter (11)
         :                    :                    :                                                              +- InputAdapter (10)
         :                    :                    :                                                                 +- NativeParquetScan  (9)
         :                    :                    +- NativeSort (39)
         :                    :                       +- InputAdapter (38)
         :                    :                          +- AQEShuffleRead (37)
         :                    :                             +- ShuffleQueryStage (36), Statistics(X)
         :                    :                                +- NativeShuffleExchange (35)
         :                    :                                   +- NativeFilter (34)
         :                    :                                      +- InputAdapter (33)
         :                    :                                         +- NativeParquetScan  (32)
         :                    +- NativeSort (55)
         :                       +- InputAdapter (54)
         :                          +- AQEShuffleRead (53)
         :                             +- ShuffleQueryStage (52), Statistics(X)
         :                                +- NativeShuffleExchange (51)
         :                                   +- NativeProject (50)
         :                                      +- NativeFilter (49)
         :                                         +- InputAdapter (48)
         :                                            +- NativeParquetScan  (47)
         +- NativeSort (99)
            +- InputAdapter (98)
               +- AQEShuffleRead (97)
                  +- ShuffleQueryStage (96), Statistics(X)
                     +- NativeShuffleExchange (95)
                        +- NativeProject (94)
                           +- NativeSortMergeJoin Inner (93)
                              :- NativeSort (83)
                              :  +- InputAdapter (82)
                              :     +- AQEShuffleRead (81)
                              :        +- ShuffleQueryStage (80), Statistics(X)
                              :           +- NativeShuffleExchange (79)
                              :              +- NativeProject (78)
                              :                 +- NativeSortMergeJoin Inner (77)
                              :                    :- NativeSort (68)
                              :                    :  +- InputAdapter (67)
                              :                    :     +- InputAdapter (66)
                              :                    :        +- AQEShuffleRead (65)
                              :                    :           +- ShuffleQueryStage (64), Statistics(X)
                              :                    :              +- ReusedExchange (63)
                              :                    +- NativeSort (76)
                              :                       +- InputAdapter (75)
                              :                          +- AQEShuffleRead (74)
                              :                             +- ShuffleQueryStage (73), Statistics(X)
                              :                                +- NativeShuffleExchange (72)
                              :                                   +- NativeFilter (71)
                              :                                      +- InputAdapter (70)
                              :                                         +- NativeParquetScan  (69)
                              +- NativeSort (92)
                                 +- InputAdapter (91)
                                    +- AQEShuffleRead (90)
                                       +- ShuffleQueryStage (89), Statistics(X)
                                          +- NativeShuffleExchange (88)
                                             +- NativeProject (87)
                                                +- NativeFilter (86)
                                                   +- InputAdapter (85)
                                                      +- NativeParquetScan  (84)
+- == Initial Plan ==
   TakeOrderedAndProject (169)
   +- Project (168)
      +- SortMergeJoin Inner (167)
         :- Sort (134)
         :  +- Exchange (133)
         :     +- Project (132)
         :        +- SortMergeJoin Inner (131)
         :           :- Sort (125)
         :           :  +- Exchange (124)
         :           :     +- Project (123)
         :           :        +- SortMergeJoin Inner (122)
         :           :           :- Sort (117)
         :           :           :  +- Exchange (116)
         :           :           :     +- HashAggregate (115)
         :           :           :        +- Exchange (114)
         :           :           :           +- HashAggregate (113)
         :           :           :              +- Project (112)
         :           :           :                 +- SortMergeJoin Inner (111)
         :           :           :                    :- Sort (106)
         :           :           :                    :  +- Exchange (105)
         :           :           :                    :     +- Filter (104)
         :           :           :                    :        +- Scan parquet (103)
         :           :           :                    +- Sort (110)
         :           :           :                       +- Exchange (109)
         :           :           :                          +- Filter (108)
         :           :           :                             +- Scan parquet (107)
         :           :           +- Sort (121)
         :           :              +- Exchange (120)
         :           :                 +- Filter (119)
         :           :                    +- Scan parquet (118)
         :           +- Sort (130)
         :              +- Exchange (129)
         :                 +- Project (128)
         :                    +- Filter (127)
         :                       +- Scan parquet (126)
         +- Sort (166)
            +- Exchange (165)
               +- Project (164)
                  +- SortMergeJoin Inner (163)
                     :- Sort (157)
                     :  +- Exchange (156)
                     :     +- Project (155)
                     :        +- SortMergeJoin Inner (154)
                     :           :- Sort (149)
                     :           :  +- Exchange (148)
                     :           :     +- HashAggregate (147)
                     :           :        +- Exchange (146)
                     :           :           +- HashAggregate (145)
                     :           :              +- Project (144)
                     :           :                 +- SortMergeJoin Inner (143)
                     :           :                    :- Sort (138)
                     :           :                    :  +- Exchange (137)
                     :           :                    :     +- Filter (136)
                     :           :                    :        +- Scan parquet (135)
                     :           :                    +- Sort (142)
                     :           :                       +- Exchange (141)
                     :           :                          +- Filter (140)
                     :           :                             +- Scan parquet (139)
                     :           +- Sort (153)
                     :              +- Exchange (152)
                     :                 +- Filter (151)
                     :                    +- Scan parquet (150)
                     +- Sort (162)
                        +- Exchange (161)
                           +- Project (160)
                              +- Filter (159)
                                 +- Scan parquet (158)


(103) Scan parquet
Output [3]: [ss_sold_date_sk#1, ss_store_sk#2, ss_sales_price#3]
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_sales_price:decimal(7,2)>

(2) InputAdapter
Input [3]: [ss_sold_date_sk#1, ss_store_sk#2, ss_sales_price#3]
Arguments: [#1, #2, #3]

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

(4) NativeShuffleExchange
Input [3]: [#1#1, #2#2, #3#3]
Arguments: hashpartitioning(ss_sold_date_sk#1, 100), ENSURE_REQUIREMENTS, [plan_id=1]

(5) ShuffleQueryStage
Output [3]: [#1#1, #2#2, #3#3]
Arguments: X

(6) AQEShuffleRead
Input [3]: [#1#1, #2#2, #3#3]
Arguments: coalesced

(7) InputAdapter
Input [3]: [#1#1, #2#2, #3#3]

(8) NativeSort
Input [3]: [#1#1, #2#2, #3#3]
Arguments: [ss_sold_date_sk#1 ASC NULLS FIRST], false

(107) Scan parquet
Output [3]: [d_date_sk#4, d_week_seq#5, d_day_name#6]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(d_date_sk), IsNotNull(d_week_seq)]
ReadSchema: struct<d_date_sk:int,d_week_seq:int,d_day_name:string>

(10) InputAdapter
Input [3]: [d_date_sk#4, d_week_seq#5, d_day_name#6]
Arguments: [#4, #5, #6]

(11) NativeFilter
Input [3]: [#4#4, #5#5, #6#6]
Condition : (isnotnull(d_date_sk#4) AND isnotnull(d_week_seq#5))

(12) NativeShuffleExchange
Input [3]: [#4#4, #5#5, #6#6]
Arguments: hashpartitioning(d_date_sk#4, 100), ENSURE_REQUIREMENTS, [plan_id=2]

(13) ShuffleQueryStage
Output [3]: [#4#4, #5#5, #6#6]
Arguments: X

(14) AQEShuffleRead
Input [3]: [#4#4, #5#5, #6#6]
Arguments: coalesced

(15) InputAdapter
Input [3]: [#4#4, #5#5, #6#6]

(16) NativeSort
Input [3]: [#4#4, #5#5, #6#6]
Arguments: [d_date_sk#4 ASC NULLS FIRST], false

(17) NativeSortMergeJoin
Left keys [1]: [ss_sold_date_sk#1]
Right keys [1]: [d_date_sk#4]
Join type: Inner
Join condition: None

(18) NativeProject
Output [4]: [ss_store_sk#2, ss_sales_price#3, d_week_seq#5, d_day_name#6]
Input [6]: [#1#1, #2#2, #3#3, #4#4, #5#5, #6#6]

(19) NativeProject
Output [9]: [d_week_seq#5 AS d_week_seq#5, ss_store_sk#2 AS ss_store_sk#2, UnscaledValue(CASE WHEN (d_day_name#6 = Sunday) THEN ss_sales_price#3 END) AS _c2#7, UnscaledValue(CASE WHEN (d_day_name#6 = Monday) THEN ss_sales_price#3 END) AS _c3#8, UnscaledValue(CASE WHEN (d_day_name#6 = Tuesday) THEN ss_sales_price#3 END) AS _c4#9, UnscaledValue(CASE WHEN (d_day_name#6 = Wednesday) THEN ss_sales_price#3 END) AS _c5#10, UnscaledValue(CASE WHEN (d_day_name#6 = Thursday) THEN ss_sales_price#3 END) AS _c6#11, UnscaledValue(CASE WHEN (d_day_name#6 = Friday) THEN ss_sales_price#3 END) AS _c7#12, UnscaledValue(CASE WHEN (d_day_name#6 = Saturday) THEN ss_sales_price#3 END) AS _c8#13]
Input [4]: [ss_store_sk#2, ss_sales_price#3, d_week_seq#5, d_day_name#6]

(20) NativeHashAggregate
Input [9]: [d_week_seq#5, ss_store_sk#2, _c2#7, _c3#8, _c4#9, _c5#10, _c6#11, _c7#12, _c8#13]
Keys [2]: [d_week_seq#5, ss_store_sk#2]
Functions [7]: [partial_sum(_c2#7), partial_sum(_c3#8), partial_sum(_c4#9), partial_sum(_c5#10), partial_sum(_c6#11), partial_sum(_c7#12), partial_sum(_c8#13)]
Aggregate Attributes [7]: [sum#14, sum#15, sum#16, sum#17, sum#18, sum#19, sum#20]
Results [9]: [d_week_seq#5, ss_store_sk#2, #21, #21, #21, #21, #21, #21, #21]

(21) NativeShuffleExchange
Input [9]: [d_week_seq#5, ss_store_sk#2, #21, #21, #21, #21, #21, #21, #21]
Arguments: hashpartitioning(d_week_seq#5, ss_store_sk#2, 100), ENSURE_REQUIREMENTS, [plan_id=3]

(22) ShuffleQueryStage
Output [9]: [d_week_seq#5, ss_store_sk#2, #21, #21, #21, #21, #21, #21, #21]
Arguments: X

(23) AQEShuffleRead
Input [9]: [d_week_seq#5, ss_store_sk#2, #21, #21, #21, #21, #21, #21, #21]
Arguments: coalesced

(24) InputAdapter
Input [9]: [d_week_seq#5, ss_store_sk#2, #21, #21, #21, #21, #21, #21, #21]

(25) NativeHashAggregate
Input [9]: [d_week_seq#5, ss_store_sk#2, #21, #21, #21, #21, #21, #21, #21]
Keys [2]: [d_week_seq#5, ss_store_sk#2]
Functions [7]: [sum(UnscaledValue(CASE WHEN (d_day_name#6 = Sunday) THEN ss_sales_price#3 END)), sum(UnscaledValue(CASE WHEN (d_day_name#6 = Monday) THEN ss_sales_price#3 END)), sum(UnscaledValue(CASE WHEN (d_day_name#6 = Tuesday) THEN ss_sales_price#3 END)), sum(UnscaledValue(CASE WHEN (d_day_name#6 = Wednesday) THEN ss_sales_price#3 END)), sum(UnscaledValue(CASE WHEN (d_day_name#6 = Thursday) THEN ss_sales_price#3 END)), sum(UnscaledValue(CASE WHEN (d_day_name#6 = Friday) THEN ss_sales_price#3 END)), sum(UnscaledValue(CASE WHEN (d_day_name#6 = Saturday) THEN ss_sales_price#3 END))]
Aggregate Attributes [7]: [sum(UnscaledValue(CASE WHEN (d_day_name#6 = Sunday) THEN ss_sales_price#3 END))#22, sum(UnscaledValue(CASE WHEN (d_day_name#6 = Monday) THEN ss_sales_price#3 END))#23, sum(UnscaledValue(CASE WHEN (d_day_name#6 = Tuesday) THEN ss_sales_price#3 END))#24, sum(UnscaledValue(CASE WHEN (d_day_name#6 = Wednesday) THEN ss_sales_price#3 END))#25, sum(UnscaledValue(CASE WHEN (d_day_name#6 = Thursday) THEN ss_sales_price#3 END))#26, sum(UnscaledValue(CASE WHEN (d_day_name#6 = Friday) THEN ss_sales_price#3 END))#27, sum(UnscaledValue(CASE WHEN (d_day_name#6 = Saturday) THEN ss_sales_price#3 END))#28]
Results [9]: [d_week_seq#5, ss_store_sk#2, sum(UnscaledValue(CASE WHEN (d_day_name#6 = Sunday) THEN ss_sales_price#3 END))#22, sum(UnscaledValue(CASE WHEN (d_day_name#6 = Monday) THEN ss_sales_price#3 END))#23, sum(UnscaledValue(CASE WHEN (d_day_name#6 = Tuesday) THEN ss_sales_price#3 END))#24, sum(UnscaledValue(CASE WHEN (d_day_name#6 = Wednesday) THEN ss_sales_price#3 END))#25, sum(UnscaledValue(CASE WHEN (d_day_name#6 = Thursday) THEN ss_sales_price#3 END))#26, sum(UnscaledValue(CASE WHEN (d_day_name#6 = Friday) THEN ss_sales_price#3 END))#27, sum(UnscaledValue(CASE WHEN (d_day_name#6 = Saturday) THEN ss_sales_price#3 END))#28]

(26) NativeProject
Output [9]: [d_week_seq#5, ss_store_sk#2, MakeDecimal(sum(UnscaledValue(CASE WHEN (d_day_name#6 = Sunday) THEN ss_sales_price#3 END))#22,17,2) AS sun_sales#29, MakeDecimal(sum(UnscaledValue(CASE WHEN (d_day_name#6 = Monday) THEN ss_sales_price#3 END))#23,17,2) AS mon_sales#30, MakeDecimal(sum(UnscaledValue(CASE WHEN (d_day_name#6 = Tuesday) THEN ss_sales_price#3 END))#24,17,2) AS tue_sales#31, MakeDecimal(sum(UnscaledValue(CASE WHEN (d_day_name#6 = Wednesday) THEN ss_sales_price#3 END))#25,17,2) AS wed_sales#32, MakeDecimal(sum(UnscaledValue(CASE WHEN (d_day_name#6 = Thursday) THEN ss_sales_price#3 END))#26,17,2) AS thu_sales#33, MakeDecimal(sum(UnscaledValue(CASE WHEN (d_day_name#6 = Friday) THEN ss_sales_price#3 END))#27,17,2) AS fri_sales#34, MakeDecimal(sum(UnscaledValue(CASE WHEN (d_day_name#6 = Saturday) THEN ss_sales_price#3 END))#28,17,2) AS sat_sales#35]
Input [9]: [d_week_seq#5, ss_store_sk#2, sum(UnscaledValue(CASE WHEN (d_day_name#6 = Sunday) THEN ss_sales_price#3 END))#22, sum(UnscaledValue(CASE WHEN (d_day_name#6 = Monday) THEN ss_sales_price#3 END))#23, sum(UnscaledValue(CASE WHEN (d_day_name#6 = Tuesday) THEN ss_sales_price#3 END))#24, sum(UnscaledValue(CASE WHEN (d_day_name#6 = Wednesday) THEN ss_sales_price#3 END))#25, sum(UnscaledValue(CASE WHEN (d_day_name#6 = Thursday) THEN ss_sales_price#3 END))#26, sum(UnscaledValue(CASE WHEN (d_day_name#6 = Friday) THEN ss_sales_price#3 END))#27, sum(UnscaledValue(CASE WHEN (d_day_name#6 = Saturday) THEN ss_sales_price#3 END))#28]

(27) NativeShuffleExchange
Input [9]: [d_week_seq#5, ss_store_sk#2, sun_sales#29, mon_sales#30, tue_sales#31, wed_sales#32, thu_sales#33, fri_sales#34, sat_sales#35]
Arguments: hashpartitioning(ss_store_sk#2, 100), ENSURE_REQUIREMENTS, [plan_id=4]

(28) ShuffleQueryStage
Output [9]: [d_week_seq#5, ss_store_sk#2, sun_sales#29, mon_sales#30, tue_sales#31, wed_sales#32, thu_sales#33, fri_sales#34, sat_sales#35]
Arguments: X

(29) AQEShuffleRead
Input [9]: [d_week_seq#5, ss_store_sk#2, sun_sales#29, mon_sales#30, tue_sales#31, wed_sales#32, thu_sales#33, fri_sales#34, sat_sales#35]
Arguments: coalesced

(30) InputAdapter
Input [9]: [d_week_seq#5, ss_store_sk#2, sun_sales#29, mon_sales#30, tue_sales#31, wed_sales#32, thu_sales#33, fri_sales#34, sat_sales#35]

(31) NativeSort
Input [9]: [d_week_seq#5, ss_store_sk#2, sun_sales#29, mon_sales#30, tue_sales#31, wed_sales#32, thu_sales#33, fri_sales#34, sat_sales#35]
Arguments: [ss_store_sk#2 ASC NULLS FIRST], false

(118) Scan parquet
Output [3]: [s_store_sk#36, s_store_id#37, s_store_name#38]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(s_store_sk), IsNotNull(s_store_id)]
ReadSchema: struct<s_store_sk:int,s_store_id:string,s_store_name:string>

(33) InputAdapter
Input [3]: [s_store_sk#36, s_store_id#37, s_store_name#38]
Arguments: [#36, #37, #38]

(34) NativeFilter
Input [3]: [#36#36, #37#37, #38#38]
Condition : (isnotnull(s_store_sk#36) AND isnotnull(s_store_id#37))

(35) NativeShuffleExchange
Input [3]: [#36#36, #37#37, #38#38]
Arguments: hashpartitioning(s_store_sk#36, 100), ENSURE_REQUIREMENTS, [plan_id=5]

(36) ShuffleQueryStage
Output [3]: [#36#36, #37#37, #38#38]
Arguments: X

(37) AQEShuffleRead
Input [3]: [#36#36, #37#37, #38#38]
Arguments: coalesced

(38) InputAdapter
Input [3]: [#36#36, #37#37, #38#38]

(39) NativeSort
Input [3]: [#36#36, #37#37, #38#38]
Arguments: [s_store_sk#36 ASC NULLS FIRST], false

(40) NativeSortMergeJoin
Left keys [1]: [ss_store_sk#2]
Right keys [1]: [s_store_sk#36]
Join type: Inner
Join condition: None

(41) NativeProject
Output [10]: [d_week_seq#5, sun_sales#29, mon_sales#30, tue_sales#31, wed_sales#32, thu_sales#33, fri_sales#34, sat_sales#35, s_store_id#37, s_store_name#38]
Input [12]: [d_week_seq#5, ss_store_sk#2, sun_sales#29, mon_sales#30, tue_sales#31, wed_sales#32, thu_sales#33, fri_sales#34, sat_sales#35, #36#36, #37#37, #38#38]

(42) NativeShuffleExchange
Input [10]: [d_week_seq#5, sun_sales#29, mon_sales#30, tue_sales#31, wed_sales#32, thu_sales#33, fri_sales#34, sat_sales#35, s_store_id#37, s_store_name#38]
Arguments: hashpartitioning(d_week_seq#5, 100), ENSURE_REQUIREMENTS, [plan_id=6]

(43) ShuffleQueryStage
Output [10]: [d_week_seq#5, sun_sales#29, mon_sales#30, tue_sales#31, wed_sales#32, thu_sales#33, fri_sales#34, sat_sales#35, s_store_id#37, s_store_name#38]
Arguments: X

(44) AQEShuffleRead
Input [10]: [d_week_seq#5, sun_sales#29, mon_sales#30, tue_sales#31, wed_sales#32, thu_sales#33, fri_sales#34, sat_sales#35, s_store_id#37, s_store_name#38]
Arguments: coalesced

(45) InputAdapter
Input [10]: [d_week_seq#5, sun_sales#29, mon_sales#30, tue_sales#31, wed_sales#32, thu_sales#33, fri_sales#34, sat_sales#35, s_store_id#37, s_store_name#38]

(46) NativeSort
Input [10]: [d_week_seq#5, sun_sales#29, mon_sales#30, tue_sales#31, wed_sales#32, thu_sales#33, fri_sales#34, sat_sales#35, s_store_id#37, s_store_name#38]
Arguments: [d_week_seq#5 ASC NULLS FIRST], false

(126) Scan parquet
Output [2]: [d_month_seq#39, d_week_seq#40]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(d_month_seq), GreaterThanOrEqual(d_month_seq,1212), LessThanOrEqual(d_month_seq,1223), IsNotNull(d_week_seq)]
ReadSchema: struct<d_month_seq:int,d_week_seq:int>

(48) InputAdapter
Input [2]: [d_month_seq#39, d_week_seq#40]
Arguments: [#39, #40]

(49) NativeFilter
Input [2]: [#39#39, #40#40]
Condition : (((isnotnull(d_month_seq#39) AND (d_month_seq#39 >= 1212)) AND (d_month_seq#39 <= 1223)) AND isnotnull(d_week_seq#40))

(50) NativeProject
Output [1]: [d_week_seq#40]
Input [2]: [#39#39, #40#40]

(51) NativeShuffleExchange
Input [1]: [d_week_seq#40]
Arguments: hashpartitioning(d_week_seq#40, 100), ENSURE_REQUIREMENTS, [plan_id=7]

(52) ShuffleQueryStage
Output [1]: [d_week_seq#40]
Arguments: X

(53) AQEShuffleRead
Input [1]: [d_week_seq#40]
Arguments: coalesced

(54) InputAdapter
Input [1]: [d_week_seq#40]

(55) NativeSort
Input [1]: [d_week_seq#40]
Arguments: [d_week_seq#40 ASC NULLS FIRST], false

(56) NativeSortMergeJoin
Left keys [1]: [d_week_seq#5]
Right keys [1]: [d_week_seq#40]
Join type: Inner
Join condition: None

(57) NativeProject
Output [10]: [s_store_name#38 AS s_store_name1#41, d_week_seq#5 AS d_week_seq1#42, s_store_id#37 AS s_store_id1#43, sun_sales#29 AS sun_sales1#44, mon_sales#30 AS mon_sales1#45, tue_sales#31 AS tue_sales1#46, wed_sales#32 AS wed_sales1#47, thu_sales#33 AS thu_sales1#48, fri_sales#34 AS fri_sales1#49, sat_sales#35 AS sat_sales1#50]
Input [11]: [d_week_seq#5, sun_sales#29, mon_sales#30, tue_sales#31, wed_sales#32, thu_sales#33, fri_sales#34, sat_sales#35, s_store_id#37, s_store_name#38, d_week_seq#40]

(58) NativeShuffleExchange
Input [10]: [s_store_name1#41, d_week_seq1#42, s_store_id1#43, sun_sales1#44, mon_sales1#45, tue_sales1#46, wed_sales1#47, thu_sales1#48, fri_sales1#49, sat_sales1#50]
Arguments: hashpartitioning(s_store_id1#43, d_week_seq1#42, 100), ENSURE_REQUIREMENTS, [plan_id=8]

(59) ShuffleQueryStage
Output [10]: [s_store_name1#41, d_week_seq1#42, s_store_id1#43, sun_sales1#44, mon_sales1#45, tue_sales1#46, wed_sales1#47, thu_sales1#48, fri_sales1#49, sat_sales1#50]
Arguments: X

(60) AQEShuffleRead
Input [10]: [s_store_name1#41, d_week_seq1#42, s_store_id1#43, sun_sales1#44, mon_sales1#45, tue_sales1#46, wed_sales1#47, thu_sales1#48, fri_sales1#49, sat_sales1#50]
Arguments: coalesced

(61) InputAdapter
Input [10]: [s_store_name1#41, d_week_seq1#42, s_store_id1#43, sun_sales1#44, mon_sales1#45, tue_sales1#46, wed_sales1#47, thu_sales1#48, fri_sales1#49, sat_sales1#50]

(62) NativeSort
Input [10]: [s_store_name1#41, d_week_seq1#42, s_store_id1#43, sun_sales1#44, mon_sales1#45, tue_sales1#46, wed_sales1#47, thu_sales1#48, fri_sales1#49, sat_sales1#50]
Arguments: [s_store_id1#43 ASC NULLS FIRST, d_week_seq1#42 ASC NULLS FIRST], false

(63) ReusedExchange [Reuses operator id: 27]
Output [9]: [d_week_seq#51, ss_store_sk#52, sun_sales#53, mon_sales#54, tue_sales#55, wed_sales#56, thu_sales#57, fri_sales#58, sat_sales#59]

(64) ShuffleQueryStage
Output [9]: [d_week_seq#51, ss_store_sk#52, sun_sales#53, mon_sales#54, tue_sales#55, wed_sales#56, thu_sales#57, fri_sales#58, sat_sales#59]
Arguments: X

(65) AQEShuffleRead
Input [9]: [d_week_seq#51, ss_store_sk#52, sun_sales#53, mon_sales#54, tue_sales#55, wed_sales#56, thu_sales#57, fri_sales#58, sat_sales#59]
Arguments: coalesced

(66) InputAdapter
Input [9]: [d_week_seq#51, ss_store_sk#52, sun_sales#53, mon_sales#54, tue_sales#55, wed_sales#56, thu_sales#57, fri_sales#58, sat_sales#59]
Arguments: [#51, #52, #53, #54, #55, #56, #57, #58, #59]

(67) InputAdapter
Input [9]: [#51#51, #52#52, #53#53, #54#54, #55#55, #56#56, #57#57, #58#58, #59#59]

(68) NativeSort
Input [9]: [#51#51, #52#52, #53#53, #54#54, #55#55, #56#56, #57#57, #58#58, #59#59]
Arguments: [ss_store_sk#52 ASC NULLS FIRST], false

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

(70) InputAdapter
Input [2]: [s_store_sk#60, s_store_id#61]
Arguments: [#60, #61]

(71) NativeFilter
Input [2]: [#60#60, #61#61]
Condition : (isnotnull(s_store_sk#60) AND isnotnull(s_store_id#61))

(72) NativeShuffleExchange
Input [2]: [#60#60, #61#61]
Arguments: hashpartitioning(s_store_sk#60, 100), ENSURE_REQUIREMENTS, [plan_id=9]

(73) ShuffleQueryStage
Output [2]: [#60#60, #61#61]
Arguments: X

(74) AQEShuffleRead
Input [2]: [#60#60, #61#61]
Arguments: coalesced

(75) InputAdapter
Input [2]: [#60#60, #61#61]

(76) NativeSort
Input [2]: [#60#60, #61#61]
Arguments: [s_store_sk#60 ASC NULLS FIRST], false

(77) NativeSortMergeJoin
Left keys [1]: [ss_store_sk#52]
Right keys [1]: [s_store_sk#60]
Join type: Inner
Join condition: None

(78) NativeProject
Output [9]: [d_week_seq#51, sun_sales#53, mon_sales#54, tue_sales#55, wed_sales#56, thu_sales#57, fri_sales#58, sat_sales#59, s_store_id#61]
Input [11]: [#51#51, #52#52, #53#53, #54#54, #55#55, #56#56, #57#57, #58#58, #59#59, #60#60, #61#61]

(79) NativeShuffleExchange
Input [9]: [d_week_seq#51, sun_sales#53, mon_sales#54, tue_sales#55, wed_sales#56, thu_sales#57, fri_sales#58, sat_sales#59, s_store_id#61]
Arguments: hashpartitioning(d_week_seq#51, 100), ENSURE_REQUIREMENTS, [plan_id=10]

(80) ShuffleQueryStage
Output [9]: [d_week_seq#51, sun_sales#53, mon_sales#54, tue_sales#55, wed_sales#56, thu_sales#57, fri_sales#58, sat_sales#59, s_store_id#61]
Arguments: X

(81) AQEShuffleRead
Input [9]: [d_week_seq#51, sun_sales#53, mon_sales#54, tue_sales#55, wed_sales#56, thu_sales#57, fri_sales#58, sat_sales#59, s_store_id#61]
Arguments: coalesced

(82) InputAdapter
Input [9]: [d_week_seq#51, sun_sales#53, mon_sales#54, tue_sales#55, wed_sales#56, thu_sales#57, fri_sales#58, sat_sales#59, s_store_id#61]

(83) NativeSort
Input [9]: [d_week_seq#51, sun_sales#53, mon_sales#54, tue_sales#55, wed_sales#56, thu_sales#57, fri_sales#58, sat_sales#59, s_store_id#61]
Arguments: [d_week_seq#51 ASC NULLS FIRST], false

(158) Scan parquet
Output [2]: [d_month_seq#62, d_week_seq#63]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(d_month_seq), GreaterThanOrEqual(d_month_seq,1224), LessThanOrEqual(d_month_seq,1235), IsNotNull(d_week_seq)]
ReadSchema: struct<d_month_seq:int,d_week_seq:int>

(85) InputAdapter
Input [2]: [d_month_seq#62, d_week_seq#63]
Arguments: [#62, #63]

(86) NativeFilter
Input [2]: [#62#62, #63#63]
Condition : (((isnotnull(d_month_seq#62) AND (d_month_seq#62 >= 1224)) AND (d_month_seq#62 <= 1235)) AND isnotnull(d_week_seq#63))

(87) NativeProject
Output [1]: [d_week_seq#63]
Input [2]: [#62#62, #63#63]

(88) NativeShuffleExchange
Input [1]: [d_week_seq#63]
Arguments: hashpartitioning(d_week_seq#63, 100), ENSURE_REQUIREMENTS, [plan_id=11]

(89) ShuffleQueryStage
Output [1]: [d_week_seq#63]
Arguments: X

(90) AQEShuffleRead
Input [1]: [d_week_seq#63]
Arguments: coalesced

(91) InputAdapter
Input [1]: [d_week_seq#63]

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

(93) NativeSortMergeJoin
Left keys [1]: [d_week_seq#51]
Right keys [1]: [d_week_seq#63]
Join type: Inner
Join condition: None

(94) NativeProject
Output [9]: [d_week_seq#51 AS d_week_seq2#64, s_store_id#61 AS s_store_id2#65, sun_sales#53 AS sun_sales2#66, mon_sales#54 AS mon_sales2#67, tue_sales#55 AS tue_sales2#68, wed_sales#56 AS wed_sales2#69, thu_sales#57 AS thu_sales2#70, fri_sales#58 AS fri_sales2#71, sat_sales#59 AS sat_sales2#72]
Input [10]: [d_week_seq#51, sun_sales#53, mon_sales#54, tue_sales#55, wed_sales#56, thu_sales#57, fri_sales#58, sat_sales#59, s_store_id#61, d_week_seq#63]

(95) NativeShuffleExchange
Input [9]: [d_week_seq2#64, s_store_id2#65, sun_sales2#66, mon_sales2#67, tue_sales2#68, wed_sales2#69, thu_sales2#70, fri_sales2#71, sat_sales2#72]
Arguments: hashpartitioning(s_store_id2#65, (d_week_seq2#64 - 52), 100), ENSURE_REQUIREMENTS, [plan_id=12]

(96) ShuffleQueryStage
Output [9]: [d_week_seq2#64, s_store_id2#65, sun_sales2#66, mon_sales2#67, tue_sales2#68, wed_sales2#69, thu_sales2#70, fri_sales2#71, sat_sales2#72]
Arguments: X

(97) AQEShuffleRead
Input [9]: [d_week_seq2#64, s_store_id2#65, sun_sales2#66, mon_sales2#67, tue_sales2#68, wed_sales2#69, thu_sales2#70, fri_sales2#71, sat_sales2#72]
Arguments: coalesced

(98) InputAdapter
Input [9]: [d_week_seq2#64, s_store_id2#65, sun_sales2#66, mon_sales2#67, tue_sales2#68, wed_sales2#69, thu_sales2#70, fri_sales2#71, sat_sales2#72]

(99) NativeSort
Input [9]: [d_week_seq2#64, s_store_id2#65, sun_sales2#66, mon_sales2#67, tue_sales2#68, wed_sales2#69, thu_sales2#70, fri_sales2#71, sat_sales2#72]
Arguments: [s_store_id2#65 ASC NULLS FIRST, (d_week_seq2#64 - 52) ASC NULLS FIRST], false

(100) NativeSortMergeJoin
Left keys [2]: [s_store_id1#43, d_week_seq1#42]
Right keys [2]: [s_store_id2#65, (d_week_seq2#64 - 52)]
Join type: Inner
Join condition: None

(101) NativeProject
Output [10]: [s_store_name1#41, s_store_id1#43, d_week_seq1#42, (sun_sales1#44 / sun_sales2#66) AS (sun_sales1 / sun_sales2)#73, (mon_sales1#45 / mon_sales2#67) AS (mon_sales1 / mon_sales2)#74, (tue_sales1#46 / tue_sales2#68) AS (tue_sales1 / tue_sales2)#75, (wed_sales1#47 / wed_sales2#69) AS (wed_sales1 / wed_sales2)#76, (thu_sales1#48 / thu_sales2#70) AS (thu_sales1 / thu_sales2)#77, (fri_sales1#49 / fri_sales2#71) AS (fri_sales1 / fri_sales2)#78, (sat_sales1#50 / sat_sales2#72) AS (sat_sales1 / sat_sales2)#79]
Input [19]: [s_store_name1#41, d_week_seq1#42, s_store_id1#43, sun_sales1#44, mon_sales1#45, tue_sales1#46, wed_sales1#47, thu_sales1#48, fri_sales1#49, sat_sales1#50, d_week_seq2#64, s_store_id2#65, sun_sales2#66, mon_sales2#67, tue_sales2#68, wed_sales2#69, thu_sales2#70, fri_sales2#71, sat_sales2#72]

(102) NativeTakeOrdered
Input [10]: [s_store_name1#41, s_store_id1#43, d_week_seq1#42, (sun_sales1 / sun_sales2)#73, (mon_sales1 / mon_sales2)#74, (tue_sales1 / tue_sales2)#75, (wed_sales1 / wed_sales2)#76, (thu_sales1 / thu_sales2)#77, (fri_sales1 / fri_sales2)#78, (sat_sales1 / sat_sales2)#79]
Arguments: X, X, [s_store_name1#41 ASC NULLS FIRST, s_store_id1#43 ASC NULLS FIRST, d_week_seq1#42 ASC NULLS FIRST]

(103) Scan parquet
Output [3]: [ss_sold_date_sk#1, ss_store_sk#2, ss_sales_price#3]
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_sales_price:decimal(7,2)>

(104) Filter
Input [3]: [ss_sold_date_sk#1, ss_store_sk#2, ss_sales_price#3]
Condition : (isnotnull(ss_sold_date_sk#1) AND isnotnull(ss_store_sk#2))

(105) Exchange
Input [3]: [ss_sold_date_sk#1, ss_store_sk#2, ss_sales_price#3]
Arguments: hashpartitioning(ss_sold_date_sk#1, 100), ENSURE_REQUIREMENTS, [plan_id=13]

(106) Sort
Input [3]: [ss_sold_date_sk#1, ss_store_sk#2, ss_sales_price#3]
Arguments: [ss_sold_date_sk#1 ASC NULLS FIRST], false, 0

(107) Scan parquet
Output [3]: [d_date_sk#4, d_week_seq#5, d_day_name#6]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(d_date_sk), IsNotNull(d_week_seq)]
ReadSchema: struct<d_date_sk:int,d_week_seq:int,d_day_name:string>

(108) Filter
Input [3]: [d_date_sk#4, d_week_seq#5, d_day_name#6]
Condition : (isnotnull(d_date_sk#4) AND isnotnull(d_week_seq#5))

(109) Exchange
Input [3]: [d_date_sk#4, d_week_seq#5, d_day_name#6]
Arguments: hashpartitioning(d_date_sk#4, 100), ENSURE_REQUIREMENTS, [plan_id=14]

(110) Sort
Input [3]: [d_date_sk#4, d_week_seq#5, d_day_name#6]
Arguments: [d_date_sk#4 ASC NULLS FIRST], false, 0

(111) SortMergeJoin
Left keys [1]: [ss_sold_date_sk#1]
Right keys [1]: [d_date_sk#4]
Join type: Inner
Join condition: None

(112) Project
Output [4]: [ss_store_sk#2, ss_sales_price#3, d_week_seq#5, d_day_name#6]
Input [6]: [ss_sold_date_sk#1, ss_store_sk#2, ss_sales_price#3, d_date_sk#4, d_week_seq#5, d_day_name#6]

(113) HashAggregate
Input [4]: [ss_store_sk#2, ss_sales_price#3, d_week_seq#5, d_day_name#6]
Keys [2]: [d_week_seq#5, ss_store_sk#2]
Functions [7]: [partial_sum(UnscaledValue(CASE WHEN (d_day_name#6 = Sunday) THEN ss_sales_price#3 END)), partial_sum(UnscaledValue(CASE WHEN (d_day_name#6 = Monday) THEN ss_sales_price#3 END)), partial_sum(UnscaledValue(CASE WHEN (d_day_name#6 = Tuesday) THEN ss_sales_price#3 END)), partial_sum(UnscaledValue(CASE WHEN (d_day_name#6 = Wednesday) THEN ss_sales_price#3 END)), partial_sum(UnscaledValue(CASE WHEN (d_day_name#6 = Thursday) THEN ss_sales_price#3 END)), partial_sum(UnscaledValue(CASE WHEN (d_day_name#6 = Friday) THEN ss_sales_price#3 END)), partial_sum(UnscaledValue(CASE WHEN (d_day_name#6 = Saturday) THEN ss_sales_price#3 END))]
Aggregate Attributes [7]: [sum#14, sum#15, sum#16, sum#17, sum#18, sum#19, sum#20]
Results [9]: [d_week_seq#5, ss_store_sk#2, sum#80, sum#81, sum#82, sum#83, sum#84, sum#85, sum#86]

(114) Exchange
Input [9]: [d_week_seq#5, ss_store_sk#2, sum#80, sum#81, sum#82, sum#83, sum#84, sum#85, sum#86]
Arguments: hashpartitioning(d_week_seq#5, ss_store_sk#2, 100), ENSURE_REQUIREMENTS, [plan_id=15]

(115) HashAggregate
Input [9]: [d_week_seq#5, ss_store_sk#2, sum#80, sum#81, sum#82, sum#83, sum#84, sum#85, sum#86]
Keys [2]: [d_week_seq#5, ss_store_sk#2]
Functions [7]: [sum(UnscaledValue(CASE WHEN (d_day_name#6 = Sunday) THEN ss_sales_price#3 END)), sum(UnscaledValue(CASE WHEN (d_day_name#6 = Monday) THEN ss_sales_price#3 END)), sum(UnscaledValue(CASE WHEN (d_day_name#6 = Tuesday) THEN ss_sales_price#3 END)), sum(UnscaledValue(CASE WHEN (d_day_name#6 = Wednesday) THEN ss_sales_price#3 END)), sum(UnscaledValue(CASE WHEN (d_day_name#6 = Thursday) THEN ss_sales_price#3 END)), sum(UnscaledValue(CASE WHEN (d_day_name#6 = Friday) THEN ss_sales_price#3 END)), sum(UnscaledValue(CASE WHEN (d_day_name#6 = Saturday) THEN ss_sales_price#3 END))]
Aggregate Attributes [7]: [sum(UnscaledValue(CASE WHEN (d_day_name#6 = Sunday) THEN ss_sales_price#3 END))#22, sum(UnscaledValue(CASE WHEN (d_day_name#6 = Monday) THEN ss_sales_price#3 END))#23, sum(UnscaledValue(CASE WHEN (d_day_name#6 = Tuesday) THEN ss_sales_price#3 END))#24, sum(UnscaledValue(CASE WHEN (d_day_name#6 = Wednesday) THEN ss_sales_price#3 END))#25, sum(UnscaledValue(CASE WHEN (d_day_name#6 = Thursday) THEN ss_sales_price#3 END))#26, sum(UnscaledValue(CASE WHEN (d_day_name#6 = Friday) THEN ss_sales_price#3 END))#27, sum(UnscaledValue(CASE WHEN (d_day_name#6 = Saturday) THEN ss_sales_price#3 END))#28]
Results [9]: [d_week_seq#5, ss_store_sk#2, MakeDecimal(sum(UnscaledValue(CASE WHEN (d_day_name#6 = Sunday) THEN ss_sales_price#3 END))#22,17,2) AS sun_sales#29, MakeDecimal(sum(UnscaledValue(CASE WHEN (d_day_name#6 = Monday) THEN ss_sales_price#3 END))#23,17,2) AS mon_sales#30, MakeDecimal(sum(UnscaledValue(CASE WHEN (d_day_name#6 = Tuesday) THEN ss_sales_price#3 END))#24,17,2) AS tue_sales#31, MakeDecimal(sum(UnscaledValue(CASE WHEN (d_day_name#6 = Wednesday) THEN ss_sales_price#3 END))#25,17,2) AS wed_sales#32, MakeDecimal(sum(UnscaledValue(CASE WHEN (d_day_name#6 = Thursday) THEN ss_sales_price#3 END))#26,17,2) AS thu_sales#33, MakeDecimal(sum(UnscaledValue(CASE WHEN (d_day_name#6 = Friday) THEN ss_sales_price#3 END))#27,17,2) AS fri_sales#34, MakeDecimal(sum(UnscaledValue(CASE WHEN (d_day_name#6 = Saturday) THEN ss_sales_price#3 END))#28,17,2) AS sat_sales#35]

(116) Exchange
Input [9]: [d_week_seq#5, ss_store_sk#2, sun_sales#29, mon_sales#30, tue_sales#31, wed_sales#32, thu_sales#33, fri_sales#34, sat_sales#35]
Arguments: hashpartitioning(ss_store_sk#2, 100), ENSURE_REQUIREMENTS, [plan_id=16]

(117) Sort
Input [9]: [d_week_seq#5, ss_store_sk#2, sun_sales#29, mon_sales#30, tue_sales#31, wed_sales#32, thu_sales#33, fri_sales#34, sat_sales#35]
Arguments: [ss_store_sk#2 ASC NULLS FIRST], false, 0

(118) Scan parquet
Output [3]: [s_store_sk#36, s_store_id#37, s_store_name#38]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(s_store_sk), IsNotNull(s_store_id)]
ReadSchema: struct<s_store_sk:int,s_store_id:string,s_store_name:string>

(119) Filter
Input [3]: [s_store_sk#36, s_store_id#37, s_store_name#38]
Condition : (isnotnull(s_store_sk#36) AND isnotnull(s_store_id#37))

(120) Exchange
Input [3]: [s_store_sk#36, s_store_id#37, s_store_name#38]
Arguments: hashpartitioning(s_store_sk#36, 100), ENSURE_REQUIREMENTS, [plan_id=17]

(121) Sort
Input [3]: [s_store_sk#36, s_store_id#37, s_store_name#38]
Arguments: [s_store_sk#36 ASC NULLS FIRST], false, 0

(122) SortMergeJoin
Left keys [1]: [ss_store_sk#2]
Right keys [1]: [s_store_sk#36]
Join type: Inner
Join condition: None

(123) Project
Output [10]: [d_week_seq#5, sun_sales#29, mon_sales#30, tue_sales#31, wed_sales#32, thu_sales#33, fri_sales#34, sat_sales#35, s_store_id#37, s_store_name#38]
Input [12]: [d_week_seq#5, ss_store_sk#2, sun_sales#29, mon_sales#30, tue_sales#31, wed_sales#32, thu_sales#33, fri_sales#34, sat_sales#35, s_store_sk#36, s_store_id#37, s_store_name#38]

(124) Exchange
Input [10]: [d_week_seq#5, sun_sales#29, mon_sales#30, tue_sales#31, wed_sales#32, thu_sales#33, fri_sales#34, sat_sales#35, s_store_id#37, s_store_name#38]
Arguments: hashpartitioning(d_week_seq#5, 100), ENSURE_REQUIREMENTS, [plan_id=18]

(125) Sort
Input [10]: [d_week_seq#5, sun_sales#29, mon_sales#30, tue_sales#31, wed_sales#32, thu_sales#33, fri_sales#34, sat_sales#35, s_store_id#37, s_store_name#38]
Arguments: [d_week_seq#5 ASC NULLS FIRST], false, 0

(126) Scan parquet
Output [2]: [d_month_seq#39, d_week_seq#40]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(d_month_seq), GreaterThanOrEqual(d_month_seq,1212), LessThanOrEqual(d_month_seq,1223), IsNotNull(d_week_seq)]
ReadSchema: struct<d_month_seq:int,d_week_seq:int>

(127) Filter
Input [2]: [d_month_seq#39, d_week_seq#40]
Condition : (((isnotnull(d_month_seq#39) AND (d_month_seq#39 >= 1212)) AND (d_month_seq#39 <= 1223)) AND isnotnull(d_week_seq#40))

(128) Project
Output [1]: [d_week_seq#40]
Input [2]: [d_month_seq#39, d_week_seq#40]

(129) Exchange
Input [1]: [d_week_seq#40]
Arguments: hashpartitioning(d_week_seq#40, 100), ENSURE_REQUIREMENTS, [plan_id=19]

(130) Sort
Input [1]: [d_week_seq#40]
Arguments: [d_week_seq#40 ASC NULLS FIRST], false, 0

(131) SortMergeJoin
Left keys [1]: [d_week_seq#5]
Right keys [1]: [d_week_seq#40]
Join type: Inner
Join condition: None

(132) Project
Output [10]: [s_store_name#38 AS s_store_name1#41, d_week_seq#5 AS d_week_seq1#42, s_store_id#37 AS s_store_id1#43, sun_sales#29 AS sun_sales1#44, mon_sales#30 AS mon_sales1#45, tue_sales#31 AS tue_sales1#46, wed_sales#32 AS wed_sales1#47, thu_sales#33 AS thu_sales1#48, fri_sales#34 AS fri_sales1#49, sat_sales#35 AS sat_sales1#50]
Input [11]: [d_week_seq#5, sun_sales#29, mon_sales#30, tue_sales#31, wed_sales#32, thu_sales#33, fri_sales#34, sat_sales#35, s_store_id#37, s_store_name#38, d_week_seq#40]

(133) Exchange
Input [10]: [s_store_name1#41, d_week_seq1#42, s_store_id1#43, sun_sales1#44, mon_sales1#45, tue_sales1#46, wed_sales1#47, thu_sales1#48, fri_sales1#49, sat_sales1#50]
Arguments: hashpartitioning(s_store_id1#43, d_week_seq1#42, 100), ENSURE_REQUIREMENTS, [plan_id=20]

(134) Sort
Input [10]: [s_store_name1#41, d_week_seq1#42, s_store_id1#43, sun_sales1#44, mon_sales1#45, tue_sales1#46, wed_sales1#47, thu_sales1#48, fri_sales1#49, sat_sales1#50]
Arguments: [s_store_id1#43 ASC NULLS FIRST, d_week_seq1#42 ASC NULLS FIRST], false, 0

(135) Scan parquet
Output [3]: [ss_sold_date_sk#87, ss_store_sk#52, ss_sales_price#88]
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_sales_price:decimal(7,2)>

(136) Filter
Input [3]: [ss_sold_date_sk#87, ss_store_sk#52, ss_sales_price#88]
Condition : (isnotnull(ss_sold_date_sk#87) AND isnotnull(ss_store_sk#52))

(137) Exchange
Input [3]: [ss_sold_date_sk#87, ss_store_sk#52, ss_sales_price#88]
Arguments: hashpartitioning(ss_sold_date_sk#87, 100), ENSURE_REQUIREMENTS, [plan_id=21]

(138) Sort
Input [3]: [ss_sold_date_sk#87, ss_store_sk#52, ss_sales_price#88]
Arguments: [ss_sold_date_sk#87 ASC NULLS FIRST], false, 0

(139) Scan parquet
Output [3]: [d_date_sk#89, d_week_seq#51, d_day_name#90]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(d_date_sk), IsNotNull(d_week_seq)]
ReadSchema: struct<d_date_sk:int,d_week_seq:int,d_day_name:string>

(140) Filter
Input [3]: [d_date_sk#89, d_week_seq#51, d_day_name#90]
Condition : (isnotnull(d_date_sk#89) AND isnotnull(d_week_seq#51))

(141) Exchange
Input [3]: [d_date_sk#89, d_week_seq#51, d_day_name#90]
Arguments: hashpartitioning(d_date_sk#89, 100), ENSURE_REQUIREMENTS, [plan_id=22]

(142) Sort
Input [3]: [d_date_sk#89, d_week_seq#51, d_day_name#90]
Arguments: [d_date_sk#89 ASC NULLS FIRST], false, 0

(143) SortMergeJoin
Left keys [1]: [ss_sold_date_sk#87]
Right keys [1]: [d_date_sk#89]
Join type: Inner
Join condition: None

(144) Project
Output [4]: [ss_store_sk#52, ss_sales_price#88, d_week_seq#51, d_day_name#90]
Input [6]: [ss_sold_date_sk#87, ss_store_sk#52, ss_sales_price#88, d_date_sk#89, d_week_seq#51, d_day_name#90]

(145) HashAggregate
Input [4]: [ss_store_sk#52, ss_sales_price#88, d_week_seq#51, d_day_name#90]
Keys [2]: [d_week_seq#51, ss_store_sk#52]
Functions [7]: [partial_sum(UnscaledValue(CASE WHEN (d_day_name#90 = Sunday) THEN ss_sales_price#88 END)), partial_sum(UnscaledValue(CASE WHEN (d_day_name#90 = Monday) THEN ss_sales_price#88 END)), partial_sum(UnscaledValue(CASE WHEN (d_day_name#90 = Tuesday) THEN ss_sales_price#88 END)), partial_sum(UnscaledValue(CASE WHEN (d_day_name#90 = Wednesday) THEN ss_sales_price#88 END)), partial_sum(UnscaledValue(CASE WHEN (d_day_name#90 = Thursday) THEN ss_sales_price#88 END)), partial_sum(UnscaledValue(CASE WHEN (d_day_name#90 = Friday) THEN ss_sales_price#88 END)), partial_sum(UnscaledValue(CASE WHEN (d_day_name#90 = Saturday) THEN ss_sales_price#88 END))]
Aggregate Attributes [7]: [sum#91, sum#92, sum#93, sum#94, sum#95, sum#96, sum#97]
Results [9]: [d_week_seq#51, ss_store_sk#52, sum#98, sum#99, sum#100, sum#101, sum#102, sum#103, sum#104]

(146) Exchange
Input [9]: [d_week_seq#51, ss_store_sk#52, sum#98, sum#99, sum#100, sum#101, sum#102, sum#103, sum#104]
Arguments: hashpartitioning(d_week_seq#51, ss_store_sk#52, 100), ENSURE_REQUIREMENTS, [plan_id=23]

(147) HashAggregate
Input [9]: [d_week_seq#51, ss_store_sk#52, sum#98, sum#99, sum#100, sum#101, sum#102, sum#103, sum#104]
Keys [2]: [d_week_seq#51, ss_store_sk#52]
Functions [7]: [sum(UnscaledValue(CASE WHEN (d_day_name#90 = Sunday) THEN ss_sales_price#88 END)), sum(UnscaledValue(CASE WHEN (d_day_name#90 = Monday) THEN ss_sales_price#88 END)), sum(UnscaledValue(CASE WHEN (d_day_name#90 = Tuesday) THEN ss_sales_price#88 END)), sum(UnscaledValue(CASE WHEN (d_day_name#90 = Wednesday) THEN ss_sales_price#88 END)), sum(UnscaledValue(CASE WHEN (d_day_name#90 = Thursday) THEN ss_sales_price#88 END)), sum(UnscaledValue(CASE WHEN (d_day_name#90 = Friday) THEN ss_sales_price#88 END)), sum(UnscaledValue(CASE WHEN (d_day_name#90 = Saturday) THEN ss_sales_price#88 END))]
Aggregate Attributes [7]: [sum(UnscaledValue(CASE WHEN (d_day_name#90 = Sunday) THEN ss_sales_price#88 END))#22, sum(UnscaledValue(CASE WHEN (d_day_name#90 = Monday) THEN ss_sales_price#88 END))#23, sum(UnscaledValue(CASE WHEN (d_day_name#90 = Tuesday) THEN ss_sales_price#88 END))#24, sum(UnscaledValue(CASE WHEN (d_day_name#90 = Wednesday) THEN ss_sales_price#88 END))#25, sum(UnscaledValue(CASE WHEN (d_day_name#90 = Thursday) THEN ss_sales_price#88 END))#26, sum(UnscaledValue(CASE WHEN (d_day_name#90 = Friday) THEN ss_sales_price#88 END))#27, sum(UnscaledValue(CASE WHEN (d_day_name#90 = Saturday) THEN ss_sales_price#88 END))#28]
Results [9]: [d_week_seq#51, ss_store_sk#52, MakeDecimal(sum(UnscaledValue(CASE WHEN (d_day_name#90 = Sunday) THEN ss_sales_price#88 END))#22,17,2) AS sun_sales#53, MakeDecimal(sum(UnscaledValue(CASE WHEN (d_day_name#90 = Monday) THEN ss_sales_price#88 END))#23,17,2) AS mon_sales#54, MakeDecimal(sum(UnscaledValue(CASE WHEN (d_day_name#90 = Tuesday) THEN ss_sales_price#88 END))#24,17,2) AS tue_sales#55, MakeDecimal(sum(UnscaledValue(CASE WHEN (d_day_name#90 = Wednesday) THEN ss_sales_price#88 END))#25,17,2) AS wed_sales#56, MakeDecimal(sum(UnscaledValue(CASE WHEN (d_day_name#90 = Thursday) THEN ss_sales_price#88 END))#26,17,2) AS thu_sales#57, MakeDecimal(sum(UnscaledValue(CASE WHEN (d_day_name#90 = Friday) THEN ss_sales_price#88 END))#27,17,2) AS fri_sales#58, MakeDecimal(sum(UnscaledValue(CASE WHEN (d_day_name#90 = Saturday) THEN ss_sales_price#88 END))#28,17,2) AS sat_sales#59]

(148) Exchange
Input [9]: [d_week_seq#51, ss_store_sk#52, sun_sales#53, mon_sales#54, tue_sales#55, wed_sales#56, thu_sales#57, fri_sales#58, sat_sales#59]
Arguments: hashpartitioning(ss_store_sk#52, 100), ENSURE_REQUIREMENTS, [plan_id=24]

(149) Sort
Input [9]: [d_week_seq#51, ss_store_sk#52, sun_sales#53, mon_sales#54, tue_sales#55, wed_sales#56, thu_sales#57, fri_sales#58, sat_sales#59]
Arguments: [ss_store_sk#52 ASC NULLS FIRST], false, 0

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

(151) Filter
Input [2]: [s_store_sk#60, s_store_id#61]
Condition : (isnotnull(s_store_sk#60) AND isnotnull(s_store_id#61))

(152) Exchange
Input [2]: [s_store_sk#60, s_store_id#61]
Arguments: hashpartitioning(s_store_sk#60, 100), ENSURE_REQUIREMENTS, [plan_id=25]

(153) Sort
Input [2]: [s_store_sk#60, s_store_id#61]
Arguments: [s_store_sk#60 ASC NULLS FIRST], false, 0

(154) SortMergeJoin
Left keys [1]: [ss_store_sk#52]
Right keys [1]: [s_store_sk#60]
Join type: Inner
Join condition: None

(155) Project
Output [9]: [d_week_seq#51, sun_sales#53, mon_sales#54, tue_sales#55, wed_sales#56, thu_sales#57, fri_sales#58, sat_sales#59, s_store_id#61]
Input [11]: [d_week_seq#51, ss_store_sk#52, sun_sales#53, mon_sales#54, tue_sales#55, wed_sales#56, thu_sales#57, fri_sales#58, sat_sales#59, s_store_sk#60, s_store_id#61]

(156) Exchange
Input [9]: [d_week_seq#51, sun_sales#53, mon_sales#54, tue_sales#55, wed_sales#56, thu_sales#57, fri_sales#58, sat_sales#59, s_store_id#61]
Arguments: hashpartitioning(d_week_seq#51, 100), ENSURE_REQUIREMENTS, [plan_id=26]

(157) Sort
Input [9]: [d_week_seq#51, sun_sales#53, mon_sales#54, tue_sales#55, wed_sales#56, thu_sales#57, fri_sales#58, sat_sales#59, s_store_id#61]
Arguments: [d_week_seq#51 ASC NULLS FIRST], false, 0

(158) Scan parquet
Output [2]: [d_month_seq#62, d_week_seq#63]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(d_month_seq), GreaterThanOrEqual(d_month_seq,1224), LessThanOrEqual(d_month_seq,1235), IsNotNull(d_week_seq)]
ReadSchema: struct<d_month_seq:int,d_week_seq:int>

(159) Filter
Input [2]: [d_month_seq#62, d_week_seq#63]
Condition : (((isnotnull(d_month_seq#62) AND (d_month_seq#62 >= 1224)) AND (d_month_seq#62 <= 1235)) AND isnotnull(d_week_seq#63))

(160) Project
Output [1]: [d_week_seq#63]
Input [2]: [d_month_seq#62, d_week_seq#63]

(161) Exchange
Input [1]: [d_week_seq#63]
Arguments: hashpartitioning(d_week_seq#63, 100), ENSURE_REQUIREMENTS, [plan_id=27]

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

(163) SortMergeJoin
Left keys [1]: [d_week_seq#51]
Right keys [1]: [d_week_seq#63]
Join type: Inner
Join condition: None

(164) Project
Output [9]: [d_week_seq#51 AS d_week_seq2#64, s_store_id#61 AS s_store_id2#65, sun_sales#53 AS sun_sales2#66, mon_sales#54 AS mon_sales2#67, tue_sales#55 AS tue_sales2#68, wed_sales#56 AS wed_sales2#69, thu_sales#57 AS thu_sales2#70, fri_sales#58 AS fri_sales2#71, sat_sales#59 AS sat_sales2#72]
Input [10]: [d_week_seq#51, sun_sales#53, mon_sales#54, tue_sales#55, wed_sales#56, thu_sales#57, fri_sales#58, sat_sales#59, s_store_id#61, d_week_seq#63]

(165) Exchange
Input [9]: [d_week_seq2#64, s_store_id2#65, sun_sales2#66, mon_sales2#67, tue_sales2#68, wed_sales2#69, thu_sales2#70, fri_sales2#71, sat_sales2#72]
Arguments: hashpartitioning(s_store_id2#65, (d_week_seq2#64 - 52), 100), ENSURE_REQUIREMENTS, [plan_id=28]

(166) Sort
Input [9]: [d_week_seq2#64, s_store_id2#65, sun_sales2#66, mon_sales2#67, tue_sales2#68, wed_sales2#69, thu_sales2#70, fri_sales2#71, sat_sales2#72]
Arguments: [s_store_id2#65 ASC NULLS FIRST, (d_week_seq2#64 - 52) ASC NULLS FIRST], false, 0

(167) SortMergeJoin
Left keys [2]: [s_store_id1#43, d_week_seq1#42]
Right keys [2]: [s_store_id2#65, (d_week_seq2#64 - 52)]
Join type: Inner
Join condition: None

(168) Project
Output [10]: [s_store_name1#41, s_store_id1#43, d_week_seq1#42, (sun_sales1#44 / sun_sales2#66) AS (sun_sales1 / sun_sales2)#73, (mon_sales1#45 / mon_sales2#67) AS (mon_sales1 / mon_sales2)#74, (tue_sales1#46 / tue_sales2#68) AS (tue_sales1 / tue_sales2)#75, (wed_sales1#47 / wed_sales2#69) AS (wed_sales1 / wed_sales2)#76, (thu_sales1#48 / thu_sales2#70) AS (thu_sales1 / thu_sales2)#77, (fri_sales1#49 / fri_sales2#71) AS (fri_sales1 / fri_sales2)#78, (sat_sales1#50 / sat_sales2#72) AS (sat_sales1 / sat_sales2)#79]
Input [19]: [s_store_name1#41, d_week_seq1#42, s_store_id1#43, sun_sales1#44, mon_sales1#45, tue_sales1#46, wed_sales1#47, thu_sales1#48, fri_sales1#49, sat_sales1#50, d_week_seq2#64, s_store_id2#65, sun_sales2#66, mon_sales2#67, tue_sales2#68, wed_sales2#69, thu_sales2#70, fri_sales2#71, sat_sales2#72]

(169) TakeOrderedAndProject
Input [10]: [s_store_name1#41, s_store_id1#43, d_week_seq1#42, (sun_sales1 / sun_sales2)#73, (mon_sales1 / mon_sales2)#74, (tue_sales1 / tue_sales2)#75, (wed_sales1 / wed_sales2)#76, (thu_sales1 / thu_sales2)#77, (fri_sales1 / fri_sales2)#78, (sat_sales1 / sat_sales2)#79]
Arguments: X, [s_store_name1#41 ASC NULLS FIRST, s_store_id1#43 ASC NULLS FIRST, d_week_seq1#42 ASC NULLS FIRST], [s_store_name1#41, s_store_id1#43, d_week_seq1#42, (sun_sales1 / sun_sales2)#73, (mon_sales1 / mon_sales2)#74, (tue_sales1 / tue_sales2)#75, (wed_sales1 / wed_sales2)#76, (thu_sales1 / thu_sales2)#77, (fri_sales1 / fri_sales2)#78, (sat_sales1 / sat_sales2)#79]

(170) AdaptiveSparkPlan
Output [10]: [s_store_name1#41, s_store_id1#43, d_week_seq1#42, (sun_sales1 / sun_sales2)#73, (mon_sales1 / mon_sales2)#74, (tue_sales1 / tue_sales2)#75, (wed_sales1 / wed_sales2)#76, (thu_sales1 / thu_sales2)#77, (fri_sales1 / fri_sales2)#78, (sat_sales1 / sat_sales2)#79]
Arguments: isFinalPlan=true

