== Physical Plan ==
AdaptiveSparkPlan (105)
+- == Final Plan ==
   TakeOrderedAndProject (67)
   +- * Project (66)
      +- * Filter (65)
         +- Window (64)
            +- NativeSort (63)
               +- InputAdapter (62)
                  +- AQEShuffleRead (61)
                     +- ShuffleQueryStage (60), Statistics(X)
                        +- NativeShuffleExchange (59)
                           +- NativeProject (58)
                              +- NativeHashAggregate (57)
                                 +- InputAdapter (56)
                                    +- AQEShuffleRead (55)
                                       +- ShuffleQueryStage (54), Statistics(X)
                                          +- NativeShuffleExchange (53)
                                             +- NativeHashAggregate (52)
                                                +- NativeProject (51)
                                                   +- NativeProject (50)
                                                      +- NativeSortMergeJoin Inner (49)
                                                         :- NativeSort (40)
                                                         :  +- InputAdapter (39)
                                                         :     +- AQEShuffleRead (38)
                                                         :        +- ShuffleQueryStage (37), Statistics(X)
                                                         :           +- NativeShuffleExchange (36)
                                                         :              +- NativeProject (35)
                                                         :                 +- NativeSortMergeJoin Inner (34)
                                                         :                    :- NativeSort (24)
                                                         :                    :  +- InputAdapter (23)
                                                         :                    :     +- AQEShuffleRead (22)
                                                         :                    :        +- ShuffleQueryStage (21), Statistics(X)
                                                         :                    :           +- NativeShuffleExchange (20)
                                                         :                    :              +- NativeProject (19)
                                                         :                    :                 +- NativeSortMergeJoin Inner (18)
                                                         :                    :                    :- NativeSort (9)
                                                         :                    :                    :  +- InputAdapter (8)
                                                         :                    :                    :     +- AQEShuffleRead (7)
                                                         :                    :                    :        +- ShuffleQueryStage (6), Statistics(X)
                                                         :                    :                    :           +- NativeShuffleExchange (5)
                                                         :                    :                    :              +- NativeProject (4)
                                                         :                    :                    :                 +- NativeFilter (3)
                                                         :                    :                    :                    +- InputAdapter (2)
                                                         :                    :                    :                       +- NativeParquetScan  (1)
                                                         :                    :                    +- NativeSort (17)
                                                         :                    :                       +- InputAdapter (16)
                                                         :                    :                          +- AQEShuffleRead (15)
                                                         :                    :                             +- ShuffleQueryStage (14), Statistics(X)
                                                         :                    :                                +- NativeShuffleExchange (13)
                                                         :                    :                                   +- NativeFilter (12)
                                                         :                    :                                      +- InputAdapter (11)
                                                         :                    :                                         +- NativeParquetScan  (10)
                                                         :                    +- NativeSort (33)
                                                         :                       +- InputAdapter (32)
                                                         :                          +- AQEShuffleRead (31)
                                                         :                             +- ShuffleQueryStage (30), Statistics(X)
                                                         :                                +- NativeShuffleExchange (29)
                                                         :                                   +- NativeProject (28)
                                                         :                                      +- NativeFilter (27)
                                                         :                                         +- InputAdapter (26)
                                                         :                                            +- NativeParquetScan  (25)
                                                         +- NativeSort (48)
                                                            +- InputAdapter (47)
                                                               +- AQEShuffleRead (46)
                                                                  +- ShuffleQueryStage (45), Statistics(X)
                                                                     +- NativeShuffleExchange (44)
                                                                        +- NativeFilter (43)
                                                                           +- InputAdapter (42)
                                                                              +- NativeParquetScan  (41)
