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


(120) Scan parquet
Output [7]: [ws_sold_date_sk#1, ws_item_sk#2, ws_web_page_sk#3, ws_order_number#4, ws_quantity#5, ws_sales_price#6, ws_net_profit#7]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(ws_item_sk), IsNotNull(ws_order_number), IsNotNull(ws_web_page_sk), IsNotNull(ws_sold_date_sk), Or(Or(And(GreaterThanOrEqual(ws_sales_price,100.00),LessThanOrEqual(ws_sales_price,150.00)),And(GreaterThanOrEqual(ws_sales_price,50.00),LessThanOrEqual(ws_sales_price,100.00))),And(GreaterThanOrEqual(ws_sales_price,150.00),LessThanOrEqual(ws_sales_price,200.00))), Or(Or(And(GreaterThanOrEqual(ws_net_profit,100.00),LessThanOrEqual(ws_net_profit,200.00)),And(GreaterThanOrEqual(ws_net_profit,150.00),LessThanOrEqual(ws_net_profit,300.00))),And(GreaterThanOrEqual(ws_net_profit,50.00),LessThanOrEqual(ws_net_profit,250.00)))]
ReadSchema: struct<ws_sold_date_sk:int,ws_item_sk:int,ws_web_page_sk:int,ws_order_number:int,ws_quantity:int,ws_sales_price:decimal(7,2),ws_net_profit:decimal(7,2)>

(2) InputAdapter
Input [7]: [ws_sold_date_sk#1, ws_item_sk#2, ws_web_page_sk#3, ws_order_number#4, ws_quantity#5, ws_sales_price#6, ws_net_profit#7]
Arguments: [#1, #2, #3, #4, #5, #6, #7]

(3) NativeFilter
Input [7]: [#1#1, #2#2, #3#3, #4#4, #5#5, #6#6, #7#7]
Condition : (((((isnotnull(ws_item_sk#2) AND isnotnull(ws_order_number#4)) AND isnotnull(ws_web_page_sk#3)) AND isnotnull(ws_sold_date_sk#1)) AND ((((ws_sales_price#6 >= 100.00) AND (ws_sales_price#6 <= 150.00)) OR ((ws_sales_price#6 >= 50.00) AND (ws_sales_price#6 <= 100.00))) OR ((ws_sales_price#6 >= 150.00) AND (ws_sales_price#6 <= 200.00)))) AND ((((ws_net_profit#7 >= 100.00) AND (ws_net_profit#7 <= 200.00)) OR ((ws_net_profit#7 >= 150.00) AND (ws_net_profit#7 <= 300.00))) OR ((ws_net_profit#7 >= 50.00) AND (ws_net_profit#7 <= 250.00))))

(4) NativeShuffleExchange
Input [7]: [#1#1, #2#2, #3#3, #4#4, #5#5, #6#6, #7#7]
Arguments: hashpartitioning(ws_item_sk#2, ws_order_number#4, 100), ENSURE_REQUIREMENTS, [plan_id=1]

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

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

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

(8) NativeSort
Input [7]: [#1#1, #2#2, #3#3, #4#4, #5#5, #6#6, #7#7]
Arguments: [ws_item_sk#2 ASC NULLS FIRST, ws_order_number#4 ASC NULLS FIRST], false

(124) Scan parquet
Output [8]: [wr_item_sk#8, wr_refunded_cdemo_sk#9, wr_refunded_addr_sk#10, wr_returning_cdemo_sk#11, wr_reason_sk#12, wr_order_number#13, wr_fee#14, wr_refunded_cash#15]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(wr_item_sk), IsNotNull(wr_order_number), IsNotNull(wr_refunded_cdemo_sk), IsNotNull(wr_returning_cdemo_sk), IsNotNull(wr_refunded_addr_sk), IsNotNull(wr_reason_sk)]
ReadSchema: struct<wr_item_sk:int,wr_refunded_cdemo_sk:int,wr_refunded_addr_sk:int,wr_returning_cdemo_sk:int,wr_reason_sk:int,wr_order_number:int,wr_fee:decimal(7,2),wr_refunded_cash:decimal(7,2)>

(10) InputAdapter
Input [8]: [wr_item_sk#8, wr_refunded_cdemo_sk#9, wr_refunded_addr_sk#10, wr_returning_cdemo_sk#11, wr_reason_sk#12, wr_order_number#13, wr_fee#14, wr_refunded_cash#15]
Arguments: [#8, #9, #10, #11, #12, #13, #14, #15]

(11) NativeFilter
Input [8]: [#8#8, #9#9, #10#10, #11#11, #12#12, #13#13, #14#14, #15#15]
Condition : (((((isnotnull(wr_item_sk#8) AND isnotnull(wr_order_number#13)) AND isnotnull(wr_refunded_cdemo_sk#9)) AND isnotnull(wr_returning_cdemo_sk#11)) AND isnotnull(wr_refunded_addr_sk#10)) AND isnotnull(wr_reason_sk#12))

(12) NativeShuffleExchange
Input [8]: [#8#8, #9#9, #10#10, #11#11, #12#12, #13#13, #14#14, #15#15]
Arguments: hashpartitioning(wr_item_sk#8, wr_order_number#13, 100), ENSURE_REQUIREMENTS, [plan_id=2]

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

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

(15) InputAdapter
Input [8]: [#8#8, #9#9, #10#10, #11#11, #12#12, #13#13, #14#14, #15#15]

(16) NativeSort
Input [8]: [#8#8, #9#9, #10#10, #11#11, #12#12, #13#13, #14#14, #15#15]
Arguments: [wr_item_sk#8 ASC NULLS FIRST, wr_order_number#13 ASC NULLS FIRST], false

(17) NativeSortMergeJoin
Left keys [2]: [ws_item_sk#2, ws_order_number#4]
Right keys [2]: [wr_item_sk#8, wr_order_number#13]
Join type: Inner
Join condition: None

(18) NativeProject
Output [11]: [ws_sold_date_sk#1, ws_web_page_sk#3, ws_quantity#5, ws_sales_price#6, ws_net_profit#7, wr_refunded_cdemo_sk#9, wr_refunded_addr_sk#10, wr_returning_cdemo_sk#11, wr_reason_sk#12, wr_fee#14, wr_refunded_cash#15]
Input [15]: [#1#1, #2#2, #3#3, #4#4, #5#5, #6#6, #7#7, #8#8, #9#9, #10#10, #11#11, #12#12, #13#13, #14#14, #15#15]

(19) NativeShuffleExchange
Input [11]: [ws_sold_date_sk#1, ws_web_page_sk#3, ws_quantity#5, ws_sales_price#6, ws_net_profit#7, wr_refunded_cdemo_sk#9, wr_refunded_addr_sk#10, wr_returning_cdemo_sk#11, wr_reason_sk#12, wr_fee#14, wr_refunded_cash#15]
Arguments: hashpartitioning(ws_web_page_sk#3, 100), ENSURE_REQUIREMENTS, [plan_id=3]

(20) ShuffleQueryStage
Output [11]: [ws_sold_date_sk#1, ws_web_page_sk#3, ws_quantity#5, ws_sales_price#6, ws_net_profit#7, wr_refunded_cdemo_sk#9, wr_refunded_addr_sk#10, wr_returning_cdemo_sk#11, wr_reason_sk#12, wr_fee#14, wr_refunded_cash#15]
Arguments: X

(21) AQEShuffleRead
Input [11]: [ws_sold_date_sk#1, ws_web_page_sk#3, ws_quantity#5, ws_sales_price#6, ws_net_profit#7, wr_refunded_cdemo_sk#9, wr_refunded_addr_sk#10, wr_returning_cdemo_sk#11, wr_reason_sk#12, wr_fee#14, wr_refunded_cash#15]
Arguments: coalesced

(22) InputAdapter
Input [11]: [ws_sold_date_sk#1, ws_web_page_sk#3, ws_quantity#5, ws_sales_price#6, ws_net_profit#7, wr_refunded_cdemo_sk#9, wr_refunded_addr_sk#10, wr_returning_cdemo_sk#11, wr_reason_sk#12, wr_fee#14, wr_refunded_cash#15]

(23) NativeSort
Input [11]: [ws_sold_date_sk#1, ws_web_page_sk#3, ws_quantity#5, ws_sales_price#6, ws_net_profit#7, wr_refunded_cdemo_sk#9, wr_refunded_addr_sk#10, wr_returning_cdemo_sk#11, wr_reason_sk#12, wr_fee#14, wr_refunded_cash#15]
Arguments: [ws_web_page_sk#3 ASC NULLS FIRST], false

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

(25) InputAdapter
Input [1]: [wp_web_page_sk#16]
Arguments: [#16]

(26) NativeFilter
Input [1]: [#16#16]
Condition : isnotnull(wp_web_page_sk#16)

(27) NativeShuffleExchange
Input [1]: [#16#16]
Arguments: hashpartitioning(wp_web_page_sk#16, 100), ENSURE_REQUIREMENTS, [plan_id=4]

(28) ShuffleQueryStage
Output [1]: [#16#16]
Arguments: X

(29) AQEShuffleRead
Input [1]: [#16#16]
Arguments: coalesced

(30) InputAdapter
Input [1]: [#16#16]

(31) NativeSort
Input [1]: [#16#16]
Arguments: [wp_web_page_sk#16 ASC NULLS FIRST], false

(32) NativeSortMergeJoin
Left keys [1]: [ws_web_page_sk#3]
Right keys [1]: [wp_web_page_sk#16]
Join type: Inner
Join condition: None

(33) NativeProject
Output [10]: [ws_sold_date_sk#1, ws_quantity#5, ws_sales_price#6, ws_net_profit#7, wr_refunded_cdemo_sk#9, wr_refunded_addr_sk#10, wr_returning_cdemo_sk#11, wr_reason_sk#12, wr_fee#14, wr_refunded_cash#15]
Input [12]: [ws_sold_date_sk#1, ws_web_page_sk#3, ws_quantity#5, ws_sales_price#6, ws_net_profit#7, wr_refunded_cdemo_sk#9, wr_refunded_addr_sk#10, wr_returning_cdemo_sk#11, wr_reason_sk#12, wr_fee#14, wr_refunded_cash#15, #16#16]

(34) NativeShuffleExchange
Input [10]: [ws_sold_date_sk#1, ws_quantity#5, ws_sales_price#6, ws_net_profit#7, wr_refunded_cdemo_sk#9, wr_refunded_addr_sk#10, wr_returning_cdemo_sk#11, wr_reason_sk#12, wr_fee#14, wr_refunded_cash#15]
Arguments: hashpartitioning(wr_refunded_cdemo_sk#9, 100), ENSURE_REQUIREMENTS, [plan_id=5]

(35) ShuffleQueryStage
Output [10]: [ws_sold_date_sk#1, ws_quantity#5, ws_sales_price#6, ws_net_profit#7, wr_refunded_cdemo_sk#9, wr_refunded_addr_sk#10, wr_returning_cdemo_sk#11, wr_reason_sk#12, wr_fee#14, wr_refunded_cash#15]
Arguments: X

(36) AQEShuffleRead
Input [10]: [ws_sold_date_sk#1, ws_quantity#5, ws_sales_price#6, ws_net_profit#7, wr_refunded_cdemo_sk#9, wr_refunded_addr_sk#10, wr_returning_cdemo_sk#11, wr_reason_sk#12, wr_fee#14, wr_refunded_cash#15]
Arguments: coalesced

(37) InputAdapter
Input [10]: [ws_sold_date_sk#1, ws_quantity#5, ws_sales_price#6, ws_net_profit#7, wr_refunded_cdemo_sk#9, wr_refunded_addr_sk#10, wr_returning_cdemo_sk#11, wr_reason_sk#12, wr_fee#14, wr_refunded_cash#15]

(38) NativeSort
Input [10]: [ws_sold_date_sk#1, ws_quantity#5, ws_sales_price#6, ws_net_profit#7, wr_refunded_cdemo_sk#9, wr_refunded_addr_sk#10, wr_returning_cdemo_sk#11, wr_reason_sk#12, wr_fee#14, wr_refunded_cash#15]
Arguments: [wr_refunded_cdemo_sk#9 ASC NULLS FIRST], false

(140) Scan parquet
Output [3]: [cd_demo_sk#17, cd_marital_status#18, cd_education_status#19]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(cd_demo_sk), IsNotNull(cd_marital_status), IsNotNull(cd_education_status), Or(Or(And(EqualTo(cd_marital_status,M),EqualTo(cd_education_status,Advanced Degree)),And(EqualTo(cd_marital_status,S),EqualTo(cd_education_status,College))),And(EqualTo(cd_marital_status,W),EqualTo(cd_education_status,2 yr Degree)))]
ReadSchema: struct<cd_demo_sk:int,cd_marital_status:string,cd_education_status:string>

(40) InputAdapter
Input [3]: [cd_demo_sk#17, cd_marital_status#18, cd_education_status#19]
Arguments: [#17, #18, #19]

(41) NativeFilter
Input [3]: [#17#17, #18#18, #19#19]
Condition : (((isnotnull(cd_demo_sk#17) AND isnotnull(cd_marital_status#18)) AND isnotnull(cd_education_status#19)) AND ((((cd_marital_status#18 = M) AND (cd_education_status#19 = Advanced Degree)) OR ((cd_marital_status#18 = S) AND (cd_education_status#19 = College))) OR ((cd_marital_status#18 = W) AND (cd_education_status#19 = 2 yr Degree))))

(42) NativeShuffleExchange
Input [3]: [#17#17, #18#18, #19#19]
Arguments: hashpartitioning(cd_demo_sk#17, 100), ENSURE_REQUIREMENTS, [plan_id=6]

(43) ShuffleQueryStage
Output [3]: [#17#17, #18#18, #19#19]
Arguments: X

(44) AQEShuffleRead
Input [3]: [#17#17, #18#18, #19#19]
Arguments: coalesced

(45) InputAdapter
Input [3]: [#17#17, #18#18, #19#19]

(46) NativeSort
Input [3]: [#17#17, #18#18, #19#19]
Arguments: [cd_demo_sk#17 ASC NULLS FIRST], false

(47) NativeSortMergeJoin
Left keys [1]: [wr_refunded_cdemo_sk#9]
Right keys [1]: [cd_demo_sk#17]
Join type: Inner
Join condition: ((((((cd_marital_status#18 = M) AND (cd_education_status#19 = Advanced Degree)) AND (ws_sales_price#6 >= 100.00)) AND (ws_sales_price#6 <= 150.00)) OR ((((cd_marital_status#18 = S) AND (cd_education_status#19 = College)) AND (ws_sales_price#6 >= 50.00)) AND (ws_sales_price#6 <= 100.00))) OR ((((cd_marital_status#18 = W) AND (cd_education_status#19 = 2 yr Degree)) AND (ws_sales_price#6 >= 150.00)) AND (ws_sales_price#6 <= 200.00)))

(48) NativeProject
Output [10]: [ws_sold_date_sk#1, ws_quantity#5, ws_net_profit#7, wr_refunded_addr_sk#10, wr_returning_cdemo_sk#11, wr_reason_sk#12, wr_fee#14, wr_refunded_cash#15, cd_marital_status#18, cd_education_status#19]
Input [13]: [ws_sold_date_sk#1, ws_quantity#5, ws_sales_price#6, ws_net_profit#7, wr_refunded_cdemo_sk#9, wr_refunded_addr_sk#10, wr_returning_cdemo_sk#11, wr_reason_sk#12, wr_fee#14, wr_refunded_cash#15, #17#17, #18#18, #19#19]

(49) NativeShuffleExchange
Input [10]: [ws_sold_date_sk#1, ws_quantity#5, ws_net_profit#7, wr_refunded_addr_sk#10, wr_returning_cdemo_sk#11, wr_reason_sk#12, wr_fee#14, wr_refunded_cash#15, cd_marital_status#18, cd_education_status#19]
Arguments: hashpartitioning(wr_returning_cdemo_sk#11, cd_marital_status#18, cd_education_status#19, 100), ENSURE_REQUIREMENTS, [plan_id=7]

(50) ShuffleQueryStage
Output [10]: [ws_sold_date_sk#1, ws_quantity#5, ws_net_profit#7, wr_refunded_addr_sk#10, wr_returning_cdemo_sk#11, wr_reason_sk#12, wr_fee#14, wr_refunded_cash#15, cd_marital_status#18, cd_education_status#19]
Arguments: X

(51) AQEShuffleRead
Input [10]: [ws_sold_date_sk#1, ws_quantity#5, ws_net_profit#7, wr_refunded_addr_sk#10, wr_returning_cdemo_sk#11, wr_reason_sk#12, wr_fee#14, wr_refunded_cash#15, cd_marital_status#18, cd_education_status#19]
Arguments: coalesced

(52) InputAdapter
Input [10]: [ws_sold_date_sk#1, ws_quantity#5, ws_net_profit#7, wr_refunded_addr_sk#10, wr_returning_cdemo_sk#11, wr_reason_sk#12, wr_fee#14, wr_refunded_cash#15, cd_marital_status#18, cd_education_status#19]

(53) NativeSort
Input [10]: [ws_sold_date_sk#1, ws_quantity#5, ws_net_profit#7, wr_refunded_addr_sk#10, wr_returning_cdemo_sk#11, wr_reason_sk#12, wr_fee#14, wr_refunded_cash#15, cd_marital_status#18, cd_education_status#19]
Arguments: [wr_returning_cdemo_sk#11 ASC NULLS FIRST, cd_marital_status#18 ASC NULLS FIRST, cd_education_status#19 ASC NULLS FIRST], false

(148) Scan parquet
Output [3]: [cd_demo_sk#20, cd_marital_status#21, cd_education_status#22]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(cd_demo_sk), IsNotNull(cd_marital_status), IsNotNull(cd_education_status)]
ReadSchema: struct<cd_demo_sk:int,cd_marital_status:string,cd_education_status:string>

(55) InputAdapter
Input [3]: [cd_demo_sk#20, cd_marital_status#21, cd_education_status#22]
Arguments: [#20, #21, #22]

(56) NativeFilter
Input [3]: [#20#20, #21#21, #22#22]
Condition : ((isnotnull(cd_demo_sk#20) AND isnotnull(cd_marital_status#21)) AND isnotnull(cd_education_status#22))

(57) NativeShuffleExchange
Input [3]: [#20#20, #21#21, #22#22]
Arguments: hashpartitioning(cd_demo_sk#20, cd_marital_status#21, cd_education_status#22, 100), ENSURE_REQUIREMENTS, [plan_id=8]

(58) ShuffleQueryStage
Output [3]: [#20#20, #21#21, #22#22]
Arguments: X

(59) AQEShuffleRead
Input [3]: [#20#20, #21#21, #22#22]
Arguments: coalesced

(60) InputAdapter
Input [3]: [#20#20, #21#21, #22#22]

(61) NativeSort
Input [3]: [#20#20, #21#21, #22#22]
Arguments: [cd_demo_sk#20 ASC NULLS FIRST, cd_marital_status#21 ASC NULLS FIRST, cd_education_status#22 ASC NULLS FIRST], false

(62) NativeSortMergeJoin
Left keys [3]: [wr_returning_cdemo_sk#11, cd_marital_status#18, cd_education_status#19]
Right keys [3]: [cd_demo_sk#20, cd_marital_status#21, cd_education_status#22]
Join type: Inner
Join condition: None

(63) NativeProject
Output [7]: [ws_sold_date_sk#1, ws_quantity#5, ws_net_profit#7, wr_refunded_addr_sk#10, wr_reason_sk#12, wr_fee#14, wr_refunded_cash#15]
Input [13]: [ws_sold_date_sk#1, ws_quantity#5, ws_net_profit#7, wr_refunded_addr_sk#10, wr_returning_cdemo_sk#11, wr_reason_sk#12, wr_fee#14, wr_refunded_cash#15, cd_marital_status#18, cd_education_status#19, #20#20, #21#21, #22#22]

(64) NativeShuffleExchange
Input [7]: [ws_sold_date_sk#1, ws_quantity#5, ws_net_profit#7, wr_refunded_addr_sk#10, wr_reason_sk#12, wr_fee#14, wr_refunded_cash#15]
Arguments: hashpartitioning(wr_refunded_addr_sk#10, 100), ENSURE_REQUIREMENTS, [plan_id=9]

(65) ShuffleQueryStage
Output [7]: [ws_sold_date_sk#1, ws_quantity#5, ws_net_profit#7, wr_refunded_addr_sk#10, wr_reason_sk#12, wr_fee#14, wr_refunded_cash#15]
Arguments: X

(66) AQEShuffleRead
Input [7]: [ws_sold_date_sk#1, ws_quantity#5, ws_net_profit#7, wr_refunded_addr_sk#10, wr_reason_sk#12, wr_fee#14, wr_refunded_cash#15]
Arguments: coalesced

(67) InputAdapter
Input [7]: [ws_sold_date_sk#1, ws_quantity#5, ws_net_profit#7, wr_refunded_addr_sk#10, wr_reason_sk#12, wr_fee#14, wr_refunded_cash#15]

(68) NativeSort
Input [7]: [ws_sold_date_sk#1, ws_quantity#5, ws_net_profit#7, wr_refunded_addr_sk#10, wr_reason_sk#12, wr_fee#14, wr_refunded_cash#15]
Arguments: [wr_refunded_addr_sk#10 ASC NULLS FIRST], false

(156) Scan parquet
Output [3]: [ca_address_sk#23, ca_state#24, ca_country#25]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(ca_country), EqualTo(ca_country,United States), IsNotNull(ca_address_sk), Or(Or(In(ca_state, [IN,NJ,OH]),In(ca_state, [CT,KY,WI])),In(ca_state, [AR,IA,LA]))]
ReadSchema: struct<ca_address_sk:int,ca_state:string,ca_country:string>

(70) InputAdapter
Input [3]: [ca_address_sk#23, ca_state#24, ca_country#25]
Arguments: [#23, #24, #25]

(71) NativeFilter
Input [3]: [#23#23, #24#24, #25#25]
Condition : (((isnotnull(ca_country#25) AND (ca_country#25 = United States)) AND isnotnull(ca_address_sk#23)) AND ((ca_state#24 IN (IN,OH,NJ) OR ca_state#24 IN (WI,CT,KY)) OR ca_state#24 IN (LA,IA,AR)))

(72) NativeProject
Output [2]: [ca_address_sk#23, ca_state#24]
Input [3]: [#23#23, #24#24, #25#25]

(73) NativeShuffleExchange
Input [2]: [ca_address_sk#23, ca_state#24]
Arguments: hashpartitioning(ca_address_sk#23, 100), ENSURE_REQUIREMENTS, [plan_id=10]

(74) ShuffleQueryStage
Output [2]: [ca_address_sk#23, ca_state#24]
Arguments: X

(75) AQEShuffleRead
Input [2]: [ca_address_sk#23, ca_state#24]
Arguments: coalesced

(76) InputAdapter
Input [2]: [ca_address_sk#23, ca_state#24]

(77) NativeSort
Input [2]: [ca_address_sk#23, ca_state#24]
Arguments: [ca_address_sk#23 ASC NULLS FIRST], false

(78) NativeSortMergeJoin
Left keys [1]: [wr_refunded_addr_sk#10]
Right keys [1]: [ca_address_sk#23]
Join type: Inner
Join condition: ((((ca_state#24 IN (IN,OH,NJ) AND (ws_net_profit#7 >= 100.00)) AND (ws_net_profit#7 <= 200.00)) OR ((ca_state#24 IN (WI,CT,KY) AND (ws_net_profit#7 >= 150.00)) AND (ws_net_profit#7 <= 300.00))) OR ((ca_state#24 IN (LA,IA,AR) AND (ws_net_profit#7 >= 50.00)) AND (ws_net_profit#7 <= 250.00)))

(79) NativeProject
Output [5]: [ws_sold_date_sk#1, ws_quantity#5, wr_reason_sk#12, wr_fee#14, wr_refunded_cash#15]
Input [9]: [ws_sold_date_sk#1, ws_quantity#5, ws_net_profit#7, wr_refunded_addr_sk#10, wr_reason_sk#12, wr_fee#14, wr_refunded_cash#15, ca_address_sk#23, ca_state#24]

(80) NativeShuffleExchange
Input [5]: [ws_sold_date_sk#1, ws_quantity#5, wr_reason_sk#12, wr_fee#14, wr_refunded_cash#15]
Arguments: hashpartitioning(ws_sold_date_sk#1, 100), ENSURE_REQUIREMENTS, [plan_id=11]

(81) ShuffleQueryStage
Output [5]: [ws_sold_date_sk#1, ws_quantity#5, wr_reason_sk#12, wr_fee#14, wr_refunded_cash#15]
Arguments: X

(82) AQEShuffleRead
Input [5]: [ws_sold_date_sk#1, ws_quantity#5, wr_reason_sk#12, wr_fee#14, wr_refunded_cash#15]
Arguments: coalesced

(83) InputAdapter
Input [5]: [ws_sold_date_sk#1, ws_quantity#5, wr_reason_sk#12, wr_fee#14, wr_refunded_cash#15]

(84) NativeSort
Input [5]: [ws_sold_date_sk#1, ws_quantity#5, wr_reason_sk#12, wr_fee#14, wr_refunded_cash#15]
Arguments: [ws_sold_date_sk#1 ASC NULLS FIRST], false

(165) Scan parquet
Output [2]: [d_date_sk#26, d_year#27]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(d_year), EqualTo(d_year,2000), IsNotNull(d_date_sk)]
ReadSchema: struct<d_date_sk:int,d_year:int>

(86) InputAdapter
Input [2]: [d_date_sk#26, d_year#27]
Arguments: [#26, #27]

(87) NativeFilter
Input [2]: [#26#26, #27#27]
Condition : ((isnotnull(d_year#27) AND (d_year#27 = 2000)) AND isnotnull(d_date_sk#26))

(88) NativeProject
Output [1]: [d_date_sk#26]
Input [2]: [#26#26, #27#27]

(89) NativeShuffleExchange
Input [1]: [d_date_sk#26]
Arguments: hashpartitioning(d_date_sk#26, 100), ENSURE_REQUIREMENTS, [plan_id=12]

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

(91) AQEShuffleRead
Input [1]: [d_date_sk#26]
Arguments: coalesced

(92) InputAdapter
Input [1]: [d_date_sk#26]

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

(94) NativeSortMergeJoin
Left keys [1]: [ws_sold_date_sk#1]
Right keys [1]: [d_date_sk#26]
Join type: Inner
Join condition: None

(95) NativeProject
Output [4]: [ws_quantity#5, wr_reason_sk#12, wr_fee#14, wr_refunded_cash#15]
Input [6]: [ws_sold_date_sk#1, ws_quantity#5, wr_reason_sk#12, wr_fee#14, wr_refunded_cash#15, d_date_sk#26]

(96) NativeShuffleExchange
Input [4]: [ws_quantity#5, wr_reason_sk#12, wr_fee#14, wr_refunded_cash#15]
Arguments: hashpartitioning(wr_reason_sk#12, 100), ENSURE_REQUIREMENTS, [plan_id=13]

(97) ShuffleQueryStage
Output [4]: [ws_quantity#5, wr_reason_sk#12, wr_fee#14, wr_refunded_cash#15]
Arguments: X

(98) AQEShuffleRead
Input [4]: [ws_quantity#5, wr_reason_sk#12, wr_fee#14, wr_refunded_cash#15]
Arguments: coalesced

(99) InputAdapter
Input [4]: [ws_quantity#5, wr_reason_sk#12, wr_fee#14, wr_refunded_cash#15]

(100) NativeSort
Input [4]: [ws_quantity#5, wr_reason_sk#12, wr_fee#14, wr_refunded_cash#15]
Arguments: [wr_reason_sk#12 ASC NULLS FIRST], false

(174) Scan parquet
Output [2]: [r_reason_sk#28, r_reason_desc#29]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(r_reason_sk)]
ReadSchema: struct<r_reason_sk:int,r_reason_desc:string>

(102) InputAdapter
Input [2]: [r_reason_sk#28, r_reason_desc#29]
Arguments: [#28, #29]

(103) NativeFilter
Input [2]: [#28#28, #29#29]
Condition : isnotnull(r_reason_sk#28)

(104) NativeShuffleExchange
Input [2]: [#28#28, #29#29]
Arguments: hashpartitioning(r_reason_sk#28, 100), ENSURE_REQUIREMENTS, [plan_id=14]

(105) ShuffleQueryStage
Output [2]: [#28#28, #29#29]
Arguments: X

(106) AQEShuffleRead
Input [2]: [#28#28, #29#29]
Arguments: coalesced

(107) InputAdapter
Input [2]: [#28#28, #29#29]

(108) NativeSort
Input [2]: [#28#28, #29#29]
Arguments: [r_reason_sk#28 ASC NULLS FIRST], false

(109) NativeSortMergeJoin
Left keys [1]: [wr_reason_sk#12]
Right keys [1]: [r_reason_sk#28]
Join type: Inner
Join condition: None

(110) NativeProject
Output [4]: [ws_quantity#5, wr_fee#14, wr_refunded_cash#15, r_reason_desc#29]
Input [6]: [ws_quantity#5, wr_reason_sk#12, wr_fee#14, wr_refunded_cash#15, #28#28, #29#29]

(111) NativeProject
Output [4]: [r_reason_desc#29 AS r_reason_desc#29, ws_quantity#5 AS _c1#30, UnscaledValue(wr_refunded_cash#15) AS _c2#31, UnscaledValue(wr_fee#14) AS _c3#32]
Input [4]: [ws_quantity#5, wr_fee#14, wr_refunded_cash#15, r_reason_desc#29]

(112) NativeHashAggregate
Input [4]: [r_reason_desc#29, _c1#30, _c2#31, _c3#32]
Keys [1]: [r_reason_desc#29]
Functions [3]: [partial_avg(_c1#30), partial_avg(_c2#31), partial_avg(_c3#32)]
Aggregate Attributes [6]: [sum#33, count#34, sum#35, count#36, sum#37, count#38]
Results [7]: [r_reason_desc#29, #39, #40, #39, #40, #39, #40]

(113) NativeShuffleExchange
Input [7]: [r_reason_desc#29, #39, #40, #39, #40, #39, #40]
Arguments: hashpartitioning(r_reason_desc#29, 100), ENSURE_REQUIREMENTS, [plan_id=15]

(114) ShuffleQueryStage
Output [7]: [r_reason_desc#29, #39, #40, #39, #40, #39, #40]
Arguments: X

(115) AQEShuffleRead
Input [7]: [r_reason_desc#29, #39, #40, #39, #40, #39, #40]
Arguments: coalesced

(116) InputAdapter
Input [7]: [r_reason_desc#29, #39, #40, #39, #40, #39, #40]

(117) NativeHashAggregate
Input [7]: [r_reason_desc#29, #39, #40, #39, #40, #39, #40]
Keys [1]: [r_reason_desc#29]
Functions [3]: [avg(ws_quantity#5), avg(UnscaledValue(wr_refunded_cash#15)), avg(UnscaledValue(wr_fee#14))]
Aggregate Attributes [3]: [avg(ws_quantity#5)#41, avg(UnscaledValue(wr_refunded_cash#15))#42, avg(UnscaledValue(wr_fee#14))#43]
Results [4]: [r_reason_desc#29, avg(ws_quantity#5)#41, avg(UnscaledValue(wr_refunded_cash#15))#42, avg(UnscaledValue(wr_fee#14))#43]

(118) NativeProject
Output [4]: [substr(r_reason_desc#29, 1, 20) AS substr(r_reason_desc, 1, 20)#44, avg(ws_quantity#5)#41 AS avg(ws_quantity)#45, cast((avg(UnscaledValue(wr_refunded_cash#15))#42 / 100.0) as decimal(11,6)) AS avg(wr_refunded_cash)#46, cast((avg(UnscaledValue(wr_fee#14))#43 / 100.0) as decimal(11,6)) AS avg(wr_fee)#47]
Input [4]: [r_reason_desc#29, avg(ws_quantity#5)#41, avg(UnscaledValue(wr_refunded_cash#15))#42, avg(UnscaledValue(wr_fee#14))#43]

(119) NativeTakeOrdered
Input [4]: [substr(r_reason_desc, 1, 20)#44, avg(ws_quantity)#45, avg(wr_refunded_cash)#46, avg(wr_fee)#47]
Arguments: X, X, [substr(r_reason_desc, 1, 20)#44 ASC NULLS FIRST, avg(ws_quantity)#45 ASC NULLS FIRST, avg(wr_refunded_cash)#46 ASC NULLS FIRST, avg(wr_fee)#47 ASC NULLS FIRST]

(120) Scan parquet
Output [7]: [ws_sold_date_sk#1, ws_item_sk#2, ws_web_page_sk#3, ws_order_number#4, ws_quantity#5, ws_sales_price#6, ws_net_profit#7]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(ws_item_sk), IsNotNull(ws_order_number), IsNotNull(ws_web_page_sk), IsNotNull(ws_sold_date_sk), Or(Or(And(GreaterThanOrEqual(ws_sales_price,100.00),LessThanOrEqual(ws_sales_price,150.00)),And(GreaterThanOrEqual(ws_sales_price,50.00),LessThanOrEqual(ws_sales_price,100.00))),And(GreaterThanOrEqual(ws_sales_price,150.00),LessThanOrEqual(ws_sales_price,200.00))), Or(Or(And(GreaterThanOrEqual(ws_net_profit,100.00),LessThanOrEqual(ws_net_profit,200.00)),And(GreaterThanOrEqual(ws_net_profit,150.00),LessThanOrEqual(ws_net_profit,300.00))),And(GreaterThanOrEqual(ws_net_profit,50.00),LessThanOrEqual(ws_net_profit,250.00)))]
ReadSchema: struct<ws_sold_date_sk:int,ws_item_sk:int,ws_web_page_sk:int,ws_order_number:int,ws_quantity:int,ws_sales_price:decimal(7,2),ws_net_profit:decimal(7,2)>

(121) Filter
Input [7]: [ws_sold_date_sk#1, ws_item_sk#2, ws_web_page_sk#3, ws_order_number#4, ws_quantity#5, ws_sales_price#6, ws_net_profit#7]
Condition : (((((isnotnull(ws_item_sk#2) AND isnotnull(ws_order_number#4)) AND isnotnull(ws_web_page_sk#3)) AND isnotnull(ws_sold_date_sk#1)) AND ((((ws_sales_price#6 >= 100.00) AND (ws_sales_price#6 <= 150.00)) OR ((ws_sales_price#6 >= 50.00) AND (ws_sales_price#6 <= 100.00))) OR ((ws_sales_price#6 >= 150.00) AND (ws_sales_price#6 <= 200.00)))) AND ((((ws_net_profit#7 >= 100.00) AND (ws_net_profit#7 <= 200.00)) OR ((ws_net_profit#7 >= 150.00) AND (ws_net_profit#7 <= 300.00))) OR ((ws_net_profit#7 >= 50.00) AND (ws_net_profit#7 <= 250.00))))

(122) Exchange
Input [7]: [ws_sold_date_sk#1, ws_item_sk#2, ws_web_page_sk#3, ws_order_number#4, ws_quantity#5, ws_sales_price#6, ws_net_profit#7]
Arguments: hashpartitioning(ws_item_sk#2, ws_order_number#4, 100), ENSURE_REQUIREMENTS, [plan_id=16]

(123) Sort
Input [7]: [ws_sold_date_sk#1, ws_item_sk#2, ws_web_page_sk#3, ws_order_number#4, ws_quantity#5, ws_sales_price#6, ws_net_profit#7]
Arguments: [ws_item_sk#2 ASC NULLS FIRST, ws_order_number#4 ASC NULLS FIRST], false, 0

(124) Scan parquet
Output [8]: [wr_item_sk#8, wr_refunded_cdemo_sk#9, wr_refunded_addr_sk#10, wr_returning_cdemo_sk#11, wr_reason_sk#12, wr_order_number#13, wr_fee#14, wr_refunded_cash#15]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(wr_item_sk), IsNotNull(wr_order_number), IsNotNull(wr_refunded_cdemo_sk), IsNotNull(wr_returning_cdemo_sk), IsNotNull(wr_refunded_addr_sk), IsNotNull(wr_reason_sk)]
ReadSchema: struct<wr_item_sk:int,wr_refunded_cdemo_sk:int,wr_refunded_addr_sk:int,wr_returning_cdemo_sk:int,wr_reason_sk:int,wr_order_number:int,wr_fee:decimal(7,2),wr_refunded_cash:decimal(7,2)>

(125) Filter
Input [8]: [wr_item_sk#8, wr_refunded_cdemo_sk#9, wr_refunded_addr_sk#10, wr_returning_cdemo_sk#11, wr_reason_sk#12, wr_order_number#13, wr_fee#14, wr_refunded_cash#15]
Condition : (((((isnotnull(wr_item_sk#8) AND isnotnull(wr_order_number#13)) AND isnotnull(wr_refunded_cdemo_sk#9)) AND isnotnull(wr_returning_cdemo_sk#11)) AND isnotnull(wr_refunded_addr_sk#10)) AND isnotnull(wr_reason_sk#12))

(126) Exchange
Input [8]: [wr_item_sk#8, wr_refunded_cdemo_sk#9, wr_refunded_addr_sk#10, wr_returning_cdemo_sk#11, wr_reason_sk#12, wr_order_number#13, wr_fee#14, wr_refunded_cash#15]
Arguments: hashpartitioning(wr_item_sk#8, wr_order_number#13, 100), ENSURE_REQUIREMENTS, [plan_id=17]

(127) Sort
Input [8]: [wr_item_sk#8, wr_refunded_cdemo_sk#9, wr_refunded_addr_sk#10, wr_returning_cdemo_sk#11, wr_reason_sk#12, wr_order_number#13, wr_fee#14, wr_refunded_cash#15]
Arguments: [wr_item_sk#8 ASC NULLS FIRST, wr_order_number#13 ASC NULLS FIRST], false, 0

(128) SortMergeJoin
Left keys [2]: [ws_item_sk#2, ws_order_number#4]
Right keys [2]: [wr_item_sk#8, wr_order_number#13]
Join type: Inner
Join condition: None

(129) Project
Output [11]: [ws_sold_date_sk#1, ws_web_page_sk#3, ws_quantity#5, ws_sales_price#6, ws_net_profit#7, wr_refunded_cdemo_sk#9, wr_refunded_addr_sk#10, wr_returning_cdemo_sk#11, wr_reason_sk#12, wr_fee#14, wr_refunded_cash#15]
Input [15]: [ws_sold_date_sk#1, ws_item_sk#2, ws_web_page_sk#3, ws_order_number#4, ws_quantity#5, ws_sales_price#6, ws_net_profit#7, wr_item_sk#8, wr_refunded_cdemo_sk#9, wr_refunded_addr_sk#10, wr_returning_cdemo_sk#11, wr_reason_sk#12, wr_order_number#13, wr_fee#14, wr_refunded_cash#15]

(130) Exchange
Input [11]: [ws_sold_date_sk#1, ws_web_page_sk#3, ws_quantity#5, ws_sales_price#6, ws_net_profit#7, wr_refunded_cdemo_sk#9, wr_refunded_addr_sk#10, wr_returning_cdemo_sk#11, wr_reason_sk#12, wr_fee#14, wr_refunded_cash#15]
Arguments: hashpartitioning(ws_web_page_sk#3, 100), ENSURE_REQUIREMENTS, [plan_id=18]

(131) Sort
Input [11]: [ws_sold_date_sk#1, ws_web_page_sk#3, ws_quantity#5, ws_sales_price#6, ws_net_profit#7, wr_refunded_cdemo_sk#9, wr_refunded_addr_sk#10, wr_returning_cdemo_sk#11, wr_reason_sk#12, wr_fee#14, wr_refunded_cash#15]
Arguments: [ws_web_page_sk#3 ASC NULLS FIRST], false, 0

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

(133) Filter
Input [1]: [wp_web_page_sk#16]
Condition : isnotnull(wp_web_page_sk#16)

(134) Exchange
Input [1]: [wp_web_page_sk#16]
Arguments: hashpartitioning(wp_web_page_sk#16, 100), ENSURE_REQUIREMENTS, [plan_id=19]

(135) Sort
Input [1]: [wp_web_page_sk#16]
Arguments: [wp_web_page_sk#16 ASC NULLS FIRST], false, 0

(136) SortMergeJoin
Left keys [1]: [ws_web_page_sk#3]
Right keys [1]: [wp_web_page_sk#16]
Join type: Inner
Join condition: None

(137) Project
Output [10]: [ws_sold_date_sk#1, ws_quantity#5, ws_sales_price#6, ws_net_profit#7, wr_refunded_cdemo_sk#9, wr_refunded_addr_sk#10, wr_returning_cdemo_sk#11, wr_reason_sk#12, wr_fee#14, wr_refunded_cash#15]
Input [12]: [ws_sold_date_sk#1, ws_web_page_sk#3, ws_quantity#5, ws_sales_price#6, ws_net_profit#7, wr_refunded_cdemo_sk#9, wr_refunded_addr_sk#10, wr_returning_cdemo_sk#11, wr_reason_sk#12, wr_fee#14, wr_refunded_cash#15, wp_web_page_sk#16]

(138) Exchange
Input [10]: [ws_sold_date_sk#1, ws_quantity#5, ws_sales_price#6, ws_net_profit#7, wr_refunded_cdemo_sk#9, wr_refunded_addr_sk#10, wr_returning_cdemo_sk#11, wr_reason_sk#12, wr_fee#14, wr_refunded_cash#15]
Arguments: hashpartitioning(wr_refunded_cdemo_sk#9, 100), ENSURE_REQUIREMENTS, [plan_id=20]

(139) Sort
Input [10]: [ws_sold_date_sk#1, ws_quantity#5, ws_sales_price#6, ws_net_profit#7, wr_refunded_cdemo_sk#9, wr_refunded_addr_sk#10, wr_returning_cdemo_sk#11, wr_reason_sk#12, wr_fee#14, wr_refunded_cash#15]
Arguments: [wr_refunded_cdemo_sk#9 ASC NULLS FIRST], false, 0

(140) Scan parquet
Output [3]: [cd_demo_sk#17, cd_marital_status#18, cd_education_status#19]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(cd_demo_sk), IsNotNull(cd_marital_status), IsNotNull(cd_education_status), Or(Or(And(EqualTo(cd_marital_status,M),EqualTo(cd_education_status,Advanced Degree)),And(EqualTo(cd_marital_status,S),EqualTo(cd_education_status,College))),And(EqualTo(cd_marital_status,W),EqualTo(cd_education_status,2 yr Degree)))]
ReadSchema: struct<cd_demo_sk:int,cd_marital_status:string,cd_education_status:string>

(141) Filter
Input [3]: [cd_demo_sk#17, cd_marital_status#18, cd_education_status#19]
Condition : (((isnotnull(cd_demo_sk#17) AND isnotnull(cd_marital_status#18)) AND isnotnull(cd_education_status#19)) AND ((((cd_marital_status#18 = M) AND (cd_education_status#19 = Advanced Degree)) OR ((cd_marital_status#18 = S) AND (cd_education_status#19 = College))) OR ((cd_marital_status#18 = W) AND (cd_education_status#19 = 2 yr Degree))))

(142) Exchange
Input [3]: [cd_demo_sk#17, cd_marital_status#18, cd_education_status#19]
Arguments: hashpartitioning(cd_demo_sk#17, 100), ENSURE_REQUIREMENTS, [plan_id=21]

(143) Sort
Input [3]: [cd_demo_sk#17, cd_marital_status#18, cd_education_status#19]
Arguments: [cd_demo_sk#17 ASC NULLS FIRST], false, 0

(144) SortMergeJoin
Left keys [1]: [wr_refunded_cdemo_sk#9]
Right keys [1]: [cd_demo_sk#17]
Join type: Inner
Join condition: ((((((cd_marital_status#18 = M) AND (cd_education_status#19 = Advanced Degree)) AND (ws_sales_price#6 >= 100.00)) AND (ws_sales_price#6 <= 150.00)) OR ((((cd_marital_status#18 = S) AND (cd_education_status#19 = College)) AND (ws_sales_price#6 >= 50.00)) AND (ws_sales_price#6 <= 100.00))) OR ((((cd_marital_status#18 = W) AND (cd_education_status#19 = 2 yr Degree)) AND (ws_sales_price#6 >= 150.00)) AND (ws_sales_price#6 <= 200.00)))

(145) Project
Output [10]: [ws_sold_date_sk#1, ws_quantity#5, ws_net_profit#7, wr_refunded_addr_sk#10, wr_returning_cdemo_sk#11, wr_reason_sk#12, wr_fee#14, wr_refunded_cash#15, cd_marital_status#18, cd_education_status#19]
Input [13]: [ws_sold_date_sk#1, ws_quantity#5, ws_sales_price#6, ws_net_profit#7, wr_refunded_cdemo_sk#9, wr_refunded_addr_sk#10, wr_returning_cdemo_sk#11, wr_reason_sk#12, wr_fee#14, wr_refunded_cash#15, cd_demo_sk#17, cd_marital_status#18, cd_education_status#19]

(146) Exchange
Input [10]: [ws_sold_date_sk#1, ws_quantity#5, ws_net_profit#7, wr_refunded_addr_sk#10, wr_returning_cdemo_sk#11, wr_reason_sk#12, wr_fee#14, wr_refunded_cash#15, cd_marital_status#18, cd_education_status#19]
Arguments: hashpartitioning(wr_returning_cdemo_sk#11, cd_marital_status#18, cd_education_status#19, 100), ENSURE_REQUIREMENTS, [plan_id=22]

(147) Sort
Input [10]: [ws_sold_date_sk#1, ws_quantity#5, ws_net_profit#7, wr_refunded_addr_sk#10, wr_returning_cdemo_sk#11, wr_reason_sk#12, wr_fee#14, wr_refunded_cash#15, cd_marital_status#18, cd_education_status#19]
Arguments: [wr_returning_cdemo_sk#11 ASC NULLS FIRST, cd_marital_status#18 ASC NULLS FIRST, cd_education_status#19 ASC NULLS FIRST], false, 0

(148) Scan parquet
Output [3]: [cd_demo_sk#20, cd_marital_status#21, cd_education_status#22]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(cd_demo_sk), IsNotNull(cd_marital_status), IsNotNull(cd_education_status)]
ReadSchema: struct<cd_demo_sk:int,cd_marital_status:string,cd_education_status:string>

(149) Filter
Input [3]: [cd_demo_sk#20, cd_marital_status#21, cd_education_status#22]
Condition : ((isnotnull(cd_demo_sk#20) AND isnotnull(cd_marital_status#21)) AND isnotnull(cd_education_status#22))

(150) Exchange
Input [3]: [cd_demo_sk#20, cd_marital_status#21, cd_education_status#22]
Arguments: hashpartitioning(cd_demo_sk#20, cd_marital_status#21, cd_education_status#22, 100), ENSURE_REQUIREMENTS, [plan_id=23]

(151) Sort
Input [3]: [cd_demo_sk#20, cd_marital_status#21, cd_education_status#22]
Arguments: [cd_demo_sk#20 ASC NULLS FIRST, cd_marital_status#21 ASC NULLS FIRST, cd_education_status#22 ASC NULLS FIRST], false, 0

(152) SortMergeJoin
Left keys [3]: [wr_returning_cdemo_sk#11, cd_marital_status#18, cd_education_status#19]
Right keys [3]: [cd_demo_sk#20, cd_marital_status#21, cd_education_status#22]
Join type: Inner
Join condition: None

(153) Project
Output [7]: [ws_sold_date_sk#1, ws_quantity#5, ws_net_profit#7, wr_refunded_addr_sk#10, wr_reason_sk#12, wr_fee#14, wr_refunded_cash#15]
Input [13]: [ws_sold_date_sk#1, ws_quantity#5, ws_net_profit#7, wr_refunded_addr_sk#10, wr_returning_cdemo_sk#11, wr_reason_sk#12, wr_fee#14, wr_refunded_cash#15, cd_marital_status#18, cd_education_status#19, cd_demo_sk#20, cd_marital_status#21, cd_education_status#22]

(154) Exchange
Input [7]: [ws_sold_date_sk#1, ws_quantity#5, ws_net_profit#7, wr_refunded_addr_sk#10, wr_reason_sk#12, wr_fee#14, wr_refunded_cash#15]
Arguments: hashpartitioning(wr_refunded_addr_sk#10, 100), ENSURE_REQUIREMENTS, [plan_id=24]

(155) Sort
Input [7]: [ws_sold_date_sk#1, ws_quantity#5, ws_net_profit#7, wr_refunded_addr_sk#10, wr_reason_sk#12, wr_fee#14, wr_refunded_cash#15]
Arguments: [wr_refunded_addr_sk#10 ASC NULLS FIRST], false, 0

(156) Scan parquet
Output [3]: [ca_address_sk#23, ca_state#24, ca_country#25]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(ca_country), EqualTo(ca_country,United States), IsNotNull(ca_address_sk), Or(Or(In(ca_state, [IN,NJ,OH]),In(ca_state, [CT,KY,WI])),In(ca_state, [AR,IA,LA]))]
ReadSchema: struct<ca_address_sk:int,ca_state:string,ca_country:string>

(157) Filter
Input [3]: [ca_address_sk#23, ca_state#24, ca_country#25]
Condition : (((isnotnull(ca_country#25) AND (ca_country#25 = United States)) AND isnotnull(ca_address_sk#23)) AND ((ca_state#24 IN (IN,OH,NJ) OR ca_state#24 IN (WI,CT,KY)) OR ca_state#24 IN (LA,IA,AR)))

(158) Project
Output [2]: [ca_address_sk#23, ca_state#24]
Input [3]: [ca_address_sk#23, ca_state#24, ca_country#25]

(159) Exchange
Input [2]: [ca_address_sk#23, ca_state#24]
Arguments: hashpartitioning(ca_address_sk#23, 100), ENSURE_REQUIREMENTS, [plan_id=25]

(160) Sort
Input [2]: [ca_address_sk#23, ca_state#24]
Arguments: [ca_address_sk#23 ASC NULLS FIRST], false, 0

(161) SortMergeJoin
Left keys [1]: [wr_refunded_addr_sk#10]
Right keys [1]: [ca_address_sk#23]
Join type: Inner
Join condition: ((((ca_state#24 IN (IN,OH,NJ) AND (ws_net_profit#7 >= 100.00)) AND (ws_net_profit#7 <= 200.00)) OR ((ca_state#24 IN (WI,CT,KY) AND (ws_net_profit#7 >= 150.00)) AND (ws_net_profit#7 <= 300.00))) OR ((ca_state#24 IN (LA,IA,AR) AND (ws_net_profit#7 >= 50.00)) AND (ws_net_profit#7 <= 250.00)))

(162) Project
Output [5]: [ws_sold_date_sk#1, ws_quantity#5, wr_reason_sk#12, wr_fee#14, wr_refunded_cash#15]
Input [9]: [ws_sold_date_sk#1, ws_quantity#5, ws_net_profit#7, wr_refunded_addr_sk#10, wr_reason_sk#12, wr_fee#14, wr_refunded_cash#15, ca_address_sk#23, ca_state#24]

(163) Exchange
Input [5]: [ws_sold_date_sk#1, ws_quantity#5, wr_reason_sk#12, wr_fee#14, wr_refunded_cash#15]
Arguments: hashpartitioning(ws_sold_date_sk#1, 100), ENSURE_REQUIREMENTS, [plan_id=26]

(164) Sort
Input [5]: [ws_sold_date_sk#1, ws_quantity#5, wr_reason_sk#12, wr_fee#14, wr_refunded_cash#15]
Arguments: [ws_sold_date_sk#1 ASC NULLS FIRST], false, 0

(165) Scan parquet
Output [2]: [d_date_sk#26, d_year#27]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(d_year), EqualTo(d_year,2000), IsNotNull(d_date_sk)]
ReadSchema: struct<d_date_sk:int,d_year:int>

(166) Filter
Input [2]: [d_date_sk#26, d_year#27]
Condition : ((isnotnull(d_year#27) AND (d_year#27 = 2000)) AND isnotnull(d_date_sk#26))

(167) Project
Output [1]: [d_date_sk#26]
Input [2]: [d_date_sk#26, d_year#27]

(168) Exchange
Input [1]: [d_date_sk#26]
Arguments: hashpartitioning(d_date_sk#26, 100), ENSURE_REQUIREMENTS, [plan_id=27]

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

(170) SortMergeJoin
Left keys [1]: [ws_sold_date_sk#1]
Right keys [1]: [d_date_sk#26]
Join type: Inner
Join condition: None

(171) Project
Output [4]: [ws_quantity#5, wr_reason_sk#12, wr_fee#14, wr_refunded_cash#15]
Input [6]: [ws_sold_date_sk#1, ws_quantity#5, wr_reason_sk#12, wr_fee#14, wr_refunded_cash#15, d_date_sk#26]

(172) Exchange
Input [4]: [ws_quantity#5, wr_reason_sk#12, wr_fee#14, wr_refunded_cash#15]
Arguments: hashpartitioning(wr_reason_sk#12, 100), ENSURE_REQUIREMENTS, [plan_id=28]

(173) Sort
Input [4]: [ws_quantity#5, wr_reason_sk#12, wr_fee#14, wr_refunded_cash#15]
Arguments: [wr_reason_sk#12 ASC NULLS FIRST], false, 0

(174) Scan parquet
Output [2]: [r_reason_sk#28, r_reason_desc#29]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(r_reason_sk)]
ReadSchema: struct<r_reason_sk:int,r_reason_desc:string>

(175) Filter
Input [2]: [r_reason_sk#28, r_reason_desc#29]
Condition : isnotnull(r_reason_sk#28)

(176) Exchange
Input [2]: [r_reason_sk#28, r_reason_desc#29]
Arguments: hashpartitioning(r_reason_sk#28, 100), ENSURE_REQUIREMENTS, [plan_id=29]

(177) Sort
Input [2]: [r_reason_sk#28, r_reason_desc#29]
Arguments: [r_reason_sk#28 ASC NULLS FIRST], false, 0

(178) SortMergeJoin
Left keys [1]: [wr_reason_sk#12]
Right keys [1]: [r_reason_sk#28]
Join type: Inner
Join condition: None

(179) Project
Output [4]: [ws_quantity#5, wr_fee#14, wr_refunded_cash#15, r_reason_desc#29]
Input [6]: [ws_quantity#5, wr_reason_sk#12, wr_fee#14, wr_refunded_cash#15, r_reason_sk#28, r_reason_desc#29]

(180) HashAggregate
Input [4]: [ws_quantity#5, wr_fee#14, wr_refunded_cash#15, r_reason_desc#29]
Keys [1]: [r_reason_desc#29]
Functions [3]: [partial_avg(ws_quantity#5), partial_avg(UnscaledValue(wr_refunded_cash#15)), partial_avg(UnscaledValue(wr_fee#14))]
Aggregate Attributes [6]: [sum#33, count#34, sum#35, count#36, sum#37, count#38]
Results [7]: [r_reason_desc#29, sum#48, count#49, sum#50, count#51, sum#52, count#53]

(181) Exchange
Input [7]: [r_reason_desc#29, sum#48, count#49, sum#50, count#51, sum#52, count#53]
Arguments: hashpartitioning(r_reason_desc#29, 100), ENSURE_REQUIREMENTS, [plan_id=30]

(182) HashAggregate
Input [7]: [r_reason_desc#29, sum#48, count#49, sum#50, count#51, sum#52, count#53]
Keys [1]: [r_reason_desc#29]
Functions [3]: [avg(ws_quantity#5), avg(UnscaledValue(wr_refunded_cash#15)), avg(UnscaledValue(wr_fee#14))]
Aggregate Attributes [3]: [avg(ws_quantity#5)#41, avg(UnscaledValue(wr_refunded_cash#15))#42, avg(UnscaledValue(wr_fee#14))#43]
Results [4]: [substr(r_reason_desc#29, 1, 20) AS substr(r_reason_desc, 1, 20)#44, avg(ws_quantity#5)#41 AS avg(ws_quantity)#45, cast((avg(UnscaledValue(wr_refunded_cash#15))#42 / 100.0) as decimal(11,6)) AS avg(wr_refunded_cash)#46, cast((avg(UnscaledValue(wr_fee#14))#43 / 100.0) as decimal(11,6)) AS avg(wr_fee)#47]

(183) TakeOrderedAndProject
Input [4]: [substr(r_reason_desc, 1, 20)#44, avg(ws_quantity)#45, avg(wr_refunded_cash)#46, avg(wr_fee)#47]
Arguments: X, [substr(r_reason_desc, 1, 20)#44 ASC NULLS FIRST, avg(ws_quantity)#45 ASC NULLS FIRST, avg(wr_refunded_cash)#46 ASC NULLS FIRST, avg(wr_fee)#47 ASC NULLS FIRST], [substr(r_reason_desc, 1, 20)#44, avg(ws_quantity)#45, avg(wr_refunded_cash)#46, avg(wr_fee)#47]

(184) AdaptiveSparkPlan
Output [4]: [substr(r_reason_desc, 1, 20)#44, avg(ws_quantity)#45, avg(wr_refunded_cash)#46, avg(wr_fee)#47]
Arguments: isFinalPlan=true

