== Physical Plan ==
AdaptiveSparkPlan (297)
+- == Final Plan ==
   NativeProject (176)
   +- NativeHashAggregate (175)
      +- ShuffleQueryStage (174), Statistics(X)
         +- NativeShuffleExchange (173)
            +- NativeHashAggregate (172)
               +- InputAdapter (171)
                  +- NativeUnion (170)
                     :- NativeProject (98)
                     :  +- NativeSortMergeJoin Inner (97)
                     :     :- NativeSort (87)
                     :     :  +- InputAdapter (86)
                     :     :     +- AQEShuffleRead (85)
                     :     :        +- ShuffleQueryStage (84), Statistics(X)
                     :     :           +- NativeShuffleExchange (83)
                     :     :              +- NativeProject (82)
                     :     :                 +- NativeSortMergeJoin LeftSemi (81)
                     :     :                    :- NativeSort (55)
                     :     :                    :  +- InputAdapter (54)
                     :     :                    :     +- AQEShuffleRead (53)
                     :     :                    :        +- ShuffleQueryStage (52), Statistics(X)
                     :     :                    :           +- NativeShuffleExchange (51)
                     :     :                    :              +- NativeProject (50)
                     :     :                    :                 +- NativeSortMergeJoin LeftSemi (49)
                     :     :                    :                    :- NativeSort (8)
                     :     :                    :                    :  +- InputAdapter (7)
                     :     :                    :                    :     +- AQEShuffleRead (6)
                     :     :                    :                    :        +- ShuffleQueryStage (5), Statistics(X)
                     :     :                    :                    :           +- NativeShuffleExchange (4)
                     :     :                    :                    :              +- NativeFilter (3)
                     :     :                    :                    :                 +- InputAdapter (2)
                     :     :                    :                    :                    +- NativeParquetScan  (1)
                     :     :                    :                    +- NativeSort (48)
                     :     :                    :                       +- NativeProject (47)
                     :     :                    :                          +- NativeFilter (46)
                     :     :                    :                             +- NativeProject (45)
                     :     :                    :                                +- NativeHashAggregate (44)
                     :     :                    :                                   +- NativeHashAggregate (43)
                     :     :                    :                                      +- NativeProject (42)
                     :     :                    :                                         +- NativeSortMergeJoin Inner (41)
                     :     :                    :                                            :- NativeSort (32)
                     :     :                    :                                            :  +- InputAdapter (31)
                     :     :                    :                                            :     +- AQEShuffleRead (30)
                     :     :                    :                                            :        +- ShuffleQueryStage (29), Statistics(X)
                     :     :                    :                                            :           +- NativeShuffleExchange (28)
                     :     :                    :                                            :              +- NativeProject (27)
                     :     :                    :                                            :                 +- NativeSortMergeJoin Inner (26)
                     :     :                    :                                            :                    :- NativeSort (16)
                     :     :                    :                                            :                    :  +- InputAdapter (15)
                     :     :                    :                                            :                    :     +- AQEShuffleRead (14)
                     :     :                    :                                            :                    :        +- ShuffleQueryStage (13), Statistics(X)
                     :     :                    :                                            :                    :           +- NativeShuffleExchange (12)
                     :     :                    :                                            :                    :              +- NativeFilter (11)
                     :     :                    :                                            :                    :                 +- InputAdapter (10)
                     :     :                    :                                            :                    :                    +- NativeParquetScan  (9)
                     :     :                    :                                            :                    +- NativeSort (25)
                     :     :                    :                                            :                       +- InputAdapter (24)
                     :     :                    :                                            :                          +- AQEShuffleRead (23)
                     :     :                    :                                            :                             +- ShuffleQueryStage (22), Statistics(X)
                     :     :                    :                                            :                                +- NativeShuffleExchange (21)
                     :     :                    :                                            :                                   +- NativeProject (20)
                     :     :                    :                                            :                                      +- NativeFilter (19)
                     :     :                    :                                            :                                         +- InputAdapter (18)
                     :     :                    :                                            :                                            +- NativeParquetScan  (17)
                     :     :                    :                                            +- NativeSort (40)
                     :     :                    :                                               +- InputAdapter (39)
                     :     :                    :                                                  +- AQEShuffleRead (38)
                     :     :                    :                                                     +- ShuffleQueryStage (37), Statistics(X)
                     :     :                    :                                                        +- NativeShuffleExchange (36)
                     :     :                    :                                                           +- NativeFilter (35)
                     :     :                    :                                                              +- InputAdapter (34)
                     :     :                    :                                                                 +- NativeParquetScan  (33)
                     :     :                    +- NativeSort (80)
                     :     :                       +- NativeProject (79)
                     :     :                          +- NativeFilter (78)
                     :     :                             +- NativeProject (77)
                     :     :                                +- NativeHashAggregate (76)
                     :     :                                   +- NativeHashAggregate (75)
                     :     :                                      +- NativeProject (74)
                     :     :                                         +- NativeProject (73)
                     :     :                                            +- NativeSortMergeJoin Inner (72)
                     :     :                                               :- NativeSort (63)
                     :     :                                               :  +- InputAdapter (62)
                     :     :                                               :     +- AQEShuffleRead (61)
                     :     :                                               :        +- ShuffleQueryStage (60), Statistics(X)
                     :     :                                               :           +- NativeShuffleExchange (59)
                     :     :                                               :              +- NativeFilter (58)
                     :     :                                               :                 +- InputAdapter (57)
                     :     :                                               :                    +- NativeParquetScan  (56)
                     :     :                                               +- NativeSort (71)
                     :     :                                                  +- InputAdapter (70)
                     :     :                                                     +- AQEShuffleRead (69)
                     :     :                                                        +- ShuffleQueryStage (68), Statistics(X)
                     :     :                                                           +- NativeShuffleExchange (67)
                     :     :                                                              +- NativeFilter (66)
                     :     :                                                                 +- InputAdapter (65)
                     :     :                                                                    +- NativeParquetScan  (64)
                     :     +- NativeSort (96)
                     :        +- InputAdapter (95)
                     :           +- AQEShuffleRead (94)
                     :              +- ShuffleQueryStage (93), Statistics(X)
                     :                 +- NativeShuffleExchange (92)
                     :                    +- NativeProject (91)
                     :                       +- NativeFilter (90)
                     :                          +- InputAdapter (89)
                     :                             +- NativeParquetScan  (88)
                     +- NativeProject (169)
                        +- NativeSortMergeJoin Inner (168)
                           :- NativeSort (161)
                           :  +- InputAdapter (160)
                           :     +- AQEShuffleRead (159)
                           :        +- ShuffleQueryStage (158), Statistics(X)
                           :           +- NativeShuffleExchange (157)
                           :              +- NativeProject (156)
                           :                 +- NativeSortMergeJoin LeftSemi (155)
                           :                    :- NativeSort (133)
                           :                    :  +- InputAdapter (132)
                           :                    :     +- AQEShuffleRead (131)
                           :                    :        +- ShuffleQueryStage (130), Statistics(X)
                           :                    :           +- NativeShuffleExchange (129)
                           :                    :              +- NativeProject (128)
                           :                    :                 +- NativeSortMergeJoin LeftSemi (127)
                           :                    :                    :- NativeSort (106)
                           :                    :                    :  +- InputAdapter (105)
                           :                    :                    :     +- AQEShuffleRead (104)
                           :                    :                    :        +- ShuffleQueryStage (103), Statistics(X)
                           :                    :                    :           +- NativeShuffleExchange (102)
                           :                    :                    :              +- NativeFilter (101)
                           :                    :                    :                 +- InputAdapter (100)
                           :                    :                    :                    +- NativeParquetScan  (99)
                           :                    :                    +- NativeSort (126)
                           :                    :                       +- NativeProject (125)
                           :                    :                          +- NativeFilter (124)
                           :                    :                             +- NativeProject (123)
                           :                    :                                +- NativeHashAggregate (122)
                           :                    :                                   +- NativeHashAggregate (121)
                           :                    :                                      +- NativeProject (120)
                           :                    :                                         +- NativeSortMergeJoin Inner (119)
                           :                    :                                            :- NativeSort (112)
                           :                    :                                            :  +- InputAdapter (111)
                           :                    :                                            :     +- InputAdapter (110)
                           :                    :                                            :        +- AQEShuffleRead (109)
                           :                    :                                            :           +- ShuffleQueryStage (108), Statistics(X)
                           :                    :                                            :              +- ReusedExchange (107)
                           :                    :                                            +- NativeSort (118)
                           :                    :                                               +- InputAdapter (117)
                           :                    :                                                  +- InputAdapter (116)
                           :                    :                                                     +- AQEShuffleRead (115)
                           :                    :                                                        +- ShuffleQueryStage (114), Statistics(X)
                           :                    :                                                           +- ReusedExchange (113)
                           :                    +- NativeSort (154)
                           :                       +- NativeProject (153)
                           :                          +- NativeFilter (152)
                           :                             +- NativeProject (151)
                           :                                +- NativeHashAggregate (150)
                           :                                   +- NativeHashAggregate (149)
                           :                                      +- NativeProject (148)
                           :                                         +- NativeProject (147)
                           :                                            +- NativeSortMergeJoin Inner (146)
                           :                                               :- NativeSort (139)
                           :                                               :  +- InputAdapter (138)
                           :                                               :     +- InputAdapter (137)
                           :                                               :        +- AQEShuffleRead (136)
                           :                                               :           +- ShuffleQueryStage (135), Statistics(X)
                           :                                               :              +- ReusedExchange (134)
                           :                                               +- NativeSort (145)
                           :                                                  +- InputAdapter (144)
                           :                                                     +- InputAdapter (143)
                           :                                                        +- AQEShuffleRead (142)
                           :                                                           +- ShuffleQueryStage (141), Statistics(X)
                           :                                                              +- ReusedExchange (140)
                           +- NativeSort (167)
                              +- InputAdapter (166)
                                 +- InputAdapter (165)
                                    +- AQEShuffleRead (164)
                                       +- ShuffleQueryStage (163), Statistics(X)
                                          +- ReusedExchange (162)
