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


(101) Scan parquet
Output [5]: [ss_item_sk#1, ss_customer_sk#2, ss_store_sk#3, ss_ticket_number#4, ss_net_paid#5]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(ss_ticket_number), IsNotNull(ss_item_sk), IsNotNull(ss_store_sk), IsNotNull(ss_customer_sk)]
ReadSchema: struct<ss_item_sk:int,ss_customer_sk:int,ss_store_sk:int,ss_ticket_number:int,ss_net_paid:decimal(7,2)>

(2) InputAdapter
Input [5]: [ss_item_sk#1, ss_customer_sk#2, ss_store_sk#3, ss_ticket_number#4, ss_net_paid#5]
Arguments: [#1, #2, #3, #4, #5]

(3) NativeFilter
Input [5]: [#1#1, #2#2, #3#3, #4#4, #5#5]
Condition : (((isnotnull(ss_ticket_number#4) AND isnotnull(ss_item_sk#1)) AND isnotnull(ss_store_sk#3)) AND isnotnull(ss_customer_sk#2))

(4) NativeShuffleExchange
Input [5]: [#1#1, #2#2, #3#3, #4#4, #5#5]
Arguments: hashpartitioning(ss_ticket_number#4, ss_item_sk#1, 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: [ss_ticket_number#4 ASC NULLS FIRST, ss_item_sk#1 ASC NULLS FIRST], false

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

(10) InputAdapter
Input [2]: [sr_item_sk#6, sr_ticket_number#7]
Arguments: [#6, #7]

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

(12) NativeShuffleExchange
Input [2]: [#6#6, #7#7]
Arguments: hashpartitioning(sr_ticket_number#7, sr_item_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: [sr_ticket_number#7 ASC NULLS FIRST, sr_item_sk#6 ASC NULLS FIRST], false

(17) NativeSortMergeJoin
Left keys [2]: [ss_ticket_number#4, ss_item_sk#1]
Right keys [2]: [sr_ticket_number#7, sr_item_sk#6]
Join type: Inner
Join condition: None

(18) NativeProject
Output [4]: [ss_item_sk#1, ss_customer_sk#2, ss_store_sk#3, ss_net_paid#5]
Input [7]: [#1#1, #2#2, #3#3, #4#4, #5#5, #6#6, #7#7]

(19) NativeShuffleExchange
Input [4]: [ss_item_sk#1, ss_customer_sk#2, ss_store_sk#3, ss_net_paid#5]
Arguments: hashpartitioning(ss_store_sk#3, 100), ENSURE_REQUIREMENTS, [plan_id=3]

(20) ShuffleQueryStage
Output [4]: [ss_item_sk#1, ss_customer_sk#2, ss_store_sk#3, ss_net_paid#5]
Arguments: X

(21) AQEShuffleRead
Input [4]: [ss_item_sk#1, ss_customer_sk#2, ss_store_sk#3, ss_net_paid#5]
Arguments: coalesced

(22) InputAdapter
Input [4]: [ss_item_sk#1, ss_customer_sk#2, ss_store_sk#3, ss_net_paid#5]

(23) NativeSort
Input [4]: [ss_item_sk#1, ss_customer_sk#2, ss_store_sk#3, ss_net_paid#5]
Arguments: [ss_store_sk#3 ASC NULLS FIRST], false

(113) Scan parquet
Output [5]: [s_store_sk#8, s_store_name#9, s_market_id#10, s_state#11, s_zip#12]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(s_market_id), EqualTo(s_market_id,8), IsNotNull(s_store_sk), IsNotNull(s_zip)]
ReadSchema: struct<s_store_sk:int,s_store_name:string,s_market_id:int,s_state:string,s_zip:string>

(25) InputAdapter
Input [5]: [s_store_sk#8, s_store_name#9, s_market_id#10, s_state#11, s_zip#12]
Arguments: [#8, #9, #10, #11, #12]

(26) NativeFilter
Input [5]: [#8#8, #9#9, #10#10, #11#11, #12#12]
Condition : (((isnotnull(s_market_id#10) AND (s_market_id#10 = 8)) AND isnotnull(s_store_sk#8)) AND isnotnull(s_zip#12))

(27) NativeProject
Output [4]: [s_store_sk#8, s_store_name#9, s_state#11, s_zip#12]
Input [5]: [#8#8, #9#9, #10#10, #11#11, #12#12]

(28) NativeShuffleExchange
Input [4]: [s_store_sk#8, s_store_name#9, s_state#11, s_zip#12]
Arguments: hashpartitioning(s_store_sk#8, 100), ENSURE_REQUIREMENTS, [plan_id=4]

(29) ShuffleQueryStage
Output [4]: [s_store_sk#8, s_store_name#9, s_state#11, s_zip#12]
Arguments: X

(30) AQEShuffleRead
Input [4]: [s_store_sk#8, s_store_name#9, s_state#11, s_zip#12]
Arguments: coalesced

(31) InputAdapter
Input [4]: [s_store_sk#8, s_store_name#9, s_state#11, s_zip#12]

(32) NativeSort
Input [4]: [s_store_sk#8, s_store_name#9, s_state#11, s_zip#12]
Arguments: [s_store_sk#8 ASC NULLS FIRST], false

(33) NativeSortMergeJoin
Left keys [1]: [ss_store_sk#3]
Right keys [1]: [s_store_sk#8]
Join type: Inner
Join condition: None

(34) NativeProject
Output [6]: [ss_item_sk#1, ss_customer_sk#2, ss_net_paid#5, s_store_name#9, s_state#11, s_zip#12]
Input [8]: [ss_item_sk#1, ss_customer_sk#2, ss_store_sk#3, ss_net_paid#5, s_store_sk#8, s_store_name#9, s_state#11, s_zip#12]

(35) NativeShuffleExchange
Input [6]: [ss_item_sk#1, ss_customer_sk#2, ss_net_paid#5, s_store_name#9, s_state#11, s_zip#12]
Arguments: hashpartitioning(ss_item_sk#1, 100), ENSURE_REQUIREMENTS, [plan_id=5]

(36) ShuffleQueryStage
Output [6]: [ss_item_sk#1, ss_customer_sk#2, ss_net_paid#5, s_store_name#9, s_state#11, s_zip#12]
Arguments: X

(37) AQEShuffleRead
Input [6]: [ss_item_sk#1, ss_customer_sk#2, ss_net_paid#5, s_store_name#9, s_state#11, s_zip#12]
Arguments: coalesced

(38) InputAdapter
Input [6]: [ss_item_sk#1, ss_customer_sk#2, ss_net_paid#5, s_store_name#9, s_state#11, s_zip#12]

(39) NativeSort
Input [6]: [ss_item_sk#1, ss_customer_sk#2, ss_net_paid#5, s_store_name#9, s_state#11, s_zip#12]
Arguments: [ss_item_sk#1 ASC NULLS FIRST], false

(122) Scan parquet
Output [6]: [i_item_sk#13, i_current_price#14, i_size#15, i_color#16, i_units#17, i_manager_id#18]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(i_color), EqualTo(i_color,pale), IsNotNull(i_item_sk)]
ReadSchema: struct<i_item_sk:int,i_current_price:decimal(7,2),i_size:string,i_color:string,i_units:string,i_manager_id:int>

(41) InputAdapter
Input [6]: [i_item_sk#13, i_current_price#14, i_size#15, i_color#16, i_units#17, i_manager_id#18]
Arguments: [#13, #14, #15, #16, #17, #18]

(42) NativeFilter
Input [6]: [#13#13, #14#14, #15#15, #16#16, #17#17, #18#18]
Condition : ((isnotnull(i_color#16) AND (i_color#16 = pale)) AND isnotnull(i_item_sk#13))

(43) NativeShuffleExchange
Input [6]: [#13#13, #14#14, #15#15, #16#16, #17#17, #18#18]
Arguments: hashpartitioning(i_item_sk#13, 100), ENSURE_REQUIREMENTS, [plan_id=6]

(44) ShuffleQueryStage
Output [6]: [#13#13, #14#14, #15#15, #16#16, #17#17, #18#18]
Arguments: X

(45) AQEShuffleRead
Input [6]: [#13#13, #14#14, #15#15, #16#16, #17#17, #18#18]
Arguments: coalesced

(46) InputAdapter
Input [6]: [#13#13, #14#14, #15#15, #16#16, #17#17, #18#18]

(47) NativeSort
Input [6]: [#13#13, #14#14, #15#15, #16#16, #17#17, #18#18]
Arguments: [i_item_sk#13 ASC NULLS FIRST], false

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

(49) NativeProject
Output [10]: [ss_customer_sk#2, ss_net_paid#5, s_store_name#9, s_state#11, s_zip#12, i_current_price#14, i_size#15, i_color#16, i_units#17, i_manager_id#18]
Input [12]: [ss_item_sk#1, ss_customer_sk#2, ss_net_paid#5, s_store_name#9, s_state#11, s_zip#12, #13#13, #14#14, #15#15, #16#16, #17#17, #18#18]

(50) NativeShuffleExchange
Input [10]: [ss_customer_sk#2, ss_net_paid#5, s_store_name#9, s_state#11, s_zip#12, i_current_price#14, i_size#15, i_color#16, i_units#17, i_manager_id#18]
Arguments: hashpartitioning(ss_customer_sk#2, 100), ENSURE_REQUIREMENTS, [plan_id=7]

(51) ShuffleQueryStage
Output [10]: [ss_customer_sk#2, ss_net_paid#5, s_store_name#9, s_state#11, s_zip#12, i_current_price#14, i_size#15, i_color#16, i_units#17, i_manager_id#18]
Arguments: X

(52) AQEShuffleRead
Input [10]: [ss_customer_sk#2, ss_net_paid#5, s_store_name#9, s_state#11, s_zip#12, i_current_price#14, i_size#15, i_color#16, i_units#17, i_manager_id#18]
Arguments: coalesced

(53) InputAdapter
Input [10]: [ss_customer_sk#2, ss_net_paid#5, s_store_name#9, s_state#11, s_zip#12, i_current_price#14, i_size#15, i_color#16, i_units#17, i_manager_id#18]

(54) NativeSort
Input [10]: [ss_customer_sk#2, ss_net_paid#5, s_store_name#9, s_state#11, s_zip#12, i_current_price#14, i_size#15, i_color#16, i_units#17, i_manager_id#18]
Arguments: [ss_customer_sk#2 ASC NULLS FIRST], false

(130) Scan parquet
Output [4]: [c_customer_sk#19, c_first_name#20, c_last_name#21, c_birth_country#22]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(c_customer_sk), IsNotNull(c_birth_country)]
ReadSchema: struct<c_customer_sk:int,c_first_name:string,c_last_name:string,c_birth_country:string>

(56) InputAdapter
Input [4]: [c_customer_sk#19, c_first_name#20, c_last_name#21, c_birth_country#22]
Arguments: [#19, #20, #21, #22]

(57) NativeFilter
Input [4]: [#19#19, #20#20, #21#21, #22#22]
Condition : (isnotnull(c_customer_sk#19) AND isnotnull(c_birth_country#22))

(58) NativeShuffleExchange
Input [4]: [#19#19, #20#20, #21#21, #22#22]
Arguments: hashpartitioning(c_customer_sk#19, 100), ENSURE_REQUIREMENTS, [plan_id=8]

(59) ShuffleQueryStage
Output [4]: [#19#19, #20#20, #21#21, #22#22]
Arguments: X

(60) AQEShuffleRead
Input [4]: [#19#19, #20#20, #21#21, #22#22]
Arguments: coalesced

(61) InputAdapter
Input [4]: [#19#19, #20#20, #21#21, #22#22]

(62) NativeSort
Input [4]: [#19#19, #20#20, #21#21, #22#22]
Arguments: [c_customer_sk#19 ASC NULLS FIRST], false

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

(64) NativeProject
Output [12]: [ss_net_paid#5, s_store_name#9, s_state#11, s_zip#12, i_current_price#14, i_size#15, i_color#16, i_units#17, i_manager_id#18, c_first_name#20, c_last_name#21, c_birth_country#22]
Input [14]: [ss_customer_sk#2, ss_net_paid#5, s_store_name#9, s_state#11, s_zip#12, i_current_price#14, i_size#15, i_color#16, i_units#17, i_manager_id#18, #19#19, #20#20, #21#21, #22#22]

(65) NativeShuffleExchange
Input [12]: [ss_net_paid#5, s_store_name#9, s_state#11, s_zip#12, i_current_price#14, i_size#15, i_color#16, i_units#17, i_manager_id#18, c_first_name#20, c_last_name#21, c_birth_country#22]
Arguments: hashpartitioning(c_birth_country#22, s_zip#12, 100), ENSURE_REQUIREMENTS, [plan_id=9]

(66) ShuffleQueryStage
Output [12]: [ss_net_paid#5, s_store_name#9, s_state#11, s_zip#12, i_current_price#14, i_size#15, i_color#16, i_units#17, i_manager_id#18, c_first_name#20, c_last_name#21, c_birth_country#22]
Arguments: X

(67) AQEShuffleRead
Input [12]: [ss_net_paid#5, s_store_name#9, s_state#11, s_zip#12, i_current_price#14, i_size#15, i_color#16, i_units#17, i_manager_id#18, c_first_name#20, c_last_name#21, c_birth_country#22]
Arguments: coalesced

(68) InputAdapter
Input [12]: [ss_net_paid#5, s_store_name#9, s_state#11, s_zip#12, i_current_price#14, i_size#15, i_color#16, i_units#17, i_manager_id#18, c_first_name#20, c_last_name#21, c_birth_country#22]

(69) NativeSort
Input [12]: [ss_net_paid#5, s_store_name#9, s_state#11, s_zip#12, i_current_price#14, i_size#15, i_color#16, i_units#17, i_manager_id#18, c_first_name#20, c_last_name#21, c_birth_country#22]
Arguments: [c_birth_country#22 ASC NULLS FIRST, s_zip#12 ASC NULLS FIRST], false

(138) Scan parquet
Output [3]: [ca_state#23, ca_zip#24, ca_country#25]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(ca_country), IsNotNull(ca_zip)]
ReadSchema: struct<ca_state:string,ca_zip:string,ca_country:string>

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

(72) NativeFilter
Input [3]: [#23#23, #24#24, #25#25]
Condition : (isnotnull(ca_country#25) AND isnotnull(ca_zip#24))

(73) NativeShuffleExchange
Input [3]: [#23#23, #24#24, #25#25]
Arguments: hashpartitioning(upper(ca_country#25), ca_zip#24, 100), ENSURE_REQUIREMENTS, [plan_id=10]

(74) ShuffleQueryStage
Output [3]: [#23#23, #24#24, #25#25]
Arguments: X

(75) AQEShuffleRead
Input [3]: [#23#23, #24#24, #25#25]
Arguments: coalesced

(76) InputAdapter
Input [3]: [#23#23, #24#24, #25#25]

(77) NativeSort
Input [3]: [#23#23, #24#24, #25#25]
Arguments: [upper(ca_country#25) ASC NULLS FIRST, ca_zip#24 ASC NULLS FIRST], false

(78) NativeSortMergeJoin
Left keys [2]: [c_birth_country#22, s_zip#12]
Right keys [2]: [upper(ca_country#25), ca_zip#24]
Join type: Inner
Join condition: None

(79) NativeProject
Output [11]: [ss_net_paid#5, s_store_name#9, s_state#11, i_current_price#14, i_size#15, i_color#16, i_units#17, i_manager_id#18, c_first_name#20, c_last_name#21, ca_state#23]
Input [15]: [ss_net_paid#5, s_store_name#9, s_state#11, s_zip#12, i_current_price#14, i_size#15, i_color#16, i_units#17, i_manager_id#18, c_first_name#20, c_last_name#21, c_birth_country#22, #23#23, #24#24, #25#25]

(80) NativeProject
Output [11]: [c_last_name#21 AS c_last_name#21, c_first_name#20 AS c_first_name#20, s_store_name#9 AS s_store_name#9, ca_state#23 AS ca_state#23, s_state#11 AS s_state#11, i_color#16 AS i_color#16, i_current_price#14 AS i_current_price#14, i_manager_id#18 AS i_manager_id#18, i_units#17 AS i_units#17, i_size#15 AS i_size#15, UnscaledValue(ss_net_paid#5) AS _c10#26]
Input [11]: [ss_net_paid#5, s_store_name#9, s_state#11, i_current_price#14, i_size#15, i_color#16, i_units#17, i_manager_id#18, c_first_name#20, c_last_name#21, ca_state#23]

(81) NativeHashAggregate
Input [11]: [c_last_name#21, c_first_name#20, s_store_name#9, ca_state#23, s_state#11, i_color#16, i_current_price#14, i_manager_id#18, i_units#17, i_size#15, _c10#26]
Keys [10]: [c_last_name#21, c_first_name#20, s_store_name#9, ca_state#23, s_state#11, i_color#16, i_current_price#14, i_manager_id#18, i_units#17, i_size#15]
Functions [1]: [partial_sum(_c10#26)]
Aggregate Attributes [1]: [sum#27]
Results [11]: [c_last_name#21, c_first_name#20, s_store_name#9, ca_state#23, s_state#11, i_color#16, i_current_price#14, i_manager_id#18, i_units#17, i_size#15, #28]

(82) NativeShuffleExchange
Input [11]: [c_last_name#21, c_first_name#20, s_store_name#9, ca_state#23, s_state#11, i_color#16, i_current_price#14, i_manager_id#18, i_units#17, i_size#15, #28]
Arguments: hashpartitioning(c_last_name#21, c_first_name#20, s_store_name#9, ca_state#23, s_state#11, i_color#16, i_current_price#14, i_manager_id#18, i_units#17, i_size#15, 100), ENSURE_REQUIREMENTS, [plan_id=11]

(83) ShuffleQueryStage
Output [11]: [c_last_name#21, c_first_name#20, s_store_name#9, ca_state#23, s_state#11, i_color#16, i_current_price#14, i_manager_id#18, i_units#17, i_size#15, #28]
Arguments: X

(84) AQEShuffleRead
Input [11]: [c_last_name#21, c_first_name#20, s_store_name#9, ca_state#23, s_state#11, i_color#16, i_current_price#14, i_manager_id#18, i_units#17, i_size#15, #28]
Arguments: coalesced

(85) InputAdapter
Input [11]: [c_last_name#21, c_first_name#20, s_store_name#9, ca_state#23, s_state#11, i_color#16, i_current_price#14, i_manager_id#18, i_units#17, i_size#15, #28]

(86) NativeHashAggregate
Input [11]: [c_last_name#21, c_first_name#20, s_store_name#9, ca_state#23, s_state#11, i_color#16, i_current_price#14, i_manager_id#18, i_units#17, i_size#15, #28]
Keys [10]: [c_last_name#21, c_first_name#20, s_store_name#9, ca_state#23, s_state#11, i_color#16, i_current_price#14, i_manager_id#18, i_units#17, i_size#15]
Functions [1]: [sum(UnscaledValue(ss_net_paid#5))]
Aggregate Attributes [1]: [sum(UnscaledValue(ss_net_paid#5))#29]
Results [11]: [c_last_name#21, c_first_name#20, s_store_name#9, ca_state#23, s_state#11, i_color#16, i_current_price#14, i_manager_id#18, i_units#17, i_size#15, sum(UnscaledValue(ss_net_paid#5))#29]

(87) NativeProject
Output [4]: [c_last_name#21, c_first_name#20, s_store_name#9, MakeDecimal(sum(UnscaledValue(ss_net_paid#5))#29,17,2) AS netpaid#30]
Input [11]: [c_last_name#21, c_first_name#20, s_store_name#9, ca_state#23, s_state#11, i_color#16, i_current_price#14, i_manager_id#18, i_units#17, i_size#15, sum(UnscaledValue(ss_net_paid#5))#29]

(88) NativeHashAggregate
Input [4]: [c_last_name#21, c_first_name#20, s_store_name#9, netpaid#30]
Keys [3]: [c_last_name#21, c_first_name#20, s_store_name#9]
Functions [1]: [partial_sum(netpaid#30)]
Aggregate Attributes [2]: [sum#31, isEmpty#32]
Results [4]: [c_last_name#21, c_first_name#20, s_store_name#9, #33]

(89) NativeShuffleExchange
Input [4]: [c_last_name#21, c_first_name#20, s_store_name#9, #33]
Arguments: hashpartitioning(c_last_name#21, c_first_name#20, s_store_name#9, 100), ENSURE_REQUIREMENTS, [plan_id=12]

(90) ShuffleQueryStage
Output [4]: [c_last_name#21, c_first_name#20, s_store_name#9, #33]
Arguments: X

(91) AQEShuffleRead
Input [4]: [c_last_name#21, c_first_name#20, s_store_name#9, #33]
Arguments: coalesced

(92) InputAdapter
Input [4]: [c_last_name#21, c_first_name#20, s_store_name#9, #33]

(93) NativeHashAggregate
Input [4]: [c_last_name#21, c_first_name#20, s_store_name#9, #33]
Keys [3]: [c_last_name#21, c_first_name#20, s_store_name#9]
Functions [1]: [sum(netpaid#30)]
Aggregate Attributes [1]: [sum(netpaid#30)#34]
Results [4]: [c_last_name#21, c_first_name#20, s_store_name#9, sum(netpaid#30)#34]

(94) NativeProject
Output [4]: [c_last_name#21, c_first_name#20, s_store_name#9, sum(netpaid#30)#34 AS paid#35]
Input [4]: [c_last_name#21, c_first_name#20, s_store_name#9, sum(netpaid#30)#34]

(95) NativeFilter
Input [4]: [c_last_name#21, c_first_name#20, s_store_name#9, paid#35]
Condition : (isnotnull(paid#35) AND (cast(paid#35 as decimal(33,8)) > cast(Subquery subquery#36, [id=#37] as decimal(33,8))))

(96) NativeShuffleExchange
Input [4]: [c_last_name#21, c_first_name#20, s_store_name#9, paid#35]
Arguments: rangepartitioning(c_last_name#21 ASC NULLS FIRST, c_first_name#20 ASC NULLS FIRST, s_store_name#9 ASC NULLS FIRST, 100), ENSURE_REQUIREMENTS, [plan_id=13]

(97) ShuffleQueryStage
Output [4]: [c_last_name#21, c_first_name#20, s_store_name#9, paid#35]
Arguments: X

(98) AQEShuffleRead
Input [4]: [c_last_name#21, c_first_name#20, s_store_name#9, paid#35]
Arguments: coalesced

(99) InputAdapter
Input [4]: [c_last_name#21, c_first_name#20, s_store_name#9, paid#35]

(100) NativeSort
Input [4]: [c_last_name#21, c_first_name#20, s_store_name#9, paid#35]
Arguments: [c_last_name#21 ASC NULLS FIRST, c_first_name#20 ASC NULLS FIRST, s_store_name#9 ASC NULLS FIRST], true

(101) Scan parquet
Output [5]: [ss_item_sk#1, ss_customer_sk#2, ss_store_sk#3, ss_ticket_number#4, ss_net_paid#5]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(ss_ticket_number), IsNotNull(ss_item_sk), IsNotNull(ss_store_sk), IsNotNull(ss_customer_sk)]
ReadSchema: struct<ss_item_sk:int,ss_customer_sk:int,ss_store_sk:int,ss_ticket_number:int,ss_net_paid:decimal(7,2)>

(102) Filter
Input [5]: [ss_item_sk#1, ss_customer_sk#2, ss_store_sk#3, ss_ticket_number#4, ss_net_paid#5]
Condition : (((isnotnull(ss_ticket_number#4) AND isnotnull(ss_item_sk#1)) AND isnotnull(ss_store_sk#3)) AND isnotnull(ss_customer_sk#2))

(103) Exchange
Input [5]: [ss_item_sk#1, ss_customer_sk#2, ss_store_sk#3, ss_ticket_number#4, ss_net_paid#5]
Arguments: hashpartitioning(ss_ticket_number#4, ss_item_sk#1, 100), ENSURE_REQUIREMENTS, [plan_id=14]

(104) Sort
Input [5]: [ss_item_sk#1, ss_customer_sk#2, ss_store_sk#3, ss_ticket_number#4, ss_net_paid#5]
Arguments: [ss_ticket_number#4 ASC NULLS FIRST, ss_item_sk#1 ASC NULLS FIRST], false, 0

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

(106) Filter
Input [2]: [sr_item_sk#6, sr_ticket_number#7]
Condition : (isnotnull(sr_ticket_number#7) AND isnotnull(sr_item_sk#6))

(107) Exchange
Input [2]: [sr_item_sk#6, sr_ticket_number#7]
Arguments: hashpartitioning(sr_ticket_number#7, sr_item_sk#6, 100), ENSURE_REQUIREMENTS, [plan_id=15]

(108) Sort
Input [2]: [sr_item_sk#6, sr_ticket_number#7]
Arguments: [sr_ticket_number#7 ASC NULLS FIRST, sr_item_sk#6 ASC NULLS FIRST], false, 0

(109) SortMergeJoin
Left keys [2]: [ss_ticket_number#4, ss_item_sk#1]
Right keys [2]: [sr_ticket_number#7, sr_item_sk#6]
Join type: Inner
Join condition: None

(110) Project
Output [4]: [ss_item_sk#1, ss_customer_sk#2, ss_store_sk#3, ss_net_paid#5]
Input [7]: [ss_item_sk#1, ss_customer_sk#2, ss_store_sk#3, ss_ticket_number#4, ss_net_paid#5, sr_item_sk#6, sr_ticket_number#7]

(111) Exchange
Input [4]: [ss_item_sk#1, ss_customer_sk#2, ss_store_sk#3, ss_net_paid#5]
Arguments: hashpartitioning(ss_store_sk#3, 100), ENSURE_REQUIREMENTS, [plan_id=16]

(112) Sort
Input [4]: [ss_item_sk#1, ss_customer_sk#2, ss_store_sk#3, ss_net_paid#5]
Arguments: [ss_store_sk#3 ASC NULLS FIRST], false, 0

(113) Scan parquet
Output [5]: [s_store_sk#8, s_store_name#9, s_market_id#10, s_state#11, s_zip#12]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(s_market_id), EqualTo(s_market_id,8), IsNotNull(s_store_sk), IsNotNull(s_zip)]
ReadSchema: struct<s_store_sk:int,s_store_name:string,s_market_id:int,s_state:string,s_zip:string>

(114) Filter
Input [5]: [s_store_sk#8, s_store_name#9, s_market_id#10, s_state#11, s_zip#12]
Condition : (((isnotnull(s_market_id#10) AND (s_market_id#10 = 8)) AND isnotnull(s_store_sk#8)) AND isnotnull(s_zip#12))

(115) Project
Output [4]: [s_store_sk#8, s_store_name#9, s_state#11, s_zip#12]
Input [5]: [s_store_sk#8, s_store_name#9, s_market_id#10, s_state#11, s_zip#12]

(116) Exchange
Input [4]: [s_store_sk#8, s_store_name#9, s_state#11, s_zip#12]
Arguments: hashpartitioning(s_store_sk#8, 100), ENSURE_REQUIREMENTS, [plan_id=17]

(117) Sort
Input [4]: [s_store_sk#8, s_store_name#9, s_state#11, s_zip#12]
Arguments: [s_store_sk#8 ASC NULLS FIRST], false, 0

(118) SortMergeJoin
Left keys [1]: [ss_store_sk#3]
Right keys [1]: [s_store_sk#8]
Join type: Inner
Join condition: None

(119) Project
Output [6]: [ss_item_sk#1, ss_customer_sk#2, ss_net_paid#5, s_store_name#9, s_state#11, s_zip#12]
Input [8]: [ss_item_sk#1, ss_customer_sk#2, ss_store_sk#3, ss_net_paid#5, s_store_sk#8, s_store_name#9, s_state#11, s_zip#12]

(120) Exchange
Input [6]: [ss_item_sk#1, ss_customer_sk#2, ss_net_paid#5, s_store_name#9, s_state#11, s_zip#12]
Arguments: hashpartitioning(ss_item_sk#1, 100), ENSURE_REQUIREMENTS, [plan_id=18]

(121) Sort
Input [6]: [ss_item_sk#1, ss_customer_sk#2, ss_net_paid#5, s_store_name#9, s_state#11, s_zip#12]
Arguments: [ss_item_sk#1 ASC NULLS FIRST], false, 0

(122) Scan parquet
Output [6]: [i_item_sk#13, i_current_price#14, i_size#15, i_color#16, i_units#17, i_manager_id#18]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(i_color), EqualTo(i_color,pale), IsNotNull(i_item_sk)]
ReadSchema: struct<i_item_sk:int,i_current_price:decimal(7,2),i_size:string,i_color:string,i_units:string,i_manager_id:int>

(123) Filter
Input [6]: [i_item_sk#13, i_current_price#14, i_size#15, i_color#16, i_units#17, i_manager_id#18]
Condition : ((isnotnull(i_color#16) AND (i_color#16 = pale)) AND isnotnull(i_item_sk#13))

(124) Exchange
Input [6]: [i_item_sk#13, i_current_price#14, i_size#15, i_color#16, i_units#17, i_manager_id#18]
Arguments: hashpartitioning(i_item_sk#13, 100), ENSURE_REQUIREMENTS, [plan_id=19]

(125) Sort
Input [6]: [i_item_sk#13, i_current_price#14, i_size#15, i_color#16, i_units#17, i_manager_id#18]
Arguments: [i_item_sk#13 ASC NULLS FIRST], false, 0

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

(127) Project
Output [10]: [ss_customer_sk#2, ss_net_paid#5, s_store_name#9, s_state#11, s_zip#12, i_current_price#14, i_size#15, i_color#16, i_units#17, i_manager_id#18]
Input [12]: [ss_item_sk#1, ss_customer_sk#2, ss_net_paid#5, s_store_name#9, s_state#11, s_zip#12, i_item_sk#13, i_current_price#14, i_size#15, i_color#16, i_units#17, i_manager_id#18]

(128) Exchange
Input [10]: [ss_customer_sk#2, ss_net_paid#5, s_store_name#9, s_state#11, s_zip#12, i_current_price#14, i_size#15, i_color#16, i_units#17, i_manager_id#18]
Arguments: hashpartitioning(ss_customer_sk#2, 100), ENSURE_REQUIREMENTS, [plan_id=20]

(129) Sort
Input [10]: [ss_customer_sk#2, ss_net_paid#5, s_store_name#9, s_state#11, s_zip#12, i_current_price#14, i_size#15, i_color#16, i_units#17, i_manager_id#18]
Arguments: [ss_customer_sk#2 ASC NULLS FIRST], false, 0

(130) Scan parquet
Output [4]: [c_customer_sk#19, c_first_name#20, c_last_name#21, c_birth_country#22]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(c_customer_sk), IsNotNull(c_birth_country)]
ReadSchema: struct<c_customer_sk:int,c_first_name:string,c_last_name:string,c_birth_country:string>

(131) Filter
Input [4]: [c_customer_sk#19, c_first_name#20, c_last_name#21, c_birth_country#22]
Condition : (isnotnull(c_customer_sk#19) AND isnotnull(c_birth_country#22))

(132) Exchange
Input [4]: [c_customer_sk#19, c_first_name#20, c_last_name#21, c_birth_country#22]
Arguments: hashpartitioning(c_customer_sk#19, 100), ENSURE_REQUIREMENTS, [plan_id=21]

(133) Sort
Input [4]: [c_customer_sk#19, c_first_name#20, c_last_name#21, c_birth_country#22]
Arguments: [c_customer_sk#19 ASC NULLS FIRST], false, 0

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

(135) Project
Output [12]: [ss_net_paid#5, s_store_name#9, s_state#11, s_zip#12, i_current_price#14, i_size#15, i_color#16, i_units#17, i_manager_id#18, c_first_name#20, c_last_name#21, c_birth_country#22]
Input [14]: [ss_customer_sk#2, ss_net_paid#5, s_store_name#9, s_state#11, s_zip#12, i_current_price#14, i_size#15, i_color#16, i_units#17, i_manager_id#18, c_customer_sk#19, c_first_name#20, c_last_name#21, c_birth_country#22]

(136) Exchange
Input [12]: [ss_net_paid#5, s_store_name#9, s_state#11, s_zip#12, i_current_price#14, i_size#15, i_color#16, i_units#17, i_manager_id#18, c_first_name#20, c_last_name#21, c_birth_country#22]
Arguments: hashpartitioning(c_birth_country#22, s_zip#12, 100), ENSURE_REQUIREMENTS, [plan_id=22]

(137) Sort
Input [12]: [ss_net_paid#5, s_store_name#9, s_state#11, s_zip#12, i_current_price#14, i_size#15, i_color#16, i_units#17, i_manager_id#18, c_first_name#20, c_last_name#21, c_birth_country#22]
Arguments: [c_birth_country#22 ASC NULLS FIRST, s_zip#12 ASC NULLS FIRST], false, 0

(138) Scan parquet
Output [3]: [ca_state#23, ca_zip#24, ca_country#25]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(ca_country), IsNotNull(ca_zip)]
ReadSchema: struct<ca_state:string,ca_zip:string,ca_country:string>

(139) Filter
Input [3]: [ca_state#23, ca_zip#24, ca_country#25]
Condition : (isnotnull(ca_country#25) AND isnotnull(ca_zip#24))

(140) Exchange
Input [3]: [ca_state#23, ca_zip#24, ca_country#25]
Arguments: hashpartitioning(upper(ca_country#25), ca_zip#24, 100), ENSURE_REQUIREMENTS, [plan_id=23]

(141) Sort
Input [3]: [ca_state#23, ca_zip#24, ca_country#25]
Arguments: [upper(ca_country#25) ASC NULLS FIRST, ca_zip#24 ASC NULLS FIRST], false, 0

(142) SortMergeJoin
Left keys [2]: [c_birth_country#22, s_zip#12]
Right keys [2]: [upper(ca_country#25), ca_zip#24]
Join type: Inner
Join condition: None

(143) Project
Output [11]: [ss_net_paid#5, s_store_name#9, s_state#11, i_current_price#14, i_size#15, i_color#16, i_units#17, i_manager_id#18, c_first_name#20, c_last_name#21, ca_state#23]
Input [15]: [ss_net_paid#5, s_store_name#9, s_state#11, s_zip#12, i_current_price#14, i_size#15, i_color#16, i_units#17, i_manager_id#18, c_first_name#20, c_last_name#21, c_birth_country#22, ca_state#23, ca_zip#24, ca_country#25]

(144) HashAggregate
Input [11]: [ss_net_paid#5, s_store_name#9, s_state#11, i_current_price#14, i_size#15, i_color#16, i_units#17, i_manager_id#18, c_first_name#20, c_last_name#21, ca_state#23]
Keys [10]: [c_last_name#21, c_first_name#20, s_store_name#9, ca_state#23, s_state#11, i_color#16, i_current_price#14, i_manager_id#18, i_units#17, i_size#15]
Functions [1]: [partial_sum(UnscaledValue(ss_net_paid#5))]
Aggregate Attributes [1]: [sum#27]
Results [11]: [c_last_name#21, c_first_name#20, s_store_name#9, ca_state#23, s_state#11, i_color#16, i_current_price#14, i_manager_id#18, i_units#17, i_size#15, sum#38]

(145) Exchange
Input [11]: [c_last_name#21, c_first_name#20, s_store_name#9, ca_state#23, s_state#11, i_color#16, i_current_price#14, i_manager_id#18, i_units#17, i_size#15, sum#38]
Arguments: hashpartitioning(c_last_name#21, c_first_name#20, s_store_name#9, ca_state#23, s_state#11, i_color#16, i_current_price#14, i_manager_id#18, i_units#17, i_size#15, 100), ENSURE_REQUIREMENTS, [plan_id=24]

(146) HashAggregate
Input [11]: [c_last_name#21, c_first_name#20, s_store_name#9, ca_state#23, s_state#11, i_color#16, i_current_price#14, i_manager_id#18, i_units#17, i_size#15, sum#38]
Keys [10]: [c_last_name#21, c_first_name#20, s_store_name#9, ca_state#23, s_state#11, i_color#16, i_current_price#14, i_manager_id#18, i_units#17, i_size#15]
Functions [1]: [sum(UnscaledValue(ss_net_paid#5))]
Aggregate Attributes [1]: [sum(UnscaledValue(ss_net_paid#5))#29]
Results [4]: [c_last_name#21, c_first_name#20, s_store_name#9, MakeDecimal(sum(UnscaledValue(ss_net_paid#5))#29,17,2) AS netpaid#30]

(147) HashAggregate
Input [4]: [c_last_name#21, c_first_name#20, s_store_name#9, netpaid#30]
Keys [3]: [c_last_name#21, c_first_name#20, s_store_name#9]
Functions [1]: [partial_sum(netpaid#30)]
Aggregate Attributes [2]: [sum#31, isEmpty#32]
Results [5]: [c_last_name#21, c_first_name#20, s_store_name#9, sum#39, isEmpty#40]

(148) Exchange
Input [5]: [c_last_name#21, c_first_name#20, s_store_name#9, sum#39, isEmpty#40]
Arguments: hashpartitioning(c_last_name#21, c_first_name#20, s_store_name#9, 100), ENSURE_REQUIREMENTS, [plan_id=25]

(149) HashAggregate
Input [5]: [c_last_name#21, c_first_name#20, s_store_name#9, sum#39, isEmpty#40]
Keys [3]: [c_last_name#21, c_first_name#20, s_store_name#9]
Functions [1]: [sum(netpaid#30)]
Aggregate Attributes [1]: [sum(netpaid#30)#34]
Results [4]: [c_last_name#21, c_first_name#20, s_store_name#9, sum(netpaid#30)#34 AS paid#35]

(150) Filter
Input [4]: [c_last_name#21, c_first_name#20, s_store_name#9, paid#35]
Condition : (isnotnull(paid#35) AND (cast(paid#35 as decimal(33,8)) > cast(Subquery subquery#36, [id=#37] as decimal(33,8))))

(151) Exchange
Input [4]: [c_last_name#21, c_first_name#20, s_store_name#9, paid#35]
Arguments: rangepartitioning(c_last_name#21 ASC NULLS FIRST, c_first_name#20 ASC NULLS FIRST, s_store_name#9 ASC NULLS FIRST, 100), ENSURE_REQUIREMENTS, [plan_id=26]

(152) Sort
Input [4]: [c_last_name#21, c_first_name#20, s_store_name#9, paid#35]
Arguments: [c_last_name#21 ASC NULLS FIRST, c_first_name#20 ASC NULLS FIRST, s_store_name#9 ASC NULLS FIRST], true, 0

(153) AdaptiveSparkPlan
Output [4]: [c_last_name#21, c_first_name#20, s_store_name#9, paid#35]
Arguments: isFinalPlan=true

===== Subqueries =====

Subquery:1 Hosting operator id = 95 Hosting Expression = Subquery subquery#36, [id=#37]
AdaptiveSparkPlan (258)
+- == Final Plan ==
   NativeProject (208)
   +- NativeHashAggregate (207)
      +- ShuffleQueryStage (206), Statistics(X)
         +- NativeShuffleExchange (205)
            +- NativeHashAggregate (204)
               +- NativeProject (203)
                  +- NativeHashAggregate (202)
                     +- InputAdapter (201)
                        +- AQEShuffleRead (200)
                           +- ShuffleQueryStage (199), Statistics(X)
                              +- NativeShuffleExchange (198)
                                 +- NativeHashAggregate (197)
                                    +- NativeProject (196)
                                       +- NativeProject (195)
                                          +- NativeSortMergeJoin Inner (194)
                                             :- NativeSort (187)
                                             :  +- InputAdapter (186)
                                             :     +- AQEShuffleRead (185)
                                             :        +- ShuffleQueryStage (184), Statistics(X)
                                             :           +- NativeShuffleExchange (183)
                                             :              +- NativeProject (182)
                                             :                 +- NativeSortMergeJoin Inner (181)
                                             :                    :- NativeSort (174)
                                             :                    :  +- InputAdapter (173)
                                             :                    :     +- AQEShuffleRead (172)
                                             :                    :        +- ShuffleQueryStage (171), Statistics(X)
                                             :                    :           +- NativeShuffleExchange (170)
                                             :                    :              +- NativeProject (169)
                                             :                    :                 +- NativeSortMergeJoin Inner (168)
                                             :                    :                    :- NativeSort (159)
                                             :                    :                    :  +- InputAdapter (158)
                                             :                    :                    :     +- InputAdapter (157)
                                             :                    :                    :        +- AQEShuffleRead (156)
                                             :                    :                    :           +- ShuffleQueryStage (155), Statistics(X)
                                             :                    :                    :              +- ReusedExchange (154)
                                             :                    :                    +- NativeSort (167)
                                             :                    :                       +- InputAdapter (166)
                                             :                    :                          +- AQEShuffleRead (165)
                                             :                    :                             +- ShuffleQueryStage (164), Statistics(X)
                                             :                    :                                +- NativeShuffleExchange (163)
                                             :                    :                                   +- NativeFilter (162)
                                             :                    :                                      +- InputAdapter (161)
                                             :                    :                                         +- NativeParquetScan  (160)
                                             :                    +- NativeSort (180)
                                             :                       +- InputAdapter (179)
                                             :                          +- InputAdapter (178)
                                             :                             +- AQEShuffleRead (177)
                                             :                                +- ShuffleQueryStage (176), Statistics(X)
                                             :                                   +- ReusedExchange (175)
                                             +- NativeSort (193)
                                                +- InputAdapter (192)
                                                   +- InputAdapter (191)
                                                      +- AQEShuffleRead (190)
                                                         +- ShuffleQueryStage (189), Statistics(X)
                                                            +- ReusedExchange (188)
+- == Initial Plan ==
   HashAggregate (257)
   +- Exchange (256)
      +- HashAggregate (255)
         +- HashAggregate (254)
            +- Exchange (253)
               +- HashAggregate (252)
                  +- Project (251)
                     +- SortMergeJoin Inner (250)
                        :- Sort (245)
                        :  +- Exchange (244)
                        :     +- Project (243)
                        :        +- SortMergeJoin Inner (242)
                        :           :- Sort (237)
                        :           :  +- Exchange (236)
                        :           :     +- Project (235)
                        :           :        +- SortMergeJoin Inner (234)
                        :           :           :- Sort (229)
                        :           :           :  +- Exchange (228)
                        :           :           :     +- Project (227)
                        :           :           :        +- SortMergeJoin Inner (226)
                        :           :           :           :- Sort (220)
                        :           :           :           :  +- Exchange (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 (225)
                        :           :           :              +- Exchange (224)
                        :           :           :                 +- Project (223)
                        :           :           :                    +- Filter (222)
                        :           :           :                       +- Scan parquet (221)
                        :           :           +- Sort (233)
                        :           :              +- Exchange (232)
                        :           :                 +- Filter (231)
                        :           :                    +- Scan parquet (230)
                        :           +- Sort (241)
                        :              +- Exchange (240)
                        :                 +- Filter (239)
                        :                    +- Scan parquet (238)
                        +- Sort (249)
                           +- Exchange (248)
                              +- Filter (247)
                                 +- Scan parquet (246)


(154) ReusedExchange [Reuses operator id: 35]
Output [6]: [ss_item_sk#41, ss_customer_sk#42, ss_net_paid#43, s_store_name#44, s_state#45, s_zip#46]

(155) ShuffleQueryStage
Output [6]: [ss_item_sk#41, ss_customer_sk#42, ss_net_paid#43, s_store_name#44, s_state#45, s_zip#46]
Arguments: X

(156) AQEShuffleRead
Input [6]: [ss_item_sk#41, ss_customer_sk#42, ss_net_paid#43, s_store_name#44, s_state#45, s_zip#46]
Arguments: coalesced

(157) InputAdapter
Input [6]: [ss_item_sk#41, ss_customer_sk#42, ss_net_paid#43, s_store_name#44, s_state#45, s_zip#46]
Arguments: [#41, #42, #43, #44, #45, #46]

(158) InputAdapter
Input [6]: [#41#41, #42#42, #43#43, #44#44, #45#45, #46#46]

(159) NativeSort
Input [6]: [#41#41, #42#42, #43#43, #44#44, #45#45, #46#46]
Arguments: [ss_item_sk#41 ASC NULLS FIRST], false

(230) Scan parquet
Output [6]: [i_item_sk#47, i_current_price#48, i_size#49, i_color#50, i_units#51, i_manager_id#52]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(i_item_sk)]
ReadSchema: struct<i_item_sk:int,i_current_price:decimal(7,2),i_size:string,i_color:string,i_units:string,i_manager_id:int>

(161) InputAdapter
Input [6]: [i_item_sk#47, i_current_price#48, i_size#49, i_color#50, i_units#51, i_manager_id#52]
Arguments: [#47, #48, #49, #50, #51, #52]

(162) NativeFilter
Input [6]: [#47#47, #48#48, #49#49, #50#50, #51#51, #52#52]
Condition : isnotnull(i_item_sk#47)

(163) NativeShuffleExchange
Input [6]: [#47#47, #48#48, #49#49, #50#50, #51#51, #52#52]
Arguments: hashpartitioning(i_item_sk#47, 100), ENSURE_REQUIREMENTS, [plan_id=27]

(164) ShuffleQueryStage
Output [6]: [#47#47, #48#48, #49#49, #50#50, #51#51, #52#52]
Arguments: X

(165) AQEShuffleRead
Input [6]: [#47#47, #48#48, #49#49, #50#50, #51#51, #52#52]
Arguments: coalesced

(166) InputAdapter
Input [6]: [#47#47, #48#48, #49#49, #50#50, #51#51, #52#52]

(167) NativeSort
Input [6]: [#47#47, #48#48, #49#49, #50#50, #51#51, #52#52]
Arguments: [i_item_sk#47 ASC NULLS FIRST], false

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

(169) NativeProject
Output [10]: [ss_customer_sk#42, ss_net_paid#43, s_store_name#44, s_state#45, s_zip#46, i_current_price#48, i_size#49, i_color#50, i_units#51, i_manager_id#52]
Input [12]: [#41#41, #42#42, #43#43, #44#44, #45#45, #46#46, #47#47, #48#48, #49#49, #50#50, #51#51, #52#52]

(170) NativeShuffleExchange
Input [10]: [ss_customer_sk#42, ss_net_paid#43, s_store_name#44, s_state#45, s_zip#46, i_current_price#48, i_size#49, i_color#50, i_units#51, i_manager_id#52]
Arguments: hashpartitioning(ss_customer_sk#42, 100), ENSURE_REQUIREMENTS, [plan_id=28]

(171) ShuffleQueryStage
Output [10]: [ss_customer_sk#42, ss_net_paid#43, s_store_name#44, s_state#45, s_zip#46, i_current_price#48, i_size#49, i_color#50, i_units#51, i_manager_id#52]
Arguments: X

(172) AQEShuffleRead
Input [10]: [ss_customer_sk#42, ss_net_paid#43, s_store_name#44, s_state#45, s_zip#46, i_current_price#48, i_size#49, i_color#50, i_units#51, i_manager_id#52]
Arguments: coalesced

(173) InputAdapter
Input [10]: [ss_customer_sk#42, ss_net_paid#43, s_store_name#44, s_state#45, s_zip#46, i_current_price#48, i_size#49, i_color#50, i_units#51, i_manager_id#52]

(174) NativeSort
Input [10]: [ss_customer_sk#42, ss_net_paid#43, s_store_name#44, s_state#45, s_zip#46, i_current_price#48, i_size#49, i_color#50, i_units#51, i_manager_id#52]
Arguments: [ss_customer_sk#42 ASC NULLS FIRST], false

(175) ReusedExchange [Reuses operator id: 58]
Output [4]: [c_customer_sk#53, c_first_name#54, c_last_name#55, c_birth_country#56]

(176) ShuffleQueryStage
Output [4]: [c_customer_sk#53, c_first_name#54, c_last_name#55, c_birth_country#56]
Arguments: X

(177) AQEShuffleRead
Input [4]: [c_customer_sk#53, c_first_name#54, c_last_name#55, c_birth_country#56]
Arguments: coalesced

(178) InputAdapter
Input [4]: [c_customer_sk#53, c_first_name#54, c_last_name#55, c_birth_country#56]
Arguments: [#53, #54, #55, #56]

(179) InputAdapter
Input [4]: [#53#53, #54#54, #55#55, #56#56]

(180) NativeSort
Input [4]: [#53#53, #54#54, #55#55, #56#56]
Arguments: [c_customer_sk#53 ASC NULLS FIRST], false

(181) NativeSortMergeJoin
Left keys [1]: [ss_customer_sk#42]
Right keys [1]: [c_customer_sk#53]
Join type: Inner
Join condition: None

(182) NativeProject
Output [12]: [ss_net_paid#43, s_store_name#44, s_state#45, s_zip#46, i_current_price#48, i_size#49, i_color#50, i_units#51, i_manager_id#52, c_first_name#54, c_last_name#55, c_birth_country#56]
Input [14]: [ss_customer_sk#42, ss_net_paid#43, s_store_name#44, s_state#45, s_zip#46, i_current_price#48, i_size#49, i_color#50, i_units#51, i_manager_id#52, #53#53, #54#54, #55#55, #56#56]

(183) NativeShuffleExchange
Input [12]: [ss_net_paid#43, s_store_name#44, s_state#45, s_zip#46, i_current_price#48, i_size#49, i_color#50, i_units#51, i_manager_id#52, c_first_name#54, c_last_name#55, c_birth_country#56]
Arguments: hashpartitioning(c_birth_country#56, s_zip#46, 100), ENSURE_REQUIREMENTS, [plan_id=29]

(184) ShuffleQueryStage
Output [12]: [ss_net_paid#43, s_store_name#44, s_state#45, s_zip#46, i_current_price#48, i_size#49, i_color#50, i_units#51, i_manager_id#52, c_first_name#54, c_last_name#55, c_birth_country#56]
Arguments: X

(185) AQEShuffleRead
Input [12]: [ss_net_paid#43, s_store_name#44, s_state#45, s_zip#46, i_current_price#48, i_size#49, i_color#50, i_units#51, i_manager_id#52, c_first_name#54, c_last_name#55, c_birth_country#56]
Arguments: coalesced

(186) InputAdapter
Input [12]: [ss_net_paid#43, s_store_name#44, s_state#45, s_zip#46, i_current_price#48, i_size#49, i_color#50, i_units#51, i_manager_id#52, c_first_name#54, c_last_name#55, c_birth_country#56]

(187) NativeSort
Input [12]: [ss_net_paid#43, s_store_name#44, s_state#45, s_zip#46, i_current_price#48, i_size#49, i_color#50, i_units#51, i_manager_id#52, c_first_name#54, c_last_name#55, c_birth_country#56]
Arguments: [c_birth_country#56 ASC NULLS FIRST, s_zip#46 ASC NULLS FIRST], false

(188) ReusedExchange [Reuses operator id: 73]
Output [3]: [ca_state#57, ca_zip#58, ca_country#59]

(189) ShuffleQueryStage
Output [3]: [ca_state#57, ca_zip#58, ca_country#59]
Arguments: X

(190) AQEShuffleRead
Input [3]: [ca_state#57, ca_zip#58, ca_country#59]
Arguments: coalesced

(191) InputAdapter
Input [3]: [ca_state#57, ca_zip#58, ca_country#59]
Arguments: [#57, #58, #59]

(192) InputAdapter
Input [3]: [#57#57, #58#58, #59#59]

(193) NativeSort
Input [3]: [#57#57, #58#58, #59#59]
Arguments: [upper(ca_country#59) ASC NULLS FIRST, ca_zip#58 ASC NULLS FIRST], false

(194) NativeSortMergeJoin
Left keys [2]: [c_birth_country#56, s_zip#46]
Right keys [2]: [upper(ca_country#59), ca_zip#58]
Join type: Inner
Join condition: None

(195) NativeProject
Output [11]: [ss_net_paid#43, s_store_name#44, s_state#45, i_current_price#48, i_size#49, i_color#50, i_units#51, i_manager_id#52, c_first_name#54, c_last_name#55, ca_state#57]
Input [15]: [ss_net_paid#43, s_store_name#44, s_state#45, s_zip#46, i_current_price#48, i_size#49, i_color#50, i_units#51, i_manager_id#52, c_first_name#54, c_last_name#55, c_birth_country#56, #57#57, #58#58, #59#59]

(196) NativeProject
Output [11]: [c_last_name#55 AS c_last_name#55, c_first_name#54 AS c_first_name#54, s_store_name#44 AS s_store_name#44, ca_state#57 AS ca_state#57, s_state#45 AS s_state#45, i_color#50 AS i_color#50, i_current_price#48 AS i_current_price#48, i_manager_id#52 AS i_manager_id#52, i_units#51 AS i_units#51, i_size#49 AS i_size#49, UnscaledValue(ss_net_paid#43) AS _c10#60]
Input [11]: [ss_net_paid#43, s_store_name#44, s_state#45, i_current_price#48, i_size#49, i_color#50, i_units#51, i_manager_id#52, c_first_name#54, c_last_name#55, ca_state#57]

(197) NativeHashAggregate
Input [11]: [c_last_name#55, c_first_name#54, s_store_name#44, ca_state#57, s_state#45, i_color#50, i_current_price#48, i_manager_id#52, i_units#51, i_size#49, _c10#60]
Keys [10]: [c_last_name#55, c_first_name#54, s_store_name#44, ca_state#57, s_state#45, i_color#50, i_current_price#48, i_manager_id#52, i_units#51, i_size#49]
Functions [1]: [partial_sum(_c10#60)]
Aggregate Attributes [1]: [sum#61]
Results [11]: [c_last_name#55, c_first_name#54, s_store_name#44, ca_state#57, s_state#45, i_color#50, i_current_price#48, i_manager_id#52, i_units#51, i_size#49, #28]

(198) NativeShuffleExchange
Input [11]: [c_last_name#55, c_first_name#54, s_store_name#44, ca_state#57, s_state#45, i_color#50, i_current_price#48, i_manager_id#52, i_units#51, i_size#49, #28]
Arguments: hashpartitioning(c_last_name#55, c_first_name#54, s_store_name#44, ca_state#57, s_state#45, i_color#50, i_current_price#48, i_manager_id#52, i_units#51, i_size#49, 100), ENSURE_REQUIREMENTS, [plan_id=30]

(199) ShuffleQueryStage
Output [11]: [c_last_name#55, c_first_name#54, s_store_name#44, ca_state#57, s_state#45, i_color#50, i_current_price#48, i_manager_id#52, i_units#51, i_size#49, #28]
Arguments: X

(200) AQEShuffleRead
Input [11]: [c_last_name#55, c_first_name#54, s_store_name#44, ca_state#57, s_state#45, i_color#50, i_current_price#48, i_manager_id#52, i_units#51, i_size#49, #28]
Arguments: coalesced

(201) InputAdapter
Input [11]: [c_last_name#55, c_first_name#54, s_store_name#44, ca_state#57, s_state#45, i_color#50, i_current_price#48, i_manager_id#52, i_units#51, i_size#49, #28]

(202) NativeHashAggregate
Input [11]: [c_last_name#55, c_first_name#54, s_store_name#44, ca_state#57, s_state#45, i_color#50, i_current_price#48, i_manager_id#52, i_units#51, i_size#49, #28]
Keys [10]: [c_last_name#55, c_first_name#54, s_store_name#44, ca_state#57, s_state#45, i_color#50, i_current_price#48, i_manager_id#52, i_units#51, i_size#49]
Functions [1]: [sum(UnscaledValue(ss_net_paid#43))]
Aggregate Attributes [1]: [sum(UnscaledValue(ss_net_paid#43))#29]
Results [11]: [c_last_name#55, c_first_name#54, s_store_name#44, ca_state#57, s_state#45, i_color#50, i_current_price#48, i_manager_id#52, i_units#51, i_size#49, sum(UnscaledValue(ss_net_paid#43))#29]

(203) NativeProject
Output [1]: [MakeDecimal(sum(UnscaledValue(ss_net_paid#43))#29,17,2) AS netpaid#62]
Input [11]: [c_last_name#55, c_first_name#54, s_store_name#44, ca_state#57, s_state#45, i_color#50, i_current_price#48, i_manager_id#52, i_units#51, i_size#49, sum(UnscaledValue(ss_net_paid#43))#29]

(204) NativeHashAggregate
Input [1]: [netpaid#62]
Keys: []
Functions [1]: [partial_avg(netpaid#62)]
Aggregate Attributes [2]: [sum#63, count#64]
Results [2]: [#33, #28]

(205) NativeShuffleExchange
Input [2]: [#33, #28]
Arguments: SinglePartition, ENSURE_REQUIREMENTS, [plan_id=31]

(206) ShuffleQueryStage
Output [2]: [#33, #28]
Arguments: X

(207) NativeHashAggregate
Input [2]: [#33, #28]
Keys: []
Functions [1]: [avg(netpaid#62)]
Aggregate Attributes [1]: [avg(netpaid#62)#65]
Results [1]: [avg(netpaid#62)#65]

(208) NativeProject
Output [1]: [(0.05 * avg(netpaid#62)#65) AS (0.05 * avg(netpaid))#66]
Input [1]: [avg(netpaid#62)#65]

(209) Scan parquet
Output [5]: [ss_item_sk#41, ss_customer_sk#42, ss_store_sk#67, ss_ticket_number#68, ss_net_paid#43]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(ss_ticket_number), IsNotNull(ss_item_sk), IsNotNull(ss_store_sk), IsNotNull(ss_customer_sk)]
ReadSchema: struct<ss_item_sk:int,ss_customer_sk:int,ss_store_sk:int,ss_ticket_number:int,ss_net_paid:decimal(7,2)>

(210) Filter
Input [5]: [ss_item_sk#41, ss_customer_sk#42, ss_store_sk#67, ss_ticket_number#68, ss_net_paid#43]
Condition : (((isnotnull(ss_ticket_number#68) AND isnotnull(ss_item_sk#41)) AND isnotnull(ss_store_sk#67)) AND isnotnull(ss_customer_sk#42))

(211) Exchange
Input [5]: [ss_item_sk#41, ss_customer_sk#42, ss_store_sk#67, ss_ticket_number#68, ss_net_paid#43]
Arguments: hashpartitioning(ss_ticket_number#68, ss_item_sk#41, 100), ENSURE_REQUIREMENTS, [plan_id=32]

(212) Sort
Input [5]: [ss_item_sk#41, ss_customer_sk#42, ss_store_sk#67, ss_ticket_number#68, ss_net_paid#43]
Arguments: [ss_ticket_number#68 ASC NULLS FIRST, ss_item_sk#41 ASC NULLS FIRST], false, 0

(213) Scan parquet
Output [2]: [sr_item_sk#69, sr_ticket_number#70]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(sr_ticket_number), IsNotNull(sr_item_sk)]
ReadSchema: struct<sr_item_sk:int,sr_ticket_number:int>

(214) Filter
Input [2]: [sr_item_sk#69, sr_ticket_number#70]
Condition : (isnotnull(sr_ticket_number#70) AND isnotnull(sr_item_sk#69))

(215) Exchange
Input [2]: [sr_item_sk#69, sr_ticket_number#70]
Arguments: hashpartitioning(sr_ticket_number#70, sr_item_sk#69, 100), ENSURE_REQUIREMENTS, [plan_id=33]

(216) Sort
Input [2]: [sr_item_sk#69, sr_ticket_number#70]
Arguments: [sr_ticket_number#70 ASC NULLS FIRST, sr_item_sk#69 ASC NULLS FIRST], false, 0

(217) SortMergeJoin
Left keys [2]: [ss_ticket_number#68, ss_item_sk#41]
Right keys [2]: [sr_ticket_number#70, sr_item_sk#69]
Join type: Inner
Join condition: None

(218) Project
Output [4]: [ss_item_sk#41, ss_customer_sk#42, ss_store_sk#67, ss_net_paid#43]
Input [7]: [ss_item_sk#41, ss_customer_sk#42, ss_store_sk#67, ss_ticket_number#68, ss_net_paid#43, sr_item_sk#69, sr_ticket_number#70]

(219) Exchange
Input [4]: [ss_item_sk#41, ss_customer_sk#42, ss_store_sk#67, ss_net_paid#43]
Arguments: hashpartitioning(ss_store_sk#67, 100), ENSURE_REQUIREMENTS, [plan_id=34]

(220) Sort
Input [4]: [ss_item_sk#41, ss_customer_sk#42, ss_store_sk#67, ss_net_paid#43]
Arguments: [ss_store_sk#67 ASC NULLS FIRST], false, 0

(221) Scan parquet
Output [5]: [s_store_sk#71, s_store_name#44, s_market_id#72, s_state#45, s_zip#46]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(s_market_id), EqualTo(s_market_id,8), IsNotNull(s_store_sk), IsNotNull(s_zip)]
ReadSchema: struct<s_store_sk:int,s_store_name:string,s_market_id:int,s_state:string,s_zip:string>

(222) Filter
Input [5]: [s_store_sk#71, s_store_name#44, s_market_id#72, s_state#45, s_zip#46]
Condition : (((isnotnull(s_market_id#72) AND (s_market_id#72 = 8)) AND isnotnull(s_store_sk#71)) AND isnotnull(s_zip#46))

(223) Project
Output [4]: [s_store_sk#71, s_store_name#44, s_state#45, s_zip#46]
Input [5]: [s_store_sk#71, s_store_name#44, s_market_id#72, s_state#45, s_zip#46]

(224) Exchange
Input [4]: [s_store_sk#71, s_store_name#44, s_state#45, s_zip#46]
Arguments: hashpartitioning(s_store_sk#71, 100), ENSURE_REQUIREMENTS, [plan_id=35]

(225) Sort
Input [4]: [s_store_sk#71, s_store_name#44, s_state#45, s_zip#46]
Arguments: [s_store_sk#71 ASC NULLS FIRST], false, 0

(226) SortMergeJoin
Left keys [1]: [ss_store_sk#67]
Right keys [1]: [s_store_sk#71]
Join type: Inner
Join condition: None

(227) Project
Output [6]: [ss_item_sk#41, ss_customer_sk#42, ss_net_paid#43, s_store_name#44, s_state#45, s_zip#46]
Input [8]: [ss_item_sk#41, ss_customer_sk#42, ss_store_sk#67, ss_net_paid#43, s_store_sk#71, s_store_name#44, s_state#45, s_zip#46]

(228) Exchange
Input [6]: [ss_item_sk#41, ss_customer_sk#42, ss_net_paid#43, s_store_name#44, s_state#45, s_zip#46]
Arguments: hashpartitioning(ss_item_sk#41, 100), ENSURE_REQUIREMENTS, [plan_id=36]

(229) Sort
Input [6]: [ss_item_sk#41, ss_customer_sk#42, ss_net_paid#43, s_store_name#44, s_state#45, s_zip#46]
Arguments: [ss_item_sk#41 ASC NULLS FIRST], false, 0

(230) Scan parquet
Output [6]: [i_item_sk#47, i_current_price#48, i_size#49, i_color#50, i_units#51, i_manager_id#52]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(i_item_sk)]
ReadSchema: struct<i_item_sk:int,i_current_price:decimal(7,2),i_size:string,i_color:string,i_units:string,i_manager_id:int>

(231) Filter
Input [6]: [i_item_sk#47, i_current_price#48, i_size#49, i_color#50, i_units#51, i_manager_id#52]
Condition : isnotnull(i_item_sk#47)

(232) Exchange
Input [6]: [i_item_sk#47, i_current_price#48, i_size#49, i_color#50, i_units#51, i_manager_id#52]
Arguments: hashpartitioning(i_item_sk#47, 100), ENSURE_REQUIREMENTS, [plan_id=37]

(233) Sort
Input [6]: [i_item_sk#47, i_current_price#48, i_size#49, i_color#50, i_units#51, i_manager_id#52]
Arguments: [i_item_sk#47 ASC NULLS FIRST], false, 0

(234) SortMergeJoin
Left keys [1]: [ss_item_sk#41]
Right keys [1]: [i_item_sk#47]
Join type: Inner
Join condition: None

(235) Project
Output [10]: [ss_customer_sk#42, ss_net_paid#43, s_store_name#44, s_state#45, s_zip#46, i_current_price#48, i_size#49, i_color#50, i_units#51, i_manager_id#52]
Input [12]: [ss_item_sk#41, ss_customer_sk#42, ss_net_paid#43, s_store_name#44, s_state#45, s_zip#46, i_item_sk#47, i_current_price#48, i_size#49, i_color#50, i_units#51, i_manager_id#52]

(236) Exchange
Input [10]: [ss_customer_sk#42, ss_net_paid#43, s_store_name#44, s_state#45, s_zip#46, i_current_price#48, i_size#49, i_color#50, i_units#51, i_manager_id#52]
Arguments: hashpartitioning(ss_customer_sk#42, 100), ENSURE_REQUIREMENTS, [plan_id=38]

(237) Sort
Input [10]: [ss_customer_sk#42, ss_net_paid#43, s_store_name#44, s_state#45, s_zip#46, i_current_price#48, i_size#49, i_color#50, i_units#51, i_manager_id#52]
Arguments: [ss_customer_sk#42 ASC NULLS FIRST], false, 0

(238) Scan parquet
Output [4]: [c_customer_sk#53, c_first_name#54, c_last_name#55, c_birth_country#56]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(c_customer_sk), IsNotNull(c_birth_country)]
ReadSchema: struct<c_customer_sk:int,c_first_name:string,c_last_name:string,c_birth_country:string>

(239) Filter
Input [4]: [c_customer_sk#53, c_first_name#54, c_last_name#55, c_birth_country#56]
Condition : (isnotnull(c_customer_sk#53) AND isnotnull(c_birth_country#56))

(240) Exchange
Input [4]: [c_customer_sk#53, c_first_name#54, c_last_name#55, c_birth_country#56]
Arguments: hashpartitioning(c_customer_sk#53, 100), ENSURE_REQUIREMENTS, [plan_id=39]

(241) Sort
Input [4]: [c_customer_sk#53, c_first_name#54, c_last_name#55, c_birth_country#56]
Arguments: [c_customer_sk#53 ASC NULLS FIRST], false, 0

(242) SortMergeJoin
Left keys [1]: [ss_customer_sk#42]
Right keys [1]: [c_customer_sk#53]
Join type: Inner
Join condition: None

(243) Project
Output [12]: [ss_net_paid#43, s_store_name#44, s_state#45, s_zip#46, i_current_price#48, i_size#49, i_color#50, i_units#51, i_manager_id#52, c_first_name#54, c_last_name#55, c_birth_country#56]
Input [14]: [ss_customer_sk#42, ss_net_paid#43, s_store_name#44, s_state#45, s_zip#46, i_current_price#48, i_size#49, i_color#50, i_units#51, i_manager_id#52, c_customer_sk#53, c_first_name#54, c_last_name#55, c_birth_country#56]

(244) Exchange
Input [12]: [ss_net_paid#43, s_store_name#44, s_state#45, s_zip#46, i_current_price#48, i_size#49, i_color#50, i_units#51, i_manager_id#52, c_first_name#54, c_last_name#55, c_birth_country#56]
Arguments: hashpartitioning(c_birth_country#56, s_zip#46, 100), ENSURE_REQUIREMENTS, [plan_id=40]

(245) Sort
Input [12]: [ss_net_paid#43, s_store_name#44, s_state#45, s_zip#46, i_current_price#48, i_size#49, i_color#50, i_units#51, i_manager_id#52, c_first_name#54, c_last_name#55, c_birth_country#56]
Arguments: [c_birth_country#56 ASC NULLS FIRST, s_zip#46 ASC NULLS FIRST], false, 0

(246) Scan parquet
Output [3]: [ca_state#57, ca_zip#58, ca_country#59]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(ca_country), IsNotNull(ca_zip)]
ReadSchema: struct<ca_state:string,ca_zip:string,ca_country:string>

(247) Filter
Input [3]: [ca_state#57, ca_zip#58, ca_country#59]
Condition : (isnotnull(ca_country#59) AND isnotnull(ca_zip#58))

(248) Exchange
Input [3]: [ca_state#57, ca_zip#58, ca_country#59]
Arguments: hashpartitioning(upper(ca_country#59), ca_zip#58, 100), ENSURE_REQUIREMENTS, [plan_id=41]

(249) Sort
Input [3]: [ca_state#57, ca_zip#58, ca_country#59]
Arguments: [upper(ca_country#59) ASC NULLS FIRST, ca_zip#58 ASC NULLS FIRST], false, 0

(250) SortMergeJoin
Left keys [2]: [c_birth_country#56, s_zip#46]
Right keys [2]: [upper(ca_country#59), ca_zip#58]
Join type: Inner
Join condition: None

(251) Project
Output [11]: [ss_net_paid#43, s_store_name#44, s_state#45, i_current_price#48, i_size#49, i_color#50, i_units#51, i_manager_id#52, c_first_name#54, c_last_name#55, ca_state#57]
Input [15]: [ss_net_paid#43, s_store_name#44, s_state#45, s_zip#46, i_current_price#48, i_size#49, i_color#50, i_units#51, i_manager_id#52, c_first_name#54, c_last_name#55, c_birth_country#56, ca_state#57, ca_zip#58, ca_country#59]

(252) HashAggregate
Input [11]: [ss_net_paid#43, s_store_name#44, s_state#45, i_current_price#48, i_size#49, i_color#50, i_units#51, i_manager_id#52, c_first_name#54, c_last_name#55, ca_state#57]
Keys [10]: [c_last_name#55, c_first_name#54, s_store_name#44, ca_state#57, s_state#45, i_color#50, i_current_price#48, i_manager_id#52, i_units#51, i_size#49]
Functions [1]: [partial_sum(UnscaledValue(ss_net_paid#43))]
Aggregate Attributes [1]: [sum#61]
Results [11]: [c_last_name#55, c_first_name#54, s_store_name#44, ca_state#57, s_state#45, i_color#50, i_current_price#48, i_manager_id#52, i_units#51, i_size#49, sum#73]

(253) Exchange
Input [11]: [c_last_name#55, c_first_name#54, s_store_name#44, ca_state#57, s_state#45, i_color#50, i_current_price#48, i_manager_id#52, i_units#51, i_size#49, sum#73]
Arguments: hashpartitioning(c_last_name#55, c_first_name#54, s_store_name#44, ca_state#57, s_state#45, i_color#50, i_current_price#48, i_manager_id#52, i_units#51, i_size#49, 100), ENSURE_REQUIREMENTS, [plan_id=42]

(254) HashAggregate
Input [11]: [c_last_name#55, c_first_name#54, s_store_name#44, ca_state#57, s_state#45, i_color#50, i_current_price#48, i_manager_id#52, i_units#51, i_size#49, sum#73]
Keys [10]: [c_last_name#55, c_first_name#54, s_store_name#44, ca_state#57, s_state#45, i_color#50, i_current_price#48, i_manager_id#52, i_units#51, i_size#49]
Functions [1]: [sum(UnscaledValue(ss_net_paid#43))]
Aggregate Attributes [1]: [sum(UnscaledValue(ss_net_paid#43))#29]
Results [1]: [MakeDecimal(sum(UnscaledValue(ss_net_paid#43))#29,17,2) AS netpaid#62]

(255) HashAggregate
Input [1]: [netpaid#62]
Keys: []
Functions [1]: [partial_avg(netpaid#62)]
Aggregate Attributes [2]: [sum#63, count#64]
Results [2]: [sum#74, count#75]

(256) Exchange
Input [2]: [sum#74, count#75]
Arguments: SinglePartition, ENSURE_REQUIREMENTS, [plan_id=43]

(257) HashAggregate
Input [2]: [sum#74, count#75]
Keys: []
Functions [1]: [avg(netpaid#62)]
Aggregate Attributes [1]: [avg(netpaid#62)#65]
Results [1]: [(0.05 * avg(netpaid#62)#65) AS (0.05 * avg(netpaid))#66]

(258) AdaptiveSparkPlan
Output [1]: [(0.05 * avg(netpaid))#66]
Arguments: isFinalPlan=true