+- == Initial Plan ==
   TakeOrderedAndProject (104)
   +- Project (103)
      +- Filter (102)
         +- Window (101)
            +- Sort (100)
               +- Exchange (99)
                  +- HashAggregate (98)
                     +- Exchange (97)
                        +- HashAggregate (96)
                           +- Project (95)
                              +- SortMergeJoin Inner (94)
                                 :- Sort (89)
                                 :  +- Exchange (88)
                                 :     +- Project (87)
                                 :        +- SortMergeJoin Inner (86)
                                 :           :- Sort (80)
                                 :           :  +- Exchange (79)
                                 :           :     +- Project (78)
                                 :           :        +- SortMergeJoin Inner (77)
                                 :           :           :- Sort (72)
                                 :           :           :  +- Exchange (71)
                                 :           :           :     +- Project (70)
                                 :           :           :        +- Filter (69)
                                 :           :           :           +- Scan parquet (68)
                                 :           :           +- Sort (76)
                                 :           :              +- Exchange (75)
                                 :           :                 +- Filter (74)
                                 :           :                    +- Scan parquet (73)
                                 :           +- Sort (85)
                                 :              +- Exchange (84)
                                 :                 +- Project (83)
                                 :                    +- Filter (82)
                                 :                       +- Scan parquet (81)
                                 +- Sort (93)
                                    +- Exchange (92)
                                       +- Filter (91)
                                          +- Scan parquet (90)