+- == Initial Plan ==
   HashAggregate (296)
   +- Exchange (295)
      +- HashAggregate (294)
         +- Union (293)
            :- Project (234)
            :  +- SortMergeJoin Inner (233)
            :     :- Sort (227)
            :     :  +- Exchange (226)
            :     :     +- Project (225)
            :     :        +- SortMergeJoin LeftSemi (224)
            :     :           :- Sort (208)
            :     :           :  +- Exchange (207)
            :     :           :     +- Project (206)
            :     :           :        +- SortMergeJoin LeftSemi (205)
            :     :           :           :- Sort (180)
            :     :           :           :  +- Exchange (179)
            :     :           :           :     +- Filter (178)
            :     :           :           :        +- Scan parquet (177)
            :     :           :           +- Sort (204)
            :     :           :              +- Project (203)
            :     :           :                 +- Filter (202)
            :     :           :                    +- HashAggregate (201)
            :     :           :                       +- HashAggregate (200)
            :     :           :                          +- Project (199)
            :     :           :                             +- SortMergeJoin Inner (198)
            :     :           :                                :- Sort (193)
            :     :           :                                :  +- Exchange (192)
            :     :           :                                :     +- Project (191)
            :     :           :                                :        +- SortMergeJoin Inner (190)
            :     :           :                                :           :- Sort (184)
            :     :           :                                :           :  +- Exchange (183)
            :     :           :                                :           :     +- Filter (182)
            :     :           :                                :           :        +- Scan parquet (181)
            :     :           :                                :           +- Sort (189)
            :     :           :                                :              +- Exchange (188)
            :     :           :                                :                 +- Project (187)
            :     :           :                                :                    +- Filter (186)
            :     :           :                                :                       +- Scan parquet (185)
            :     :           :                                +- Sort (197)
            :     :           :                                   +- Exchange (196)
            :     :           :                                      +- Filter (195)
            :     :           :                                         +- Scan parquet (194)
            :     :           +- Sort (223)
            :     :              +- Project (222)
            :     :                 +- Filter (221)
            :     :                    +- HashAggregate (220)
            :     :                       +- HashAggregate (219)
            :     :                          +- Project (218)
            :     :                             +- SortMergeJoin Inner (217)
            :     :                                :- Sort (212)
            :     :                                :  +- Exchange (211)
            :     :                                :     +- Filter (210)
            :     :                                :        +- Scan parquet (209)
            :     :                                +- Sort (216)
            :     :                                   +- Exchange (215)
            :     :                                      +- Filter (214)
            :     :                                         +- Scan parquet (213)
            :     +- Sort (232)
            :        +- Exchange (231)
            :           +- Project (230)
            :              +- Filter (229)
            :                 +- Scan parquet (228)
            +- Project (292)
               +- SortMergeJoin Inner (291)
                  :- Sort (285)
                  :  +- Exchange (284)
                  :     +- Project (283)
                  :        +- SortMergeJoin LeftSemi (282)
                  :           :- Sort (266)
                  :           :  +- Exchange (265)
                  :           :     +- Project (264)
                  :           :        +- SortMergeJoin LeftSemi (263)
                  :           :           :- Sort (238)
                  :           :           :  +- Exchange (237)
                  :           :           :     +- Filter (236)
                  :           :           :        +- Scan parquet (235)
                  :           :           +- Sort (262)
                  :           :              +- Project (261)
                  :           :                 +- Filter (260)
                  :           :                    +- HashAggregate (259)
                  :           :                       +- HashAggregate (258)
                  :           :                          +- Project (257)
                  :           :                             +- SortMergeJoin Inner (256)
                  :           :                                :- Sort (251)
                  :           :                                :  +- Exchange (250)
                  :           :                                :     +- Project (249)
                  :           :                                :        +- SortMergeJoin Inner (248)
                  :           :                                :           :- Sort (242)
                  :           :                                :           :  +- Exchange (241)
                  :           :                                :           :     +- Filter (240)
                  :           :                                :           :        +- Scan parquet (239)
                  :           :                                :           +- Sort (247)
                  :           :                                :              +- Exchange (246)
                  :           :                                :                 +- Project (245)
                  :           :                                :                    +- Filter (244)
                  :           :                                :                       +- Scan parquet (243)
                  :           :                                +- Sort (255)
                  :           :                                   +- Exchange (254)
                  :           :                                      +- Filter (253)
                  :           :                                         +- Scan parquet (252)
                  :           +- Sort (281)
                  :              +- Project (280)
                  :                 +- Filter (279)
                  :                    +- HashAggregate (278)
                  :                       +- HashAggregate (277)
                  :                          +- Project (276)
                  :                             +- SortMergeJoin Inner (275)
                  :                                :- Sort (270)
                  :                                :  +- Exchange (269)
                  :                                :     +- Filter (268)
                  :                                :        +- Scan parquet (267)
                  :                                +- Sort (274)
                  :                                   +- Exchange (273)
                  :                                      +- Filter (272)
                  :                                         +- Scan parquet (271)
                  +- Sort (290)
                     +- Exchange (289)
                        +- Project (288)
                           +- Filter (287)
                              +- Scan parquet (286)


