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


(111) Scan parquet
Output [6]: [ws_ship_date_sk#1, ws_ship_addr_sk#2, ws_web_site_sk#3, ws_order_number#4, ws_ext_ship_cost#5, ws_net_profit#6]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(ws_ship_date_sk), IsNotNull(ws_ship_addr_sk), IsNotNull(ws_web_site_sk)]
ReadSchema: struct<ws_ship_date_sk:int,ws_ship_addr_sk:int,ws_web_site_sk:int,ws_order_number:int,ws_ext_ship_cost:decimal(7,2),ws_net_profit:decimal(7,2)>

(2) InputAdapter
Input [6]: [ws_ship_date_sk#1, ws_ship_addr_sk#2, ws_web_site_sk#3, ws_order_number#4, ws_ext_ship_cost#5, ws_net_profit#6]
Arguments: [#1, #2, #3, #4, #5, #6]

(3) NativeFilter
Input [6]: [#1#1, #2#2, #3#3, #4#4, #5#5, #6#6]
Condition : ((isnotnull(ws_ship_date_sk#1) AND isnotnull(ws_ship_addr_sk#2)) AND isnotnull(ws_web_site_sk#3))

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

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

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

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

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

(115) Scan parquet
Output [2]: [ws_warehouse_sk#7, ws_order_number#8]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(ws_order_number), IsNotNull(ws_warehouse_sk)]
ReadSchema: struct<ws_warehouse_sk:int,ws_order_number:int>

(10) InputAdapter
Input [2]: [ws_warehouse_sk#7, ws_order_number#8]
Arguments: [#7, #8]

(11) NativeFilter
Input [2]: [#7#7, #8#8]
Condition : (isnotnull(ws_order_number#8) AND isnotnull(ws_warehouse_sk#7))

(12) NativeShuffleExchange
Input [2]: [#7#7, #8#8]
Arguments: hashpartitioning(ws_order_number#8, 100), ENSURE_REQUIREMENTS, [plan_id=2]

(13) ShuffleQueryStage
Output [2]: [#7#7, #8#8]
Arguments: X

(14) AQEShuffleRead
Input [2]: [#7#7, #8#8]
Arguments: coalesced

(15) InputAdapter
Input [2]: [#7#7, #8#8]

(16) NativeSort
Input [2]: [#7#7, #8#8]
Arguments: [ws_order_number#8 ASC NULLS FIRST], false

(17) ReusedExchange [Reuses operator id: 12]
Output [2]: [ws_warehouse_sk#9, ws_order_number#10]

(18) ShuffleQueryStage
Output [2]: [ws_warehouse_sk#9, ws_order_number#10]
Arguments: X

(19) AQEShuffleRead
Input [2]: [ws_warehouse_sk#9, ws_order_number#10]
Arguments: coalesced

(20) InputAdapter
Input [2]: [ws_warehouse_sk#9, ws_order_number#10]
Arguments: [#9, #10]

(21) InputAdapter
Input [2]: [#9#9, #10#10]

(22) NativeSort
Input [2]: [#9#9, #10#10]
Arguments: [ws_order_number#10 ASC NULLS FIRST], false

(23) NativeSortMergeJoin
Left keys [1]: [ws_order_number#8]
Right keys [1]: [ws_order_number#10]
Join type: Inner
Join condition: NOT (ws_warehouse_sk#7 = ws_warehouse_sk#9)

(24) NativeProject
Output [1]: [ws_order_number#8]
Input [4]: [#7#7, #8#8, #9#9, #10#10]

(25) NativeSortMergeJoin
Left keys [1]: [ws_order_number#4]
Right keys [1]: [ws_order_number#8]
Join type: LeftSemi
Join condition: None

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

(27) InputAdapter
Input [1]: [wr_order_number#11]
Arguments: [#11]

(28) NativeFilter
Input [1]: [#11#11]
Condition : isnotnull(wr_order_number#11)

(29) NativeShuffleExchange
Input [1]: [#11#11]
Arguments: hashpartitioning(wr_order_number#11, 100), ENSURE_REQUIREMENTS, [plan_id=3]

(30) ShuffleQueryStage
Output [1]: [#11#11]
Arguments: X

(31) AQEShuffleRead
Input [1]: [#11#11]
Arguments: coalesced

(32) InputAdapter
Input [1]: [#11#11]

(33) NativeSort
Input [1]: [#11#11]
Arguments: [wr_order_number#11 ASC NULLS FIRST], false

(34) ReusedExchange [Reuses operator id: 12]
Output [2]: [ws_warehouse_sk#12, ws_order_number#13]

(35) ShuffleQueryStage
Output [2]: [ws_warehouse_sk#12, ws_order_number#13]
Arguments: X

(36) AQEShuffleRead
Input [2]: [ws_warehouse_sk#12, ws_order_number#13]
Arguments: coalesced

(37) InputAdapter
Input [2]: [ws_warehouse_sk#12, ws_order_number#13]
Arguments: [#12, #13]

(38) InputAdapter
Input [2]: [#12#12, #13#13]

(39) NativeSort
Input [2]: [#12#12, #13#13]
Arguments: [ws_order_number#13 ASC NULLS FIRST], false

(40) ReusedExchange [Reuses operator id: 12]
Output [2]: [ws_warehouse_sk#14, ws_order_number#15]

(41) ShuffleQueryStage
Output [2]: [ws_warehouse_sk#14, ws_order_number#15]
Arguments: X

(42) AQEShuffleRead
Input [2]: [ws_warehouse_sk#14, ws_order_number#15]
Arguments: coalesced

(43) InputAdapter
Input [2]: [ws_warehouse_sk#14, ws_order_number#15]
Arguments: [#14, #15]

(44) InputAdapter
Input [2]: [#14#14, #15#15]

(45) NativeSort
Input [2]: [#14#14, #15#15]
Arguments: [ws_order_number#15 ASC NULLS FIRST], false

(46) NativeSortMergeJoin
Left keys [1]: [ws_order_number#13]
Right keys [1]: [ws_order_number#15]
Join type: Inner
Join condition: NOT (ws_warehouse_sk#12 = ws_warehouse_sk#14)

(47) NativeProject
Output [1]: [ws_order_number#13]
Input [4]: [#12#12, #13#13, #14#14, #15#15]

(48) NativeSortMergeJoin
Left keys [1]: [wr_order_number#11]
Right keys [1]: [ws_order_number#13]
Join type: Inner
Join condition: None

(49) NativeProject
Output [1]: [wr_order_number#11]
Input [2]: [#11#11, ws_order_number#13]

(50) NativeSortMergeJoin
Left keys [1]: [ws_order_number#4]
Right keys [1]: [wr_order_number#11]
Join type: LeftSemi
Join condition: None

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

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

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

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

(55) NativeSort
Input [6]: [#1#1, #2#2, #3#3, #4#4, #5#5, #6#6]
Arguments: [ws_ship_date_sk#1 ASC NULLS FIRST], false

(145) Scan parquet
Output [2]: [d_date_sk#16, d_date#17]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(d_date), GreaterThanOrEqual(d_date,1999-02-01), LessThanOrEqual(d_date,1999-04-02), IsNotNull(d_date_sk)]
ReadSchema: struct<d_date_sk:int,d_date:date>

(57) InputAdapter
Input [2]: [d_date_sk#16, d_date#17]
Arguments: [#16, #17]

(58) NativeFilter
Input [2]: [#16#16, #17#17]
Condition : (((isnotnull(d_date#17) AND (d_date#17 >= 1999-02-01)) AND (d_date#17 <= 1999-04-02)) AND isnotnull(d_date_sk#16))

(59) NativeProject
Output [1]: [d_date_sk#16]
Input [2]: [#16#16, #17#17]

(60) NativeShuffleExchange
Input [1]: [d_date_sk#16]
Arguments: hashpartitioning(d_date_sk#16, 100), ENSURE_REQUIREMENTS, [plan_id=5]

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

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

(63) InputAdapter
Input [1]: [d_date_sk#16]

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

(65) NativeSortMergeJoin
Left keys [1]: [ws_ship_date_sk#1]
Right keys [1]: [d_date_sk#16]
Join type: Inner
Join condition: None

(66) NativeProject
Output [5]: [ws_ship_addr_sk#2, ws_web_site_sk#3, ws_order_number#4, ws_ext_ship_cost#5, ws_net_profit#6]
Input [7]: [#1#1, #2#2, #3#3, #4#4, #5#5, #6#6, d_date_sk#16]

(67) NativeShuffleExchange
Input [5]: [ws_ship_addr_sk#2, ws_web_site_sk#3, ws_order_number#4, ws_ext_ship_cost#5, ws_net_profit#6]
Arguments: hashpartitioning(ws_ship_addr_sk#2, 100), ENSURE_REQUIREMENTS, [plan_id=6]

(68) ShuffleQueryStage
Output [5]: [ws_ship_addr_sk#2, ws_web_site_sk#3, ws_order_number#4, ws_ext_ship_cost#5, ws_net_profit#6]
Arguments: X

(69) AQEShuffleRead
Input [5]: [ws_ship_addr_sk#2, ws_web_site_sk#3, ws_order_number#4, ws_ext_ship_cost#5, ws_net_profit#6]
Arguments: coalesced

(70) InputAdapter
Input [5]: [ws_ship_addr_sk#2, ws_web_site_sk#3, ws_order_number#4, ws_ext_ship_cost#5, ws_net_profit#6]

(71) NativeSort
Input [5]: [ws_ship_addr_sk#2, ws_web_site_sk#3, ws_order_number#4, ws_ext_ship_cost#5, ws_net_profit#6]
Arguments: [ws_ship_addr_sk#2 ASC NULLS FIRST], false

(154) Scan parquet
Output [2]: [ca_address_sk#18, ca_state#19]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(ca_state), EqualTo(ca_state,IL), IsNotNull(ca_address_sk)]
ReadSchema: struct<ca_address_sk:int,ca_state:string>

(73) InputAdapter
Input [2]: [ca_address_sk#18, ca_state#19]
Arguments: [#18, #19]

(74) NativeFilter
Input [2]: [#18#18, #19#19]
Condition : ((isnotnull(ca_state#19) AND (ca_state#19 = IL)) AND isnotnull(ca_address_sk#18))

(75) NativeProject
Output [1]: [ca_address_sk#18]
Input [2]: [#18#18, #19#19]

(76) NativeShuffleExchange
Input [1]: [ca_address_sk#18]
Arguments: hashpartitioning(ca_address_sk#18, 100), ENSURE_REQUIREMENTS, [plan_id=7]

(77) ShuffleQueryStage
Output [1]: [ca_address_sk#18]
Arguments: X

(78) AQEShuffleRead
Input [1]: [ca_address_sk#18]
Arguments: coalesced

(79) InputAdapter
Input [1]: [ca_address_sk#18]

(80) NativeSort
Input [1]: [ca_address_sk#18]
Arguments: [ca_address_sk#18 ASC NULLS FIRST], false

(81) NativeSortMergeJoin
Left keys [1]: [ws_ship_addr_sk#2]
Right keys [1]: [ca_address_sk#18]
Join type: Inner
Join condition: None

(82) NativeProject
Output [4]: [ws_web_site_sk#3, ws_order_number#4, ws_ext_ship_cost#5, ws_net_profit#6]
Input [6]: [ws_ship_addr_sk#2, ws_web_site_sk#3, ws_order_number#4, ws_ext_ship_cost#5, ws_net_profit#6, ca_address_sk#18]

(83) NativeShuffleExchange
Input [4]: [ws_web_site_sk#3, ws_order_number#4, ws_ext_ship_cost#5, ws_net_profit#6]
Arguments: hashpartitioning(ws_web_site_sk#3, 100), ENSURE_REQUIREMENTS, [plan_id=8]

(84) ShuffleQueryStage
Output [4]: [ws_web_site_sk#3, ws_order_number#4, ws_ext_ship_cost#5, ws_net_profit#6]
Arguments: X

(85) AQEShuffleRead
Input [4]: [ws_web_site_sk#3, ws_order_number#4, ws_ext_ship_cost#5, ws_net_profit#6]
Arguments: coalesced

(86) InputAdapter
Input [4]: [ws_web_site_sk#3, ws_order_number#4, ws_ext_ship_cost#5, ws_net_profit#6]

(87) NativeSort
Input [4]: [ws_web_site_sk#3, ws_order_number#4, ws_ext_ship_cost#5, ws_net_profit#6]
Arguments: [ws_web_site_sk#3 ASC NULLS FIRST], false

(163) Scan parquet
Output [2]: [web_site_sk#20, web_company_name#21]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(web_company_name), EqualTo(web_company_name,pri), IsNotNull(web_site_sk)]
ReadSchema: struct<web_site_sk:int,web_company_name:string>

(89) InputAdapter
Input [2]: [web_site_sk#20, web_company_name#21]
Arguments: [#20, #21]

(90) NativeFilter
Input [2]: [#20#20, #21#21]
Condition : ((isnotnull(web_company_name#21) AND (web_company_name#21 = pri)) AND isnotnull(web_site_sk#20))

(91) NativeProject
Output [1]: [web_site_sk#20]
Input [2]: [#20#20, #21#21]

(92) NativeShuffleExchange
Input [1]: [web_site_sk#20]
Arguments: hashpartitioning(web_site_sk#20, 100), ENSURE_REQUIREMENTS, [plan_id=9]

(93) ShuffleQueryStage
Output [1]: [web_site_sk#20]
Arguments: X

(94) AQEShuffleRead
Input [1]: [web_site_sk#20]
Arguments: coalesced

(95) InputAdapter
Input [1]: [web_site_sk#20]

(96) NativeSort
Input [1]: [web_site_sk#20]
Arguments: [web_site_sk#20 ASC NULLS FIRST], false

(97) NativeSortMergeJoin
Left keys [1]: [ws_web_site_sk#3]
Right keys [1]: [web_site_sk#20]
Join type: Inner
Join condition: None

(98) NativeProject
Output [3]: [ws_order_number#4, ws_ext_ship_cost#5, ws_net_profit#6]
Input [5]: [ws_web_site_sk#3, ws_order_number#4, ws_ext_ship_cost#5, ws_net_profit#6, web_site_sk#20]

(99) NativeProject
Output [3]: [ws_order_number#4 AS ws_order_number#4, UnscaledValue(ws_ext_ship_cost#5) AS _c1#22, UnscaledValue(ws_net_profit#6) AS _c2#23]
Input [3]: [ws_order_number#4, ws_ext_ship_cost#5, ws_net_profit#6]

(100) NativeHashAggregate
Input [3]: [ws_order_number#4, _c1#22, _c2#23]
Keys [1]: [ws_order_number#4]
Functions [2]: [partial_sum(_c1#22), partial_sum(_c2#23)]
Aggregate Attributes [2]: [sum(UnscaledValue(ws_ext_ship_cost#5))#24, sum(UnscaledValue(ws_net_profit#6))#25]
Results [3]: [ws_order_number#4, #26, #26]

(101) NativeShuffleExchange
Input [3]: [ws_order_number#4, #26, #26]
Arguments: hashpartitioning(ws_order_number#4, 100), ENSURE_REQUIREMENTS, [plan_id=10]

(102) ShuffleQueryStage
Output [3]: [ws_order_number#4, #26, #26]
Arguments: X

(103) AQEShuffleRead
Input [3]: [ws_order_number#4, #26, #26]
Arguments: coalesced

(104) InputAdapter
Input [3]: [ws_order_number#4, #26, #26]

(105) NativeHashAggregate
Input [3]: [ws_order_number#4, #26, #26]
Keys [1]: [ws_order_number#4]
Functions [2]: [merge_sum(UnscaledValue(ws_ext_ship_cost#5)), merge_sum(UnscaledValue(ws_net_profit#6))]
Aggregate Attributes [2]: [sum(UnscaledValue(ws_ext_ship_cost#5))#24, sum(UnscaledValue(ws_net_profit#6))#25]
Results [3]: [ws_order_number#4, #26, #26]

(106) NativeHashAggregate
Input [3]: [ws_order_number#4, #26, #26]
Keys: []
Functions [3]: [merge_sum(UnscaledValue(ws_ext_ship_cost#5)), merge_sum(UnscaledValue(ws_net_profit#6)), partial_count(distinct ws_order_number#4)]
Aggregate Attributes [3]: [sum(UnscaledValue(ws_ext_ship_cost#5))#24, sum(UnscaledValue(ws_net_profit#6))#25, count(ws_order_number#4)#27]
Results [3]: [#26, #26, #26]

(107) NativeShuffleExchange
Input [3]: [#26, #26, #26]
Arguments: SinglePartition, ENSURE_REQUIREMENTS, [plan_id=11]

(108) ShuffleQueryStage
Output [3]: [#26, #26, #26]
Arguments: X

(109) NativeHashAggregate
Input [3]: [#26, #26, #26]
Keys: []
Functions [3]: [sum(UnscaledValue(ws_ext_ship_cost#5)), sum(UnscaledValue(ws_net_profit#6)), count(distinct ws_order_number#4)]
Aggregate Attributes [3]: [sum(UnscaledValue(ws_ext_ship_cost#5))#24, sum(UnscaledValue(ws_net_profit#6))#25, count(ws_order_number#4)#27]
Results [3]: [sum(UnscaledValue(ws_ext_ship_cost#5))#24, sum(UnscaledValue(ws_net_profit#6))#25, count(ws_order_number#4)#27]

(110) NativeProject
Output [3]: [count(ws_order_number#4)#27 AS order count #28, MakeDecimal(sum(UnscaledValue(ws_ext_ship_cost#5))#24,17,2) AS total shipping cost #29, MakeDecimal(sum(UnscaledValue(ws_net_profit#6))#25,17,2) AS total net profit #30]
Input [3]: [sum(UnscaledValue(ws_ext_ship_cost#5))#24, sum(UnscaledValue(ws_net_profit#6))#25, count(ws_order_number#4)#27]

(111) Scan parquet
Output [6]: [ws_ship_date_sk#1, ws_ship_addr_sk#2, ws_web_site_sk#3, ws_order_number#4, ws_ext_ship_cost#5, ws_net_profit#6]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(ws_ship_date_sk), IsNotNull(ws_ship_addr_sk), IsNotNull(ws_web_site_sk)]
ReadSchema: struct<ws_ship_date_sk:int,ws_ship_addr_sk:int,ws_web_site_sk:int,ws_order_number:int,ws_ext_ship_cost:decimal(7,2),ws_net_profit:decimal(7,2)>

(112) Filter
Input [6]: [ws_ship_date_sk#1, ws_ship_addr_sk#2, ws_web_site_sk#3, ws_order_number#4, ws_ext_ship_cost#5, ws_net_profit#6]
Condition : ((isnotnull(ws_ship_date_sk#1) AND isnotnull(ws_ship_addr_sk#2)) AND isnotnull(ws_web_site_sk#3))

(113) Exchange
Input [6]: [ws_ship_date_sk#1, ws_ship_addr_sk#2, ws_web_site_sk#3, ws_order_number#4, ws_ext_ship_cost#5, ws_net_profit#6]
Arguments: hashpartitioning(ws_order_number#4, 100), ENSURE_REQUIREMENTS, [plan_id=12]

(114) Sort
Input [6]: [ws_ship_date_sk#1, ws_ship_addr_sk#2, ws_web_site_sk#3, ws_order_number#4, ws_ext_ship_cost#5, ws_net_profit#6]
Arguments: [ws_order_number#4 ASC NULLS FIRST], false, 0

(115) Scan parquet
Output [2]: [ws_warehouse_sk#7, ws_order_number#8]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(ws_order_number), IsNotNull(ws_warehouse_sk)]
ReadSchema: struct<ws_warehouse_sk:int,ws_order_number:int>

(116) Filter
Input [2]: [ws_warehouse_sk#7, ws_order_number#8]
Condition : (isnotnull(ws_order_number#8) AND isnotnull(ws_warehouse_sk#7))

(117) Exchange
Input [2]: [ws_warehouse_sk#7, ws_order_number#8]
Arguments: hashpartitioning(ws_order_number#8, 100), ENSURE_REQUIREMENTS, [plan_id=13]

(118) Sort
Input [2]: [ws_warehouse_sk#7, ws_order_number#8]
Arguments: [ws_order_number#8 ASC NULLS FIRST], false, 0

(119) Scan parquet
Output [2]: [ws_warehouse_sk#9, ws_order_number#10]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(ws_order_number), IsNotNull(ws_warehouse_sk)]
ReadSchema: struct<ws_warehouse_sk:int,ws_order_number:int>

(120) Filter
Input [2]: [ws_warehouse_sk#9, ws_order_number#10]
Condition : (isnotnull(ws_order_number#10) AND isnotnull(ws_warehouse_sk#9))

(121) Exchange
Input [2]: [ws_warehouse_sk#9, ws_order_number#10]
Arguments: hashpartitioning(ws_order_number#10, 100), ENSURE_REQUIREMENTS, [plan_id=14]

(122) Sort
Input [2]: [ws_warehouse_sk#9, ws_order_number#10]
Arguments: [ws_order_number#10 ASC NULLS FIRST], false, 0

(123) SortMergeJoin
Left keys [1]: [ws_order_number#8]
Right keys [1]: [ws_order_number#10]
Join type: Inner
Join condition: NOT (ws_warehouse_sk#7 = ws_warehouse_sk#9)

(124) Project
Output [1]: [ws_order_number#8]
Input [4]: [ws_warehouse_sk#7, ws_order_number#8, ws_warehouse_sk#9, ws_order_number#10]

(125) SortMergeJoin
Left keys [1]: [ws_order_number#4]
Right keys [1]: [ws_order_number#8]
Join type: LeftSemi
Join condition: None

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

(127) Filter
Input [1]: [wr_order_number#11]
Condition : isnotnull(wr_order_number#11)

(128) Exchange
Input [1]: [wr_order_number#11]
Arguments: hashpartitioning(wr_order_number#11, 100), ENSURE_REQUIREMENTS, [plan_id=15]

(129) Sort
Input [1]: [wr_order_number#11]
Arguments: [wr_order_number#11 ASC NULLS FIRST], false, 0

(130) Scan parquet
Output [2]: [ws_warehouse_sk#12, ws_order_number#13]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(ws_order_number), IsNotNull(ws_warehouse_sk)]
ReadSchema: struct<ws_warehouse_sk:int,ws_order_number:int>

(131) Filter
Input [2]: [ws_warehouse_sk#12, ws_order_number#13]
Condition : (isnotnull(ws_order_number#13) AND isnotnull(ws_warehouse_sk#12))

(132) Exchange
Input [2]: [ws_warehouse_sk#12, ws_order_number#13]
Arguments: hashpartitioning(ws_order_number#13, 100), ENSURE_REQUIREMENTS, [plan_id=16]

(133) Sort
Input [2]: [ws_warehouse_sk#12, ws_order_number#13]
Arguments: [ws_order_number#13 ASC NULLS FIRST], false, 0

(134) Scan parquet
Output [2]: [ws_warehouse_sk#14, ws_order_number#15]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(ws_order_number), IsNotNull(ws_warehouse_sk)]
ReadSchema: struct<ws_warehouse_sk:int,ws_order_number:int>

(135) Filter
Input [2]: [ws_warehouse_sk#14, ws_order_number#15]
Condition : (isnotnull(ws_order_number#15) AND isnotnull(ws_warehouse_sk#14))

(136) Exchange
Input [2]: [ws_warehouse_sk#14, ws_order_number#15]
Arguments: hashpartitioning(ws_order_number#15, 100), ENSURE_REQUIREMENTS, [plan_id=17]

(137) Sort
Input [2]: [ws_warehouse_sk#14, ws_order_number#15]
Arguments: [ws_order_number#15 ASC NULLS FIRST], false, 0

(138) SortMergeJoin
Left keys [1]: [ws_order_number#13]
Right keys [1]: [ws_order_number#15]
Join type: Inner
Join condition: NOT (ws_warehouse_sk#12 = ws_warehouse_sk#14)

(139) Project
Output [1]: [ws_order_number#13]
Input [4]: [ws_warehouse_sk#12, ws_order_number#13, ws_warehouse_sk#14, ws_order_number#15]

(140) SortMergeJoin
Left keys [1]: [wr_order_number#11]
Right keys [1]: [ws_order_number#13]
Join type: Inner
Join condition: None

(141) Project
Output [1]: [wr_order_number#11]
Input [2]: [wr_order_number#11, ws_order_number#13]

(142) SortMergeJoin
Left keys [1]: [ws_order_number#4]
Right keys [1]: [wr_order_number#11]
Join type: LeftSemi
Join condition: None

(143) Exchange
Input [6]: [ws_ship_date_sk#1, ws_ship_addr_sk#2, ws_web_site_sk#3, ws_order_number#4, ws_ext_ship_cost#5, ws_net_profit#6]
Arguments: hashpartitioning(ws_ship_date_sk#1, 100), ENSURE_REQUIREMENTS, [plan_id=18]

(144) Sort
Input [6]: [ws_ship_date_sk#1, ws_ship_addr_sk#2, ws_web_site_sk#3, ws_order_number#4, ws_ext_ship_cost#5, ws_net_profit#6]
Arguments: [ws_ship_date_sk#1 ASC NULLS FIRST], false, 0

(145) Scan parquet
Output [2]: [d_date_sk#16, d_date#17]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(d_date), GreaterThanOrEqual(d_date,1999-02-01), LessThanOrEqual(d_date,1999-04-02), IsNotNull(d_date_sk)]
ReadSchema: struct<d_date_sk:int,d_date:date>

(146) Filter
Input [2]: [d_date_sk#16, d_date#17]
Condition : (((isnotnull(d_date#17) AND (d_date#17 >= 1999-02-01)) AND (d_date#17 <= 1999-04-02)) AND isnotnull(d_date_sk#16))

(147) Project
Output [1]: [d_date_sk#16]
Input [2]: [d_date_sk#16, d_date#17]

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

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

(150) SortMergeJoin
Left keys [1]: [ws_ship_date_sk#1]
Right keys [1]: [d_date_sk#16]
Join type: Inner
Join condition: None

(151) Project
Output [5]: [ws_ship_addr_sk#2, ws_web_site_sk#3, ws_order_number#4, ws_ext_ship_cost#5, ws_net_profit#6]
Input [7]: [ws_ship_date_sk#1, ws_ship_addr_sk#2, ws_web_site_sk#3, ws_order_number#4, ws_ext_ship_cost#5, ws_net_profit#6, d_date_sk#16]

(152) Exchange
Input [5]: [ws_ship_addr_sk#2, ws_web_site_sk#3, ws_order_number#4, ws_ext_ship_cost#5, ws_net_profit#6]
Arguments: hashpartitioning(ws_ship_addr_sk#2, 100), ENSURE_REQUIREMENTS, [plan_id=20]

(153) Sort
Input [5]: [ws_ship_addr_sk#2, ws_web_site_sk#3, ws_order_number#4, ws_ext_ship_cost#5, ws_net_profit#6]
Arguments: [ws_ship_addr_sk#2 ASC NULLS FIRST], false, 0

(154) Scan parquet
Output [2]: [ca_address_sk#18, ca_state#19]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(ca_state), EqualTo(ca_state,IL), IsNotNull(ca_address_sk)]
ReadSchema: struct<ca_address_sk:int,ca_state:string>

(155) Filter
Input [2]: [ca_address_sk#18, ca_state#19]
Condition : ((isnotnull(ca_state#19) AND (ca_state#19 = IL)) AND isnotnull(ca_address_sk#18))

(156) Project
Output [1]: [ca_address_sk#18]
Input [2]: [ca_address_sk#18, ca_state#19]

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

(158) Sort
Input [1]: [ca_address_sk#18]
Arguments: [ca_address_sk#18 ASC NULLS FIRST], false, 0

(159) SortMergeJoin
Left keys [1]: [ws_ship_addr_sk#2]
Right keys [1]: [ca_address_sk#18]
Join type: Inner
Join condition: None

(160) Project
Output [4]: [ws_web_site_sk#3, ws_order_number#4, ws_ext_ship_cost#5, ws_net_profit#6]
Input [6]: [ws_ship_addr_sk#2, ws_web_site_sk#3, ws_order_number#4, ws_ext_ship_cost#5, ws_net_profit#6, ca_address_sk#18]

(161) Exchange
Input [4]: [ws_web_site_sk#3, ws_order_number#4, ws_ext_ship_cost#5, ws_net_profit#6]
Arguments: hashpartitioning(ws_web_site_sk#3, 100), ENSURE_REQUIREMENTS, [plan_id=22]

(162) Sort
Input [4]: [ws_web_site_sk#3, ws_order_number#4, ws_ext_ship_cost#5, ws_net_profit#6]
Arguments: [ws_web_site_sk#3 ASC NULLS FIRST], false, 0

(163) Scan parquet
Output [2]: [web_site_sk#20, web_company_name#21]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(web_company_name), EqualTo(web_company_name,pri), IsNotNull(web_site_sk)]
ReadSchema: struct<web_site_sk:int,web_company_name:string>

(164) Filter
Input [2]: [web_site_sk#20, web_company_name#21]
Condition : ((isnotnull(web_company_name#21) AND (web_company_name#21 = pri)) AND isnotnull(web_site_sk#20))

(165) Project
Output [1]: [web_site_sk#20]
Input [2]: [web_site_sk#20, web_company_name#21]

(166) Exchange
Input [1]: [web_site_sk#20]
Arguments: hashpartitioning(web_site_sk#20, 100), ENSURE_REQUIREMENTS, [plan_id=23]

(167) Sort
Input [1]: [web_site_sk#20]
Arguments: [web_site_sk#20 ASC NULLS FIRST], false, 0

(168) SortMergeJoin
Left keys [1]: [ws_web_site_sk#3]
Right keys [1]: [web_site_sk#20]
Join type: Inner
Join condition: None

(169) Project
Output [3]: [ws_order_number#4, ws_ext_ship_cost#5, ws_net_profit#6]
Input [5]: [ws_web_site_sk#3, ws_order_number#4, ws_ext_ship_cost#5, ws_net_profit#6, web_site_sk#20]

(170) HashAggregate
Input [3]: [ws_order_number#4, ws_ext_ship_cost#5, ws_net_profit#6]
Keys [1]: [ws_order_number#4]
Functions [2]: [partial_sum(UnscaledValue(ws_ext_ship_cost#5)), partial_sum(UnscaledValue(ws_net_profit#6))]
Aggregate Attributes [2]: [sum(UnscaledValue(ws_ext_ship_cost#5))#24, sum(UnscaledValue(ws_net_profit#6))#25]
Results [3]: [ws_order_number#4, sum#31, sum#32]

(171) Exchange
Input [3]: [ws_order_number#4, sum#31, sum#32]
Arguments: hashpartitioning(ws_order_number#4, 100), ENSURE_REQUIREMENTS, [plan_id=24]

(172) HashAggregate
Input [3]: [ws_order_number#4, sum#31, sum#32]
Keys [1]: [ws_order_number#4]
Functions [2]: [merge_sum(UnscaledValue(ws_ext_ship_cost#5)), merge_sum(UnscaledValue(ws_net_profit#6))]
Aggregate Attributes [2]: [sum(UnscaledValue(ws_ext_ship_cost#5))#24, sum(UnscaledValue(ws_net_profit#6))#25]
Results [3]: [ws_order_number#4, sum#31, sum#32]

(173) HashAggregate
Input [3]: [ws_order_number#4, sum#31, sum#32]
Keys: []
Functions [3]: [merge_sum(UnscaledValue(ws_ext_ship_cost#5)), merge_sum(UnscaledValue(ws_net_profit#6)), partial_count(distinct ws_order_number#4)]
Aggregate Attributes [3]: [sum(UnscaledValue(ws_ext_ship_cost#5))#24, sum(UnscaledValue(ws_net_profit#6))#25, count(ws_order_number#4)#27]
Results [3]: [sum#31, sum#32, count#33]

(174) Exchange
Input [3]: [sum#31, sum#32, count#33]
Arguments: SinglePartition, ENSURE_REQUIREMENTS, [plan_id=25]

(175) HashAggregate
Input [3]: [sum#31, sum#32, count#33]
Keys: []
Functions [3]: [sum(UnscaledValue(ws_ext_ship_cost#5)), sum(UnscaledValue(ws_net_profit#6)), count(distinct ws_order_number#4)]
Aggregate Attributes [3]: [sum(UnscaledValue(ws_ext_ship_cost#5))#24, sum(UnscaledValue(ws_net_profit#6))#25, count(ws_order_number#4)#27]
Results [3]: [count(ws_order_number#4)#27 AS order count #28, MakeDecimal(sum(UnscaledValue(ws_ext_ship_cost#5))#24,17,2) AS total shipping cost #29, MakeDecimal(sum(UnscaledValue(ws_net_profit#6))#25,17,2) AS total net profit #30]

(176) AdaptiveSparkPlan
Output [3]: [order count #28, total shipping cost #29, total net profit #30]
Arguments: isFinalPlan=true

