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


(67) Scan parquet
Output [4]: [i_item_sk#1, i_brand#2, i_class#3, i_category#4]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [Or(And(In(i_category, [Books,Electronics,Sports]),In(i_class, [computers,football,stereo])),And(In(i_category, [Jewelry,Men,Women]),In(i_class, [birdal,dresses,shirts]))), IsNotNull(i_item_sk)]
ReadSchema: struct<i_item_sk:int,i_brand:string,i_class:string,i_category:string>

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

(3) NativeFilter
Input [4]: [#1#1, #2#2, #3#3, #4#4]
Condition : (((i_category#4 IN (Books,Electronics,Sports) AND i_class#3 IN (computers,stereo,football)) OR (i_category#4 IN (Men,Jewelry,Women) AND i_class#3 IN (shirts,birdal,dresses))) AND isnotnull(i_item_sk#1))

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

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

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

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

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

(71) Scan parquet
Output [4]: [ss_sold_date_sk#5, ss_item_sk#6, ss_store_sk#7, ss_sales_price#8]
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)>

(10) InputAdapter
Input [4]: [ss_sold_date_sk#5, ss_item_sk#6, ss_store_sk#7, ss_sales_price#8]
Arguments: [#5, #6, #7, #8]

(11) NativeFilter
Input [4]: [#5#5, #6#6, #7#7, #8#8]
Condition : ((isnotnull(ss_item_sk#6) AND isnotnull(ss_sold_date_sk#5)) AND isnotnull(ss_store_sk#7))

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

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

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

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

(16) NativeSort
Input [4]: [#5#5, #6#6, #7#7, #8#8]
Arguments: [ss_item_sk#6 ASC NULLS FIRST], false

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

(18) NativeProject
Output [6]: [i_brand#2, i_class#3, i_category#4, ss_sold_date_sk#5, ss_store_sk#7, ss_sales_price#8]
Input [8]: [#1#1, #2#2, #3#3, #4#4, #5#5, #6#6, #7#7, #8#8]

(19) NativeShuffleExchange
Input [6]: [i_brand#2, i_class#3, i_category#4, ss_sold_date_sk#5, ss_store_sk#7, ss_sales_price#8]
Arguments: hashpartitioning(ss_sold_date_sk#5, 100), ENSURE_REQUIREMENTS, [plan_id=3]

(20) ShuffleQueryStage
Output [6]: [i_brand#2, i_class#3, i_category#4, ss_sold_date_sk#5, ss_store_sk#7, ss_sales_price#8]
Arguments: X

(21) AQEShuffleRead
Input [6]: [i_brand#2, i_class#3, i_category#4, ss_sold_date_sk#5, ss_store_sk#7, ss_sales_price#8]
Arguments: coalesced

(22) InputAdapter
Input [6]: [i_brand#2, i_class#3, i_category#4, ss_sold_date_sk#5, ss_store_sk#7, ss_sales_price#8]

(23) NativeSort
Input [6]: [i_brand#2, i_class#3, i_category#4, ss_sold_date_sk#5, ss_store_sk#7, ss_sales_price#8]
Arguments: [ss_sold_date_sk#5 ASC NULLS FIRST], false

(79) Scan parquet
Output [3]: [d_date_sk#9, d_year#10, d_moy#11]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(d_year), EqualTo(d_year,1999), IsNotNull(d_date_sk)]
ReadSchema: struct<d_date_sk:int,d_year:int,d_moy:int>

(25) InputAdapter
Input [3]: [d_date_sk#9, d_year#10, d_moy#11]
Arguments: [#9, #10, #11]

(26) NativeFilter
Input [3]: [#9#9, #10#10, #11#11]
Condition : ((isnotnull(d_year#10) AND (d_year#10 = 1999)) AND isnotnull(d_date_sk#9))

(27) NativeProject
Output [2]: [d_date_sk#9, d_moy#11]
Input [3]: [#9#9, #10#10, #11#11]

(28) NativeShuffleExchange
Input [2]: [d_date_sk#9, d_moy#11]
Arguments: hashpartitioning(d_date_sk#9, 100), ENSURE_REQUIREMENTS, [plan_id=4]

(29) ShuffleQueryStage
Output [2]: [d_date_sk#9, d_moy#11]
Arguments: X

(30) AQEShuffleRead
Input [2]: [d_date_sk#9, d_moy#11]
Arguments: coalesced

(31) InputAdapter
Input [2]: [d_date_sk#9, d_moy#11]

(32) NativeSort
Input [2]: [d_date_sk#9, d_moy#11]
Arguments: [d_date_sk#9 ASC NULLS FIRST], false

(33) NativeSortMergeJoin
Left keys [1]: [ss_sold_date_sk#5]
Right keys [1]: [d_date_sk#9]
Join type: Inner
Join condition: None

(34) NativeProject
Output [6]: [i_brand#2, i_class#3, i_category#4, ss_store_sk#7, ss_sales_price#8, d_moy#11]
Input [8]: [i_brand#2, i_class#3, i_category#4, ss_sold_date_sk#5, ss_store_sk#7, ss_sales_price#8, d_date_sk#9, d_moy#11]

(35) NativeShuffleExchange
Input [6]: [i_brand#2, i_class#3, i_category#4, ss_store_sk#7, ss_sales_price#8, d_moy#11]
Arguments: hashpartitioning(ss_store_sk#7, 100), ENSURE_REQUIREMENTS, [plan_id=5]

(36) ShuffleQueryStage
Output [6]: [i_brand#2, i_class#3, i_category#4, ss_store_sk#7, ss_sales_price#8, d_moy#11]
Arguments: X

(37) AQEShuffleRead
Input [6]: [i_brand#2, i_class#3, i_category#4, ss_store_sk#7, ss_sales_price#8, d_moy#11]
Arguments: coalesced

(38) InputAdapter
Input [6]: [i_brand#2, i_class#3, i_category#4, ss_store_sk#7, ss_sales_price#8, d_moy#11]

(39) NativeSort
Input [6]: [i_brand#2, i_class#3, i_category#4, ss_store_sk#7, ss_sales_price#8, d_moy#11]
Arguments: [ss_store_sk#7 ASC NULLS FIRST], false

(88) Scan parquet
Output [3]: [s_store_sk#12, s_store_name#13, s_company_name#14]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(s_store_sk)]
ReadSchema: struct<s_store_sk:int,s_store_name:string,s_company_name:string>

(41) InputAdapter
Input [3]: [s_store_sk#12, s_store_name#13, s_company_name#14]
Arguments: [#12, #13, #14]

(42) NativeFilter
Input [3]: [#12#12, #13#13, #14#14]
Condition : isnotnull(s_store_sk#12)

(43) NativeShuffleExchange
Input [3]: [#12#12, #13#13, #14#14]
Arguments: hashpartitioning(s_store_sk#12, 100), ENSURE_REQUIREMENTS, [plan_id=6]

(44) ShuffleQueryStage
Output [3]: [#12#12, #13#13, #14#14]
Arguments: X

(45) AQEShuffleRead
Input [3]: [#12#12, #13#13, #14#14]
Arguments: coalesced

(46) InputAdapter
Input [3]: [#12#12, #13#13, #14#14]

(47) NativeSort
Input [3]: [#12#12, #13#13, #14#14]
Arguments: [s_store_sk#12 ASC NULLS FIRST], false

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

(49) NativeProject
Output [7]: [i_brand#2, i_class#3, i_category#4, ss_sales_price#8, d_moy#11, s_store_name#13, s_company_name#14]
Input [9]: [i_brand#2, i_class#3, i_category#4, ss_store_sk#7, ss_sales_price#8, d_moy#11, #12#12, #13#13, #14#14]

(50) NativeProject
Output [7]: [i_category#4 AS i_category#4, i_class#3 AS i_class#3, i_brand#2 AS i_brand#2, s_store_name#13 AS s_store_name#13, s_company_name#14 AS s_company_name#14, d_moy#11 AS d_moy#11, UnscaledValue(ss_sales_price#8) AS _c6#15]
Input [7]: [i_brand#2, i_class#3, i_category#4, ss_sales_price#8, d_moy#11, s_store_name#13, s_company_name#14]

(51) NativeHashAggregate
Input [7]: [i_category#4, i_class#3, i_brand#2, s_store_name#13, s_company_name#14, d_moy#11, _c6#15]
Keys [6]: [i_category#4, i_class#3, i_brand#2, s_store_name#13, s_company_name#14, d_moy#11]
Functions [1]: [partial_sum(_c6#15)]
Aggregate Attributes [1]: [sum#16]
Results [7]: [i_category#4, i_class#3, i_brand#2, s_store_name#13, s_company_name#14, d_moy#11, #17]

(52) NativeShuffleExchange
Input [7]: [i_category#4, i_class#3, i_brand#2, s_store_name#13, s_company_name#14, d_moy#11, #17]
Arguments: hashpartitioning(i_category#4, i_class#3, i_brand#2, s_store_name#13, s_company_name#14, d_moy#11, 100), ENSURE_REQUIREMENTS, [plan_id=7]

(53) ShuffleQueryStage
Output [7]: [i_category#4, i_class#3, i_brand#2, s_store_name#13, s_company_name#14, d_moy#11, #17]
Arguments: X

(54) AQEShuffleRead
Input [7]: [i_category#4, i_class#3, i_brand#2, s_store_name#13, s_company_name#14, d_moy#11, #17]
Arguments: coalesced

(55) InputAdapter
Input [7]: [i_category#4, i_class#3, i_brand#2, s_store_name#13, s_company_name#14, d_moy#11, #17]

(56) NativeHashAggregate
Input [7]: [i_category#4, i_class#3, i_brand#2, s_store_name#13, s_company_name#14, d_moy#11, #17]
Keys [6]: [i_category#4, i_class#3, i_brand#2, s_store_name#13, s_company_name#14, d_moy#11]
Functions [1]: [sum(UnscaledValue(ss_sales_price#8))]
Aggregate Attributes [1]: [sum(UnscaledValue(ss_sales_price#8))#18]
Results [7]: [i_category#4, i_class#3, i_brand#2, s_store_name#13, s_company_name#14, d_moy#11, sum(UnscaledValue(ss_sales_price#8))#18]

(57) NativeProject
Output [8]: [i_category#4, i_class#3, i_brand#2, s_store_name#13, s_company_name#14, d_moy#11, MakeDecimal(sum(UnscaledValue(ss_sales_price#8))#18,17,2) AS sum_sales#19, MakeDecimal(sum(UnscaledValue(ss_sales_price#8))#18,17,2) AS _w0#20]
Input [7]: [i_category#4, i_class#3, i_brand#2, s_store_name#13, s_company_name#14, d_moy#11, sum(UnscaledValue(ss_sales_price#8))#18]

(58) NativeShuffleExchange
Input [8]: [i_category#4, i_class#3, i_brand#2, s_store_name#13, s_company_name#14, d_moy#11, sum_sales#19, _w0#20]
Arguments: hashpartitioning(i_category#4, i_brand#2, s_store_name#13, s_company_name#14, 100), ENSURE_REQUIREMENTS, [plan_id=8]

(59) ShuffleQueryStage
Output [8]: [i_category#4, i_class#3, i_brand#2, s_store_name#13, s_company_name#14, d_moy#11, sum_sales#19, _w0#20]
Arguments: X

(60) AQEShuffleRead
Input [8]: [i_category#4, i_class#3, i_brand#2, s_store_name#13, s_company_name#14, d_moy#11, sum_sales#19, _w0#20]
Arguments: coalesced

(61) InputAdapter
Input [8]: [i_category#4, i_class#3, i_brand#2, s_store_name#13, s_company_name#14, d_moy#11, sum_sales#19, _w0#20]

(62) NativeSort
Input [8]: [i_category#4, i_class#3, i_brand#2, s_store_name#13, s_company_name#14, d_moy#11, sum_sales#19, _w0#20]
Arguments: [i_category#4 ASC NULLS FIRST, i_brand#2 ASC NULLS FIRST, s_store_name#13 ASC NULLS FIRST, s_company_name#14 ASC NULLS FIRST], false

(63) Window
Input [8]: [i_category#4, i_class#3, i_brand#2, s_store_name#13, s_company_name#14, d_moy#11, sum_sales#19, _w0#20]
Arguments: [avg(_w0#20) windowspecdefinition(i_category#4, i_brand#2, s_store_name#13, s_company_name#14, specifiedwindowframe(RowFrame, unboundedpreceding$(), unboundedfollowing$())) AS avg_monthly_sales#21], [i_category#4, i_brand#2, s_store_name#13, s_company_name#14]

(64) Filter [codegen id : X]
Input [9]: [i_category#4, i_class#3, i_brand#2, s_store_name#13, s_company_name#14, d_moy#11, sum_sales#19, _w0#20, avg_monthly_sales#21]
Condition : CASE WHEN NOT (avg_monthly_sales#21 = 0.000000) THEN ((abs((sum_sales#19 - avg_monthly_sales#21)) / avg_monthly_sales#21) > 0.1000000000000000) END

(65) Project [codegen id : X]
Output [8]: [i_category#4, i_class#3, i_brand#2, s_store_name#13, s_company_name#14, d_moy#11, sum_sales#19, avg_monthly_sales#21]
Input [9]: [i_category#4, i_class#3, i_brand#2, s_store_name#13, s_company_name#14, d_moy#11, sum_sales#19, _w0#20, avg_monthly_sales#21]

(66) TakeOrderedAndProject
Input [8]: [i_category#4, i_class#3, i_brand#2, s_store_name#13, s_company_name#14, d_moy#11, sum_sales#19, avg_monthly_sales#21]
Arguments: X, [(sum_sales#19 - avg_monthly_sales#21) ASC NULLS FIRST, s_store_name#13 ASC NULLS FIRST], [i_category#4, i_class#3, i_brand#2, s_store_name#13, s_company_name#14, d_moy#11, sum_sales#19, avg_monthly_sales#21]

(67) Scan parquet
Output [4]: [i_item_sk#1, i_brand#2, i_class#3, i_category#4]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [Or(And(In(i_category, [Books,Electronics,Sports]),In(i_class, [computers,football,stereo])),And(In(i_category, [Jewelry,Men,Women]),In(i_class, [birdal,dresses,shirts]))), IsNotNull(i_item_sk)]
ReadSchema: struct<i_item_sk:int,i_brand:string,i_class:string,i_category:string>

(68) Filter
Input [4]: [i_item_sk#1, i_brand#2, i_class#3, i_category#4]
Condition : (((i_category#4 IN (Books,Electronics,Sports) AND i_class#3 IN (computers,stereo,football)) OR (i_category#4 IN (Men,Jewelry,Women) AND i_class#3 IN (shirts,birdal,dresses))) AND isnotnull(i_item_sk#1))

(69) Exchange
Input [4]: [i_item_sk#1, i_brand#2, i_class#3, i_category#4]
Arguments: hashpartitioning(i_item_sk#1, 100), ENSURE_REQUIREMENTS, [plan_id=9]

(70) Sort
Input [4]: [i_item_sk#1, i_brand#2, i_class#3, i_category#4]
Arguments: [i_item_sk#1 ASC NULLS FIRST], false, 0

(71) Scan parquet
Output [4]: [ss_sold_date_sk#5, ss_item_sk#6, ss_store_sk#7, ss_sales_price#8]
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)>

(72) Filter
Input [4]: [ss_sold_date_sk#5, ss_item_sk#6, ss_store_sk#7, ss_sales_price#8]
Condition : ((isnotnull(ss_item_sk#6) AND isnotnull(ss_sold_date_sk#5)) AND isnotnull(ss_store_sk#7))

(73) Exchange
Input [4]: [ss_sold_date_sk#5, ss_item_sk#6, ss_store_sk#7, ss_sales_price#8]
Arguments: hashpartitioning(ss_item_sk#6, 100), ENSURE_REQUIREMENTS, [plan_id=10]

(74) Sort
Input [4]: [ss_sold_date_sk#5, ss_item_sk#6, ss_store_sk#7, ss_sales_price#8]
Arguments: [ss_item_sk#6 ASC NULLS FIRST], false, 0

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

(76) Project
Output [6]: [i_brand#2, i_class#3, i_category#4, ss_sold_date_sk#5, ss_store_sk#7, ss_sales_price#8]
Input [8]: [i_item_sk#1, i_brand#2, i_class#3, i_category#4, ss_sold_date_sk#5, ss_item_sk#6, ss_store_sk#7, ss_sales_price#8]

(77) Exchange
Input [6]: [i_brand#2, i_class#3, i_category#4, ss_sold_date_sk#5, ss_store_sk#7, ss_sales_price#8]
Arguments: hashpartitioning(ss_sold_date_sk#5, 100), ENSURE_REQUIREMENTS, [plan_id=11]

(78) Sort
Input [6]: [i_brand#2, i_class#3, i_category#4, ss_sold_date_sk#5, ss_store_sk#7, ss_sales_price#8]
Arguments: [ss_sold_date_sk#5 ASC NULLS FIRST], false, 0

(79) Scan parquet
Output [3]: [d_date_sk#9, d_year#10, d_moy#11]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(d_year), EqualTo(d_year,1999), IsNotNull(d_date_sk)]
ReadSchema: struct<d_date_sk:int,d_year:int,d_moy:int>

(80) Filter
Input [3]: [d_date_sk#9, d_year#10, d_moy#11]
Condition : ((isnotnull(d_year#10) AND (d_year#10 = 1999)) AND isnotnull(d_date_sk#9))

(81) Project
Output [2]: [d_date_sk#9, d_moy#11]
Input [3]: [d_date_sk#9, d_year#10, d_moy#11]

(82) Exchange
Input [2]: [d_date_sk#9, d_moy#11]
Arguments: hashpartitioning(d_date_sk#9, 100), ENSURE_REQUIREMENTS, [plan_id=12]

(83) Sort
Input [2]: [d_date_sk#9, d_moy#11]
Arguments: [d_date_sk#9 ASC NULLS FIRST], false, 0

(84) SortMergeJoin
Left keys [1]: [ss_sold_date_sk#5]
Right keys [1]: [d_date_sk#9]
Join type: Inner
Join condition: None

(85) Project
Output [6]: [i_brand#2, i_class#3, i_category#4, ss_store_sk#7, ss_sales_price#8, d_moy#11]
Input [8]: [i_brand#2, i_class#3, i_category#4, ss_sold_date_sk#5, ss_store_sk#7, ss_sales_price#8, d_date_sk#9, d_moy#11]

(86) Exchange
Input [6]: [i_brand#2, i_class#3, i_category#4, ss_store_sk#7, ss_sales_price#8, d_moy#11]
Arguments: hashpartitioning(ss_store_sk#7, 100), ENSURE_REQUIREMENTS, [plan_id=13]

(87) Sort
Input [6]: [i_brand#2, i_class#3, i_category#4, ss_store_sk#7, ss_sales_price#8, d_moy#11]
Arguments: [ss_store_sk#7 ASC NULLS FIRST], false, 0

(88) Scan parquet
Output [3]: [s_store_sk#12, s_store_name#13, s_company_name#14]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(s_store_sk)]
ReadSchema: struct<s_store_sk:int,s_store_name:string,s_company_name:string>

(89) Filter
Input [3]: [s_store_sk#12, s_store_name#13, s_company_name#14]
Condition : isnotnull(s_store_sk#12)

(90) Exchange
Input [3]: [s_store_sk#12, s_store_name#13, s_company_name#14]
Arguments: hashpartitioning(s_store_sk#12, 100), ENSURE_REQUIREMENTS, [plan_id=14]

(91) Sort
Input [3]: [s_store_sk#12, s_store_name#13, s_company_name#14]
Arguments: [s_store_sk#12 ASC NULLS FIRST], false, 0

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

(93) Project
Output [7]: [i_brand#2, i_class#3, i_category#4, ss_sales_price#8, d_moy#11, s_store_name#13, s_company_name#14]
Input [9]: [i_brand#2, i_class#3, i_category#4, ss_store_sk#7, ss_sales_price#8, d_moy#11, s_store_sk#12, s_store_name#13, s_company_name#14]

(94) HashAggregate
Input [7]: [i_brand#2, i_class#3, i_category#4, ss_sales_price#8, d_moy#11, s_store_name#13, s_company_name#14]
Keys [6]: [i_category#4, i_class#3, i_brand#2, s_store_name#13, s_company_name#14, d_moy#11]
Functions [1]: [partial_sum(UnscaledValue(ss_sales_price#8))]
Aggregate Attributes [1]: [sum#16]
Results [7]: [i_category#4, i_class#3, i_brand#2, s_store_name#13, s_company_name#14, d_moy#11, sum#22]

(95) Exchange
Input [7]: [i_category#4, i_class#3, i_brand#2, s_store_name#13, s_company_name#14, d_moy#11, sum#22]
Arguments: hashpartitioning(i_category#4, i_class#3, i_brand#2, s_store_name#13, s_company_name#14, d_moy#11, 100), ENSURE_REQUIREMENTS, [plan_id=15]

(96) HashAggregate
Input [7]: [i_category#4, i_class#3, i_brand#2, s_store_name#13, s_company_name#14, d_moy#11, sum#22]
Keys [6]: [i_category#4, i_class#3, i_brand#2, s_store_name#13, s_company_name#14, d_moy#11]
Functions [1]: [sum(UnscaledValue(ss_sales_price#8))]
Aggregate Attributes [1]: [sum(UnscaledValue(ss_sales_price#8))#18]
Results [8]: [i_category#4, i_class#3, i_brand#2, s_store_name#13, s_company_name#14, d_moy#11, MakeDecimal(sum(UnscaledValue(ss_sales_price#8))#18,17,2) AS sum_sales#19, MakeDecimal(sum(UnscaledValue(ss_sales_price#8))#18,17,2) AS _w0#20]

(97) Exchange
Input [8]: [i_category#4, i_class#3, i_brand#2, s_store_name#13, s_company_name#14, d_moy#11, sum_sales#19, _w0#20]
Arguments: hashpartitioning(i_category#4, i_brand#2, s_store_name#13, s_company_name#14, 100), ENSURE_REQUIREMENTS, [plan_id=16]

(98) Sort
Input [8]: [i_category#4, i_class#3, i_brand#2, s_store_name#13, s_company_name#14, d_moy#11, sum_sales#19, _w0#20]
Arguments: [i_category#4 ASC NULLS FIRST, i_brand#2 ASC NULLS FIRST, s_store_name#13 ASC NULLS FIRST, s_company_name#14 ASC NULLS FIRST], false, 0

(99) Window
Input [8]: [i_category#4, i_class#3, i_brand#2, s_store_name#13, s_company_name#14, d_moy#11, sum_sales#19, _w0#20]
Arguments: [avg(_w0#20) windowspecdefinition(i_category#4, i_brand#2, s_store_name#13, s_company_name#14, specifiedwindowframe(RowFrame, unboundedpreceding$(), unboundedfollowing$())) AS avg_monthly_sales#21], [i_category#4, i_brand#2, s_store_name#13, s_company_name#14]

(100) Filter
Input [9]: [i_category#4, i_class#3, i_brand#2, s_store_name#13, s_company_name#14, d_moy#11, sum_sales#19, _w0#20, avg_monthly_sales#21]
Condition : CASE WHEN NOT (avg_monthly_sales#21 = 0.000000) THEN ((abs((sum_sales#19 - avg_monthly_sales#21)) / avg_monthly_sales#21) > 0.1000000000000000) END

(101) Project
Output [8]: [i_category#4, i_class#3, i_brand#2, s_store_name#13, s_company_name#14, d_moy#11, sum_sales#19, avg_monthly_sales#21]
Input [9]: [i_category#4, i_class#3, i_brand#2, s_store_name#13, s_company_name#14, d_moy#11, sum_sales#19, _w0#20, avg_monthly_sales#21]

(102) TakeOrderedAndProject
Input [8]: [i_category#4, i_class#3, i_brand#2, s_store_name#13, s_company_name#14, d_moy#11, sum_sales#19, avg_monthly_sales#21]
Arguments: X, [(sum_sales#19 - avg_monthly_sales#21) ASC NULLS FIRST, s_store_name#13 ASC NULLS FIRST], [i_category#4, i_class#3, i_brand#2, s_store_name#13, s_company_name#14, d_moy#11, sum_sales#19, avg_monthly_sales#21]

(103) AdaptiveSparkPlan
Output [8]: [i_category#4, i_class#3, i_brand#2, s_store_name#13, s_company_name#14, d_moy#11, sum_sales#19, avg_monthly_sales#21]
Arguments: isFinalPlan=true

