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


(128) Scan parquet
Output [4]: [cr_returned_date_sk#1, cr_returning_customer_sk#2, cr_returning_addr_sk#3, cr_return_amt_inc_tax#4]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(cr_returned_date_sk), IsNotNull(cr_returning_addr_sk), IsNotNull(cr_returning_customer_sk)]
ReadSchema: struct<cr_returned_date_sk:int,cr_returning_customer_sk:int,cr_returning_addr_sk:int,cr_return_amt_inc_tax:decimal(7,2)>

(2) InputAdapter
Input [4]: [cr_returned_date_sk#1, cr_returning_customer_sk#2, cr_returning_addr_sk#3, cr_return_amt_inc_tax#4]
Arguments: [#1, #2, #3, #4]

(3) NativeFilter
Input [4]: [#1#1, #2#2, #3#3, #4#4]
Condition : ((isnotnull(cr_returned_date_sk#1) AND isnotnull(cr_returning_addr_sk#3)) AND isnotnull(cr_returning_customer_sk#2))

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

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

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

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

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

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

(10) InputAdapter
Input [2]: [d_date_sk#5, d_year#6]
Arguments: [#5, #6]

(11) NativeFilter
Input [2]: [#5#5, #6#6]
Condition : ((isnotnull(d_year#6) AND (d_year#6 = 2000)) AND isnotnull(d_date_sk#5))

(12) NativeProject
Output [1]: [d_date_sk#5]
Input [2]: [#5#5, #6#6]

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

(14) ShuffleQueryStage
Output [1]: [d_date_sk#5]
Arguments: X

(15) AQEShuffleRead
Input [1]: [d_date_sk#5]
Arguments: coalesced

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

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

(18) NativeSortMergeJoin
Left keys [1]: [cr_returned_date_sk#1]
Right keys [1]: [d_date_sk#5]
Join type: Inner
Join condition: None

(19) NativeProject
Output [3]: [cr_returning_customer_sk#2, cr_returning_addr_sk#3, cr_return_amt_inc_tax#4]
Input [5]: [#1#1, #2#2, #3#3, #4#4, d_date_sk#5]

(20) NativeShuffleExchange
Input [3]: [cr_returning_customer_sk#2, cr_returning_addr_sk#3, cr_return_amt_inc_tax#4]
Arguments: hashpartitioning(cr_returning_addr_sk#3, 100), ENSURE_REQUIREMENTS, [plan_id=3]

(21) ShuffleQueryStage
Output [3]: [cr_returning_customer_sk#2, cr_returning_addr_sk#3, cr_return_amt_inc_tax#4]
Arguments: X

(22) AQEShuffleRead
Input [3]: [cr_returning_customer_sk#2, cr_returning_addr_sk#3, cr_return_amt_inc_tax#4]
Arguments: coalesced

(23) InputAdapter
Input [3]: [cr_returning_customer_sk#2, cr_returning_addr_sk#3, cr_return_amt_inc_tax#4]

(24) NativeSort
Input [3]: [cr_returning_customer_sk#2, cr_returning_addr_sk#3, cr_return_amt_inc_tax#4]
Arguments: [cr_returning_addr_sk#3 ASC NULLS FIRST], false

(141) Scan parquet
Output [2]: [ca_address_sk#7, ca_state#8]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(ca_address_sk), IsNotNull(ca_state)]
ReadSchema: struct<ca_address_sk:int,ca_state:string>

(26) InputAdapter
Input [2]: [ca_address_sk#7, ca_state#8]
Arguments: [#7, #8]

(27) NativeFilter
Input [2]: [#7#7, #8#8]
Condition : (isnotnull(ca_address_sk#7) AND isnotnull(ca_state#8))

(28) NativeShuffleExchange
Input [2]: [#7#7, #8#8]
Arguments: hashpartitioning(ca_address_sk#7, 100), ENSURE_REQUIREMENTS, [plan_id=4]

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

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

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

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

(33) NativeSortMergeJoin
Left keys [1]: [cr_returning_addr_sk#3]
Right keys [1]: [ca_address_sk#7]
Join type: Inner
Join condition: None

(34) NativeProject
Output [3]: [cr_returning_customer_sk#2, cr_return_amt_inc_tax#4, ca_state#8]
Input [5]: [cr_returning_customer_sk#2, cr_returning_addr_sk#3, cr_return_amt_inc_tax#4, #7#7, #8#8]

(35) NativeProject
Output [3]: [cr_returning_customer_sk#2 AS cr_returning_customer_sk#2, ca_state#8 AS ca_state#8, UnscaledValue(cr_return_amt_inc_tax#4) AS _c2#9]
Input [3]: [cr_returning_customer_sk#2, cr_return_amt_inc_tax#4, ca_state#8]

(36) NativeHashAggregate
Input [3]: [cr_returning_customer_sk#2, ca_state#8, _c2#9]
Keys [2]: [cr_returning_customer_sk#2, ca_state#8]
Functions [1]: [partial_sum(_c2#9)]
Aggregate Attributes [1]: [sum#10]
Results [3]: [cr_returning_customer_sk#2, ca_state#8, #11]

(37) NativeShuffleExchange
Input [3]: [cr_returning_customer_sk#2, ca_state#8, #11]
Arguments: hashpartitioning(cr_returning_customer_sk#2, ca_state#8, 100), ENSURE_REQUIREMENTS, [plan_id=5]

(38) ShuffleQueryStage
Output [3]: [cr_returning_customer_sk#2, ca_state#8, #11]
Arguments: X

(39) AQEShuffleRead
Input [3]: [cr_returning_customer_sk#2, ca_state#8, #11]
Arguments: coalesced

(40) InputAdapter
Input [3]: [cr_returning_customer_sk#2, ca_state#8, #11]

(41) NativeHashAggregate
Input [3]: [cr_returning_customer_sk#2, ca_state#8, #11]
Keys [2]: [cr_returning_customer_sk#2, ca_state#8]
Functions [1]: [sum(UnscaledValue(cr_return_amt_inc_tax#4))]
Aggregate Attributes [1]: [sum(UnscaledValue(cr_return_amt_inc_tax#4))#12]
Results [3]: [cr_returning_customer_sk#2, ca_state#8, sum(UnscaledValue(cr_return_amt_inc_tax#4))#12]

(42) NativeProject
Output [3]: [cr_returning_customer_sk#2 AS ctr_customer_sk#13, ca_state#8 AS ctr_state#14, MakeDecimal(sum(UnscaledValue(cr_return_amt_inc_tax#4))#12,17,2) AS ctr_total_return#15]
Input [3]: [cr_returning_customer_sk#2, ca_state#8, sum(UnscaledValue(cr_return_amt_inc_tax#4))#12]

(43) NativeFilter
Input [3]: [ctr_customer_sk#13, ctr_state#14, ctr_total_return#15]
Condition : isnotnull(ctr_total_return#15)

(44) NativeShuffleExchange
Input [3]: [ctr_customer_sk#13, ctr_state#14, ctr_total_return#15]
Arguments: hashpartitioning(ctr_state#14, 100), ENSURE_REQUIREMENTS, [plan_id=6]

(45) ShuffleQueryStage
Output [3]: [ctr_customer_sk#13, ctr_state#14, ctr_total_return#15]
Arguments: X

(46) AQEShuffleRead
Input [3]: [ctr_customer_sk#13, ctr_state#14, ctr_total_return#15]
Arguments: coalesced

(47) InputAdapter
Input [3]: [ctr_customer_sk#13, ctr_state#14, ctr_total_return#15]

(48) NativeSort
Input [3]: [ctr_customer_sk#13, ctr_state#14, ctr_total_return#15]
Arguments: [ctr_state#14 ASC NULLS FIRST], false

(153) Scan parquet
Output [4]: [cr_returned_date_sk#16, cr_returning_customer_sk#17, cr_returning_addr_sk#18, cr_return_amt_inc_tax#19]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(cr_returned_date_sk), IsNotNull(cr_returning_addr_sk)]
ReadSchema: struct<cr_returned_date_sk:int,cr_returning_customer_sk:int,cr_returning_addr_sk:int,cr_return_amt_inc_tax:decimal(7,2)>

(50) InputAdapter
Input [4]: [cr_returned_date_sk#16, cr_returning_customer_sk#17, cr_returning_addr_sk#18, cr_return_amt_inc_tax#19]
Arguments: [#16, #17, #18, #19]

(51) NativeFilter
Input [4]: [#16#16, #17#17, #18#18, #19#19]
Condition : (isnotnull(cr_returned_date_sk#16) AND isnotnull(cr_returning_addr_sk#18))

(52) NativeShuffleExchange
Input [4]: [#16#16, #17#17, #18#18, #19#19]
Arguments: hashpartitioning(cr_returned_date_sk#16, 100), ENSURE_REQUIREMENTS, [plan_id=7]

(53) ShuffleQueryStage
Output [4]: [#16#16, #17#17, #18#18, #19#19]
Arguments: X

(54) AQEShuffleRead
Input [4]: [#16#16, #17#17, #18#18, #19#19]
Arguments: coalesced

(55) InputAdapter
Input [4]: [#16#16, #17#17, #18#18, #19#19]

(56) NativeSort
Input [4]: [#16#16, #17#17, #18#18, #19#19]
Arguments: [cr_returned_date_sk#16 ASC NULLS FIRST], false

(57) ReusedExchange [Reuses operator id: 13]
Output [1]: [d_date_sk#20]

(58) ShuffleQueryStage
Output [1]: [d_date_sk#20]
Arguments: X

(59) AQEShuffleRead
Input [1]: [d_date_sk#20]
Arguments: coalesced

(60) InputAdapter
Input [1]: [d_date_sk#20]
Arguments: [#20]

(61) InputAdapter
Input [1]: [#20#20]

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

(63) NativeSortMergeJoin
Left keys [1]: [cr_returned_date_sk#16]
Right keys [1]: [d_date_sk#20]
Join type: Inner
Join condition: None

(64) NativeProject
Output [3]: [cr_returning_customer_sk#17, cr_returning_addr_sk#18, cr_return_amt_inc_tax#19]
Input [5]: [#16#16, #17#17, #18#18, #19#19, #20#20]

(65) NativeShuffleExchange
Input [3]: [cr_returning_customer_sk#17, cr_returning_addr_sk#18, cr_return_amt_inc_tax#19]
Arguments: hashpartitioning(cr_returning_addr_sk#18, 100), ENSURE_REQUIREMENTS, [plan_id=8]

(66) ShuffleQueryStage
Output [3]: [cr_returning_customer_sk#17, cr_returning_addr_sk#18, cr_return_amt_inc_tax#19]
Arguments: X

(67) AQEShuffleRead
Input [3]: [cr_returning_customer_sk#17, cr_returning_addr_sk#18, cr_return_amt_inc_tax#19]
Arguments: coalesced

(68) InputAdapter
Input [3]: [cr_returning_customer_sk#17, cr_returning_addr_sk#18, cr_return_amt_inc_tax#19]

(69) NativeSort
Input [3]: [cr_returning_customer_sk#17, cr_returning_addr_sk#18, cr_return_amt_inc_tax#19]
Arguments: [cr_returning_addr_sk#18 ASC NULLS FIRST], false

(70) ReusedExchange [Reuses operator id: 28]
Output [2]: [ca_address_sk#21, ca_state#22]

(71) ShuffleQueryStage
Output [2]: [ca_address_sk#21, ca_state#22]
Arguments: X

(72) AQEShuffleRead
Input [2]: [ca_address_sk#21, ca_state#22]
Arguments: coalesced

(73) InputAdapter
Input [2]: [ca_address_sk#21, ca_state#22]
Arguments: [#21, #22]

(74) InputAdapter
Input [2]: [#21#21, #22#22]

(75) NativeSort
Input [2]: [#21#21, #22#22]
Arguments: [ca_address_sk#21 ASC NULLS FIRST], false

(76) NativeSortMergeJoin
Left keys [1]: [cr_returning_addr_sk#18]
Right keys [1]: [ca_address_sk#21]
Join type: Inner
Join condition: None

(77) NativeProject
Output [3]: [cr_returning_customer_sk#17, cr_return_amt_inc_tax#19, ca_state#22]
Input [5]: [cr_returning_customer_sk#17, cr_returning_addr_sk#18, cr_return_amt_inc_tax#19, #21#21, #22#22]

(78) NativeProject
Output [3]: [cr_returning_customer_sk#17 AS cr_returning_customer_sk#17, ca_state#22 AS ca_state#22, UnscaledValue(cr_return_amt_inc_tax#19) AS _c2#23]
Input [3]: [cr_returning_customer_sk#17, cr_return_amt_inc_tax#19, ca_state#22]

(79) NativeHashAggregate
Input [3]: [cr_returning_customer_sk#17, ca_state#22, _c2#23]
Keys [2]: [cr_returning_customer_sk#17, ca_state#22]
Functions [1]: [partial_sum(_c2#23)]
Aggregate Attributes [1]: [sum#24]
Results [3]: [cr_returning_customer_sk#17, ca_state#22, #11]

(80) NativeShuffleExchange
Input [3]: [cr_returning_customer_sk#17, ca_state#22, #11]
Arguments: hashpartitioning(cr_returning_customer_sk#17, ca_state#22, 100), ENSURE_REQUIREMENTS, [plan_id=9]

(81) ShuffleQueryStage
Output [3]: [cr_returning_customer_sk#17, ca_state#22, #11]
Arguments: X

(82) AQEShuffleRead
Input [3]: [cr_returning_customer_sk#17, ca_state#22, #11]
Arguments: coalesced

(83) InputAdapter
Input [3]: [cr_returning_customer_sk#17, ca_state#22, #11]

(84) NativeHashAggregate
Input [3]: [cr_returning_customer_sk#17, ca_state#22, #11]
Keys [2]: [cr_returning_customer_sk#17, ca_state#22]
Functions [1]: [sum(UnscaledValue(cr_return_amt_inc_tax#19))]
Aggregate Attributes [1]: [sum(UnscaledValue(cr_return_amt_inc_tax#19))#12]
Results [3]: [cr_returning_customer_sk#17, ca_state#22, sum(UnscaledValue(cr_return_amt_inc_tax#19))#12]

(85) NativeProject
Output [2]: [ca_state#22 AS ctr_state#25, MakeDecimal(sum(UnscaledValue(cr_return_amt_inc_tax#19))#12,17,2) AS ctr_total_return#26]
Input [3]: [cr_returning_customer_sk#17, ca_state#22, sum(UnscaledValue(cr_return_amt_inc_tax#19))#12]

(86) NativeHashAggregate
Input [2]: [ctr_state#25, ctr_total_return#26]
Keys [1]: [ctr_state#25]
Functions [1]: [partial_avg(ctr_total_return#26)]
Aggregate Attributes [2]: [sum#27, count#28]
Results [3]: [ctr_state#25, #29, #11]

(87) NativeShuffleExchange
Input [3]: [ctr_state#25, #29, #11]
Arguments: hashpartitioning(ctr_state#25, 100), ENSURE_REQUIREMENTS, [plan_id=10]

(88) ShuffleQueryStage
Output [3]: [ctr_state#25, #29, #11]
Arguments: X

(89) AQEShuffleRead
Input [3]: [ctr_state#25, #29, #11]
Arguments: coalesced

(90) InputAdapter
Input [3]: [ctr_state#25, #29, #11]

(91) NativeHashAggregate
Input [3]: [ctr_state#25, #29, #11]
Keys [1]: [ctr_state#25]
Functions [1]: [avg(ctr_total_return#26)]
Aggregate Attributes [1]: [avg(ctr_total_return#26)#30]
Results [2]: [ctr_state#25, avg(ctr_total_return#26)#30]

(92) NativeProject
Output [2]: [(avg(ctr_total_return#26)#30 * 1.2) AS (avg(ctr_total_return) * 1.2)#31, ctr_state#25]
Input [2]: [ctr_state#25, avg(ctr_total_return#26)#30]

(93) NativeFilter
Input [2]: [(avg(ctr_total_return) * 1.2)#31, ctr_state#25]
Condition : isnotnull((avg(ctr_total_return) * 1.2)#31)

(94) NativeSort
Input [2]: [(avg(ctr_total_return) * 1.2)#31, ctr_state#25]
Arguments: [ctr_state#25 ASC NULLS FIRST], false

(95) NativeSortMergeJoin
Left keys [1]: [ctr_state#14]
Right keys [1]: [ctr_state#25]
Join type: Inner
Join condition: (cast(ctr_total_return#15 as decimal(24,7)) > (avg(ctr_total_return) * 1.2)#31)

(96) NativeProject
Output [2]: [ctr_customer_sk#13, ctr_total_return#15]
Input [5]: [ctr_customer_sk#13, ctr_state#14, ctr_total_return#15, (avg(ctr_total_return) * 1.2)#31, ctr_state#25]

(97) NativeShuffleExchange
Input [2]: [ctr_customer_sk#13, ctr_total_return#15]
Arguments: hashpartitioning(ctr_customer_sk#13, 100), ENSURE_REQUIREMENTS, [plan_id=11]

(98) ShuffleQueryStage
Output [2]: [ctr_customer_sk#13, ctr_total_return#15]
Arguments: X

(99) AQEShuffleRead
Input [2]: [ctr_customer_sk#13, ctr_total_return#15]
Arguments: coalesced

(100) InputAdapter
Input [2]: [ctr_customer_sk#13, ctr_total_return#15]

(101) NativeSort
Input [2]: [ctr_customer_sk#13, ctr_total_return#15]
Arguments: [ctr_customer_sk#13 ASC NULLS FIRST], false

(184) Scan parquet
Output [6]: [c_customer_sk#32, c_customer_id#33, c_current_addr_sk#34, c_salutation#35, c_first_name#36, c_last_name#37]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(c_customer_sk), IsNotNull(c_current_addr_sk)]
ReadSchema: struct<c_customer_sk:int,c_customer_id:string,c_current_addr_sk:int,c_salutation:string,c_first_name:string,c_last_name:string>

(103) InputAdapter
Input [6]: [c_customer_sk#32, c_customer_id#33, c_current_addr_sk#34, c_salutation#35, c_first_name#36, c_last_name#37]
Arguments: [#32, #33, #34, #35, #36, #37]

(104) NativeFilter
Input [6]: [#32#32, #33#33, #34#34, #35#35, #36#36, #37#37]
Condition : (isnotnull(c_customer_sk#32) AND isnotnull(c_current_addr_sk#34))

(105) NativeShuffleExchange
Input [6]: [#32#32, #33#33, #34#34, #35#35, #36#36, #37#37]
Arguments: hashpartitioning(c_customer_sk#32, 100), ENSURE_REQUIREMENTS, [plan_id=12]

(106) ShuffleQueryStage
Output [6]: [#32#32, #33#33, #34#34, #35#35, #36#36, #37#37]
Arguments: X

(107) AQEShuffleRead
Input [6]: [#32#32, #33#33, #34#34, #35#35, #36#36, #37#37]
Arguments: coalesced

(108) InputAdapter
Input [6]: [#32#32, #33#33, #34#34, #35#35, #36#36, #37#37]

(109) NativeSort
Input [6]: [#32#32, #33#33, #34#34, #35#35, #36#36, #37#37]
Arguments: [c_customer_sk#32 ASC NULLS FIRST], false

(110) NativeSortMergeJoin
Left keys [1]: [ctr_customer_sk#13]
Right keys [1]: [c_customer_sk#32]
Join type: Inner
Join condition: None

(111) NativeProject
Output [6]: [ctr_total_return#15, c_customer_id#33, c_current_addr_sk#34, c_salutation#35, c_first_name#36, c_last_name#37]
Input [8]: [ctr_customer_sk#13, ctr_total_return#15, #32#32, #33#33, #34#34, #35#35, #36#36, #37#37]

(112) NativeShuffleExchange
Input [6]: [ctr_total_return#15, c_customer_id#33, c_current_addr_sk#34, c_salutation#35, c_first_name#36, c_last_name#37]
Arguments: hashpartitioning(c_current_addr_sk#34, 100), ENSURE_REQUIREMENTS, [plan_id=13]

(113) ShuffleQueryStage
Output [6]: [ctr_total_return#15, c_customer_id#33, c_current_addr_sk#34, c_salutation#35, c_first_name#36, c_last_name#37]
Arguments: X

(114) AQEShuffleRead
Input [6]: [ctr_total_return#15, c_customer_id#33, c_current_addr_sk#34, c_salutation#35, c_first_name#36, c_last_name#37]
Arguments: coalesced

(115) InputAdapter
Input [6]: [ctr_total_return#15, c_customer_id#33, c_current_addr_sk#34, c_salutation#35, c_first_name#36, c_last_name#37]

(116) NativeSort
Input [6]: [ctr_total_return#15, c_customer_id#33, c_current_addr_sk#34, c_salutation#35, c_first_name#36, c_last_name#37]
Arguments: [c_current_addr_sk#34 ASC NULLS FIRST], false

(192) Scan parquet
Output [12]: [ca_address_sk#38, ca_street_number#39, ca_street_name#40, ca_street_type#41, ca_suite_number#42, ca_city#43, ca_county#44, ca_state#45, ca_zip#46, ca_country#47, ca_gmt_offset#48, ca_location_type#49]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(ca_state), EqualTo(ca_state,GA), IsNotNull(ca_address_sk)]
ReadSchema: struct<ca_address_sk:int,ca_street_number:string,ca_street_name:string,ca_street_type:string,ca_suite_number:string,ca_city:string,ca_county:string,ca_state:string,ca_zip:string,ca_country:string,ca_gmt_offset:decimal(5,2),ca_location_type:string>

(118) InputAdapter
Input [12]: [ca_address_sk#38, ca_street_number#39, ca_street_name#40, ca_street_type#41, ca_suite_number#42, ca_city#43, ca_county#44, ca_state#45, ca_zip#46, ca_country#47, ca_gmt_offset#48, ca_location_type#49]
Arguments: [#38, #39, #40, #41, #42, #43, #44, #45, #46, #47, #48, #49]

(119) NativeFilter
Input [12]: [#38#38, #39#39, #40#40, #41#41, #42#42, #43#43, #44#44, #45#45, #46#46, #47#47, #48#48, #49#49]
Condition : ((isnotnull(ca_state#45) AND (ca_state#45 = GA)) AND isnotnull(ca_address_sk#38))

(120) NativeShuffleExchange
Input [12]: [#38#38, #39#39, #40#40, #41#41, #42#42, #43#43, #44#44, #45#45, #46#46, #47#47, #48#48, #49#49]
Arguments: hashpartitioning(ca_address_sk#38, 100), ENSURE_REQUIREMENTS, [plan_id=14]

(121) ShuffleQueryStage
Output [12]: [#38#38, #39#39, #40#40, #41#41, #42#42, #43#43, #44#44, #45#45, #46#46, #47#47, #48#48, #49#49]
Arguments: X

(122) AQEShuffleRead
Input [12]: [#38#38, #39#39, #40#40, #41#41, #42#42, #43#43, #44#44, #45#45, #46#46, #47#47, #48#48, #49#49]
Arguments: coalesced

(123) InputAdapter
Input [12]: [#38#38, #39#39, #40#40, #41#41, #42#42, #43#43, #44#44, #45#45, #46#46, #47#47, #48#48, #49#49]

(124) NativeSort
Input [12]: [#38#38, #39#39, #40#40, #41#41, #42#42, #43#43, #44#44, #45#45, #46#46, #47#47, #48#48, #49#49]
Arguments: [ca_address_sk#38 ASC NULLS FIRST], false

(125) NativeSortMergeJoin
Left keys [1]: [c_current_addr_sk#34]
Right keys [1]: [ca_address_sk#38]
Join type: Inner
Join condition: None

(126) NativeProject
Output [16]: [c_customer_id#33, c_salutation#35, c_first_name#36, c_last_name#37, ca_street_number#39, ca_street_name#40, ca_street_type#41, ca_suite_number#42, ca_city#43, ca_county#44, ca_state#45, ca_zip#46, ca_country#47, ca_gmt_offset#48, ca_location_type#49, ctr_total_return#15]
Input [18]: [ctr_total_return#15, c_customer_id#33, c_current_addr_sk#34, c_salutation#35, c_first_name#36, c_last_name#37, #38#38, #39#39, #40#40, #41#41, #42#42, #43#43, #44#44, #45#45, #46#46, #47#47, #48#48, #49#49]

(127) NativeTakeOrdered
Input [16]: [c_customer_id#33, c_salutation#35, c_first_name#36, c_last_name#37, ca_street_number#39, ca_street_name#40, ca_street_type#41, ca_suite_number#42, ca_city#43, ca_county#44, ca_state#45, ca_zip#46, ca_country#47, ca_gmt_offset#48, ca_location_type#49, ctr_total_return#15]
Arguments: X, X, [c_customer_id#33 ASC NULLS FIRST, c_salutation#35 ASC NULLS FIRST, c_first_name#36 ASC NULLS FIRST, c_last_name#37 ASC NULLS FIRST, ca_street_number#39 ASC NULLS FIRST, ca_street_name#40 ASC NULLS FIRST, ca_street_type#41 ASC NULLS FIRST, ca_suite_number#42 ASC NULLS FIRST, ca_city#43 ASC NULLS FIRST, ca_county#44 ASC NULLS FIRST, ca_state#45 ASC NULLS FIRST, ca_zip#46 ASC NULLS FIRST, ca_country#47 ASC NULLS FIRST, ca_gmt_offset#48 ASC NULLS FIRST, ca_location_type#49 ASC NULLS FIRST, ctr_total_return#15 ASC NULLS FIRST]

(128) Scan parquet
Output [4]: [cr_returned_date_sk#1, cr_returning_customer_sk#2, cr_returning_addr_sk#3, cr_return_amt_inc_tax#4]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(cr_returned_date_sk), IsNotNull(cr_returning_addr_sk), IsNotNull(cr_returning_customer_sk)]
ReadSchema: struct<cr_returned_date_sk:int,cr_returning_customer_sk:int,cr_returning_addr_sk:int,cr_return_amt_inc_tax:decimal(7,2)>

(129) Filter
Input [4]: [cr_returned_date_sk#1, cr_returning_customer_sk#2, cr_returning_addr_sk#3, cr_return_amt_inc_tax#4]
Condition : ((isnotnull(cr_returned_date_sk#1) AND isnotnull(cr_returning_addr_sk#3)) AND isnotnull(cr_returning_customer_sk#2))

(130) Exchange
Input [4]: [cr_returned_date_sk#1, cr_returning_customer_sk#2, cr_returning_addr_sk#3, cr_return_amt_inc_tax#4]
Arguments: hashpartitioning(cr_returned_date_sk#1, 100), ENSURE_REQUIREMENTS, [plan_id=15]

(131) Sort
Input [4]: [cr_returned_date_sk#1, cr_returning_customer_sk#2, cr_returning_addr_sk#3, cr_return_amt_inc_tax#4]
Arguments: [cr_returned_date_sk#1 ASC NULLS FIRST], false, 0

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

(133) Filter
Input [2]: [d_date_sk#5, d_year#6]
Condition : ((isnotnull(d_year#6) AND (d_year#6 = 2000)) AND isnotnull(d_date_sk#5))

(134) Project
Output [1]: [d_date_sk#5]
Input [2]: [d_date_sk#5, d_year#6]

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

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

(137) SortMergeJoin
Left keys [1]: [cr_returned_date_sk#1]
Right keys [1]: [d_date_sk#5]
Join type: Inner
Join condition: None

(138) Project
Output [3]: [cr_returning_customer_sk#2, cr_returning_addr_sk#3, cr_return_amt_inc_tax#4]
Input [5]: [cr_returned_date_sk#1, cr_returning_customer_sk#2, cr_returning_addr_sk#3, cr_return_amt_inc_tax#4, d_date_sk#5]

(139) Exchange
Input [3]: [cr_returning_customer_sk#2, cr_returning_addr_sk#3, cr_return_amt_inc_tax#4]
Arguments: hashpartitioning(cr_returning_addr_sk#3, 100), ENSURE_REQUIREMENTS, [plan_id=17]

(140) Sort
Input [3]: [cr_returning_customer_sk#2, cr_returning_addr_sk#3, cr_return_amt_inc_tax#4]
Arguments: [cr_returning_addr_sk#3 ASC NULLS FIRST], false, 0

(141) Scan parquet
Output [2]: [ca_address_sk#7, ca_state#8]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(ca_address_sk), IsNotNull(ca_state)]
ReadSchema: struct<ca_address_sk:int,ca_state:string>

(142) Filter
Input [2]: [ca_address_sk#7, ca_state#8]
Condition : (isnotnull(ca_address_sk#7) AND isnotnull(ca_state#8))

(143) Exchange
Input [2]: [ca_address_sk#7, ca_state#8]
Arguments: hashpartitioning(ca_address_sk#7, 100), ENSURE_REQUIREMENTS, [plan_id=18]

(144) Sort
Input [2]: [ca_address_sk#7, ca_state#8]
Arguments: [ca_address_sk#7 ASC NULLS FIRST], false, 0

(145) SortMergeJoin
Left keys [1]: [cr_returning_addr_sk#3]
Right keys [1]: [ca_address_sk#7]
Join type: Inner
Join condition: None

(146) Project
Output [3]: [cr_returning_customer_sk#2, cr_return_amt_inc_tax#4, ca_state#8]
Input [5]: [cr_returning_customer_sk#2, cr_returning_addr_sk#3, cr_return_amt_inc_tax#4, ca_address_sk#7, ca_state#8]

(147) HashAggregate
Input [3]: [cr_returning_customer_sk#2, cr_return_amt_inc_tax#4, ca_state#8]
Keys [2]: [cr_returning_customer_sk#2, ca_state#8]
Functions [1]: [partial_sum(UnscaledValue(cr_return_amt_inc_tax#4))]
Aggregate Attributes [1]: [sum#10]
Results [3]: [cr_returning_customer_sk#2, ca_state#8, sum#50]

(148) Exchange
Input [3]: [cr_returning_customer_sk#2, ca_state#8, sum#50]
Arguments: hashpartitioning(cr_returning_customer_sk#2, ca_state#8, 100), ENSURE_REQUIREMENTS, [plan_id=19]

(149) HashAggregate
Input [3]: [cr_returning_customer_sk#2, ca_state#8, sum#50]
Keys [2]: [cr_returning_customer_sk#2, ca_state#8]
Functions [1]: [sum(UnscaledValue(cr_return_amt_inc_tax#4))]
Aggregate Attributes [1]: [sum(UnscaledValue(cr_return_amt_inc_tax#4))#12]
Results [3]: [cr_returning_customer_sk#2 AS ctr_customer_sk#13, ca_state#8 AS ctr_state#14, MakeDecimal(sum(UnscaledValue(cr_return_amt_inc_tax#4))#12,17,2) AS ctr_total_return#15]

(150) Filter
Input [3]: [ctr_customer_sk#13, ctr_state#14, ctr_total_return#15]
Condition : isnotnull(ctr_total_return#15)

(151) Exchange
Input [3]: [ctr_customer_sk#13, ctr_state#14, ctr_total_return#15]
Arguments: hashpartitioning(ctr_state#14, 100), ENSURE_REQUIREMENTS, [plan_id=20]

(152) Sort
Input [3]: [ctr_customer_sk#13, ctr_state#14, ctr_total_return#15]
Arguments: [ctr_state#14 ASC NULLS FIRST], false, 0

(153) Scan parquet
Output [4]: [cr_returned_date_sk#16, cr_returning_customer_sk#17, cr_returning_addr_sk#18, cr_return_amt_inc_tax#19]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(cr_returned_date_sk), IsNotNull(cr_returning_addr_sk)]
ReadSchema: struct<cr_returned_date_sk:int,cr_returning_customer_sk:int,cr_returning_addr_sk:int,cr_return_amt_inc_tax:decimal(7,2)>

(154) Filter
Input [4]: [cr_returned_date_sk#16, cr_returning_customer_sk#17, cr_returning_addr_sk#18, cr_return_amt_inc_tax#19]
Condition : (isnotnull(cr_returned_date_sk#16) AND isnotnull(cr_returning_addr_sk#18))

(155) Exchange
Input [4]: [cr_returned_date_sk#16, cr_returning_customer_sk#17, cr_returning_addr_sk#18, cr_return_amt_inc_tax#19]
Arguments: hashpartitioning(cr_returned_date_sk#16, 100), ENSURE_REQUIREMENTS, [plan_id=21]

(156) Sort
Input [4]: [cr_returned_date_sk#16, cr_returning_customer_sk#17, cr_returning_addr_sk#18, cr_return_amt_inc_tax#19]
Arguments: [cr_returned_date_sk#16 ASC NULLS FIRST], false, 0

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

(158) Filter
Input [2]: [d_date_sk#20, d_year#51]
Condition : ((isnotnull(d_year#51) AND (d_year#51 = 2000)) AND isnotnull(d_date_sk#20))

(159) Project
Output [1]: [d_date_sk#20]
Input [2]: [d_date_sk#20, d_year#51]

(160) Exchange
Input [1]: [d_date_sk#20]
Arguments: hashpartitioning(d_date_sk#20, 100), ENSURE_REQUIREMENTS, [plan_id=22]

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

(162) SortMergeJoin
Left keys [1]: [cr_returned_date_sk#16]
Right keys [1]: [d_date_sk#20]
Join type: Inner
Join condition: None

(163) Project
Output [3]: [cr_returning_customer_sk#17, cr_returning_addr_sk#18, cr_return_amt_inc_tax#19]
Input [5]: [cr_returned_date_sk#16, cr_returning_customer_sk#17, cr_returning_addr_sk#18, cr_return_amt_inc_tax#19, d_date_sk#20]

(164) Exchange
Input [3]: [cr_returning_customer_sk#17, cr_returning_addr_sk#18, cr_return_amt_inc_tax#19]
Arguments: hashpartitioning(cr_returning_addr_sk#18, 100), ENSURE_REQUIREMENTS, [plan_id=23]

(165) Sort
Input [3]: [cr_returning_customer_sk#17, cr_returning_addr_sk#18, cr_return_amt_inc_tax#19]
Arguments: [cr_returning_addr_sk#18 ASC NULLS FIRST], false, 0

(166) Scan parquet
Output [2]: [ca_address_sk#21, ca_state#22]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(ca_address_sk), IsNotNull(ca_state)]
ReadSchema: struct<ca_address_sk:int,ca_state:string>

(167) Filter
Input [2]: [ca_address_sk#21, ca_state#22]
Condition : (isnotnull(ca_address_sk#21) AND isnotnull(ca_state#22))

(168) Exchange
Input [2]: [ca_address_sk#21, ca_state#22]
Arguments: hashpartitioning(ca_address_sk#21, 100), ENSURE_REQUIREMENTS, [plan_id=24]

(169) Sort
Input [2]: [ca_address_sk#21, ca_state#22]
Arguments: [ca_address_sk#21 ASC NULLS FIRST], false, 0

(170) SortMergeJoin
Left keys [1]: [cr_returning_addr_sk#18]
Right keys [1]: [ca_address_sk#21]
Join type: Inner
Join condition: None

(171) Project
Output [3]: [cr_returning_customer_sk#17, cr_return_amt_inc_tax#19, ca_state#22]
Input [5]: [cr_returning_customer_sk#17, cr_returning_addr_sk#18, cr_return_amt_inc_tax#19, ca_address_sk#21, ca_state#22]

(172) HashAggregate
Input [3]: [cr_returning_customer_sk#17, cr_return_amt_inc_tax#19, ca_state#22]
Keys [2]: [cr_returning_customer_sk#17, ca_state#22]
Functions [1]: [partial_sum(UnscaledValue(cr_return_amt_inc_tax#19))]
Aggregate Attributes [1]: [sum#24]
Results [3]: [cr_returning_customer_sk#17, ca_state#22, sum#52]

(173) Exchange
Input [3]: [cr_returning_customer_sk#17, ca_state#22, sum#52]
Arguments: hashpartitioning(cr_returning_customer_sk#17, ca_state#22, 100), ENSURE_REQUIREMENTS, [plan_id=25]

(174) HashAggregate
Input [3]: [cr_returning_customer_sk#17, ca_state#22, sum#52]
Keys [2]: [cr_returning_customer_sk#17, ca_state#22]
Functions [1]: [sum(UnscaledValue(cr_return_amt_inc_tax#19))]
Aggregate Attributes [1]: [sum(UnscaledValue(cr_return_amt_inc_tax#19))#12]
Results [2]: [ca_state#22 AS ctr_state#25, MakeDecimal(sum(UnscaledValue(cr_return_amt_inc_tax#19))#12,17,2) AS ctr_total_return#26]

(175) HashAggregate
Input [2]: [ctr_state#25, ctr_total_return#26]
Keys [1]: [ctr_state#25]
Functions [1]: [partial_avg(ctr_total_return#26)]
Aggregate Attributes [2]: [sum#27, count#28]
Results [3]: [ctr_state#25, sum#53, count#54]

(176) Exchange
Input [3]: [ctr_state#25, sum#53, count#54]
Arguments: hashpartitioning(ctr_state#25, 100), ENSURE_REQUIREMENTS, [plan_id=26]

(177) HashAggregate
Input [3]: [ctr_state#25, sum#53, count#54]
Keys [1]: [ctr_state#25]
Functions [1]: [avg(ctr_total_return#26)]
Aggregate Attributes [1]: [avg(ctr_total_return#26)#30]
Results [2]: [(avg(ctr_total_return#26)#30 * 1.2) AS (avg(ctr_total_return) * 1.2)#31, ctr_state#25]

(178) Filter
Input [2]: [(avg(ctr_total_return) * 1.2)#31, ctr_state#25]
Condition : isnotnull((avg(ctr_total_return) * 1.2)#31)

(179) Sort
Input [2]: [(avg(ctr_total_return) * 1.2)#31, ctr_state#25]
Arguments: [ctr_state#25 ASC NULLS FIRST], false, 0

(180) SortMergeJoin
Left keys [1]: [ctr_state#14]
Right keys [1]: [ctr_state#25]
Join type: Inner
Join condition: (cast(ctr_total_return#15 as decimal(24,7)) > (avg(ctr_total_return) * 1.2)#31)

(181) Project
Output [2]: [ctr_customer_sk#13, ctr_total_return#15]
Input [5]: [ctr_customer_sk#13, ctr_state#14, ctr_total_return#15, (avg(ctr_total_return) * 1.2)#31, ctr_state#25]

(182) Exchange
Input [2]: [ctr_customer_sk#13, ctr_total_return#15]
Arguments: hashpartitioning(ctr_customer_sk#13, 100), ENSURE_REQUIREMENTS, [plan_id=27]

(183) Sort
Input [2]: [ctr_customer_sk#13, ctr_total_return#15]
Arguments: [ctr_customer_sk#13 ASC NULLS FIRST], false, 0

(184) Scan parquet
Output [6]: [c_customer_sk#32, c_customer_id#33, c_current_addr_sk#34, c_salutation#35, c_first_name#36, c_last_name#37]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(c_customer_sk), IsNotNull(c_current_addr_sk)]
ReadSchema: struct<c_customer_sk:int,c_customer_id:string,c_current_addr_sk:int,c_salutation:string,c_first_name:string,c_last_name:string>

(185) Filter
Input [6]: [c_customer_sk#32, c_customer_id#33, c_current_addr_sk#34, c_salutation#35, c_first_name#36, c_last_name#37]
Condition : (isnotnull(c_customer_sk#32) AND isnotnull(c_current_addr_sk#34))

(186) Exchange
Input [6]: [c_customer_sk#32, c_customer_id#33, c_current_addr_sk#34, c_salutation#35, c_first_name#36, c_last_name#37]
Arguments: hashpartitioning(c_customer_sk#32, 100), ENSURE_REQUIREMENTS, [plan_id=28]

(187) Sort
Input [6]: [c_customer_sk#32, c_customer_id#33, c_current_addr_sk#34, c_salutation#35, c_first_name#36, c_last_name#37]
Arguments: [c_customer_sk#32 ASC NULLS FIRST], false, 0

(188) SortMergeJoin
Left keys [1]: [ctr_customer_sk#13]
Right keys [1]: [c_customer_sk#32]
Join type: Inner
Join condition: None

(189) Project
Output [6]: [ctr_total_return#15, c_customer_id#33, c_current_addr_sk#34, c_salutation#35, c_first_name#36, c_last_name#37]
Input [8]: [ctr_customer_sk#13, ctr_total_return#15, c_customer_sk#32, c_customer_id#33, c_current_addr_sk#34, c_salutation#35, c_first_name#36, c_last_name#37]

(190) Exchange
Input [6]: [ctr_total_return#15, c_customer_id#33, c_current_addr_sk#34, c_salutation#35, c_first_name#36, c_last_name#37]
Arguments: hashpartitioning(c_current_addr_sk#34, 100), ENSURE_REQUIREMENTS, [plan_id=29]

(191) Sort
Input [6]: [ctr_total_return#15, c_customer_id#33, c_current_addr_sk#34, c_salutation#35, c_first_name#36, c_last_name#37]
Arguments: [c_current_addr_sk#34 ASC NULLS FIRST], false, 0

(192) Scan parquet
Output [12]: [ca_address_sk#38, ca_street_number#39, ca_street_name#40, ca_street_type#41, ca_suite_number#42, ca_city#43, ca_county#44, ca_state#45, ca_zip#46, ca_country#47, ca_gmt_offset#48, ca_location_type#49]
Batched: true
Location: InMemoryFileIndex [file:/<warehouse_dir>]
PushedFilters: [IsNotNull(ca_state), EqualTo(ca_state,GA), IsNotNull(ca_address_sk)]
ReadSchema: struct<ca_address_sk:int,ca_street_number:string,ca_street_name:string,ca_street_type:string,ca_suite_number:string,ca_city:string,ca_county:string,ca_state:string,ca_zip:string,ca_country:string,ca_gmt_offset:decimal(5,2),ca_location_type:string>

(193) Filter
Input [12]: [ca_address_sk#38, ca_street_number#39, ca_street_name#40, ca_street_type#41, ca_suite_number#42, ca_city#43, ca_county#44, ca_state#45, ca_zip#46, ca_country#47, ca_gmt_offset#48, ca_location_type#49]
Condition : ((isnotnull(ca_state#45) AND (ca_state#45 = GA)) AND isnotnull(ca_address_sk#38))

(194) Exchange
Input [12]: [ca_address_sk#38, ca_street_number#39, ca_street_name#40, ca_street_type#41, ca_suite_number#42, ca_city#43, ca_county#44, ca_state#45, ca_zip#46, ca_country#47, ca_gmt_offset#48, ca_location_type#49]
Arguments: hashpartitioning(ca_address_sk#38, 100), ENSURE_REQUIREMENTS, [plan_id=30]

(195) Sort
Input [12]: [ca_address_sk#38, ca_street_number#39, ca_street_name#40, ca_street_type#41, ca_suite_number#42, ca_city#43, ca_county#44, ca_state#45, ca_zip#46, ca_country#47, ca_gmt_offset#48, ca_location_type#49]
Arguments: [ca_address_sk#38 ASC NULLS FIRST], false, 0

(196) SortMergeJoin
Left keys [1]: [c_current_addr_sk#34]
Right keys [1]: [ca_address_sk#38]
Join type: Inner
Join condition: None

(197) Project
Output [16]: [c_customer_id#33, c_salutation#35, c_first_name#36, c_last_name#37, ca_street_number#39, ca_street_name#40, ca_street_type#41, ca_suite_number#42, ca_city#43, ca_county#44, ca_state#45, ca_zip#46, ca_country#47, ca_gmt_offset#48, ca_location_type#49, ctr_total_return#15]
Input [18]: [ctr_total_return#15, c_customer_id#33, c_current_addr_sk#34, c_salutation#35, c_first_name#36, c_last_name#37, ca_address_sk#38, ca_street_number#39, ca_street_name#40, ca_street_type#41, ca_suite_number#42, ca_city#43, ca_county#44, ca_state#45, ca_zip#46, ca_country#47, ca_gmt_offset#48, ca_location_type#49]

(198) TakeOrderedAndProject
Input [16]: [c_customer_id#33, c_salutation#35, c_first_name#36, c_last_name#37, ca_street_number#39, ca_street_name#40, ca_street_type#41, ca_suite_number#42, ca_city#43, ca_county#44, ca_state#45, ca_zip#46, ca_country#47, ca_gmt_offset#48, ca_location_type#49, ctr_total_return#15]
Arguments: X, [c_customer_id#33 ASC NULLS FIRST, c_salutation#35 ASC NULLS FIRST, c_first_name#36 ASC NULLS FIRST, c_last_name#37 ASC NULLS FIRST, ca_street_number#39 ASC NULLS FIRST, ca_street_name#40 ASC NULLS FIRST, ca_street_type#41 ASC NULLS FIRST, ca_suite_number#42 ASC NULLS FIRST, ca_city#43 ASC NULLS FIRST, ca_county#44 ASC NULLS FIRST, ca_state#45 ASC NULLS FIRST, ca_zip#46 ASC NULLS FIRST, ca_country#47 ASC NULLS FIRST, ca_gmt_offset#48 ASC NULLS FIRST, ca_location_type#49 ASC NULLS FIRST, ctr_total_return#15 ASC NULLS FIRST], [c_customer_id#33, c_salutation#35, c_first_name#36, c_last_name#37, ca_street_number#39, ca_street_name#40, ca_street_type#41, ca_suite_number#42, ca_city#43, ca_county#44, ca_state#45, ca_zip#46, ca_country#47, ca_gmt_offset#48, ca_location_type#49, ctr_total_return#15]

(199) AdaptiveSparkPlan
Output [16]: [c_customer_id#33, c_salutation#35, c_first_name#36, c_last_name#37, ca_street_number#39, ca_street_name#40, ca_street_type#41, ca_suite_number#42, ca_city#43, ca_county#44, ca_state#45, ca_zip#46, ca_country#47, ca_gmt_offset#48, ca_location_type#49, ctr_total_return#15]
Arguments: isFinalPlan=true

