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


(133) Scan parquet
Output [3]: [cs_sold_date_sk#1, cs_bill_customer_sk#2, cs_item_sk#3]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(cs_item_sk), IsNotNull(cs_sold_date_sk), IsNotNull(cs_bill_customer_sk)]
ReadSchema: struct<cs_sold_date_sk:int,cs_bill_customer_sk:int,cs_item_sk:int>

(2) InputAdapter
Input [3]: [cs_sold_date_sk#1, cs_bill_customer_sk#2, cs_item_sk#3]
Arguments: [#1, #2, #3]

(3) NativeFilter
Input [3]: [#1#1, #2#2, #3#3]
Condition : ((isnotnull(cs_item_sk#3) AND isnotnull(cs_sold_date_sk#1)) AND isnotnull(cs_bill_customer_sk#2))

(4) NativeProject
Output [3]: [cs_sold_date_sk#1 AS sold_date_sk#4, cs_bill_customer_sk#2 AS customer_sk#5, cs_item_sk#3 AS item_sk#6]
Input [3]: [#1#1, #2#2, #3#3]

(136) Scan parquet
Output [3]: [ws_sold_date_sk#7, ws_item_sk#8, ws_bill_customer_sk#9]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(ws_item_sk), IsNotNull(ws_sold_date_sk), IsNotNull(ws_bill_customer_sk)]
ReadSchema: struct<ws_sold_date_sk:int,ws_item_sk:int,ws_bill_customer_sk:int>

(6) InputAdapter
Input [3]: [ws_sold_date_sk#7, ws_item_sk#8, ws_bill_customer_sk#9]
Arguments: [#7, #8, #9]

(7) NativeFilter
Input [3]: [#7#7, #8#8, #9#9]
Condition : ((isnotnull(ws_item_sk#8) AND isnotnull(ws_sold_date_sk#7)) AND isnotnull(ws_bill_customer_sk#9))

(8) NativeProject
Output [3]: [ws_sold_date_sk#7 AS sold_date_sk#10, ws_bill_customer_sk#9 AS customer_sk#11, ws_item_sk#8 AS item_sk#12]
Input [3]: [#7#7, #8#8, #9#9]

(9) NativeUnion
Arguments: [sold_date_sk#4, customer_sk#5, item_sk#6]

(10) InputAdapter
Input [3]: [sold_date_sk#4, customer_sk#5, item_sk#6]
Arguments: [#4, #5, #6]

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

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

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

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

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

(142) Scan parquet
Output [3]: [i_item_sk#13, i_class#14, i_category#15]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(i_category), IsNotNull(i_class), EqualTo(i_category,Women), EqualTo(i_class,maternity), IsNotNull(i_item_sk)]
ReadSchema: struct<i_item_sk:int,i_class:string,i_category:string>

(17) InputAdapter
Input [3]: [i_item_sk#13, i_class#14, i_category#15]
Arguments: [#13, #14, #15]

(18) NativeFilter
Input [3]: [#13#13, #14#14, #15#15]
Condition : ((((isnotnull(i_category#15) AND isnotnull(i_class#14)) AND (i_category#15 = Women)) AND (i_class#14 = maternity)) AND isnotnull(i_item_sk#13))

(19) NativeProject
Output [1]: [i_item_sk#13]
Input [3]: [#13#13, #14#14, #15#15]

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

(21) ShuffleQueryStage
Output [1]: [i_item_sk#13]
Arguments: X

(22) AQEShuffleRead
Input [1]: [i_item_sk#13]
Arguments: coalesced

(23) InputAdapter
Input [1]: [i_item_sk#13]

(24) NativeSort
Input [1]: [i_item_sk#13]
Arguments: [i_item_sk#13 ASC NULLS FIRST], false

(25) NativeSortMergeJoin
Left keys [1]: [item_sk#6]
Right keys [1]: [i_item_sk#13]
Join type: Inner
Join condition: None

(26) NativeProject
Output [2]: [sold_date_sk#4, customer_sk#5]
Input [4]: [#4#4, #5#5, #6#6, i_item_sk#13]

(27) NativeShuffleExchange
Input [2]: [sold_date_sk#4, customer_sk#5]
Arguments: hashpartitioning(sold_date_sk#4, 100), ENSURE_REQUIREMENTS, [plan_id=3]

(28) ShuffleQueryStage
Output [2]: [sold_date_sk#4, customer_sk#5]
Arguments: X

(29) AQEShuffleRead
Input [2]: [sold_date_sk#4, customer_sk#5]
Arguments: coalesced

(30) InputAdapter
Input [2]: [sold_date_sk#4, customer_sk#5]

(31) NativeSort
Input [2]: [sold_date_sk#4, customer_sk#5]
Arguments: [sold_date_sk#4 ASC NULLS FIRST], false

(151) Scan parquet
Output [3]: [d_date_sk#16, d_year#17, d_moy#18]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(d_moy), IsNotNull(d_year), EqualTo(d_moy,12), EqualTo(d_year,1998), IsNotNull(d_date_sk)]
ReadSchema: struct<d_date_sk:int,d_year:int,d_moy:int>

(33) InputAdapter
Input [3]: [d_date_sk#16, d_year#17, d_moy#18]
Arguments: [#16, #17, #18]

(34) NativeFilter
Input [3]: [#16#16, #17#17, #18#18]
Condition : ((((isnotnull(d_moy#18) AND isnotnull(d_year#17)) AND (d_moy#18 = 12)) AND (d_year#17 = 1998)) AND isnotnull(d_date_sk#16))

(35) NativeProject
Output [1]: [d_date_sk#16]
Input [3]: [#16#16, #17#17, #18#18]

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

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

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

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

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

(41) NativeSortMergeJoin
Left keys [1]: [sold_date_sk#4]
Right keys [1]: [d_date_sk#16]
Join type: Inner
Join condition: None

(42) NativeProject
Output [1]: [customer_sk#5]
Input [3]: [sold_date_sk#4, customer_sk#5, d_date_sk#16]

(43) NativeShuffleExchange
Input [1]: [customer_sk#5]
Arguments: hashpartitioning(customer_sk#5, 100), ENSURE_REQUIREMENTS, [plan_id=5]

(44) ShuffleQueryStage
Output [1]: [customer_sk#5]
Arguments: X

(45) AQEShuffleRead
Input [1]: [customer_sk#5]
Arguments: coalesced

(46) InputAdapter
Input [1]: [customer_sk#5]

(47) NativeSort
Input [1]: [customer_sk#5]
Arguments: [customer_sk#5 ASC NULLS FIRST], false

(160) Scan parquet
Output [2]: [c_customer_sk#19, c_current_addr_sk#20]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(c_customer_sk), IsNotNull(c_current_addr_sk)]
ReadSchema: struct<c_customer_sk:int,c_current_addr_sk:int>

(49) InputAdapter
Input [2]: [c_customer_sk#19, c_current_addr_sk#20]
Arguments: [#19, #20]

(50) NativeFilter
Input [2]: [#19#19, #20#20]
Condition : (isnotnull(c_customer_sk#19) AND isnotnull(c_current_addr_sk#20))

(51) NativeShuffleExchange
Input [2]: [#19#19, #20#20]
Arguments: hashpartitioning(c_customer_sk#19, 100), ENSURE_REQUIREMENTS, [plan_id=6]

(52) ShuffleQueryStage
Output [2]: [#19#19, #20#20]
Arguments: X

(53) AQEShuffleRead
Input [2]: [#19#19, #20#20]
Arguments: coalesced

(54) InputAdapter
Input [2]: [#19#19, #20#20]

(55) NativeSort
Input [2]: [#19#19, #20#20]
Arguments: [c_customer_sk#19 ASC NULLS FIRST], false

(56) NativeSortMergeJoin
Left keys [1]: [customer_sk#5]
Right keys [1]: [c_customer_sk#19]
Join type: Inner
Join condition: None

(57) NativeProject
Output [2]: [c_customer_sk#19, c_current_addr_sk#20]
Input [3]: [customer_sk#5, #19#19, #20#20]

(58) NativeHashAggregate
Input [2]: [c_customer_sk#19, c_current_addr_sk#20]
Keys [2]: [c_customer_sk#19, c_current_addr_sk#20]
Functions: []
Aggregate Attributes: []
Results [2]: [c_customer_sk#19, c_current_addr_sk#20]

(59) NativeHashAggregate
Input [2]: [c_customer_sk#19, c_current_addr_sk#20]
Keys [2]: [c_customer_sk#19, c_current_addr_sk#20]
Functions: []
Aggregate Attributes: []
Results [2]: [c_customer_sk#19, c_current_addr_sk#20]

(60) NativeProject
Output [2]: [c_customer_sk#19, c_current_addr_sk#20]
Input [2]: [c_customer_sk#19, c_current_addr_sk#20]

(61) NativeSort
Input [2]: [c_customer_sk#19, c_current_addr_sk#20]
Arguments: [c_customer_sk#19 ASC NULLS FIRST], false

(169) Scan parquet
Output [3]: [ss_sold_date_sk#21, ss_customer_sk#22, ss_ext_sales_price#23]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(ss_customer_sk), IsNotNull(ss_sold_date_sk)]
ReadSchema: struct<ss_sold_date_sk:int,ss_customer_sk:int,ss_ext_sales_price:decimal(7,2)>

(63) InputAdapter
Input [3]: [ss_sold_date_sk#21, ss_customer_sk#22, ss_ext_sales_price#23]
Arguments: [#21, #22, #23]

(64) NativeFilter
Input [3]: [#21#21, #22#22, #23#23]
Condition : (isnotnull(ss_customer_sk#22) AND isnotnull(ss_sold_date_sk#21))

(65) NativeShuffleExchange
Input [3]: [#21#21, #22#22, #23#23]
Arguments: hashpartitioning(ss_customer_sk#22, 100), ENSURE_REQUIREMENTS, [plan_id=7]

(66) ShuffleQueryStage
Output [3]: [#21#21, #22#22, #23#23]
Arguments: X

(67) AQEShuffleRead
Input [3]: [#21#21, #22#22, #23#23]
Arguments: coalesced

(68) InputAdapter
Input [3]: [#21#21, #22#22, #23#23]

(69) NativeSort
Input [3]: [#21#21, #22#22, #23#23]
Arguments: [ss_customer_sk#22 ASC NULLS FIRST], false

(70) NativeSortMergeJoin
Left keys [1]: [c_customer_sk#19]
Right keys [1]: [ss_customer_sk#22]
Join type: Inner
Join condition: None

(71) NativeProject
Output [4]: [c_customer_sk#19, c_current_addr_sk#20, ss_sold_date_sk#21, ss_ext_sales_price#23]
Input [5]: [c_customer_sk#19, c_current_addr_sk#20, #21#21, #22#22, #23#23]

(72) NativeShuffleExchange
Input [4]: [c_customer_sk#19, c_current_addr_sk#20, ss_sold_date_sk#21, ss_ext_sales_price#23]
Arguments: hashpartitioning(c_current_addr_sk#20, 100), ENSURE_REQUIREMENTS, [plan_id=8]

(73) ShuffleQueryStage
Output [4]: [c_customer_sk#19, c_current_addr_sk#20, ss_sold_date_sk#21, ss_ext_sales_price#23]
Arguments: X

(74) AQEShuffleRead
Input [4]: [c_customer_sk#19, c_current_addr_sk#20, ss_sold_date_sk#21, ss_ext_sales_price#23]
Arguments: coalesced

(75) InputAdapter
Input [4]: [c_customer_sk#19, c_current_addr_sk#20, ss_sold_date_sk#21, ss_ext_sales_price#23]

(76) NativeSort
Input [4]: [c_customer_sk#19, c_current_addr_sk#20, ss_sold_date_sk#21, ss_ext_sales_price#23]
Arguments: [c_current_addr_sk#20 ASC NULLS FIRST], false

(177) Scan parquet
Output [3]: [ca_address_sk#24, ca_county#25, ca_state#26]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(ca_address_sk), IsNotNull(ca_county), IsNotNull(ca_state)]
ReadSchema: struct<ca_address_sk:int,ca_county:string,ca_state:string>

(78) InputAdapter
Input [3]: [ca_address_sk#24, ca_county#25, ca_state#26]
Arguments: [#24, #25, #26]

(79) NativeFilter
Input [3]: [#24#24, #25#25, #26#26]
Condition : ((isnotnull(ca_address_sk#24) AND isnotnull(ca_county#25)) AND isnotnull(ca_state#26))

(80) NativeShuffleExchange
Input [3]: [#24#24, #25#25, #26#26]
Arguments: hashpartitioning(ca_address_sk#24, 100), ENSURE_REQUIREMENTS, [plan_id=9]

(81) ShuffleQueryStage
Output [3]: [#24#24, #25#25, #26#26]
Arguments: X

(82) AQEShuffleRead
Input [3]: [#24#24, #25#25, #26#26]
Arguments: coalesced

(83) InputAdapter
Input [3]: [#24#24, #25#25, #26#26]

(84) NativeSort
Input [3]: [#24#24, #25#25, #26#26]
Arguments: [ca_address_sk#24 ASC NULLS FIRST], false

(85) NativeSortMergeJoin
Left keys [1]: [c_current_addr_sk#20]
Right keys [1]: [ca_address_sk#24]
Join type: Inner
Join condition: None

(86) NativeProject
Output [5]: [c_customer_sk#19, ss_sold_date_sk#21, ss_ext_sales_price#23, ca_county#25, ca_state#26]
Input [7]: [c_customer_sk#19, c_current_addr_sk#20, ss_sold_date_sk#21, ss_ext_sales_price#23, #24#24, #25#25, #26#26]

(87) NativeShuffleExchange
Input [5]: [c_customer_sk#19, ss_sold_date_sk#21, ss_ext_sales_price#23, ca_county#25, ca_state#26]
Arguments: hashpartitioning(ca_county#25, ca_state#26, 100), ENSURE_REQUIREMENTS, [plan_id=10]

(88) ShuffleQueryStage
Output [5]: [c_customer_sk#19, ss_sold_date_sk#21, ss_ext_sales_price#23, ca_county#25, ca_state#26]
Arguments: X

(89) AQEShuffleRead
Input [5]: [c_customer_sk#19, ss_sold_date_sk#21, ss_ext_sales_price#23, ca_county#25, ca_state#26]
Arguments: coalesced

(90) InputAdapter
Input [5]: [c_customer_sk#19, ss_sold_date_sk#21, ss_ext_sales_price#23, ca_county#25, ca_state#26]

(91) NativeSort
Input [5]: [c_customer_sk#19, ss_sold_date_sk#21, ss_ext_sales_price#23, ca_county#25, ca_state#26]
Arguments: [ca_county#25 ASC NULLS FIRST, ca_state#26 ASC NULLS FIRST], false

(185) Scan parquet
Output [2]: [s_county#27, s_state#28]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(s_county), IsNotNull(s_state)]
ReadSchema: struct<s_county:string,s_state:string>

(93) InputAdapter
Input [2]: [s_county#27, s_state#28]
Arguments: [#27, #28]

(94) NativeFilter
Input [2]: [#27#27, #28#28]
Condition : (isnotnull(s_county#27) AND isnotnull(s_state#28))

(95) NativeShuffleExchange
Input [2]: [#27#27, #28#28]
Arguments: hashpartitioning(s_county#27, s_state#28, 100), ENSURE_REQUIREMENTS, [plan_id=11]

(96) ShuffleQueryStage
Output [2]: [#27#27, #28#28]
Arguments: X

(97) AQEShuffleRead
Input [2]: [#27#27, #28#28]
Arguments: coalesced

(98) InputAdapter
Input [2]: [#27#27, #28#28]

(99) NativeSort
Input [2]: [#27#27, #28#28]
Arguments: [s_county#27 ASC NULLS FIRST, s_state#28 ASC NULLS FIRST], false

(100) NativeSortMergeJoin
Left keys [2]: [ca_county#25, ca_state#26]
Right keys [2]: [s_county#27, s_state#28]
Join type: Inner
Join condition: None

(101) NativeProject
Output [3]: [c_customer_sk#19, ss_sold_date_sk#21, ss_ext_sales_price#23]
Input [7]: [c_customer_sk#19, ss_sold_date_sk#21, ss_ext_sales_price#23, ca_county#25, ca_state#26, #27#27, #28#28]

(102) NativeShuffleExchange
Input [3]: [c_customer_sk#19, ss_sold_date_sk#21, ss_ext_sales_price#23]
Arguments: hashpartitioning(ss_sold_date_sk#21, 100), ENSURE_REQUIREMENTS, [plan_id=12]

(103) ShuffleQueryStage
Output [3]: [c_customer_sk#19, ss_sold_date_sk#21, ss_ext_sales_price#23]
Arguments: X

(104) AQEShuffleRead
Input [3]: [c_customer_sk#19, ss_sold_date_sk#21, ss_ext_sales_price#23]
Arguments: coalesced

(105) InputAdapter
Input [3]: [c_customer_sk#19, ss_sold_date_sk#21, ss_ext_sales_price#23]

(106) NativeSort
Input [3]: [c_customer_sk#19, ss_sold_date_sk#21, ss_ext_sales_price#23]
Arguments: [ss_sold_date_sk#21 ASC NULLS FIRST], false

(193) Scan parquet
Output [2]: [d_date_sk#29, d_month_seq#30]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(d_month_seq), IsNotNull(d_date_sk)]
ReadSchema: struct<d_date_sk:int,d_month_seq:int>

(108) InputAdapter
Input [2]: [d_date_sk#29, d_month_seq#30]
Arguments: [#29, #30]

(109) NativeFilter
Input [2]: [#29#29, #30#30]
Condition : (((isnotnull(d_month_seq#30) AND (d_month_seq#30 >= Subquery subquery#31, [id=#32])) AND (d_month_seq#30 <= Subquery subquery#33, [id=#34])) AND isnotnull(d_date_sk#29))

(110) NativeProject
Output [1]: [d_date_sk#29]
Input [2]: [#29#29, #30#30]

(111) NativeShuffleExchange
Input [1]: [d_date_sk#29]
Arguments: hashpartitioning(d_date_sk#29, 100), ENSURE_REQUIREMENTS, [plan_id=13]

(112) ShuffleQueryStage
Output [1]: [d_date_sk#29]
Arguments: X

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

(114) InputAdapter
Input [1]: [d_date_sk#29]

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

(116) NativeSortMergeJoin
Left keys [1]: [ss_sold_date_sk#21]
Right keys [1]: [d_date_sk#29]
Join type: Inner
Join condition: None

(117) NativeProject
Output [2]: [c_customer_sk#19, ss_ext_sales_price#23]
Input [4]: [c_customer_sk#19, ss_sold_date_sk#21, ss_ext_sales_price#23, d_date_sk#29]

(118) NativeProject
Output [2]: [c_customer_sk#19 AS c_customer_sk#19, UnscaledValue(ss_ext_sales_price#23) AS _c1#35]
Input [2]: [c_customer_sk#19, ss_ext_sales_price#23]

(119) NativeHashAggregate
Input [2]: [c_customer_sk#19, _c1#35]
Keys [1]: [c_customer_sk#19]
Functions [1]: [partial_sum(_c1#35)]
Aggregate Attributes [1]: [sum#36]
Results [2]: [c_customer_sk#19, #37]

(120) NativeShuffleExchange
Input [2]: [c_customer_sk#19, #37]
Arguments: hashpartitioning(c_customer_sk#19, 100), ENSURE_REQUIREMENTS, [plan_id=14]

(121) ShuffleQueryStage
Output [2]: [c_customer_sk#19, #37]
Arguments: X

(122) AQEShuffleRead
Input [2]: [c_customer_sk#19, #37]
Arguments: coalesced

(123) InputAdapter
Input [2]: [c_customer_sk#19, #37]

(124) NativeHashAggregate
Input [2]: [c_customer_sk#19, #37]
Keys [1]: [c_customer_sk#19]
Functions [1]: [sum(UnscaledValue(ss_ext_sales_price#23))]
Aggregate Attributes [1]: [sum(UnscaledValue(ss_ext_sales_price#23))#38]
Results [2]: [c_customer_sk#19, sum(UnscaledValue(ss_ext_sales_price#23))#38]

(125) NativeProject
Output [1]: [cast((MakeDecimal(sum(UnscaledValue(ss_ext_sales_price#23))#38,17,2) / 50) as int) AS segment#39]
Input [2]: [c_customer_sk#19, sum(UnscaledValue(ss_ext_sales_price#23))#38]

(126) NativeHashAggregate
Input [1]: [segment#39]
Keys [1]: [segment#39]
Functions [1]: [partial_count(1)]
Aggregate Attributes [1]: [count#40]
Results [2]: [segment#39, #37]

(127) NativeShuffleExchange
Input [2]: [segment#39, #37]
Arguments: hashpartitioning(segment#39, 100), ENSURE_REQUIREMENTS, [plan_id=15]

(128) ShuffleQueryStage
Output [2]: [segment#39, #37]
Arguments: X

(129) AQEShuffleRead
Input [2]: [segment#39, #37]
Arguments: coalesced

(130) InputAdapter
Input [2]: [segment#39, #37]

(131) NativeHashAggregate
Input [2]: [segment#39, #37]
Keys [1]: [segment#39]
Functions [1]: [count(1)]
Aggregate Attributes [1]: [count(1)#41]
Results [2]: [segment#39, count(1)#41]

(132) NativeProject
Output [3]: [segment#39, count(1)#41 AS num_customers#42, (segment#39 * 50) AS segment_base#43]
Input [2]: [segment#39, count(1)#41]

(133) Scan parquet
Output [3]: [cs_sold_date_sk#1, cs_bill_customer_sk#2, cs_item_sk#3]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(cs_item_sk), IsNotNull(cs_sold_date_sk), IsNotNull(cs_bill_customer_sk)]
ReadSchema: struct<cs_sold_date_sk:int,cs_bill_customer_sk:int,cs_item_sk:int>

(134) Filter
Input [3]: [cs_sold_date_sk#1, cs_bill_customer_sk#2, cs_item_sk#3]
Condition : ((isnotnull(cs_item_sk#3) AND isnotnull(cs_sold_date_sk#1)) AND isnotnull(cs_bill_customer_sk#2))

(135) Project
Output [3]: [cs_sold_date_sk#1 AS sold_date_sk#4, cs_bill_customer_sk#2 AS customer_sk#5, cs_item_sk#3 AS item_sk#6]
Input [3]: [cs_sold_date_sk#1, cs_bill_customer_sk#2, cs_item_sk#3]

(136) Scan parquet
Output [3]: [ws_sold_date_sk#7, ws_item_sk#8, ws_bill_customer_sk#9]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(ws_item_sk), IsNotNull(ws_sold_date_sk), IsNotNull(ws_bill_customer_sk)]
ReadSchema: struct<ws_sold_date_sk:int,ws_item_sk:int,ws_bill_customer_sk:int>

(137) Filter
Input [3]: [ws_sold_date_sk#7, ws_item_sk#8, ws_bill_customer_sk#9]
Condition : ((isnotnull(ws_item_sk#8) AND isnotnull(ws_sold_date_sk#7)) AND isnotnull(ws_bill_customer_sk#9))

(138) Project
Output [3]: [ws_sold_date_sk#7 AS sold_date_sk#10, ws_bill_customer_sk#9 AS customer_sk#11, ws_item_sk#8 AS item_sk#12]
Input [3]: [ws_sold_date_sk#7, ws_item_sk#8, ws_bill_customer_sk#9]

(139) Union

(140) Exchange
Input [3]: [sold_date_sk#4, customer_sk#5, item_sk#6]
Arguments: hashpartitioning(item_sk#6, 100), ENSURE_REQUIREMENTS, [plan_id=16]

(141) Sort
Input [3]: [sold_date_sk#4, customer_sk#5, item_sk#6]
Arguments: [item_sk#6 ASC NULLS FIRST], false, 0

(142) Scan parquet
Output [3]: [i_item_sk#13, i_class#14, i_category#15]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(i_category), IsNotNull(i_class), EqualTo(i_category,Women), EqualTo(i_class,maternity), IsNotNull(i_item_sk)]
ReadSchema: struct<i_item_sk:int,i_class:string,i_category:string>

(143) Filter
Input [3]: [i_item_sk#13, i_class#14, i_category#15]
Condition : ((((isnotnull(i_category#15) AND isnotnull(i_class#14)) AND (i_category#15 = Women)) AND (i_class#14 = maternity)) AND isnotnull(i_item_sk#13))

(144) Project
Output [1]: [i_item_sk#13]
Input [3]: [i_item_sk#13, i_class#14, i_category#15]

(145) Exchange
Input [1]: [i_item_sk#13]
Arguments: hashpartitioning(i_item_sk#13, 100), ENSURE_REQUIREMENTS, [plan_id=17]

(146) Sort
Input [1]: [i_item_sk#13]
Arguments: [i_item_sk#13 ASC NULLS FIRST], false, 0

(147) SortMergeJoin
Left keys [1]: [item_sk#6]
Right keys [1]: [i_item_sk#13]
Join type: Inner
Join condition: None

(148) Project
Output [2]: [sold_date_sk#4, customer_sk#5]
Input [4]: [sold_date_sk#4, customer_sk#5, item_sk#6, i_item_sk#13]

(149) Exchange
Input [2]: [sold_date_sk#4, customer_sk#5]
Arguments: hashpartitioning(sold_date_sk#4, 100), ENSURE_REQUIREMENTS, [plan_id=18]

(150) Sort
Input [2]: [sold_date_sk#4, customer_sk#5]
Arguments: [sold_date_sk#4 ASC NULLS FIRST], false, 0

(151) Scan parquet
Output [3]: [d_date_sk#16, d_year#17, d_moy#18]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(d_moy), IsNotNull(d_year), EqualTo(d_moy,12), EqualTo(d_year,1998), IsNotNull(d_date_sk)]
ReadSchema: struct<d_date_sk:int,d_year:int,d_moy:int>

(152) Filter
Input [3]: [d_date_sk#16, d_year#17, d_moy#18]
Condition : ((((isnotnull(d_moy#18) AND isnotnull(d_year#17)) AND (d_moy#18 = 12)) AND (d_year#17 = 1998)) AND isnotnull(d_date_sk#16))

(153) Project
Output [1]: [d_date_sk#16]
Input [3]: [d_date_sk#16, d_year#17, d_moy#18]

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

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

(156) SortMergeJoin
Left keys [1]: [sold_date_sk#4]
Right keys [1]: [d_date_sk#16]
Join type: Inner
Join condition: None

(157) Project
Output [1]: [customer_sk#5]
Input [3]: [sold_date_sk#4, customer_sk#5, d_date_sk#16]

(158) Exchange
Input [1]: [customer_sk#5]
Arguments: hashpartitioning(customer_sk#5, 100), ENSURE_REQUIREMENTS, [plan_id=20]

(159) Sort
Input [1]: [customer_sk#5]
Arguments: [customer_sk#5 ASC NULLS FIRST], false, 0

(160) Scan parquet
Output [2]: [c_customer_sk#19, c_current_addr_sk#20]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(c_customer_sk), IsNotNull(c_current_addr_sk)]
ReadSchema: struct<c_customer_sk:int,c_current_addr_sk:int>

(161) Filter
Input [2]: [c_customer_sk#19, c_current_addr_sk#20]
Condition : (isnotnull(c_customer_sk#19) AND isnotnull(c_current_addr_sk#20))

(162) Exchange
Input [2]: [c_customer_sk#19, c_current_addr_sk#20]
Arguments: hashpartitioning(c_customer_sk#19, 100), ENSURE_REQUIREMENTS, [plan_id=21]

(163) Sort
Input [2]: [c_customer_sk#19, c_current_addr_sk#20]
Arguments: [c_customer_sk#19 ASC NULLS FIRST], false, 0

(164) SortMergeJoin
Left keys [1]: [customer_sk#5]
Right keys [1]: [c_customer_sk#19]
Join type: Inner
Join condition: None

(165) Project
Output [2]: [c_customer_sk#19, c_current_addr_sk#20]
Input [3]: [customer_sk#5, c_customer_sk#19, c_current_addr_sk#20]

(166) HashAggregate
Input [2]: [c_customer_sk#19, c_current_addr_sk#20]
Keys [2]: [c_customer_sk#19, c_current_addr_sk#20]
Functions: []
Aggregate Attributes: []
Results [2]: [c_customer_sk#19, c_current_addr_sk#20]

(167) HashAggregate
Input [2]: [c_customer_sk#19, c_current_addr_sk#20]
Keys [2]: [c_customer_sk#19, c_current_addr_sk#20]
Functions: []
Aggregate Attributes: []
Results [2]: [c_customer_sk#19, c_current_addr_sk#20]

(168) Sort
Input [2]: [c_customer_sk#19, c_current_addr_sk#20]
Arguments: [c_customer_sk#19 ASC NULLS FIRST], false, 0

(169) Scan parquet
Output [3]: [ss_sold_date_sk#21, ss_customer_sk#22, ss_ext_sales_price#23]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(ss_customer_sk), IsNotNull(ss_sold_date_sk)]
ReadSchema: struct<ss_sold_date_sk:int,ss_customer_sk:int,ss_ext_sales_price:decimal(7,2)>

(170) Filter
Input [3]: [ss_sold_date_sk#21, ss_customer_sk#22, ss_ext_sales_price#23]
Condition : (isnotnull(ss_customer_sk#22) AND isnotnull(ss_sold_date_sk#21))

(171) Exchange
Input [3]: [ss_sold_date_sk#21, ss_customer_sk#22, ss_ext_sales_price#23]
Arguments: hashpartitioning(ss_customer_sk#22, 100), ENSURE_REQUIREMENTS, [plan_id=22]

(172) Sort
Input [3]: [ss_sold_date_sk#21, ss_customer_sk#22, ss_ext_sales_price#23]
Arguments: [ss_customer_sk#22 ASC NULLS FIRST], false, 0

(173) SortMergeJoin
Left keys [1]: [c_customer_sk#19]
Right keys [1]: [ss_customer_sk#22]
Join type: Inner
Join condition: None

(174) Project
Output [4]: [c_customer_sk#19, c_current_addr_sk#20, ss_sold_date_sk#21, ss_ext_sales_price#23]
Input [5]: [c_customer_sk#19, c_current_addr_sk#20, ss_sold_date_sk#21, ss_customer_sk#22, ss_ext_sales_price#23]

(175) Exchange
Input [4]: [c_customer_sk#19, c_current_addr_sk#20, ss_sold_date_sk#21, ss_ext_sales_price#23]
Arguments: hashpartitioning(c_current_addr_sk#20, 100), ENSURE_REQUIREMENTS, [plan_id=23]

(176) Sort
Input [4]: [c_customer_sk#19, c_current_addr_sk#20, ss_sold_date_sk#21, ss_ext_sales_price#23]
Arguments: [c_current_addr_sk#20 ASC NULLS FIRST], false, 0

(177) Scan parquet
Output [3]: [ca_address_sk#24, ca_county#25, ca_state#26]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(ca_address_sk), IsNotNull(ca_county), IsNotNull(ca_state)]
ReadSchema: struct<ca_address_sk:int,ca_county:string,ca_state:string>

(178) Filter
Input [3]: [ca_address_sk#24, ca_county#25, ca_state#26]
Condition : ((isnotnull(ca_address_sk#24) AND isnotnull(ca_county#25)) AND isnotnull(ca_state#26))

(179) Exchange
Input [3]: [ca_address_sk#24, ca_county#25, ca_state#26]
Arguments: hashpartitioning(ca_address_sk#24, 100), ENSURE_REQUIREMENTS, [plan_id=24]

(180) Sort
Input [3]: [ca_address_sk#24, ca_county#25, ca_state#26]
Arguments: [ca_address_sk#24 ASC NULLS FIRST], false, 0

(181) SortMergeJoin
Left keys [1]: [c_current_addr_sk#20]
Right keys [1]: [ca_address_sk#24]
Join type: Inner
Join condition: None

(182) Project
Output [5]: [c_customer_sk#19, ss_sold_date_sk#21, ss_ext_sales_price#23, ca_county#25, ca_state#26]
Input [7]: [c_customer_sk#19, c_current_addr_sk#20, ss_sold_date_sk#21, ss_ext_sales_price#23, ca_address_sk#24, ca_county#25, ca_state#26]

(183) Exchange
Input [5]: [c_customer_sk#19, ss_sold_date_sk#21, ss_ext_sales_price#23, ca_county#25, ca_state#26]
Arguments: hashpartitioning(ca_county#25, ca_state#26, 100), ENSURE_REQUIREMENTS, [plan_id=25]

(184) Sort
Input [5]: [c_customer_sk#19, ss_sold_date_sk#21, ss_ext_sales_price#23, ca_county#25, ca_state#26]
Arguments: [ca_county#25 ASC NULLS FIRST, ca_state#26 ASC NULLS FIRST], false, 0

(185) Scan parquet
Output [2]: [s_county#27, s_state#28]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(s_county), IsNotNull(s_state)]
ReadSchema: struct<s_county:string,s_state:string>

(186) Filter
Input [2]: [s_county#27, s_state#28]
Condition : (isnotnull(s_county#27) AND isnotnull(s_state#28))

(187) Exchange
Input [2]: [s_county#27, s_state#28]
Arguments: hashpartitioning(s_county#27, s_state#28, 100), ENSURE_REQUIREMENTS, [plan_id=26]

(188) Sort
Input [2]: [s_county#27, s_state#28]
Arguments: [s_county#27 ASC NULLS FIRST, s_state#28 ASC NULLS FIRST], false, 0

(189) SortMergeJoin
Left keys [2]: [ca_county#25, ca_state#26]
Right keys [2]: [s_county#27, s_state#28]
Join type: Inner
Join condition: None

(190) Project
Output [3]: [c_customer_sk#19, ss_sold_date_sk#21, ss_ext_sales_price#23]
Input [7]: [c_customer_sk#19, ss_sold_date_sk#21, ss_ext_sales_price#23, ca_county#25, ca_state#26, s_county#27, s_state#28]

(191) Exchange
Input [3]: [c_customer_sk#19, ss_sold_date_sk#21, ss_ext_sales_price#23]
Arguments: hashpartitioning(ss_sold_date_sk#21, 100), ENSURE_REQUIREMENTS, [plan_id=27]

(192) Sort
Input [3]: [c_customer_sk#19, ss_sold_date_sk#21, ss_ext_sales_price#23]
Arguments: [ss_sold_date_sk#21 ASC NULLS FIRST], false, 0

(193) Scan parquet
Output [2]: [d_date_sk#29, d_month_seq#30]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(d_month_seq), IsNotNull(d_date_sk)]
ReadSchema: struct<d_date_sk:int,d_month_seq:int>

(194) Filter
Input [2]: [d_date_sk#29, d_month_seq#30]
Condition : (((isnotnull(d_month_seq#30) AND (d_month_seq#30 >= Subquery subquery#31, [id=#32])) AND (d_month_seq#30 <= Subquery subquery#33, [id=#34])) AND isnotnull(d_date_sk#29))

(195) Project
Output [1]: [d_date_sk#29]
Input [2]: [d_date_sk#29, d_month_seq#30]

(196) Exchange
Input [1]: [d_date_sk#29]
Arguments: hashpartitioning(d_date_sk#29, 100), ENSURE_REQUIREMENTS, [plan_id=28]

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

(198) SortMergeJoin
Left keys [1]: [ss_sold_date_sk#21]
Right keys [1]: [d_date_sk#29]
Join type: Inner
Join condition: None

(199) Project
Output [2]: [c_customer_sk#19, ss_ext_sales_price#23]
Input [4]: [c_customer_sk#19, ss_sold_date_sk#21, ss_ext_sales_price#23, d_date_sk#29]

(200) HashAggregate
Input [2]: [c_customer_sk#19, ss_ext_sales_price#23]
Keys [1]: [c_customer_sk#19]
Functions [1]: [partial_sum(UnscaledValue(ss_ext_sales_price#23))]
Aggregate Attributes [1]: [sum#36]
Results [2]: [c_customer_sk#19, sum#44]

(201) Exchange
Input [2]: [c_customer_sk#19, sum#44]
Arguments: hashpartitioning(c_customer_sk#19, 100), ENSURE_REQUIREMENTS, [plan_id=29]

(202) HashAggregate
Input [2]: [c_customer_sk#19, sum#44]
Keys [1]: [c_customer_sk#19]
Functions [1]: [sum(UnscaledValue(ss_ext_sales_price#23))]
Aggregate Attributes [1]: [sum(UnscaledValue(ss_ext_sales_price#23))#38]
Results [1]: [cast((MakeDecimal(sum(UnscaledValue(ss_ext_sales_price#23))#38,17,2) / 50) as int) AS segment#39]

(203) HashAggregate
Input [1]: [segment#39]
Keys [1]: [segment#39]
Functions [1]: [partial_count(1)]
Aggregate Attributes [1]: [count#40]
Results [2]: [segment#39, count#45]

(204) Exchange
Input [2]: [segment#39, count#45]
Arguments: hashpartitioning(segment#39, 100), ENSURE_REQUIREMENTS, [plan_id=30]

(205) HashAggregate
Input [2]: [segment#39, count#45]
Keys [1]: [segment#39]
Functions [1]: [count(1)]
Aggregate Attributes [1]: [count(1)#41]
Results [3]: [segment#39, count(1)#41 AS num_customers#42, (segment#39 * 50) AS segment_base#43]

(206) TakeOrderedAndProject
Input [3]: [segment#39, num_customers#42, segment_base#43]
Arguments: X, [segment#39 ASC NULLS FIRST, num_customers#42 ASC NULLS FIRST], [segment#39, num_customers#42, segment_base#43]

(207) AdaptiveSparkPlan
Output [3]: [segment#39, num_customers#42, segment_base#43]
Arguments: isFinalPlan=true

===== Subqueries =====

Subquery:1 Hosting operator id = 109 Hosting Expression = Subquery subquery#31, [id=#32]
AdaptiveSparkPlan (225)
+- == Final Plan ==
   NativeProject (218)
   +- NativeHashAggregate (217)
      +- InputAdapter (216)
         +- AQEShuffleRead (215)
            +- ShuffleQueryStage (214), Statistics(X)
               +- NativeShuffleExchange (213)
                  +- NativeHashAggregate (212)
                     +- NativeProject (211)
                        +- NativeFilter (210)
                           +- InputAdapter (209)
                              +- NativeParquetScan  (208)
+- == Initial Plan ==
   HashAggregate (224)
   +- Exchange (223)
      +- HashAggregate (222)
         +- Project (221)
            +- Filter (220)
               +- Scan parquet (219)


(219) Scan parquet
Output [3]: [d_month_seq#46, d_year#47, d_moy#48]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(d_year), IsNotNull(d_moy), EqualTo(d_year,1998), EqualTo(d_moy,12)]
ReadSchema: struct<d_month_seq:int,d_year:int,d_moy:int>

(209) InputAdapter
Input [3]: [d_month_seq#46, d_year#47, d_moy#48]
Arguments: [#46, #47, #48]

(210) NativeFilter
Input [3]: [#46#46, #47#47, #48#48]
Condition : (((isnotnull(d_year#47) AND isnotnull(d_moy#48)) AND (d_year#47 = 1998)) AND (d_moy#48 = 12))

(211) NativeProject
Output [1]: [(d_month_seq#46 + 1) AS (d_month_seq + 1)#49]
Input [3]: [#46#46, #47#47, #48#48]

(212) NativeHashAggregate
Input [1]: [(d_month_seq + 1)#49]
Keys [1]: [(d_month_seq + 1)#49]
Functions: []
Aggregate Attributes: []
Results [1]: [(d_month_seq + 1)#49]

(213) NativeShuffleExchange
Input [1]: [(d_month_seq + 1)#49]
Arguments: hashpartitioning((d_month_seq + 1)#49, 100), ENSURE_REQUIREMENTS, [plan_id=31]

(214) ShuffleQueryStage
Output [1]: [(d_month_seq + 1)#49]
Arguments: X

(215) AQEShuffleRead
Input [1]: [(d_month_seq + 1)#49]
Arguments: coalesced

(216) InputAdapter
Input [1]: [(d_month_seq + 1)#49]

(217) NativeHashAggregate
Input [1]: [(d_month_seq + 1)#49]
Keys [1]: [(d_month_seq + 1)#49]
Functions: []
Aggregate Attributes: []
Results [1]: [(d_month_seq + 1)#49]

(218) NativeProject
Output [1]: [(d_month_seq + 1)#49]
Input [1]: [(d_month_seq + 1)#49]

(219) Scan parquet
Output [3]: [d_month_seq#46, d_year#47, d_moy#48]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(d_year), IsNotNull(d_moy), EqualTo(d_year,1998), EqualTo(d_moy,12)]
ReadSchema: struct<d_month_seq:int,d_year:int,d_moy:int>

(220) Filter
Input [3]: [d_month_seq#46, d_year#47, d_moy#48]
Condition : (((isnotnull(d_year#47) AND isnotnull(d_moy#48)) AND (d_year#47 = 1998)) AND (d_moy#48 = 12))

(221) Project
Output [1]: [(d_month_seq#46 + 1) AS (d_month_seq + 1)#49]
Input [3]: [d_month_seq#46, d_year#47, d_moy#48]

(222) HashAggregate
Input [1]: [(d_month_seq + 1)#49]
Keys [1]: [(d_month_seq + 1)#49]
Functions: []
Aggregate Attributes: []
Results [1]: [(d_month_seq + 1)#49]

(223) Exchange
Input [1]: [(d_month_seq + 1)#49]
Arguments: hashpartitioning((d_month_seq + 1)#49, 100), ENSURE_REQUIREMENTS, [plan_id=32]

(224) HashAggregate
Input [1]: [(d_month_seq + 1)#49]
Keys [1]: [(d_month_seq + 1)#49]
Functions: []
Aggregate Attributes: []
Results [1]: [(d_month_seq + 1)#49]

(225) AdaptiveSparkPlan
Output [1]: [(d_month_seq + 1)#49]
Arguments: isFinalPlan=true

Subquery:2 Hosting operator id = 109 Hosting Expression = Subquery subquery#33, [id=#34]
AdaptiveSparkPlan (243)
+- == Final Plan ==
   NativeProject (236)
   +- NativeHashAggregate (235)
      +- InputAdapter (234)
         +- AQEShuffleRead (233)
            +- ShuffleQueryStage (232), Statistics(X)
               +- NativeShuffleExchange (231)
                  +- NativeHashAggregate (230)
                     +- NativeProject (229)
                        +- NativeFilter (228)
                           +- InputAdapter (227)
                              +- NativeParquetScan  (226)
+- == Initial Plan ==
   HashAggregate (242)
   +- Exchange (241)
      +- HashAggregate (240)
         +- Project (239)
            +- Filter (238)
               +- Scan parquet (237)


(237) Scan parquet
Output [3]: [d_month_seq#50, d_year#51, d_moy#52]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(d_year), IsNotNull(d_moy), EqualTo(d_year,1998), EqualTo(d_moy,12)]
ReadSchema: struct<d_month_seq:int,d_year:int,d_moy:int>

(227) InputAdapter
Input [3]: [d_month_seq#50, d_year#51, d_moy#52]
Arguments: [#50, #51, #52]

(228) NativeFilter
Input [3]: [#50#50, #51#51, #52#52]
Condition : (((isnotnull(d_year#51) AND isnotnull(d_moy#52)) AND (d_year#51 = 1998)) AND (d_moy#52 = 12))

(229) NativeProject
Output [1]: [(d_month_seq#50 + 3) AS (d_month_seq + 3)#53]
Input [3]: [#50#50, #51#51, #52#52]

(230) NativeHashAggregate
Input [1]: [(d_month_seq + 3)#53]
Keys [1]: [(d_month_seq + 3)#53]
Functions: []
Aggregate Attributes: []
Results [1]: [(d_month_seq + 3)#53]

(231) NativeShuffleExchange
Input [1]: [(d_month_seq + 3)#53]
Arguments: hashpartitioning((d_month_seq + 3)#53, 100), ENSURE_REQUIREMENTS, [plan_id=33]

(232) ShuffleQueryStage
Output [1]: [(d_month_seq + 3)#53]
Arguments: X

(233) AQEShuffleRead
Input [1]: [(d_month_seq + 3)#53]
Arguments: coalesced

(234) InputAdapter
Input [1]: [(d_month_seq + 3)#53]

(235) NativeHashAggregate
Input [1]: [(d_month_seq + 3)#53]
Keys [1]: [(d_month_seq + 3)#53]
Functions: []
Aggregate Attributes: []
Results [1]: [(d_month_seq + 3)#53]

(236) NativeProject
Output [1]: [(d_month_seq + 3)#53]
Input [1]: [(d_month_seq + 3)#53]

(237) Scan parquet
Output [3]: [d_month_seq#50, d_year#51, d_moy#52]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(d_year), IsNotNull(d_moy), EqualTo(d_year,1998), EqualTo(d_moy,12)]
ReadSchema: struct<d_month_seq:int,d_year:int,d_moy:int>

(238) Filter
Input [3]: [d_month_seq#50, d_year#51, d_moy#52]
Condition : (((isnotnull(d_year#51) AND isnotnull(d_moy#52)) AND (d_year#51 = 1998)) AND (d_moy#52 = 12))

(239) Project
Output [1]: [(d_month_seq#50 + 3) AS (d_month_seq + 3)#53]
Input [3]: [d_month_seq#50, d_year#51, d_moy#52]

(240) HashAggregate
Input [1]: [(d_month_seq + 3)#53]
Keys [1]: [(d_month_seq + 3)#53]
Functions: []
Aggregate Attributes: []
Results [1]: [(d_month_seq + 3)#53]

(241) Exchange
Input [1]: [(d_month_seq + 3)#53]
Arguments: hashpartitioning((d_month_seq + 3)#53, 100), ENSURE_REQUIREMENTS, [plan_id=34]

(242) HashAggregate
Input [1]: [(d_month_seq + 3)#53]
Keys [1]: [(d_month_seq + 3)#53]
Functions: []
Aggregate Attributes: []
Results [1]: [(d_month_seq + 3)#53]

(243) AdaptiveSparkPlan
Output [1]: [(d_month_seq + 3)#53]
Arguments: isFinalPlan=true