(68) Scan parquet
Output [5]: [i_item_sk#1, i_brand#2, i_class#3, i_category#4, i_manufact_id#5]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [Or(And(And(In(i_category, [Books,Children,Electronics]),In(i_class, [personal,portable,reference,self-help])),In(i_brand, [exportiunivamalg #6,scholaramalgamalg #7,scholaramalgamalg #8,scholaramalgamalg #6])),And(And(In(i_category, [Men,Music,Women]),In(i_class, [accessories,classical,fragrances,pants])),In(i_brand, [amalgimporto #9,edu packscholar #9,exportiimporto #9,importoamalg #9]))), IsNotNull(i_item_sk)]
ReadSchema: struct<i_item_sk:int,i_brand:string,i_class:string,i_category:string,i_manufact_id:int>

(2) InputAdapter
Input [5]: [i_item_sk#1, i_brand#2, i_class#3, i_category#4, i_manufact_id#5]
Arguments: [#1, #2, #3, #4, #5]

(3) NativeFilter
Input [5]: [#1#1, #2#2, #3#3, #4#4, #5#5]
Condition : ((((i_category#4 IN (Books,Children,Electronics) AND i_class#3 IN (personal,portable,reference,self-help)) AND i_brand#2 IN (scholaramalgamalg #7,scholaramalgamalg #8,exportiunivamalg #6,scholaramalgamalg #6)) OR ((i_category#4 IN (Women,Music,Men) AND i_class#3 IN (accessories,classical,fragrances,pants)) AND i_brand#2 IN (amalgimporto #9,edu packscholar #9,exportiimporto #9,importoamalg #9))) AND isnotnull(i_item_sk#1))

(4) NativeProject
Output [2]: [i_item_sk#1, i_manufact_id#5]
Input [5]: [#1#1, #2#2, #3#3, #4#4, #5#5]

(5) NativeShuffleExchange
Input [2]: [i_item_sk#1, i_manufact_id#5]
Arguments: hashpartitioning(i_item_sk#1, 100), ENSURE_REQUIREMENTS, [plan_id=1]

(6) ShuffleQueryStage
Output [2]: [i_item_sk#1, i_manufact_id#5]
Arguments: X

(7) AQEShuffleRead
Input [2]: [i_item_sk#1, i_manufact_id#5]
Arguments: coalesced

(8) InputAdapter
Input [2]: [i_item_sk#1, i_manufact_id#5]

(9) NativeSort
Input [2]: [i_item_sk#1, i_manufact_id#5]
Arguments: [i_item_sk#1 ASC NULLS FIRST], false

(73) Scan parquet
Output [4]: [ss_sold_date_sk#10, ss_item_sk#11, ss_store_sk#12, ss_sales_price#13]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(ss_item_sk), IsNotNull(ss_sold_date_sk), IsNotNull(ss_store_sk)]
ReadSchema: struct<ss_sold_date_sk:int,ss_item_sk:int,ss_store_sk:int,ss_sales_price:decimal(7,2)>

(11) InputAdapter
Input [4]: [ss_sold_date_sk#10, ss_item_sk#11, ss_store_sk#12, ss_sales_price#13]
Arguments: [#10, #11, #12, #13]

(12) NativeFilter
Input [4]: [#10#10, #11#11, #12#12, #13#13]
Condition : ((isnotnull(ss_item_sk#11) AND isnotnull(ss_sold_date_sk#10)) AND isnotnull(ss_store_sk#12))

(13) NativeShuffleExchange
Input [4]: [#10#10, #11#11, #12#12, #13#13]
Arguments: hashpartitioning(ss_item_sk#11, 100), ENSURE_REQUIREMENTS, [plan_id=2]

(14) ShuffleQueryStage
Output [4]: [#10#10, #11#11, #12#12, #13#13]
Arguments: X

(15) AQEShuffleRead
Input [4]: [#10#10, #11#11, #12#12, #13#13]
Arguments: coalesced

(16) InputAdapter
Input [4]: [#10#10, #11#11, #12#12, #13#13]

(17) NativeSort
Input [4]: [#10#10, #11#11, #12#12, #13#13]
Arguments: [ss_item_sk#11 ASC NULLS FIRST], false

(18) NativeSortMergeJoin
Left keys [1]: [i_item_sk#1]
Right keys [1]: [ss_item_sk#11]
Join type: Inner
Join condition: None

(19) NativeProject
Output [4]: [i_manufact_id#5, ss_sold_date_sk#10, ss_store_sk#12, ss_sales_price#13]
Input [6]: [i_item_sk#1, i_manufact_id#5, #10#10, #11#11, #12#12, #13#13]

(20) NativeShuffleExchange
Input [4]: [i_manufact_id#5, ss_sold_date_sk#10, ss_store_sk#12, ss_sales_price#13]
Arguments: hashpartitioning(ss_sold_date_sk#10, 100), ENSURE_REQUIREMENTS, [plan_id=3]

(21) ShuffleQueryStage
Output [4]: [i_manufact_id#5, ss_sold_date_sk#10, ss_store_sk#12, ss_sales_price#13]
Arguments: X

(22) AQEShuffleRead
Input [4]: [i_manufact_id#5, ss_sold_date_sk#10, ss_store_sk#12, ss_sales_price#13]
Arguments: coalesced

(23) InputAdapter
Input [4]: [i_manufact_id#5, ss_sold_date_sk#10, ss_store_sk#12, ss_sales_price#13]

(24) NativeSort
Input [4]: [i_manufact_id#5, ss_sold_date_sk#10, ss_store_sk#12, ss_sales_price#13]
Arguments: [ss_sold_date_sk#10 ASC NULLS FIRST], false

(81) Scan parquet
Output [3]: [d_date_sk#14, d_month_seq#15, d_qoy#16]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [In(d_month_seq, [1200,1201,1202,1203,1204,1205,1206,1207,1208,1209,1210,1211]), IsNotNull(d_date_sk)]
ReadSchema: struct<d_date_sk:int,d_month_seq:int,d_qoy:int>

(26) InputAdapter
Input [3]: [d_date_sk#14, d_month_seq#15, d_qoy#16]
Arguments: [#14, #15, #16]

(27) NativeFilter
Input [3]: [#14#14, #15#15, #16#16]
Condition : (d_month_seq#15 INSET 1200, 1201, 1202, 1203, 1204, 1205, 1206, 1207, 1208, 1209, 1210, 1211 AND isnotnull(d_date_sk#14))

(28) NativeProject
Output [2]: [d_date_sk#14, d_qoy#16]
Input [3]: [#14#14, #15#15, #16#16]

(29) NativeShuffleExchange
Input [2]: [d_date_sk#14, d_qoy#16]
Arguments: hashpartitioning(d_date_sk#14, 100), ENSURE_REQUIREMENTS, [plan_id=4]

(30) ShuffleQueryStage
Output [2]: [d_date_sk#14, d_qoy#16]
Arguments: X

(31) AQEShuffleRead
Input [2]: [d_date_sk#14, d_qoy#16]
Arguments: coalesced

(32) InputAdapter
Input [2]: [d_date_sk#14, d_qoy#16]

(33) NativeSort
Input [2]: [d_date_sk#14, d_qoy#16]
Arguments: [d_date_sk#14 ASC NULLS FIRST], false

(34) NativeSortMergeJoin
Left keys [1]: [ss_sold_date_sk#10]
Right keys [1]: [d_date_sk#14]
Join type: Inner
Join condition: None

(35) NativeProject
Output [4]: [i_manufact_id#5, ss_store_sk#12, ss_sales_price#13, d_qoy#16]
Input [6]: [i_manufact_id#5, ss_sold_date_sk#10, ss_store_sk#12, ss_sales_price#13, d_date_sk#14, d_qoy#16]

(36) NativeShuffleExchange
Input [4]: [i_manufact_id#5, ss_store_sk#12, ss_sales_price#13, d_qoy#16]
Arguments: hashpartitioning(ss_store_sk#12, 100), ENSURE_REQUIREMENTS, [plan_id=5]

(37) ShuffleQueryStage
Output [4]: [i_manufact_id#5, ss_store_sk#12, ss_sales_price#13, d_qoy#16]
Arguments: X

(38) AQEShuffleRead
Input [4]: [i_manufact_id#5, ss_store_sk#12, ss_sales_price#13, d_qoy#16]
Arguments: coalesced

(39) InputAdapter
Input [4]: [i_manufact_id#5, ss_store_sk#12, ss_sales_price#13, d_qoy#16]

(40) NativeSort
Input [4]: [i_manufact_id#5, ss_store_sk#12, ss_sales_price#13, d_qoy#16]
Arguments: [ss_store_sk#12 ASC NULLS FIRST], false

(90) Scan parquet
Output [1]: [s_store_sk#17]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(s_store_sk)]
ReadSchema: struct<s_store_sk:int>

(42) InputAdapter
Input [1]: [s_store_sk#17]
Arguments: [#17]

(43) NativeFilter
Input [1]: [#17#17]
Condition : isnotnull(s_store_sk#17)

(44) NativeShuffleExchange
Input [1]: [#17#17]
Arguments: hashpartitioning(s_store_sk#17, 100), ENSURE_REQUIREMENTS, [plan_id=6]

(45) ShuffleQueryStage
Output [1]: [#17#17]
Arguments: X

(46) AQEShuffleRead
Input [1]: [#17#17]
Arguments: coalesced

(47) InputAdapter
Input [1]: [#17#17]

(48) NativeSort
Input [1]: [#17#17]
Arguments: [s_store_sk#17 ASC NULLS FIRST], false

(49) NativeSortMergeJoin
Left keys [1]: [ss_store_sk#12]
Right keys [1]: [s_store_sk#17]
Join type: Inner
Join condition: None

(50) NativeProject
Output [3]: [i_manufact_id#5, ss_sales_price#13, d_qoy#16]
Input [5]: [i_manufact_id#5, ss_store_sk#12, ss_sales_price#13, d_qoy#16, #17#17]

(51) NativeProject
Output [3]: [i_manufact_id#5 AS i_manufact_id#5, d_qoy#16 AS d_qoy#16, UnscaledValue(ss_sales_price#13) AS _c2#18]
Input [3]: [i_manufact_id#5, ss_sales_price#13, d_qoy#16]

(52) NativeHashAggregate
Input [3]: [i_manufact_id#5, d_qoy#16, _c2#18]
Keys [2]: [i_manufact_id#5, d_qoy#16]
Functions [1]: [partial_sum(_c2#18)]
Aggregate Attributes [1]: [sum#19]
Results [3]: [i_manufact_id#5, d_qoy#16, #20]

(53) NativeShuffleExchange
Input [3]: [i_manufact_id#5, d_qoy#16, #20]
Arguments: hashpartitioning(i_manufact_id#5, d_qoy#16, 100), ENSURE_REQUIREMENTS, [plan_id=7]

(54) ShuffleQueryStage
Output [3]: [i_manufact_id#5, d_qoy#16, #20]
Arguments: X

(55) AQEShuffleRead
Input [3]: [i_manufact_id#5, d_qoy#16, #20]
Arguments: coalesced

(56) InputAdapter
Input [3]: [i_manufact_id#5, d_qoy#16, #20]

(57) NativeHashAggregate
Input [3]: [i_manufact_id#5, d_qoy#16, #20]
Keys [2]: [i_manufact_id#5, d_qoy#16]
Functions [1]: [sum(UnscaledValue(ss_sales_price#13))]
Aggregate Attributes [1]: [sum(UnscaledValue(ss_sales_price#13))#21]
Results [3]: [i_manufact_id#5, d_qoy#16, sum(UnscaledValue(ss_sales_price#13))#21]

(58) NativeProject
Output [3]: [i_manufact_id#5, MakeDecimal(sum(UnscaledValue(ss_sales_price#13))#21,17,2) AS sum_sales#22, MakeDecimal(sum(UnscaledValue(ss_sales_price#13))#21,17,2) AS _w0#23]
Input [3]: [i_manufact_id#5, d_qoy#16, sum(UnscaledValue(ss_sales_price#13))#21]

(59) NativeShuffleExchange
Input [3]: [i_manufact_id#5, sum_sales#22, _w0#23]
Arguments: hashpartitioning(i_manufact_id#5, 100), ENSURE_REQUIREMENTS, [plan_id=8]

(60) ShuffleQueryStage
Output [3]: [i_manufact_id#5, sum_sales#22, _w0#23]
Arguments: X

(61) AQEShuffleRead
Input [3]: [i_manufact_id#5, sum_sales#22, _w0#23]
Arguments: coalesced

(62) InputAdapter
Input [3]: [i_manufact_id#5, sum_sales#22, _w0#23]

(63) NativeSort
Input [3]: [i_manufact_id#5, sum_sales#22, _w0#23]
Arguments: [i_manufact_id#5 ASC NULLS FIRST], false

(64) Window
Input [3]: [i_manufact_id#5, sum_sales#22, _w0#23]
Arguments: [avg(_w0#23) windowspecdefinition(i_manufact_id#5, specifiedwindowframe(RowFrame, unboundedpreceding$(), unboundedfollowing$())) AS avg_quarterly_sales#24], [i_manufact_id#5]

(65) Filter [codegen id : X]
Input [4]: [i_manufact_id#5, sum_sales#22, _w0#23, avg_quarterly_sales#24]
Condition : CASE WHEN (avg_quarterly_sales#24 > 0.000000) THEN ((abs((sum_sales#22 - avg_quarterly_sales#24)) / avg_quarterly_sales#24) > 0.1000000000000000) ELSE false END

(66) Project [codegen id : X]
Output [3]: [i_manufact_id#5, sum_sales#22, avg_quarterly_sales#24]
Input [4]: [i_manufact_id#5, sum_sales#22, _w0#23, avg_quarterly_sales#24]

(67) TakeOrderedAndProject
Input [3]: [i_manufact_id#5, sum_sales#22, avg_quarterly_sales#24]
Arguments: X, [avg_quarterly_sales#24 ASC NULLS FIRST, sum_sales#22 ASC NULLS FIRST, i_manufact_id#5 ASC NULLS FIRST], [i_manufact_id#5, sum_sales#22, avg_quarterly_sales#24]

(68) Scan parquet
Output [5]: [i_item_sk#1, i_brand#2, i_class#3, i_category#4, i_manufact_id#5]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [Or(And(And(In(i_category, [Books,Children,Electronics]),In(i_class, [personal,portable,reference,self-help])),In(i_brand, [exportiunivamalg #6,scholaramalgamalg #7,scholaramalgamalg #8,scholaramalgamalg #6])),And(And(In(i_category, [Men,Music,Women]),In(i_class, [accessories,classical,fragrances,pants])),In(i_brand, [amalgimporto #9,edu packscholar #9,exportiimporto #9,importoamalg #9]))), IsNotNull(i_item_sk)]
ReadSchema: struct<i_item_sk:int,i_brand:string,i_class:string,i_category:string,i_manufact_id:int>

(69) Filter
Input [5]: [i_item_sk#1, i_brand#2, i_class#3, i_category#4, i_manufact_id#5]
Condition : ((((i_category#4 IN (Books,Children,Electronics) AND i_class#3 IN (personal,portable,reference,self-help)) AND i_brand#2 IN (scholaramalgamalg #7,scholaramalgamalg #8,exportiunivamalg #6,scholaramalgamalg #6)) OR ((i_category#4 IN (Women,Music,Men) AND i_class#3 IN (accessories,classical,fragrances,pants)) AND i_brand#2 IN (amalgimporto #9,edu packscholar #9,exportiimporto #9,importoamalg #9))) AND isnotnull(i_item_sk#1))

(70) Project
Output [2]: [i_item_sk#1, i_manufact_id#5]
Input [5]: [i_item_sk#1, i_brand#2, i_class#3, i_category#4, i_manufact_id#5]

(71) Exchange
Input [2]: [i_item_sk#1, i_manufact_id#5]
Arguments: hashpartitioning(i_item_sk#1, 100), ENSURE_REQUIREMENTS, [plan_id=9]

(72) Sort
Input [2]: [i_item_sk#1, i_manufact_id#5]
Arguments: [i_item_sk#1 ASC NULLS FIRST], false, 0

(73) Scan parquet
Output [4]: [ss_sold_date_sk#10, ss_item_sk#11, ss_store_sk#12, ss_sales_price#13]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(ss_item_sk), IsNotNull(ss_sold_date_sk), IsNotNull(ss_store_sk)]
ReadSchema: struct<ss_sold_date_sk:int,ss_item_sk:int,ss_store_sk:int,ss_sales_price:decimal(7,2)>

(74) Filter
Input [4]: [ss_sold_date_sk#10, ss_item_sk#11, ss_store_sk#12, ss_sales_price#13]
Condition : ((isnotnull(ss_item_sk#11) AND isnotnull(ss_sold_date_sk#10)) AND isnotnull(ss_store_sk#12))

(75) Exchange
Input [4]: [ss_sold_date_sk#10, ss_item_sk#11, ss_store_sk#12, ss_sales_price#13]
Arguments: hashpartitioning(ss_item_sk#11, 100), ENSURE_REQUIREMENTS, [plan_id=10]

(76) Sort
Input [4]: [ss_sold_date_sk#10, ss_item_sk#11, ss_store_sk#12, ss_sales_price#13]
Arguments: [ss_item_sk#11 ASC NULLS FIRST], false, 0

(77) SortMergeJoin
Left keys [1]: [i_item_sk#1]
Right keys [1]: [ss_item_sk#11]
Join type: Inner
Join condition: None

(78) Project
Output [4]: [i_manufact_id#5, ss_sold_date_sk#10, ss_store_sk#12, ss_sales_price#13]
Input [6]: [i_item_sk#1, i_manufact_id#5, ss_sold_date_sk#10, ss_item_sk#11, ss_store_sk#12, ss_sales_price#13]

(79) Exchange
Input [4]: [i_manufact_id#5, ss_sold_date_sk#10, ss_store_sk#12, ss_sales_price#13]
Arguments: hashpartitioning(ss_sold_date_sk#10, 100), ENSURE_REQUIREMENTS, [plan_id=11]

(80) Sort
Input [4]: [i_manufact_id#5, ss_sold_date_sk#10, ss_store_sk#12, ss_sales_price#13]
Arguments: [ss_sold_date_sk#10 ASC NULLS FIRST], false, 0

(81) Scan parquet
Output [3]: [d_date_sk#14, d_month_seq#15, d_qoy#16]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [In(d_month_seq, [1200,1201,1202,1203,1204,1205,1206,1207,1208,1209,1210,1211]), IsNotNull(d_date_sk)]
ReadSchema: struct<d_date_sk:int,d_month_seq:int,d_qoy:int>

(82) Filter
Input [3]: [d_date_sk#14, d_month_seq#15, d_qoy#16]
Condition : (d_month_seq#15 INSET 1200, 1201, 1202, 1203, 1204, 1205, 1206, 1207, 1208, 1209, 1210, 1211 AND isnotnull(d_date_sk#14))

(83) Project
Output [2]: [d_date_sk#14, d_qoy#16]
Input [3]: [d_date_sk#14, d_month_seq#15, d_qoy#16]

(84) Exchange
Input [2]: [d_date_sk#14, d_qoy#16]
Arguments: hashpartitioning(d_date_sk#14, 100), ENSURE_REQUIREMENTS, [plan_id=12]

(85) Sort
Input [2]: [d_date_sk#14, d_qoy#16]
Arguments: [d_date_sk#14 ASC NULLS FIRST], false, 0

(86) SortMergeJoin
Left keys [1]: [ss_sold_date_sk#10]
Right keys [1]: [d_date_sk#14]
Join type: Inner
Join condition: None

(87) Project
Output [4]: [i_manufact_id#5, ss_store_sk#12, ss_sales_price#13, d_qoy#16]
Input [6]: [i_manufact_id#5, ss_sold_date_sk#10, ss_store_sk#12, ss_sales_price#13, d_date_sk#14, d_qoy#16]

(88) Exchange
Input [4]: [i_manufact_id#5, ss_store_sk#12, ss_sales_price#13, d_qoy#16]
Arguments: hashpartitioning(ss_store_sk#12, 100), ENSURE_REQUIREMENTS, [plan_id=13]

(89) Sort
Input [4]: [i_manufact_id#5, ss_store_sk#12, ss_sales_price#13, d_qoy#16]
Arguments: [ss_store_sk#12 ASC NULLS FIRST], false, 0

(90) Scan parquet
Output [1]: [s_store_sk#17]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(s_store_sk)]
ReadSchema: struct<s_store_sk:int>

(91) Filter
Input [1]: [s_store_sk#17]
Condition : isnotnull(s_store_sk#17)

(92) Exchange
Input [1]: [s_store_sk#17]
Arguments: hashpartitioning(s_store_sk#17, 100), ENSURE_REQUIREMENTS, [plan_id=14]

(93) Sort
Input [1]: [s_store_sk#17]
Arguments: [s_store_sk#17 ASC NULLS FIRST], false, 0

(94) SortMergeJoin
Left keys [1]: [ss_store_sk#12]
Right keys [1]: [s_store_sk#17]
Join type: Inner
Join condition: None

(95) Project
Output [3]: [i_manufact_id#5, ss_sales_price#13, d_qoy#16]
Input [5]: [i_manufact_id#5, ss_store_sk#12, ss_sales_price#13, d_qoy#16, s_store_sk#17]

(96) HashAggregate
Input [3]: [i_manufact_id#5, ss_sales_price#13, d_qoy#16]
Keys [2]: [i_manufact_id#5, d_qoy#16]
Functions [1]: [partial_sum(UnscaledValue(ss_sales_price#13))]
Aggregate Attributes [1]: [sum#19]
Results [3]: [i_manufact_id#5, d_qoy#16, sum#25]

(97) Exchange
Input [3]: [i_manufact_id#5, d_qoy#16, sum#25]
Arguments: hashpartitioning(i_manufact_id#5, d_qoy#16, 100), ENSURE_REQUIREMENTS, [plan_id=15]

(98) HashAggregate
Input [3]: [i_manufact_id#5, d_qoy#16, sum#25]
Keys [2]: [i_manufact_id#5, d_qoy#16]
Functions [1]: [sum(UnscaledValue(ss_sales_price#13))]
Aggregate Attributes [1]: [sum(UnscaledValue(ss_sales_price#13))#21]
Results [3]: [i_manufact_id#5, MakeDecimal(sum(UnscaledValue(ss_sales_price#13))#21,17,2) AS sum_sales#22, MakeDecimal(sum(UnscaledValue(ss_sales_price#13))#21,17,2) AS _w0#23]

(99) Exchange
Input [3]: [i_manufact_id#5, sum_sales#22, _w0#23]
Arguments: hashpartitioning(i_manufact_id#5, 100), ENSURE_REQUIREMENTS, [plan_id=16]

(100) Sort
Input [3]: [i_manufact_id#5, sum_sales#22, _w0#23]
Arguments: [i_manufact_id#5 ASC NULLS FIRST], false, 0

(101) Window
Input [3]: [i_manufact_id#5, sum_sales#22, _w0#23]
Arguments: [avg(_w0#23) windowspecdefinition(i_manufact_id#5, specifiedwindowframe(RowFrame, unboundedpreceding$(), unboundedfollowing$())) AS avg_quarterly_sales#24], [i_manufact_id#5]

(102) Filter
Input [4]: [i_manufact_id#5, sum_sales#22, _w0#23, avg_quarterly_sales#24]
Condition : CASE WHEN (avg_quarterly_sales#24 > 0.000000) THEN ((abs((sum_sales#22 - avg_quarterly_sales#24)) / avg_quarterly_sales#24) > 0.1000000000000000) ELSE false END

(103) Project
Output [3]: [i_manufact_id#5, sum_sales#22, avg_quarterly_sales#24]
Input [4]: [i_manufact_id#5, sum_sales#22, _w0#23, avg_quarterly_sales#24]

(104) TakeOrderedAndProject
Input [3]: [i_manufact_id#5, sum_sales#22, avg_quarterly_sales#24]
Arguments: X, [avg_quarterly_sales#24 ASC NULLS FIRST, sum_sales#22 ASC NULLS FIRST, i_manufact_id#5 ASC NULLS FIRST], [i_manufact_id#5, sum_sales#22, avg_quarterly_sales#24]

(105) AdaptiveSparkPlan
Output [3]: [i_manufact_id#5, sum_sales#22, avg_quarterly_sales#24]
Arguments: isFinalPlan=true