(177) Scan parquet
Output [5]: [cs_sold_date_sk#1, cs_bill_customer_sk#2, cs_item_sk#3, cs_quantity#4, cs_list_price#5]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(cs_sold_date_sk)]
ReadSchema: struct<cs_sold_date_sk:int,cs_bill_customer_sk:int,cs_item_sk:int,cs_quantity:int,cs_list_price:decimal(7,2)>

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

(3) NativeFilter
Input [5]: [#1#1, #2#2, #3#3, #4#4, #5#5]
Condition : isnotnull(cs_sold_date_sk#1)

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

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

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

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

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

(181) Scan parquet
Output [2]: [ss_sold_date_sk#6, ss_item_sk#7]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(ss_sold_date_sk), IsNotNull(ss_item_sk)]
ReadSchema: struct<ss_sold_date_sk:int,ss_item_sk:int>

(10) InputAdapter
Input [2]: [ss_sold_date_sk#6, ss_item_sk#7]
Arguments: [#6, #7]

(11) NativeFilter
Input [2]: [#6#6, #7#7]
Condition : (isnotnull(ss_sold_date_sk#6) AND isnotnull(ss_item_sk#7))

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

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

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

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

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

(185) Scan parquet
Output [3]: [d_date_sk#8, d_date#9, d_year#10]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [In(d_year, [2000,2001,2002,2003]), IsNotNull(d_date_sk)]
ReadSchema: struct<d_date_sk:int,d_date:date,d_year:int>

(18) InputAdapter
Input [3]: [d_date_sk#8, d_date#9, d_year#10]
Arguments: [#8, #9, #10]

(19) NativeFilter
Input [3]: [#8#8, #9#9, #10#10]
Condition : (d_year#10 IN (2000,2001,2002,2003) AND isnotnull(d_date_sk#8))

(20) NativeProject
Output [2]: [d_date_sk#8, d_date#9]
Input [3]: [#8#8, #9#9, #10#10]

(21) NativeShuffleExchange
Input [2]: [d_date_sk#8, d_date#9]
Arguments: hashpartitioning(d_date_sk#8, 100), ENSURE_REQUIREMENTS, [plan_id=3]

(22) ShuffleQueryStage
Output [2]: [d_date_sk#8, d_date#9]
Arguments: X

(23) AQEShuffleRead
Input [2]: [d_date_sk#8, d_date#9]
Arguments: coalesced

(24) InputAdapter
Input [2]: [d_date_sk#8, d_date#9]

(25) NativeSort
Input [2]: [d_date_sk#8, d_date#9]
Arguments: [d_date_sk#8 ASC NULLS FIRST], false

(26) NativeSortMergeJoin
Left keys [1]: [ss_sold_date_sk#6]
Right keys [1]: [d_date_sk#8]
Join type: Inner
Join condition: None

(27) NativeProject
Output [2]: [ss_item_sk#7, d_date#9]
Input [4]: [#6#6, #7#7, d_date_sk#8, d_date#9]

(28) NativeShuffleExchange
Input [2]: [ss_item_sk#7, d_date#9]
Arguments: hashpartitioning(ss_item_sk#7, 100), ENSURE_REQUIREMENTS, [plan_id=4]

(29) ShuffleQueryStage
Output [2]: [ss_item_sk#7, d_date#9]
Arguments: X

(30) AQEShuffleRead
Input [2]: [ss_item_sk#7, d_date#9]
Arguments: coalesced

(31) InputAdapter
Input [2]: [ss_item_sk#7, d_date#9]

(32) NativeSort
Input [2]: [ss_item_sk#7, d_date#9]
Arguments: [ss_item_sk#7 ASC NULLS FIRST], false

(194) Scan parquet
Output [2]: [i_item_sk#11, i_item_desc#12]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(i_item_sk)]
ReadSchema: struct<i_item_sk:int,i_item_desc:string>

(34) InputAdapter
Input [2]: [i_item_sk#11, i_item_desc#12]
Arguments: [#11, #12]

(35) NativeFilter
Input [2]: [#11#11, #12#12]
Condition : isnotnull(i_item_sk#11)

(36) NativeShuffleExchange
Input [2]: [#11#11, #12#12]
Arguments: hashpartitioning(i_item_sk#11, 100), ENSURE_REQUIREMENTS, [plan_id=5]

(37) ShuffleQueryStage
Output [2]: [#11#11, #12#12]
Arguments: X

(38) AQEShuffleRead
Input [2]: [#11#11, #12#12]
Arguments: coalesced

(39) InputAdapter
Input [2]: [#11#11, #12#12]

(40) NativeSort
Input [2]: [#11#11, #12#12]
Arguments: [i_item_sk#11 ASC NULLS FIRST], false

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

(42) NativeProject
Output [3]: [d_date#9, i_item_sk#11, substr(i_item_desc#12, 1, 30) AS _groupingexpression#13]
Input [4]: [ss_item_sk#7, d_date#9, #11#11, #12#12]

(43) NativeHashAggregate
Input [3]: [d_date#9, i_item_sk#11, _groupingexpression#13]
Keys [3]: [_groupingexpression#13, i_item_sk#11, d_date#9]
Functions [1]: [partial_count(1)]
Aggregate Attributes [1]: [count#14]
Results [4]: [_groupingexpression#13, i_item_sk#11, d_date#9, #15]

(44) NativeHashAggregate
Input [4]: [_groupingexpression#13, i_item_sk#11, d_date#9, #15]
Keys [3]: [_groupingexpression#13, i_item_sk#11, d_date#9]
Functions [1]: [count(1)]
Aggregate Attributes [1]: [count(1)#16]
Results [4]: [_groupingexpression#13, i_item_sk#11, d_date#9, count(1)#16]

(45) NativeProject
Output [2]: [i_item_sk#11 AS item_sk#17, count(1)#16 AS cnt#18]
Input [4]: [_groupingexpression#13, i_item_sk#11, d_date#9, count(1)#16]

(46) NativeFilter
Input [2]: [item_sk#17, cnt#18]
Condition : (cnt#18 > 4)

(47) NativeProject
Output [1]: [item_sk#17]
Input [2]: [item_sk#17, cnt#18]

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

(49) NativeSortMergeJoin
Left keys [1]: [cs_item_sk#3]
Right keys [1]: [item_sk#17]
Join type: LeftSemi
Join condition: None

(50) NativeProject
Output [4]: [cs_sold_date_sk#1, cs_bill_customer_sk#2, cs_quantity#4, cs_list_price#5]
Input [5]: [#1#1, #2#2, #3#3, #4#4, #5#5]

(51) NativeShuffleExchange
Input [4]: [cs_sold_date_sk#1, cs_bill_customer_sk#2, cs_quantity#4, cs_list_price#5]
Arguments: hashpartitioning(cs_bill_customer_sk#2, 100), ENSURE_REQUIREMENTS, [plan_id=6]

(52) ShuffleQueryStage
Output [4]: [cs_sold_date_sk#1, cs_bill_customer_sk#2, cs_quantity#4, cs_list_price#5]
Arguments: X

(53) AQEShuffleRead
Input [4]: [cs_sold_date_sk#1, cs_bill_customer_sk#2, cs_quantity#4, cs_list_price#5]
Arguments: coalesced

(54) InputAdapter
Input [4]: [cs_sold_date_sk#1, cs_bill_customer_sk#2, cs_quantity#4, cs_list_price#5]

(55) NativeSort
Input [4]: [cs_sold_date_sk#1, cs_bill_customer_sk#2, cs_quantity#4, cs_list_price#5]
Arguments: [cs_bill_customer_sk#2 ASC NULLS FIRST], false

(209) Scan parquet
Output [3]: [ss_customer_sk#19, ss_quantity#20, ss_sales_price#21]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(ss_customer_sk)]
ReadSchema: struct<ss_customer_sk:int,ss_quantity:int,ss_sales_price:decimal(7,2)>

(57) InputAdapter
Input [3]: [ss_customer_sk#19, ss_quantity#20, ss_sales_price#21]
Arguments: [#19, #20, #21]

(58) NativeFilter
Input [3]: [#19#19, #20#20, #21#21]
Condition : isnotnull(ss_customer_sk#19)

(59) NativeShuffleExchange
Input [3]: [#19#19, #20#20, #21#21]
Arguments: hashpartitioning(ss_customer_sk#19, 100), ENSURE_REQUIREMENTS, [plan_id=7]

(60) ShuffleQueryStage
Output [3]: [#19#19, #20#20, #21#21]
Arguments: X

(61) AQEShuffleRead
Input [3]: [#19#19, #20#20, #21#21]
Arguments: coalesced

(62) InputAdapter
Input [3]: [#19#19, #20#20, #21#21]

(63) NativeSort
Input [3]: [#19#19, #20#20, #21#21]
Arguments: [ss_customer_sk#19 ASC NULLS FIRST], false

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

(65) InputAdapter
Input [1]: [c_customer_sk#22]
Arguments: [#22]

(66) NativeFilter
Input [1]: [#22#22]
Condition : isnotnull(c_customer_sk#22)

(67) NativeShuffleExchange
Input [1]: [#22#22]
Arguments: hashpartitioning(c_customer_sk#22, 100), ENSURE_REQUIREMENTS, [plan_id=8]

(68) ShuffleQueryStage
Output [1]: [#22#22]
Arguments: X

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

(70) InputAdapter
Input [1]: [#22#22]

(71) NativeSort
Input [1]: [#22#22]
Arguments: [c_customer_sk#22 ASC NULLS FIRST], false

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

(73) NativeProject
Output [3]: [ss_quantity#20, ss_sales_price#21, c_customer_sk#22]
Input [4]: [#19#19, #20#20, #21#21, #22#22]

(74) NativeProject
Output [2]: [c_customer_sk#22 AS c_customer_sk#22, (cast(ss_quantity#20 as decimal(10,0)) * ss_sales_price#21) AS _c1#23]
Input [3]: [ss_quantity#20, ss_sales_price#21, c_customer_sk#22]

(75) NativeHashAggregate
Input [2]: [c_customer_sk#22, _c1#23]
Keys [1]: [c_customer_sk#22]
Functions [1]: [partial_sum(_c1#23)]
Aggregate Attributes [2]: [sum#24, isEmpty#25]
Results [2]: [c_customer_sk#22, #26]

(76) NativeHashAggregate
Input [2]: [c_customer_sk#22, #26]
Keys [1]: [c_customer_sk#22]
Functions [1]: [sum((cast(ss_quantity#20 as decimal(10,0)) * ss_sales_price#21))]
Aggregate Attributes [1]: [sum((cast(ss_quantity#20 as decimal(10,0)) * ss_sales_price#21))#27]
Results [2]: [c_customer_sk#22, sum((cast(ss_quantity#20 as decimal(10,0)) * ss_sales_price#21))#27]

(77) NativeProject
Output [2]: [c_customer_sk#22, sum((cast(ss_quantity#20 as decimal(10,0)) * ss_sales_price#21))#27 AS ssales#28]
Input [2]: [c_customer_sk#22, sum((cast(ss_quantity#20 as decimal(10,0)) * ss_sales_price#21))#27]

(78) NativeFilter
Input [2]: [c_customer_sk#22, ssales#28]
Condition : (isnotnull(ssales#28) AND (cast(ssales#28 as decimal(38,8)) > (0.500000 * Subquery subquery#29, [id=#30])))

(79) NativeProject
Output [1]: [c_customer_sk#22]
Input [2]: [c_customer_sk#22, ssales#28]

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

(81) NativeSortMergeJoin
Left keys [1]: [cs_bill_customer_sk#2]
Right keys [1]: [c_customer_sk#22]
Join type: LeftSemi
Join condition: None

(82) NativeProject
Output [3]: [cs_sold_date_sk#1, cs_quantity#4, cs_list_price#5]
Input [4]: [cs_sold_date_sk#1, cs_bill_customer_sk#2, cs_quantity#4, cs_list_price#5]

(83) NativeShuffleExchange
Input [3]: [cs_sold_date_sk#1, cs_quantity#4, cs_list_price#5]
Arguments: hashpartitioning(cs_sold_date_sk#1, 100), ENSURE_REQUIREMENTS, [plan_id=9]

(84) ShuffleQueryStage
Output [3]: [cs_sold_date_sk#1, cs_quantity#4, cs_list_price#5]
Arguments: X

(85) AQEShuffleRead
Input [3]: [cs_sold_date_sk#1, cs_quantity#4, cs_list_price#5]
Arguments: coalesced

(86) InputAdapter
Input [3]: [cs_sold_date_sk#1, cs_quantity#4, cs_list_price#5]

(87) NativeSort
Input [3]: [cs_sold_date_sk#1, cs_quantity#4, cs_list_price#5]
Arguments: [cs_sold_date_sk#1 ASC NULLS FIRST], false

(228) Scan parquet
Output [3]: [d_date_sk#31, d_year#32, d_moy#33]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(d_year), IsNotNull(d_moy), EqualTo(d_year,2000), EqualTo(d_moy,2), IsNotNull(d_date_sk)]
ReadSchema: struct<d_date_sk:int,d_year:int,d_moy:int>

(89) InputAdapter
Input [3]: [d_date_sk#31, d_year#32, d_moy#33]
Arguments: [#31, #32, #33]

(90) NativeFilter
Input [3]: [#31#31, #32#32, #33#33]
Condition : ((((isnotnull(d_year#32) AND isnotnull(d_moy#33)) AND (d_year#32 = 2000)) AND (d_moy#33 = 2)) AND isnotnull(d_date_sk#31))

(91) NativeProject
Output [1]: [d_date_sk#31]
Input [3]: [#31#31, #32#32, #33#33]

(92) NativeShuffleExchange
Input [1]: [d_date_sk#31]
Arguments: hashpartitioning(d_date_sk#31, 100), ENSURE_REQUIREMENTS, [plan_id=10]

(93) ShuffleQueryStage
Output [1]: [d_date_sk#31]
Arguments: X

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

(95) InputAdapter
Input [1]: [d_date_sk#31]

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

(97) NativeSortMergeJoin
Left keys [1]: [cs_sold_date_sk#1]
Right keys [1]: [d_date_sk#31]
Join type: Inner
Join condition: None

(98) NativeProject
Output [1]: [(cast(cs_quantity#4 as decimal(10,0)) * cs_list_price#5) AS sales#34]
Input [4]: [cs_sold_date_sk#1, cs_quantity#4, cs_list_price#5, d_date_sk#31]

(235) Scan parquet
Output [5]: [ws_sold_date_sk#35, ws_item_sk#36, ws_bill_customer_sk#37, ws_quantity#38, ws_list_price#39]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(ws_sold_date_sk)]
ReadSchema: struct<ws_sold_date_sk:int,ws_item_sk:int,ws_bill_customer_sk:int,ws_quantity:int,ws_list_price:decimal(7,2)>

(100) InputAdapter
Input [5]: [ws_sold_date_sk#35, ws_item_sk#36, ws_bill_customer_sk#37, ws_quantity#38, ws_list_price#39]
Arguments: [#35, #36, #37, #38, #39]

(101) NativeFilter
Input [5]: [#35#35, #36#36, #37#37, #38#38, #39#39]
Condition : isnotnull(ws_sold_date_sk#35)

(102) NativeShuffleExchange
Input [5]: [#35#35, #36#36, #37#37, #38#38, #39#39]
Arguments: hashpartitioning(ws_item_sk#36, 100), ENSURE_REQUIREMENTS, [plan_id=11]

(103) ShuffleQueryStage
Output [5]: [#35#35, #36#36, #37#37, #38#38, #39#39]
Arguments: X

(104) AQEShuffleRead
Input [5]: [#35#35, #36#36, #37#37, #38#38, #39#39]
Arguments: coalesced

(105) InputAdapter
Input [5]: [#35#35, #36#36, #37#37, #38#38, #39#39]

(106) NativeSort
Input [5]: [#35#35, #36#36, #37#37, #38#38, #39#39]
Arguments: [ws_item_sk#36 ASC NULLS FIRST], false

(107) ReusedExchange [Reuses operator id: 28]
Output [2]: [ss_item_sk#40, d_date#41]

(108) ShuffleQueryStage
Output [2]: [ss_item_sk#40, d_date#41]
Arguments: X

(109) AQEShuffleRead
Input [2]: [ss_item_sk#40, d_date#41]
Arguments: coalesced

(110) InputAdapter
Input [2]: [ss_item_sk#40, d_date#41]
Arguments: [#40, #41]

(111) InputAdapter
Input [2]: [#40#40, #41#41]

(112) NativeSort
Input [2]: [#40#40, #41#41]
Arguments: [ss_item_sk#40 ASC NULLS FIRST], false

(113) ReusedExchange [Reuses operator id: 36]
Output [2]: [i_item_sk#42, i_item_desc#43]

(114) ShuffleQueryStage
Output [2]: [i_item_sk#42, i_item_desc#43]
Arguments: X

(115) AQEShuffleRead
Input [2]: [i_item_sk#42, i_item_desc#43]
Arguments: coalesced

(116) InputAdapter
Input [2]: [i_item_sk#42, i_item_desc#43]
Arguments: [#42, #43]

(117) InputAdapter
Input [2]: [#42#42, #43#43]

(118) NativeSort
Input [2]: [#42#42, #43#43]
Arguments: [i_item_sk#42 ASC NULLS FIRST], false

(119) NativeSortMergeJoin
Left keys [1]: [ss_item_sk#40]
Right keys [1]: [i_item_sk#42]
Join type: Inner
Join condition: None

(120) NativeProject
Output [3]: [d_date#41, i_item_sk#42, substr(i_item_desc#43, 1, 30) AS _groupingexpression#13]
Input [4]: [#40#40, #41#41, #42#42, #43#43]

(121) NativeHashAggregate
Input [3]: [d_date#41, i_item_sk#42, _groupingexpression#13]
Keys [3]: [_groupingexpression#13, i_item_sk#42, d_date#41]
Functions [1]: [partial_count(1)]
Aggregate Attributes [1]: [count#14]
Results [4]: [_groupingexpression#13, i_item_sk#42, d_date#41, #15]

(122) NativeHashAggregate
Input [4]: [_groupingexpression#13, i_item_sk#42, d_date#41, #15]
Keys [3]: [_groupingexpression#13, i_item_sk#42, d_date#41]
Functions [1]: [count(1)]
Aggregate Attributes [1]: [count(1)#16]
Results [4]: [_groupingexpression#13, i_item_sk#42, d_date#41, count(1)#16]

(123) NativeProject
Output [2]: [i_item_sk#42 AS item_sk#44, count(1)#16 AS cnt#45]
Input [4]: [_groupingexpression#13, i_item_sk#42, d_date#41, count(1)#16]

(124) NativeFilter
Input [2]: [item_sk#44, cnt#45]
Condition : (cnt#45 > 4)

(125) NativeProject
Output [1]: [item_sk#44]
Input [2]: [item_sk#44, cnt#45]

(126) NativeSort
Input [1]: [item_sk#44]
Arguments: [item_sk#44 ASC NULLS FIRST], false

(127) NativeSortMergeJoin
Left keys [1]: [ws_item_sk#36]
Right keys [1]: [item_sk#44]
Join type: LeftSemi
Join condition: None

(128) NativeProject
Output [4]: [ws_sold_date_sk#35, ws_bill_customer_sk#37, ws_quantity#38, ws_list_price#39]
Input [5]: [#35#35, #36#36, #37#37, #38#38, #39#39]

(129) NativeShuffleExchange
Input [4]: [ws_sold_date_sk#35, ws_bill_customer_sk#37, ws_quantity#38, ws_list_price#39]
Arguments: hashpartitioning(ws_bill_customer_sk#37, 100), ENSURE_REQUIREMENTS, [plan_id=12]

(130) ShuffleQueryStage
Output [4]: [ws_sold_date_sk#35, ws_bill_customer_sk#37, ws_quantity#38, ws_list_price#39]
Arguments: X

(131) AQEShuffleRead
Input [4]: [ws_sold_date_sk#35, ws_bill_customer_sk#37, ws_quantity#38, ws_list_price#39]
Arguments: coalesced

(132) InputAdapter
Input [4]: [ws_sold_date_sk#35, ws_bill_customer_sk#37, ws_quantity#38, ws_list_price#39]

(133) NativeSort
Input [4]: [ws_sold_date_sk#35, ws_bill_customer_sk#37, ws_quantity#38, ws_list_price#39]
Arguments: [ws_bill_customer_sk#37 ASC NULLS FIRST], false

(134) ReusedExchange [Reuses operator id: 59]
Output [3]: [ss_customer_sk#46, ss_quantity#47, ss_sales_price#48]

(135) ShuffleQueryStage
Output [3]: [ss_customer_sk#46, ss_quantity#47, ss_sales_price#48]
Arguments: X

(136) AQEShuffleRead
Input [3]: [ss_customer_sk#46, ss_quantity#47, ss_sales_price#48]
Arguments: coalesced

(137) InputAdapter
Input [3]: [ss_customer_sk#46, ss_quantity#47, ss_sales_price#48]
Arguments: [#46, #47, #48]

(138) InputAdapter
Input [3]: [#46#46, #47#47, #48#48]

(139) NativeSort
Input [3]: [#46#46, #47#47, #48#48]
Arguments: [ss_customer_sk#46 ASC NULLS FIRST], false

(140) ReusedExchange [Reuses operator id: 67]
Output [1]: [c_customer_sk#49]

(141) ShuffleQueryStage
Output [1]: [c_customer_sk#49]
Arguments: X

(142) AQEShuffleRead
Input [1]: [c_customer_sk#49]
Arguments: coalesced

(143) InputAdapter
Input [1]: [c_customer_sk#49]
Arguments: [#49]

(144) InputAdapter
Input [1]: [#49#49]

(145) NativeSort
Input [1]: [#49#49]
Arguments: [c_customer_sk#49 ASC NULLS FIRST], false

(146) NativeSortMergeJoin
Left keys [1]: [ss_customer_sk#46]
Right keys [1]: [c_customer_sk#49]
Join type: Inner
Join condition: None

(147) NativeProject
Output [3]: [ss_quantity#47, ss_sales_price#48, c_customer_sk#49]
Input [4]: [#46#46, #47#47, #48#48, #49#49]

(148) NativeProject
Output [2]: [c_customer_sk#49 AS c_customer_sk#49, (cast(ss_quantity#47 as decimal(10,0)) * ss_sales_price#48) AS _c1#50]
Input [3]: [ss_quantity#47, ss_sales_price#48, c_customer_sk#49]

(149) NativeHashAggregate
Input [2]: [c_customer_sk#49, _c1#50]
Keys [1]: [c_customer_sk#49]
Functions [1]: [partial_sum(_c1#50)]
Aggregate Attributes [2]: [sum#51, isEmpty#52]
Results [2]: [c_customer_sk#49, #26]

(150) NativeHashAggregate
Input [2]: [c_customer_sk#49, #26]
Keys [1]: [c_customer_sk#49]
Functions [1]: [sum((cast(ss_quantity#47 as decimal(10,0)) * ss_sales_price#48))]
Aggregate Attributes [1]: [sum((cast(ss_quantity#47 as decimal(10,0)) * ss_sales_price#48))#27]
Results [2]: [c_customer_sk#49, sum((cast(ss_quantity#47 as decimal(10,0)) * ss_sales_price#48))#27]

(151) NativeProject
Output [2]: [c_customer_sk#49, sum((cast(ss_quantity#47 as decimal(10,0)) * ss_sales_price#48))#27 AS ssales#53]
Input [2]: [c_customer_sk#49, sum((cast(ss_quantity#47 as decimal(10,0)) * ss_sales_price#48))#27]

(152) NativeFilter
Input [2]: [c_customer_sk#49, ssales#53]
Condition : (isnotnull(ssales#53) AND (cast(ssales#53 as decimal(38,8)) > (0.500000 * ReusedSubquery Subquery subquery#29, [id=#30])))

(153) NativeProject
Output [1]: [c_customer_sk#49]
Input [2]: [c_customer_sk#49, ssales#53]

(154) NativeSort
Input [1]: [c_customer_sk#49]
Arguments: [c_customer_sk#49 ASC NULLS FIRST], false

(155) NativeSortMergeJoin
Left keys [1]: [ws_bill_customer_sk#37]
Right keys [1]: [c_customer_sk#49]
Join type: LeftSemi
Join condition: None

(156) NativeProject
Output [3]: [ws_sold_date_sk#35, ws_quantity#38, ws_list_price#39]
Input [4]: [ws_sold_date_sk#35, ws_bill_customer_sk#37, ws_quantity#38, ws_list_price#39]

(157) NativeShuffleExchange
Input [3]: [ws_sold_date_sk#35, ws_quantity#38, ws_list_price#39]
Arguments: hashpartitioning(ws_sold_date_sk#35, 100), ENSURE_REQUIREMENTS, [plan_id=13]

(158) ShuffleQueryStage
Output [3]: [ws_sold_date_sk#35, ws_quantity#38, ws_list_price#39]
Arguments: X

(159) AQEShuffleRead
Input [3]: [ws_sold_date_sk#35, ws_quantity#38, ws_list_price#39]
Arguments: coalesced

(160) InputAdapter
Input [3]: [ws_sold_date_sk#35, ws_quantity#38, ws_list_price#39]

(161) NativeSort
Input [3]: [ws_sold_date_sk#35, ws_quantity#38, ws_list_price#39]
Arguments: [ws_sold_date_sk#35 ASC NULLS FIRST], false

(162) ReusedExchange [Reuses operator id: 92]
Output [1]: [d_date_sk#54]

(163) ShuffleQueryStage
Output [1]: [d_date_sk#54]
Arguments: X

(164) AQEShuffleRead
Input [1]: [d_date_sk#54]
Arguments: coalesced

(165) InputAdapter
Input [1]: [d_date_sk#54]
Arguments: [#54]

(166) InputAdapter
Input [1]: [#54#54]

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

(168) NativeSortMergeJoin
Left keys [1]: [ws_sold_date_sk#35]
Right keys [1]: [d_date_sk#54]
Join type: Inner
Join condition: None

(169) NativeProject
Output [1]: [(cast(ws_quantity#38 as decimal(10,0)) * ws_list_price#39) AS sales#55]
Input [4]: [ws_sold_date_sk#35, ws_quantity#38, ws_list_price#39, #54#54]

(170) NativeUnion
Arguments: [sales#34]

(171) InputAdapter
Input [1]: [sales#34]
Arguments: [#34]

(172) NativeHashAggregate
Input [1]: [#34#34]
Keys: []
Functions [1]: [partial_sum(sales#34)]
Aggregate Attributes [2]: [sum#56, isEmpty#57]
Results [1]: [#26]

(173) NativeShuffleExchange
Input [1]: [#26]
Arguments: SinglePartition, ENSURE_REQUIREMENTS, [plan_id=14]

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

(175) NativeHashAggregate
Input [1]: [#26]
Keys: []
Functions [1]: [sum(sales#34)]
Aggregate Attributes [1]: [sum(sales#34)#58]
Results [1]: [sum(sales#34)#58]

(176) NativeProject
Output [1]: [sum(sales#34)#58 AS sum(sales)#59]
Input [1]: [sum(sales#34)#58]

(177) Scan parquet
Output [5]: [cs_sold_date_sk#1, cs_bill_customer_sk#2, cs_item_sk#3, cs_quantity#4, cs_list_price#5]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(cs_sold_date_sk)]
ReadSchema: struct<cs_sold_date_sk:int,cs_bill_customer_sk:int,cs_item_sk:int,cs_quantity:int,cs_list_price:decimal(7,2)>

(178) Filter
Input [5]: [cs_sold_date_sk#1, cs_bill_customer_sk#2, cs_item_sk#3, cs_quantity#4, cs_list_price#5]
Condition : isnotnull(cs_sold_date_sk#1)

(179) Exchange
Input [5]: [cs_sold_date_sk#1, cs_bill_customer_sk#2, cs_item_sk#3, cs_quantity#4, cs_list_price#5]
Arguments: hashpartitioning(cs_item_sk#3, 100), ENSURE_REQUIREMENTS, [plan_id=15]

(180) Sort
Input [5]: [cs_sold_date_sk#1, cs_bill_customer_sk#2, cs_item_sk#3, cs_quantity#4, cs_list_price#5]
Arguments: [cs_item_sk#3 ASC NULLS FIRST], false, 0

(181) Scan parquet
Output [2]: [ss_sold_date_sk#6, ss_item_sk#7]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(ss_sold_date_sk), IsNotNull(ss_item_sk)]
ReadSchema: struct<ss_sold_date_sk:int,ss_item_sk:int>

(182) Filter
Input [2]: [ss_sold_date_sk#6, ss_item_sk#7]
Condition : (isnotnull(ss_sold_date_sk#6) AND isnotnull(ss_item_sk#7))

(183) Exchange
Input [2]: [ss_sold_date_sk#6, ss_item_sk#7]
Arguments: hashpartitioning(ss_sold_date_sk#6, 100), ENSURE_REQUIREMENTS, [plan_id=16]

(184) Sort
Input [2]: [ss_sold_date_sk#6, ss_item_sk#7]
Arguments: [ss_sold_date_sk#6 ASC NULLS FIRST], false, 0

(185) Scan parquet
Output [3]: [d_date_sk#8, d_date#9, d_year#10]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [In(d_year, [2000,2001,2002,2003]), IsNotNull(d_date_sk)]
ReadSchema: struct<d_date_sk:int,d_date:date,d_year:int>

(186) Filter
Input [3]: [d_date_sk#8, d_date#9, d_year#10]
Condition : (d_year#10 IN (2000,2001,2002,2003) AND isnotnull(d_date_sk#8))

(187) Project
Output [2]: [d_date_sk#8, d_date#9]
Input [3]: [d_date_sk#8, d_date#9, d_year#10]

(188) Exchange
Input [2]: [d_date_sk#8, d_date#9]
Arguments: hashpartitioning(d_date_sk#8, 100), ENSURE_REQUIREMENTS, [plan_id=17]

(189) Sort
Input [2]: [d_date_sk#8, d_date#9]
Arguments: [d_date_sk#8 ASC NULLS FIRST], false, 0

(190) SortMergeJoin
Left keys [1]: [ss_sold_date_sk#6]
Right keys [1]: [d_date_sk#8]
Join type: Inner
Join condition: None

(191) Project
Output [2]: [ss_item_sk#7, d_date#9]
Input [4]: [ss_sold_date_sk#6, ss_item_sk#7, d_date_sk#8, d_date#9]

(192) Exchange
Input [2]: [ss_item_sk#7, d_date#9]
Arguments: hashpartitioning(ss_item_sk#7, 100), ENSURE_REQUIREMENTS, [plan_id=18]

(193) Sort
Input [2]: [ss_item_sk#7, d_date#9]
Arguments: [ss_item_sk#7 ASC NULLS FIRST], false, 0

(194) Scan parquet
Output [2]: [i_item_sk#11, i_item_desc#12]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(i_item_sk)]
ReadSchema: struct<i_item_sk:int,i_item_desc:string>

(195) Filter
Input [2]: [i_item_sk#11, i_item_desc#12]
Condition : isnotnull(i_item_sk#11)

(196) Exchange
Input [2]: [i_item_sk#11, i_item_desc#12]
Arguments: hashpartitioning(i_item_sk#11, 100), ENSURE_REQUIREMENTS, [plan_id=19]

(197) Sort
Input [2]: [i_item_sk#11, i_item_desc#12]
Arguments: [i_item_sk#11 ASC NULLS FIRST], false, 0

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

(199) Project
Output [3]: [d_date#9, i_item_sk#11, substr(i_item_desc#12, 1, 30) AS _groupingexpression#13]
Input [4]: [ss_item_sk#7, d_date#9, i_item_sk#11, i_item_desc#12]

(200) HashAggregate
Input [3]: [d_date#9, i_item_sk#11, _groupingexpression#13]
Keys [3]: [_groupingexpression#13, i_item_sk#11, d_date#9]
Functions [1]: [partial_count(1)]
Aggregate Attributes [1]: [count#14]
Results [4]: [_groupingexpression#13, i_item_sk#11, d_date#9, count#60]

(201) HashAggregate
Input [4]: [_groupingexpression#13, i_item_sk#11, d_date#9, count#60]
Keys [3]: [_groupingexpression#13, i_item_sk#11, d_date#9]
Functions [1]: [count(1)]
Aggregate Attributes [1]: [count(1)#16]
Results [2]: [i_item_sk#11 AS item_sk#17, count(1)#16 AS cnt#18]

(202) Filter
Input [2]: [item_sk#17, cnt#18]
Condition : (cnt#18 > 4)

(203) Project
Output [1]: [item_sk#17]
Input [2]: [item_sk#17, cnt#18]

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

(205) SortMergeJoin
Left keys [1]: [cs_item_sk#3]
Right keys [1]: [item_sk#17]
Join type: LeftSemi
Join condition: None

(206) Project
Output [4]: [cs_sold_date_sk#1, cs_bill_customer_sk#2, cs_quantity#4, cs_list_price#5]
Input [5]: [cs_sold_date_sk#1, cs_bill_customer_sk#2, cs_item_sk#3, cs_quantity#4, cs_list_price#5]

(207) Exchange
Input [4]: [cs_sold_date_sk#1, cs_bill_customer_sk#2, cs_quantity#4, cs_list_price#5]
Arguments: hashpartitioning(cs_bill_customer_sk#2, 100), ENSURE_REQUIREMENTS, [plan_id=20]

(208) Sort
Input [4]: [cs_sold_date_sk#1, cs_bill_customer_sk#2, cs_quantity#4, cs_list_price#5]
Arguments: [cs_bill_customer_sk#2 ASC NULLS FIRST], false, 0

(209) Scan parquet
Output [3]: [ss_customer_sk#19, ss_quantity#20, ss_sales_price#21]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(ss_customer_sk)]
ReadSchema: struct<ss_customer_sk:int,ss_quantity:int,ss_sales_price:decimal(7,2)>

(210) Filter
Input [3]: [ss_customer_sk#19, ss_quantity#20, ss_sales_price#21]
Condition : isnotnull(ss_customer_sk#19)

(211) Exchange
Input [3]: [ss_customer_sk#19, ss_quantity#20, ss_sales_price#21]
Arguments: hashpartitioning(ss_customer_sk#19, 100), ENSURE_REQUIREMENTS, [plan_id=21]

(212) Sort
Input [3]: [ss_customer_sk#19, ss_quantity#20, ss_sales_price#21]
Arguments: [ss_customer_sk#19 ASC NULLS FIRST], false, 0

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

(214) Filter
Input [1]: [c_customer_sk#22]
Condition : isnotnull(c_customer_sk#22)

(215) Exchange
Input [1]: [c_customer_sk#22]
Arguments: hashpartitioning(c_customer_sk#22, 100), ENSURE_REQUIREMENTS, [plan_id=22]

(216) Sort
Input [1]: [c_customer_sk#22]
Arguments: [c_customer_sk#22 ASC NULLS FIRST], false, 0

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

(218) Project
Output [3]: [ss_quantity#20, ss_sales_price#21, c_customer_sk#22]
Input [4]: [ss_customer_sk#19, ss_quantity#20, ss_sales_price#21, c_customer_sk#22]

(219) HashAggregate
Input [3]: [ss_quantity#20, ss_sales_price#21, c_customer_sk#22]
Keys [1]: [c_customer_sk#22]
Functions [1]: [partial_sum((cast(ss_quantity#20 as decimal(10,0)) * ss_sales_price#21))]
Aggregate Attributes [2]: [sum#24, isEmpty#25]
Results [3]: [c_customer_sk#22, sum#61, isEmpty#62]

(220) HashAggregate
Input [3]: [c_customer_sk#22, sum#61, isEmpty#62]
Keys [1]: [c_customer_sk#22]
Functions [1]: [sum((cast(ss_quantity#20 as decimal(10,0)) * ss_sales_price#21))]
Aggregate Attributes [1]: [sum((cast(ss_quantity#20 as decimal(10,0)) * ss_sales_price#21))#27]
Results [2]: [c_customer_sk#22, sum((cast(ss_quantity#20 as decimal(10,0)) * ss_sales_price#21))#27 AS ssales#28]

(221) Filter
Input [2]: [c_customer_sk#22, ssales#28]
Condition : (isnotnull(ssales#28) AND (cast(ssales#28 as decimal(38,8)) > (0.500000 * Subquery subquery#29, [id=#30])))

(222) Project
Output [1]: [c_customer_sk#22]
Input [2]: [c_customer_sk#22, ssales#28]

(223) Sort
Input [1]: [c_customer_sk#22]
Arguments: [c_customer_sk#22 ASC NULLS FIRST], false, 0

(224) SortMergeJoin
Left keys [1]: [cs_bill_customer_sk#2]
Right keys [1]: [c_customer_sk#22]
Join type: LeftSemi
Join condition: None

(225) Project
Output [3]: [cs_sold_date_sk#1, cs_quantity#4, cs_list_price#5]
Input [4]: [cs_sold_date_sk#1, cs_bill_customer_sk#2, cs_quantity#4, cs_list_price#5]

(226) Exchange
Input [3]: [cs_sold_date_sk#1, cs_quantity#4, cs_list_price#5]
Arguments: hashpartitioning(cs_sold_date_sk#1, 100), ENSURE_REQUIREMENTS, [plan_id=23]

(227) Sort
Input [3]: [cs_sold_date_sk#1, cs_quantity#4, cs_list_price#5]
Arguments: [cs_sold_date_sk#1 ASC NULLS FIRST], false, 0

(228) Scan parquet
Output [3]: [d_date_sk#31, d_year#32, d_moy#33]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(d_year), IsNotNull(d_moy), EqualTo(d_year,2000), EqualTo(d_moy,2), IsNotNull(d_date_sk)]
ReadSchema: struct<d_date_sk:int,d_year:int,d_moy:int>

(229) Filter
Input [3]: [d_date_sk#31, d_year#32, d_moy#33]
Condition : ((((isnotnull(d_year#32) AND isnotnull(d_moy#33)) AND (d_year#32 = 2000)) AND (d_moy#33 = 2)) AND isnotnull(d_date_sk#31))

(230) Project
Output [1]: [d_date_sk#31]
Input [3]: [d_date_sk#31, d_year#32, d_moy#33]

(231) Exchange
Input [1]: [d_date_sk#31]
Arguments: hashpartitioning(d_date_sk#31, 100), ENSURE_REQUIREMENTS, [plan_id=24]

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

(233) SortMergeJoin
Left keys [1]: [cs_sold_date_sk#1]
Right keys [1]: [d_date_sk#31]
Join type: Inner
Join condition: None

(234) Project
Output [1]: [(cast(cs_quantity#4 as decimal(10,0)) * cs_list_price#5) AS sales#34]
Input [4]: [cs_sold_date_sk#1, cs_quantity#4, cs_list_price#5, d_date_sk#31]

(235) Scan parquet
Output [5]: [ws_sold_date_sk#35, ws_item_sk#36, ws_bill_customer_sk#37, ws_quantity#38, ws_list_price#39]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(ws_sold_date_sk)]
ReadSchema: struct<ws_sold_date_sk:int,ws_item_sk:int,ws_bill_customer_sk:int,ws_quantity:int,ws_list_price:decimal(7,2)>

(236) Filter
Input [5]: [ws_sold_date_sk#35, ws_item_sk#36, ws_bill_customer_sk#37, ws_quantity#38, ws_list_price#39]
Condition : isnotnull(ws_sold_date_sk#35)

(237) Exchange
Input [5]: [ws_sold_date_sk#35, ws_item_sk#36, ws_bill_customer_sk#37, ws_quantity#38, ws_list_price#39]
Arguments: hashpartitioning(ws_item_sk#36, 100), ENSURE_REQUIREMENTS, [plan_id=25]

(238) Sort
Input [5]: [ws_sold_date_sk#35, ws_item_sk#36, ws_bill_customer_sk#37, ws_quantity#38, ws_list_price#39]
Arguments: [ws_item_sk#36 ASC NULLS FIRST], false, 0

(239) Scan parquet
Output [2]: [ss_sold_date_sk#63, ss_item_sk#40]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(ss_sold_date_sk), IsNotNull(ss_item_sk)]
ReadSchema: struct<ss_sold_date_sk:int,ss_item_sk:int>

(240) Filter
Input [2]: [ss_sold_date_sk#63, ss_item_sk#40]
Condition : (isnotnull(ss_sold_date_sk#63) AND isnotnull(ss_item_sk#40))

(241) Exchange
Input [2]: [ss_sold_date_sk#63, ss_item_sk#40]
Arguments: hashpartitioning(ss_sold_date_sk#63, 100), ENSURE_REQUIREMENTS, [plan_id=26]

(242) Sort
Input [2]: [ss_sold_date_sk#63, ss_item_sk#40]
Arguments: [ss_sold_date_sk#63 ASC NULLS FIRST], false, 0

(243) Scan parquet
Output [3]: [d_date_sk#64, d_date#41, d_year#65]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [In(d_year, [2000,2001,2002,2003]), IsNotNull(d_date_sk)]
ReadSchema: struct<d_date_sk:int,d_date:date,d_year:int>

(244) Filter
Input [3]: [d_date_sk#64, d_date#41, d_year#65]
Condition : (d_year#65 IN (2000,2001,2002,2003) AND isnotnull(d_date_sk#64))

(245) Project
Output [2]: [d_date_sk#64, d_date#41]
Input [3]: [d_date_sk#64, d_date#41, d_year#65]

(246) Exchange
Input [2]: [d_date_sk#64, d_date#41]
Arguments: hashpartitioning(d_date_sk#64, 100), ENSURE_REQUIREMENTS, [plan_id=27]

(247) Sort
Input [2]: [d_date_sk#64, d_date#41]
Arguments: [d_date_sk#64 ASC NULLS FIRST], false, 0

(248) SortMergeJoin
Left keys [1]: [ss_sold_date_sk#63]
Right keys [1]: [d_date_sk#64]
Join type: Inner
Join condition: None

(249) Project
Output [2]: [ss_item_sk#40, d_date#41]
Input [4]: [ss_sold_date_sk#63, ss_item_sk#40, d_date_sk#64, d_date#41]

(250) Exchange
Input [2]: [ss_item_sk#40, d_date#41]
Arguments: hashpartitioning(ss_item_sk#40, 100), ENSURE_REQUIREMENTS, [plan_id=28]

(251) Sort
Input [2]: [ss_item_sk#40, d_date#41]
Arguments: [ss_item_sk#40 ASC NULLS FIRST], false, 0

(252) Scan parquet
Output [2]: [i_item_sk#42, i_item_desc#43]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(i_item_sk)]
ReadSchema: struct<i_item_sk:int,i_item_desc:string>

(253) Filter
Input [2]: [i_item_sk#42, i_item_desc#43]
Condition : isnotnull(i_item_sk#42)

(254) Exchange
Input [2]: [i_item_sk#42, i_item_desc#43]
Arguments: hashpartitioning(i_item_sk#42, 100), ENSURE_REQUIREMENTS, [plan_id=29]

(255) Sort
Input [2]: [i_item_sk#42, i_item_desc#43]
Arguments: [i_item_sk#42 ASC NULLS FIRST], false, 0

(256) SortMergeJoin
Left keys [1]: [ss_item_sk#40]
Right keys [1]: [i_item_sk#42]
Join type: Inner
Join condition: None

(257) Project
Output [3]: [d_date#41, i_item_sk#42, substr(i_item_desc#43, 1, 30) AS _groupingexpression#13]
Input [4]: [ss_item_sk#40, d_date#41, i_item_sk#42, i_item_desc#43]

(258) HashAggregate
Input [3]: [d_date#41, i_item_sk#42, _groupingexpression#13]
Keys [3]: [_groupingexpression#13, i_item_sk#42, d_date#41]
Functions [1]: [partial_count(1)]
Aggregate Attributes [1]: [count#14]
Results [4]: [_groupingexpression#13, i_item_sk#42, d_date#41, count#60]

(259) HashAggregate
Input [4]: [_groupingexpression#13, i_item_sk#42, d_date#41, count#60]
Keys [3]: [_groupingexpression#13, i_item_sk#42, d_date#41]
Functions [1]: [count(1)]
Aggregate Attributes [1]: [count(1)#16]
Results [2]: [i_item_sk#42 AS item_sk#44, count(1)#16 AS cnt#45]

(260) Filter
Input [2]: [item_sk#44, cnt#45]
Condition : (cnt#45 > 4)

(261) Project
Output [1]: [item_sk#44]
Input [2]: [item_sk#44, cnt#45]

(262) Sort
Input [1]: [item_sk#44]
Arguments: [item_sk#44 ASC NULLS FIRST], false, 0

(263) SortMergeJoin
Left keys [1]: [ws_item_sk#36]
Right keys [1]: [item_sk#44]
Join type: LeftSemi
Join condition: None

(264) Project
Output [4]: [ws_sold_date_sk#35, ws_bill_customer_sk#37, ws_quantity#38, ws_list_price#39]
Input [5]: [ws_sold_date_sk#35, ws_item_sk#36, ws_bill_customer_sk#37, ws_quantity#38, ws_list_price#39]

(265) Exchange
Input [4]: [ws_sold_date_sk#35, ws_bill_customer_sk#37, ws_quantity#38, ws_list_price#39]
Arguments: hashpartitioning(ws_bill_customer_sk#37, 100), ENSURE_REQUIREMENTS, [plan_id=30]

(266) Sort
Input [4]: [ws_sold_date_sk#35, ws_bill_customer_sk#37, ws_quantity#38, ws_list_price#39]
Arguments: [ws_bill_customer_sk#37 ASC NULLS FIRST], false, 0

(267) Scan parquet
Output [3]: [ss_customer_sk#46, ss_quantity#47, ss_sales_price#48]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(ss_customer_sk)]
ReadSchema: struct<ss_customer_sk:int,ss_quantity:int,ss_sales_price:decimal(7,2)>

(268) Filter
Input [3]: [ss_customer_sk#46, ss_quantity#47, ss_sales_price#48]
Condition : isnotnull(ss_customer_sk#46)

(269) Exchange
Input [3]: [ss_customer_sk#46, ss_quantity#47, ss_sales_price#48]
Arguments: hashpartitioning(ss_customer_sk#46, 100), ENSURE_REQUIREMENTS, [plan_id=31]

(270) Sort
Input [3]: [ss_customer_sk#46, ss_quantity#47, ss_sales_price#48]
Arguments: [ss_customer_sk#46 ASC NULLS FIRST], false, 0

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

(272) Filter
Input [1]: [c_customer_sk#49]
Condition : isnotnull(c_customer_sk#49)

(273) Exchange
Input [1]: [c_customer_sk#49]
Arguments: hashpartitioning(c_customer_sk#49, 100), ENSURE_REQUIREMENTS, [plan_id=32]

(274) Sort
Input [1]: [c_customer_sk#49]
Arguments: [c_customer_sk#49 ASC NULLS FIRST], false, 0

(275) SortMergeJoin
Left keys [1]: [ss_customer_sk#46]
Right keys [1]: [c_customer_sk#49]
Join type: Inner
Join condition: None

(276) Project
Output [3]: [ss_quantity#47, ss_sales_price#48, c_customer_sk#49]
Input [4]: [ss_customer_sk#46, ss_quantity#47, ss_sales_price#48, c_customer_sk#49]

(277) HashAggregate
Input [3]: [ss_quantity#47, ss_sales_price#48, c_customer_sk#49]
Keys [1]: [c_customer_sk#49]
Functions [1]: [partial_sum((cast(ss_quantity#47 as decimal(10,0)) * ss_sales_price#48))]
Aggregate Attributes [2]: [sum#51, isEmpty#52]
Results [3]: [c_customer_sk#49, sum#66, isEmpty#67]

(278) HashAggregate
Input [3]: [c_customer_sk#49, sum#66, isEmpty#67]
Keys [1]: [c_customer_sk#49]
Functions [1]: [sum((cast(ss_quantity#47 as decimal(10,0)) * ss_sales_price#48))]
Aggregate Attributes [1]: [sum((cast(ss_quantity#47 as decimal(10,0)) * ss_sales_price#48))#27]
Results [2]: [c_customer_sk#49, sum((cast(ss_quantity#47 as decimal(10,0)) * ss_sales_price#48))#27 AS ssales#53]

(279) Filter
Input [2]: [c_customer_sk#49, ssales#53]
Condition : (isnotnull(ssales#53) AND (cast(ssales#53 as decimal(38,8)) > (0.500000 * Subquery subquery#29, [id=#68])))

(280) Project
Output [1]: [c_customer_sk#49]
Input [2]: [c_customer_sk#49, ssales#53]

(281) Sort
Input [1]: [c_customer_sk#49]
Arguments: [c_customer_sk#49 ASC NULLS FIRST], false, 0

(282) SortMergeJoin
Left keys [1]: [ws_bill_customer_sk#37]
Right keys [1]: [c_customer_sk#49]
Join type: LeftSemi
Join condition: None

(283) Project
Output [3]: [ws_sold_date_sk#35, ws_quantity#38, ws_list_price#39]
Input [4]: [ws_sold_date_sk#35, ws_bill_customer_sk#37, ws_quantity#38, ws_list_price#39]

(284) Exchange
Input [3]: [ws_sold_date_sk#35, ws_quantity#38, ws_list_price#39]
Arguments: hashpartitioning(ws_sold_date_sk#35, 100), ENSURE_REQUIREMENTS, [plan_id=33]

(285) Sort
Input [3]: [ws_sold_date_sk#35, ws_quantity#38, ws_list_price#39]
Arguments: [ws_sold_date_sk#35 ASC NULLS FIRST], false, 0

(286) Scan parquet
Output [3]: [d_date_sk#54, d_year#69, d_moy#70]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(d_year), IsNotNull(d_moy), EqualTo(d_year,2000), EqualTo(d_moy,2), IsNotNull(d_date_sk)]
ReadSchema: struct<d_date_sk:int,d_year:int,d_moy:int>

(287) Filter
Input [3]: [d_date_sk#54, d_year#69, d_moy#70]
Condition : ((((isnotnull(d_year#69) AND isnotnull(d_moy#70)) AND (d_year#69 = 2000)) AND (d_moy#70 = 2)) AND isnotnull(d_date_sk#54))

(288) Project
Output [1]: [d_date_sk#54]
Input [3]: [d_date_sk#54, d_year#69, d_moy#70]

(289) Exchange
Input [1]: [d_date_sk#54]
Arguments: hashpartitioning(d_date_sk#54, 100), ENSURE_REQUIREMENTS, [plan_id=34]

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

(291) SortMergeJoin
Left keys [1]: [ws_sold_date_sk#35]
Right keys [1]: [d_date_sk#54]
Join type: Inner
Join condition: None

(292) Project
Output [1]: [(cast(ws_quantity#38 as decimal(10,0)) * ws_list_price#39) AS sales#55]
Input [4]: [ws_sold_date_sk#35, ws_quantity#38, ws_list_price#39, d_date_sk#54]

(293) Union

(294) HashAggregate
Input [1]: [sales#34]
Keys: []
Functions [1]: [partial_sum(sales#34)]
Aggregate Attributes [2]: [sum#56, isEmpty#57]
Results [2]: [sum#71, isEmpty#72]

(295) Exchange
Input [2]: [sum#71, isEmpty#72]
Arguments: SinglePartition, ENSURE_REQUIREMENTS, [plan_id=35]

(296) HashAggregate
Input [2]: [sum#71, isEmpty#72]
Keys: []
Functions [1]: [sum(sales#34)]
Aggregate Attributes [1]: [sum(sales#34)#58]
Results [1]: [sum(sales#34)#58 AS sum(sales)#59]

(297) AdaptiveSparkPlan
Output [1]: [sum(sales)#59]
Arguments: isFinalPlan=true

===== Subqueries =====

Subquery:1 Hosting operator id = 78 Hosting Expression = Subquery subquery#29, [id=#30]
AdaptiveSparkPlan (368)
+- == Final Plan ==
   NativeProject (342)
   +- NativeHashAggregate (341)
      +- ShuffleQueryStage (340), Statistics(X)
         +- NativeShuffleExchange (339)
            +- NativeHashAggregate (338)
               +- NativeProject (337)
                  +- NativeHashAggregate (336)
                     +- InputAdapter (335)
                        +- AQEShuffleRead (334)
                           +- ShuffleQueryStage (333), Statistics(X)
                              +- NativeShuffleExchange (332)
                                 +- NativeHashAggregate (331)
                                    +- NativeProject (330)
                                       +- NativeProject (329)
                                          +- NativeSortMergeJoin Inner (328)
                                             :- NativeSort (318)
                                             :  +- InputAdapter (317)
                                             :     +- AQEShuffleRead (316)
                                             :        +- ShuffleQueryStage (315), Statistics(X)
                                             :           +- NativeShuffleExchange (314)
                                             :              +- NativeProject (313)
                                             :                 +- NativeSortMergeJoin Inner (312)
                                             :                    :- NativeSort (305)
                                             :                    :  +- InputAdapter (304)
                                             :                    :     +- AQEShuffleRead (303)
                                             :                    :        +- ShuffleQueryStage (302), Statistics(X)
                                             :                    :           +- NativeShuffleExchange (301)
                                             :                    :              +- NativeFilter (300)
                                             :                    :                 +- InputAdapter (299)
                                             :                    :                    +- NativeParquetScan  (298)
                                             :                    +- NativeSort (311)
                                             :                       +- InputAdapter (310)
                                             :                          +- InputAdapter (309)
                                             :                             +- AQEShuffleRead (308)
                                             :                                +- ShuffleQueryStage (307), Statistics(X)
                                             :                                   +- ReusedExchange (306)
                                             +- NativeSort (327)
                                                +- InputAdapter (326)
                                                   +- AQEShuffleRead (325)
                                                      +- ShuffleQueryStage (324), Statistics(X)
                                                         +- NativeShuffleExchange (323)
                                                            +- NativeProject (322)
                                                               +- NativeFilter (321)
                                                                  +- InputAdapter (320)
                                                                     +- NativeParquetScan  (319)
+- == Initial Plan ==
   HashAggregate (367)
   +- Exchange (366)
      +- HashAggregate (365)
         +- HashAggregate (364)
            +- Exchange (363)
               +- HashAggregate (362)
                  +- Project (361)
                     +- SortMergeJoin Inner (360)
                        :- Sort (354)
                        :  +- Exchange (353)
                        :     +- Project (352)
                        :        +- SortMergeJoin Inner (351)
                        :           :- Sort (346)
                        :           :  +- Exchange (345)
                        :           :     +- Filter (344)
                        :           :        +- Scan parquet (343)
                        :           +- Sort (350)
                        :              +- Exchange (349)
                        :                 +- Filter (348)
                        :                    +- Scan parquet (347)
                        +- Sort (359)
                           +- Exchange (358)
                              +- Project (357)
                                 +- Filter (356)
                                    +- Scan parquet (355)


(343) Scan parquet
Output [4]: [ss_sold_date_sk#73, ss_customer_sk#74, ss_quantity#75, ss_sales_price#76]
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_quantity:int,ss_sales_price:decimal(7,2)>

(299) InputAdapter
Input [4]: [ss_sold_date_sk#73, ss_customer_sk#74, ss_quantity#75, ss_sales_price#76]
Arguments: [#73, #74, #75, #76]

(300) NativeFilter
Input [4]: [#73#73, #74#74, #75#75, #76#76]
Condition : (isnotnull(ss_customer_sk#74) AND isnotnull(ss_sold_date_sk#73))

(301) NativeShuffleExchange
Input [4]: [#73#73, #74#74, #75#75, #76#76]
Arguments: hashpartitioning(ss_customer_sk#74, 100), ENSURE_REQUIREMENTS, [plan_id=36]

(302) ShuffleQueryStage
Output [4]: [#73#73, #74#74, #75#75, #76#76]
Arguments: X

(303) AQEShuffleRead
Input [4]: [#73#73, #74#74, #75#75, #76#76]
Arguments: coalesced

(304) InputAdapter
Input [4]: [#73#73, #74#74, #75#75, #76#76]

(305) NativeSort
Input [4]: [#73#73, #74#74, #75#75, #76#76]
Arguments: [ss_customer_sk#74 ASC NULLS FIRST], false

(306) ReusedExchange [Reuses operator id: 67]
Output [1]: [c_customer_sk#77]

(307) ShuffleQueryStage
Output [1]: [c_customer_sk#77]
Arguments: X

(308) AQEShuffleRead
Input [1]: [c_customer_sk#77]
Arguments: coalesced

(309) InputAdapter
Input [1]: [c_customer_sk#77]
Arguments: [#77]

(310) InputAdapter
Input [1]: [#77#77]

(311) NativeSort
Input [1]: [#77#77]
Arguments: [c_customer_sk#77 ASC NULLS FIRST], false

(312) NativeSortMergeJoin
Left keys [1]: [ss_customer_sk#74]
Right keys [1]: [c_customer_sk#77]
Join type: Inner
Join condition: None

(313) NativeProject
Output [4]: [ss_sold_date_sk#73, ss_quantity#75, ss_sales_price#76, c_customer_sk#77]
Input [5]: [#73#73, #74#74, #75#75, #76#76, #77#77]

(314) NativeShuffleExchange
Input [4]: [ss_sold_date_sk#73, ss_quantity#75, ss_sales_price#76, c_customer_sk#77]
Arguments: hashpartitioning(ss_sold_date_sk#73, 100), ENSURE_REQUIREMENTS, [plan_id=37]

(315) ShuffleQueryStage
Output [4]: [ss_sold_date_sk#73, ss_quantity#75, ss_sales_price#76, c_customer_sk#77]
Arguments: X

(316) AQEShuffleRead
Input [4]: [ss_sold_date_sk#73, ss_quantity#75, ss_sales_price#76, c_customer_sk#77]
Arguments: coalesced

(317) InputAdapter
Input [4]: [ss_sold_date_sk#73, ss_quantity#75, ss_sales_price#76, c_customer_sk#77]

(318) NativeSort
Input [4]: [ss_sold_date_sk#73, ss_quantity#75, ss_sales_price#76, c_customer_sk#77]
Arguments: [ss_sold_date_sk#73 ASC NULLS FIRST], false

(355) Scan parquet
Output [2]: [d_date_sk#78, d_year#79]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [In(d_year, [2000,2001,2002,2003]), IsNotNull(d_date_sk)]
ReadSchema: struct<d_date_sk:int,d_year:int>

(320) InputAdapter
Input [2]: [d_date_sk#78, d_year#79]
Arguments: [#78, #79]

(321) NativeFilter
Input [2]: [#78#78, #79#79]
Condition : (d_year#79 IN (2000,2001,2002,2003) AND isnotnull(d_date_sk#78))

(322) NativeProject
Output [1]: [d_date_sk#78]
Input [2]: [#78#78, #79#79]

(323) NativeShuffleExchange
Input [1]: [d_date_sk#78]
Arguments: hashpartitioning(d_date_sk#78, 100), ENSURE_REQUIREMENTS, [plan_id=38]

(324) ShuffleQueryStage
Output [1]: [d_date_sk#78]
Arguments: X

(325) AQEShuffleRead
Input [1]: [d_date_sk#78]
Arguments: coalesced

(326) InputAdapter
Input [1]: [d_date_sk#78]

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

(328) NativeSortMergeJoin
Left keys [1]: [ss_sold_date_sk#73]
Right keys [1]: [d_date_sk#78]
Join type: Inner
Join condition: None

(329) NativeProject
Output [3]: [ss_quantity#75, ss_sales_price#76, c_customer_sk#77]
Input [5]: [ss_sold_date_sk#73, ss_quantity#75, ss_sales_price#76, c_customer_sk#77, d_date_sk#78]

(330) NativeProject
Output [2]: [c_customer_sk#77 AS c_customer_sk#77, (cast(ss_quantity#75 as decimal(10,0)) * ss_sales_price#76) AS _c1#80]
Input [3]: [ss_quantity#75, ss_sales_price#76, c_customer_sk#77]

(331) NativeHashAggregate
Input [2]: [c_customer_sk#77, _c1#80]
Keys [1]: [c_customer_sk#77]
Functions [1]: [partial_sum(_c1#80)]
Aggregate Attributes [2]: [sum#81, isEmpty#82]
Results [2]: [c_customer_sk#77, #26]

(332) NativeShuffleExchange
Input [2]: [c_customer_sk#77, #26]
Arguments: hashpartitioning(c_customer_sk#77, 100), ENSURE_REQUIREMENTS, [plan_id=39]

(333) ShuffleQueryStage
Output [2]: [c_customer_sk#77, #26]
Arguments: X

(334) AQEShuffleRead
Input [2]: [c_customer_sk#77, #26]
Arguments: coalesced

(335) InputAdapter
Input [2]: [c_customer_sk#77, #26]

(336) NativeHashAggregate
Input [2]: [c_customer_sk#77, #26]
Keys [1]: [c_customer_sk#77]
Functions [1]: [sum((cast(ss_quantity#75 as decimal(10,0)) * ss_sales_price#76))]
Aggregate Attributes [1]: [sum((cast(ss_quantity#75 as decimal(10,0)) * ss_sales_price#76))#83]
Results [2]: [c_customer_sk#77, sum((cast(ss_quantity#75 as decimal(10,0)) * ss_sales_price#76))#83]

(337) NativeProject
Output [1]: [sum((cast(ss_quantity#75 as decimal(10,0)) * ss_sales_price#76))#83 AS csales#84]
Input [2]: [c_customer_sk#77, sum((cast(ss_quantity#75 as decimal(10,0)) * ss_sales_price#76))#83]

(338) NativeHashAggregate
Input [1]: [csales#84]
Keys: []
Functions [1]: [partial_max(csales#84)]
Aggregate Attributes [1]: [max#85]
Results [1]: [#26]

(339) NativeShuffleExchange
Input [1]: [#26]
Arguments: SinglePartition, ENSURE_REQUIREMENTS, [plan_id=40]

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

(341) NativeHashAggregate
Input [1]: [#26]
Keys: []
Functions [1]: [max(csales#84)]
Aggregate Attributes [1]: [max(csales#84)#86]
Results [1]: [max(csales#84)#86]

(342) NativeProject
Output [1]: [max(csales#84)#86 AS tpcds_cmax#87]
Input [1]: [max(csales#84)#86]

(343) Scan parquet
Output [4]: [ss_sold_date_sk#73, ss_customer_sk#74, ss_quantity#75, ss_sales_price#76]
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_quantity:int,ss_sales_price:decimal(7,2)>

(344) Filter
Input [4]: [ss_sold_date_sk#73, ss_customer_sk#74, ss_quantity#75, ss_sales_price#76]
Condition : (isnotnull(ss_customer_sk#74) AND isnotnull(ss_sold_date_sk#73))

(345) Exchange
Input [4]: [ss_sold_date_sk#73, ss_customer_sk#74, ss_quantity#75, ss_sales_price#76]
Arguments: hashpartitioning(ss_customer_sk#74, 100), ENSURE_REQUIREMENTS, [plan_id=41]

(346) Sort
Input [4]: [ss_sold_date_sk#73, ss_customer_sk#74, ss_quantity#75, ss_sales_price#76]
Arguments: [ss_customer_sk#74 ASC NULLS FIRST], false, 0

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

(348) Filter
Input [1]: [c_customer_sk#77]
Condition : isnotnull(c_customer_sk#77)

(349) Exchange
Input [1]: [c_customer_sk#77]
Arguments: hashpartitioning(c_customer_sk#77, 100), ENSURE_REQUIREMENTS, [plan_id=42]

(350) Sort
Input [1]: [c_customer_sk#77]
Arguments: [c_customer_sk#77 ASC NULLS FIRST], false, 0

(351) SortMergeJoin
Left keys [1]: [ss_customer_sk#74]
Right keys [1]: [c_customer_sk#77]
Join type: Inner
Join condition: None

(352) Project
Output [4]: [ss_sold_date_sk#73, ss_quantity#75, ss_sales_price#76, c_customer_sk#77]
Input [5]: [ss_sold_date_sk#73, ss_customer_sk#74, ss_quantity#75, ss_sales_price#76, c_customer_sk#77]

(353) Exchange
Input [4]: [ss_sold_date_sk#73, ss_quantity#75, ss_sales_price#76, c_customer_sk#77]
Arguments: hashpartitioning(ss_sold_date_sk#73, 100), ENSURE_REQUIREMENTS, [plan_id=43]

(354) Sort
Input [4]: [ss_sold_date_sk#73, ss_quantity#75, ss_sales_price#76, c_customer_sk#77]
Arguments: [ss_sold_date_sk#73 ASC NULLS FIRST], false, 0

(355) Scan parquet
Output [2]: [d_date_sk#78, d_year#79]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [In(d_year, [2000,2001,2002,2003]), IsNotNull(d_date_sk)]
ReadSchema: struct<d_date_sk:int,d_year:int>

(356) Filter
Input [2]: [d_date_sk#78, d_year#79]
Condition : (d_year#79 IN (2000,2001,2002,2003) AND isnotnull(d_date_sk#78))

(357) Project
Output [1]: [d_date_sk#78]
Input [2]: [d_date_sk#78, d_year#79]

(358) Exchange
Input [1]: [d_date_sk#78]
Arguments: hashpartitioning(d_date_sk#78, 100), ENSURE_REQUIREMENTS, [plan_id=44]

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

(360) SortMergeJoin
Left keys [1]: [ss_sold_date_sk#73]
Right keys [1]: [d_date_sk#78]
Join type: Inner
Join condition: None

(361) Project
Output [3]: [ss_quantity#75, ss_sales_price#76, c_customer_sk#77]
Input [5]: [ss_sold_date_sk#73, ss_quantity#75, ss_sales_price#76, c_customer_sk#77, d_date_sk#78]

(362) HashAggregate
Input [3]: [ss_quantity#75, ss_sales_price#76, c_customer_sk#77]
Keys [1]: [c_customer_sk#77]
Functions [1]: [partial_sum((cast(ss_quantity#75 as decimal(10,0)) * ss_sales_price#76))]
Aggregate Attributes [2]: [sum#81, isEmpty#82]
Results [3]: [c_customer_sk#77, sum#88, isEmpty#89]

(363) Exchange
Input [3]: [c_customer_sk#77, sum#88, isEmpty#89]
Arguments: hashpartitioning(c_customer_sk#77, 100), ENSURE_REQUIREMENTS, [plan_id=45]

(364) HashAggregate
Input [3]: [c_customer_sk#77, sum#88, isEmpty#89]
Keys [1]: [c_customer_sk#77]
Functions [1]: [sum((cast(ss_quantity#75 as decimal(10,0)) * ss_sales_price#76))]
Aggregate Attributes [1]: [sum((cast(ss_quantity#75 as decimal(10,0)) * ss_sales_price#76))#83]
Results [1]: [sum((cast(ss_quantity#75 as decimal(10,0)) * ss_sales_price#76))#83 AS csales#84]

(365) HashAggregate
Input [1]: [csales#84]
Keys: []
Functions [1]: [partial_max(csales#84)]
Aggregate Attributes [1]: [max#85]
Results [1]: [max#90]

(366) Exchange
Input [1]: [max#90]
Arguments: SinglePartition, ENSURE_REQUIREMENTS, [plan_id=46]

(367) HashAggregate
Input [1]: [max#90]
Keys: []
Functions [1]: [max(csales#84)]
Aggregate Attributes [1]: [max(csales#84)#86]
Results [1]: [max(csales#84)#86 AS tpcds_cmax#87]

(368) AdaptiveSparkPlan
Output [1]: [tpcds_cmax#87]
Arguments: isFinalPlan=true

Subquery:2 Hosting operator id = 152 Hosting Expression = ReusedSubquery Subquery subquery#29, [id=#30]


