== Physical Plan ==
VeloxColumnarToRow (100)
+- TakeOrderedAndProjectExecTransformer (99)
   +- ^ ProjectExecTransformer (97)
      +- ^ BroadcastHashJoinExecTransformer Inner BuildRight (96)
         :- ^ ProjectExecTransformer (55)
         :  +- ^ ShuffledHashJoinExecTransformer Inner BuildLeft (54)
         :     :- ^ InputIteratorTransformer (15)
         :     :  +- ColumnarExchange (13)
         :     :     +- VeloxResizeBatches (12)
         :     :        +- ^ ProjectExecTransformer (10)
         :     :           +- ^ BroadcastHashJoinExecTransformer Inner BuildRight (9)
         :     :              :- ^ FilterExecTransformer (2)
         :     :              :  +- ^ FileSourceScanExecTransformer parquet spark_catalog.default.customer (1)
         :     :              +- ^ InputIteratorTransformer (8)
         :     :                 +- ColumnarBroadcastExchange (6)
         :     :                    +- ^ FilterExecTransformer (4)
         :     :                       +- ^ FileSourceScanExecTransformer parquet spark_catalog.default.customer_address (3)
         :     +- ^ InputIteratorTransformer (53)
         :        +- ColumnarExchange (51)
         :           +- VeloxResizeBatches (50)
         :              +- ^ ProjectExecTransformer (48)
         :                 +- ^ FilterExecTransformer (47)
         :                    +- ^ ProjectExecTransformer (46)
         :                       +- ^ RegularHashAggregateExecTransformer (45)
         :                          +- ^ InputIteratorTransformer (44)
         :                             +- ColumnarExchange (42)
         :                                +- VeloxResizeBatches (41)
         :                                   +- ^ ProjectExecTransformer (39)
         :                                      +- ^ FlushableHashAggregateExecTransformer (38)
         :                                         +- ^ ProjectExecTransformer (37)
         :                                            +- ^ ShuffledHashJoinExecTransformer Inner BuildRight (36)
         :                                               :- ^ InputIteratorTransformer (27)
         :                                               :  +- ColumnarExchange (25)
         :                                               :     +- VeloxResizeBatches (24)
         :                                               :        +- ^ ProjectExecTransformer (22)
         :                                               :           +- ^ BroadcastHashJoinExecTransformer Inner BuildRight (21)
         :                                               :              :- ^ FilterExecTransformer (17)
         :                                               :              :  +- ^ FileSourceScanExecTransformer parquet spark_catalog.default.catalog_returns (16)
         :                                               :              +- ^ InputIteratorTransformer (20)
         :                                               :                 +- ReusedExchange (18)
         :                                               +- ^ InputIteratorTransformer (35)
         :                                                  +- ColumnarExchange (33)
         :                                                     +- VeloxResizeBatches (32)
         :                                                        +- ^ ProjectExecTransformer (30)
         :                                                           +- ^ FilterExecTransformer (29)
         :                                                              +- ^ FileSourceScanExecTransformer parquet spark_catalog.default.customer_address (28)
         +- ^ InputIteratorTransformer (95)
            +- ColumnarBroadcastExchange (93)
               +- ^ FilterExecTransformer (91)
                  +- ^ ProjectExecTransformer (90)
                     +- ^ RegularHashAggregateExecTransformer (89)
                        +- ^ InputIteratorTransformer (88)
                           +- ColumnarExchange (86)
                              +- VeloxResizeBatches (85)
                                 +- ^ ProjectExecTransformer (83)
                                    +- ^ FlushableHashAggregateExecTransformer (82)
                                       +- ^ ProjectExecTransformer (81)
                                          +- ^ RegularHashAggregateExecTransformer (80)
                                             +- ^ InputIteratorTransformer (79)
                                                +- ColumnarExchange (77)
                                                   +- VeloxResizeBatches (76)
                                                      +- ^ ProjectExecTransformer (74)
                                                         +- ^ FlushableHashAggregateExecTransformer (73)
                                                            +- ^ ProjectExecTransformer (72)
                                                               +- ^ ShuffledHashJoinExecTransformer Inner BuildRight (71)
                                                                  :- ^ InputIteratorTransformer (67)
                                                                  :  +- ColumnarExchange (65)
                                                                  :     +- VeloxResizeBatches (64)
                                                                  :        +- ^ ProjectExecTransformer (62)
                                                                  :           +- ^ BroadcastHashJoinExecTransformer Inner BuildRight (61)
                                                                  :              :- ^ FilterExecTransformer (57)
                                                                  :              :  +- ^ FileSourceScanExecTransformer parquet spark_catalog.default.catalog_returns (56)
                                                                  :              +- ^ InputIteratorTransformer (60)
                                                                  :                 +- ReusedExchange (58)
                                                                  +- ^ InputIteratorTransformer (70)
                                                                     +- ReusedExchange (68)


(1) FileSourceScanExecTransformer parquet spark_catalog.default.customer
Output [6]: [c_customer_sk#1, c_customer_id#2, c_current_addr_sk#3, c_salutation#4, c_first_name#5, c_last_name#6]
Batched: true
Location: InMemoryFileIndex [{warehouse_dir}/customer]
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>

(2) FilterExecTransformer
Input [6]: [c_customer_sk#1, c_customer_id#2, c_current_addr_sk#3, c_salutation#4, c_first_name#5, c_last_name#6]
Arguments: (isnotnull(c_customer_sk#1) AND isnotnull(c_current_addr_sk#3))

(3) FileSourceScanExecTransformer parquet spark_catalog.default.customer_address
Output [12]: [ca_address_sk#7, ca_street_number#8, ca_street_name#9, ca_street_type#10, ca_suite_number#11, ca_city#12, ca_county#13, ca_state#14, ca_zip#15, ca_country#16, ca_gmt_offset#17, ca_location_type#18]
Batched: true
Location: InMemoryFileIndex [{warehouse_dir}/customer_address]
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>

(4) FilterExecTransformer
Input [12]: [ca_address_sk#7, ca_street_number#8, ca_street_name#9, ca_street_type#10, ca_suite_number#11, ca_city#12, ca_county#13, ca_state#14, ca_zip#15, ca_country#16, ca_gmt_offset#17, ca_location_type#18]
Arguments: ((isnotnull(ca_state#14) AND (ca_state#14 = GA)) AND isnotnull(ca_address_sk#7))

(5) WholeStageCodegenTransformer (1)
Input [12]: [ca_address_sk#7, ca_street_number#8, ca_street_name#9, ca_street_type#10, ca_suite_number#11, ca_city#12, ca_county#13, ca_state#14, ca_zip#15, ca_country#16, ca_gmt_offset#17, ca_location_type#18]
Arguments: false

(6) ColumnarBroadcastExchange
Input [12]: [ca_address_sk#7, ca_street_number#8, ca_street_name#9, ca_street_type#10, ca_suite_number#11, ca_city#12, ca_county#13, ca_state#14, ca_zip#15, ca_country#16, ca_gmt_offset#17, ca_location_type#18]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, false] as bigint)),false), [plan_id=1]

(7) InputAdapter
Input [12]: [ca_address_sk#7, ca_street_number#8, ca_street_name#9, ca_street_type#10, ca_suite_number#11, ca_city#12, ca_county#13, ca_state#14, ca_zip#15, ca_country#16, ca_gmt_offset#17, ca_location_type#18]

(8) InputIteratorTransformer
Input [12]: [ca_address_sk#7, ca_street_number#8, ca_street_name#9, ca_street_type#10, ca_suite_number#11, ca_city#12, ca_county#13, ca_state#14, ca_zip#15, ca_country#16, ca_gmt_offset#17, ca_location_type#18]

(9) BroadcastHashJoinExecTransformer
Left keys [1]: [c_current_addr_sk#3]
Right keys [1]: [ca_address_sk#7]
Join type: Inner
Join condition: None

(10) ProjectExecTransformer
Output [17]: [hash(c_customer_sk#1, 42) AS hash_partition_key#19, c_customer_sk#1, c_customer_id#2, c_salutation#4, c_first_name#5, c_last_name#6, ca_street_number#8, ca_street_name#9, ca_street_type#10, ca_suite_number#11, ca_city#12, ca_county#13, ca_state#14, ca_zip#15, ca_country#16, ca_gmt_offset#17, ca_location_type#18]
Input [18]: [c_customer_sk#1, c_customer_id#2, c_current_addr_sk#3, c_salutation#4, c_first_name#5, c_last_name#6, ca_address_sk#7, ca_street_number#8, ca_street_name#9, ca_street_type#10, ca_suite_number#11, ca_city#12, ca_county#13, ca_state#14, ca_zip#15, ca_country#16, ca_gmt_offset#17, ca_location_type#18]

(11) WholeStageCodegenTransformer (2)
Input [17]: [hash_partition_key#19, c_customer_sk#1, c_customer_id#2, c_salutation#4, c_first_name#5, c_last_name#6, ca_street_number#8, ca_street_name#9, ca_street_type#10, ca_suite_number#11, ca_city#12, ca_county#13, ca_state#14, ca_zip#15, ca_country#16, ca_gmt_offset#17, ca_location_type#18]
Arguments: false

(12) VeloxResizeBatches
Input [17]: [hash_partition_key#19, c_customer_sk#1, c_customer_id#2, c_salutation#4, c_first_name#5, c_last_name#6, ca_street_number#8, ca_street_name#9, ca_street_type#10, ca_suite_number#11, ca_city#12, ca_county#13, ca_state#14, ca_zip#15, ca_country#16, ca_gmt_offset#17, ca_location_type#18]
Arguments: 1024, 2147483647, 10485760

(13) ColumnarExchange
Input [17]: [hash_partition_key#19, c_customer_sk#1, c_customer_id#2, c_salutation#4, c_first_name#5, c_last_name#6, ca_street_number#8, ca_street_name#9, ca_street_type#10, ca_suite_number#11, ca_city#12, ca_county#13, ca_state#14, ca_zip#15, ca_country#16, ca_gmt_offset#17, ca_location_type#18]
Arguments: hashpartitioning(c_customer_sk#1, 1), ENSURE_REQUIREMENTS, [c_customer_sk#1, c_customer_id#2, c_salutation#4, c_first_name#5, c_last_name#6, ca_street_number#8, ca_street_name#9, ca_street_type#10, ca_suite_number#11, ca_city#12, ca_county#13, ca_state#14, ca_zip#15, ca_country#16, ca_gmt_offset#17, ca_location_type#18], [plan_id=2], [shuffle_writer_type=hash]

(14) InputAdapter
Input [16]: [c_customer_sk#1, c_customer_id#2, c_salutation#4, c_first_name#5, c_last_name#6, ca_street_number#8, ca_street_name#9, ca_street_type#10, ca_suite_number#11, ca_city#12, ca_county#13, ca_state#14, ca_zip#15, ca_country#16, ca_gmt_offset#17, ca_location_type#18]

(15) InputIteratorTransformer
Input [16]: [c_customer_sk#1, c_customer_id#2, c_salutation#4, c_first_name#5, c_last_name#6, ca_street_number#8, ca_street_name#9, ca_street_type#10, ca_suite_number#11, ca_city#12, ca_county#13, ca_state#14, ca_zip#15, ca_country#16, ca_gmt_offset#17, ca_location_type#18]

(16) FileSourceScanExecTransformer parquet spark_catalog.default.catalog_returns
Output [4]: [cr_returning_customer_sk#20, cr_returning_addr_sk#21, cr_return_amt_inc_tax#22, cr_returned_date_sk#23]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(cr_returned_date_sk#23), dynamicpruningexpression(cr_returned_date_sk#23 IN dynamicpruning#24)]
PushedFilters: [IsNotNull(cr_returning_addr_sk), IsNotNull(cr_returning_customer_sk)]
ReadSchema: struct<cr_returning_customer_sk:int,cr_returning_addr_sk:int,cr_return_amt_inc_tax:decimal(7,2)>

(17) FilterExecTransformer
Input [4]: [cr_returning_customer_sk#20, cr_returning_addr_sk#21, cr_return_amt_inc_tax#22, cr_returned_date_sk#23]
Arguments: (isnotnull(cr_returning_addr_sk#21) AND isnotnull(cr_returning_customer_sk#20))

(18) ReusedExchange [Reuses operator id: 105]
Output [1]: [d_date_sk#25]

(19) InputAdapter
Input [1]: [d_date_sk#25]

(20) InputIteratorTransformer
Input [1]: [d_date_sk#25]

(21) BroadcastHashJoinExecTransformer
Left keys [1]: [cr_returned_date_sk#23]
Right keys [1]: [d_date_sk#25]
Join type: Inner
Join condition: None

(22) ProjectExecTransformer
Output [4]: [hash(cr_returning_addr_sk#21, 42) AS hash_partition_key#26, cr_returning_customer_sk#20, cr_returning_addr_sk#21, cr_return_amt_inc_tax#22]
Input [5]: [cr_returning_customer_sk#20, cr_returning_addr_sk#21, cr_return_amt_inc_tax#22, cr_returned_date_sk#23, d_date_sk#25]

(23) WholeStageCodegenTransformer (5)
Input [4]: [hash_partition_key#26, cr_returning_customer_sk#20, cr_returning_addr_sk#21, cr_return_amt_inc_tax#22]
Arguments: false

(24) VeloxResizeBatches
Input [4]: [hash_partition_key#26, cr_returning_customer_sk#20, cr_returning_addr_sk#21, cr_return_amt_inc_tax#22]
Arguments: 1024, 2147483647, 10485760

(25) ColumnarExchange
Input [4]: [hash_partition_key#26, cr_returning_customer_sk#20, cr_returning_addr_sk#21, cr_return_amt_inc_tax#22]
Arguments: hashpartitioning(cr_returning_addr_sk#21, 1), ENSURE_REQUIREMENTS, [cr_returning_customer_sk#20, cr_returning_addr_sk#21, cr_return_amt_inc_tax#22], [plan_id=3], [shuffle_writer_type=hash]

(26) InputAdapter
Input [3]: [cr_returning_customer_sk#20, cr_returning_addr_sk#21, cr_return_amt_inc_tax#22]

(27) InputIteratorTransformer
Input [3]: [cr_returning_customer_sk#20, cr_returning_addr_sk#21, cr_return_amt_inc_tax#22]

(28) FileSourceScanExecTransformer parquet spark_catalog.default.customer_address
Output [2]: [ca_address_sk#27, ca_state#28]
Batched: true
Location: InMemoryFileIndex [{warehouse_dir}/customer_address]
PushedFilters: [IsNotNull(ca_address_sk), IsNotNull(ca_state)]
ReadSchema: struct<ca_address_sk:int,ca_state:string>

(29) FilterExecTransformer
Input [2]: [ca_address_sk#27, ca_state#28]
Arguments: (isnotnull(ca_address_sk#27) AND isnotnull(ca_state#28))

(30) ProjectExecTransformer
Output [3]: [hash(ca_address_sk#27, 42) AS hash_partition_key#29, ca_address_sk#27, ca_state#28]
Input [2]: [ca_address_sk#27, ca_state#28]

(31) WholeStageCodegenTransformer (6)
Input [3]: [hash_partition_key#29, ca_address_sk#27, ca_state#28]
Arguments: false

(32) VeloxResizeBatches
Input [3]: [hash_partition_key#29, ca_address_sk#27, ca_state#28]
Arguments: 1024, 2147483647, 10485760

(33) ColumnarExchange
Input [3]: [hash_partition_key#29, ca_address_sk#27, ca_state#28]
Arguments: hashpartitioning(ca_address_sk#27, 1), ENSURE_REQUIREMENTS, [ca_address_sk#27, ca_state#28], [plan_id=4], [shuffle_writer_type=hash]

(34) InputAdapter
Input [2]: [ca_address_sk#27, ca_state#28]

(35) InputIteratorTransformer
Input [2]: [ca_address_sk#27, ca_state#28]

(36) ShuffledHashJoinExecTransformer
Left keys [1]: [cr_returning_addr_sk#21]
Right keys [1]: [ca_address_sk#27]
Join type: Inner
Join condition: None

(37) ProjectExecTransformer
Output [3]: [cr_returning_customer_sk#20, ca_state#28, UnscaledValue(cr_return_amt_inc_tax#22) AS _pre_1#30]
Input [5]: [cr_returning_customer_sk#20, cr_returning_addr_sk#21, cr_return_amt_inc_tax#22, ca_address_sk#27, ca_state#28]

(38) FlushableHashAggregateExecTransformer
Input [3]: [cr_returning_customer_sk#20, ca_state#28, _pre_1#30]
Keys [2]: [cr_returning_customer_sk#20, ca_state#28]
Functions [1]: [partial_sum(_pre_1#30)]
Aggregate Attributes [1]: [sum#31]
Results [3]: [cr_returning_customer_sk#20, ca_state#28, sum#32]

(39) ProjectExecTransformer
Output [4]: [hash(cr_returning_customer_sk#20, ca_state#28, 42) AS hash_partition_key#33, cr_returning_customer_sk#20, ca_state#28, sum#32]
Input [3]: [cr_returning_customer_sk#20, ca_state#28, sum#32]

(40) WholeStageCodegenTransformer (7)
Input [4]: [hash_partition_key#33, cr_returning_customer_sk#20, ca_state#28, sum#32]
Arguments: false

(41) VeloxResizeBatches
Input [4]: [hash_partition_key#33, cr_returning_customer_sk#20, ca_state#28, sum#32]
Arguments: 1024, 2147483647, 10485760

(42) ColumnarExchange
Input [4]: [hash_partition_key#33, cr_returning_customer_sk#20, ca_state#28, sum#32]
Arguments: hashpartitioning(cr_returning_customer_sk#20, ca_state#28, 1), ENSURE_REQUIREMENTS, [cr_returning_customer_sk#20, ca_state#28, sum#32], [plan_id=5], [shuffle_writer_type=hash]

(43) InputAdapter
Input [3]: [cr_returning_customer_sk#20, ca_state#28, sum#32]

(44) InputIteratorTransformer
Input [3]: [cr_returning_customer_sk#20, ca_state#28, sum#32]

(45) RegularHashAggregateExecTransformer
Input [3]: [cr_returning_customer_sk#20, ca_state#28, sum#32]
Keys [2]: [cr_returning_customer_sk#20, ca_state#28]
Functions [1]: [sum(UnscaledValue(cr_return_amt_inc_tax#22))]
Aggregate Attributes [1]: [sum(UnscaledValue(cr_return_amt_inc_tax#22))#34]
Results [3]: [cr_returning_customer_sk#20, ca_state#28, sum(UnscaledValue(cr_return_amt_inc_tax#22))#34]

(46) ProjectExecTransformer
Output [3]: [cr_returning_customer_sk#20 AS ctr_customer_sk#35, ca_state#28 AS ctr_state#36, MakeDecimal(sum(UnscaledValue(cr_return_amt_inc_tax#22))#34,17,2) AS ctr_total_return#37]
Input [3]: [cr_returning_customer_sk#20, ca_state#28, sum(UnscaledValue(cr_return_amt_inc_tax#22))#34]

(47) FilterExecTransformer
Input [3]: [ctr_customer_sk#35, ctr_state#36, ctr_total_return#37]
Arguments: isnotnull(ctr_total_return#37)

(48) ProjectExecTransformer
Output [4]: [hash(ctr_customer_sk#35, 42) AS hash_partition_key#38, ctr_customer_sk#35, ctr_state#36, ctr_total_return#37]
Input [3]: [ctr_customer_sk#35, ctr_state#36, ctr_total_return#37]

(49) WholeStageCodegenTransformer (8)
Input [4]: [hash_partition_key#38, ctr_customer_sk#35, ctr_state#36, ctr_total_return#37]
Arguments: false

(50) VeloxResizeBatches
Input [4]: [hash_partition_key#38, ctr_customer_sk#35, ctr_state#36, ctr_total_return#37]
Arguments: 1024, 2147483647, 10485760

(51) ColumnarExchange
Input [4]: [hash_partition_key#38, ctr_customer_sk#35, ctr_state#36, ctr_total_return#37]
Arguments: hashpartitioning(ctr_customer_sk#35, 1), ENSURE_REQUIREMENTS, [ctr_customer_sk#35, ctr_state#36, ctr_total_return#37], [plan_id=6], [shuffle_writer_type=hash]

(52) InputAdapter
Input [3]: [ctr_customer_sk#35, ctr_state#36, ctr_total_return#37]

(53) InputIteratorTransformer
Input [3]: [ctr_customer_sk#35, ctr_state#36, ctr_total_return#37]

(54) ShuffledHashJoinExecTransformer
Left keys [1]: [c_customer_sk#1]
Right keys [1]: [ctr_customer_sk#35]
Join type: Inner
Join condition: None

(55) ProjectExecTransformer
Output [17]: [c_customer_id#2, c_salutation#4, c_first_name#5, c_last_name#6, ca_street_number#8, ca_street_name#9, ca_street_type#10, ca_suite_number#11, ca_city#12, ca_county#13, ca_state#14, ca_zip#15, ca_country#16, ca_gmt_offset#17, ca_location_type#18, ctr_state#36, ctr_total_return#37]
Input [19]: [c_customer_sk#1, c_customer_id#2, c_salutation#4, c_first_name#5, c_last_name#6, ca_street_number#8, ca_street_name#9, ca_street_type#10, ca_suite_number#11, ca_city#12, ca_county#13, ca_state#14, ca_zip#15, ca_country#16, ca_gmt_offset#17, ca_location_type#18, ctr_customer_sk#35, ctr_state#36, ctr_total_return#37]

(56) FileSourceScanExecTransformer parquet spark_catalog.default.catalog_returns
Output [4]: [cr_returning_customer_sk#39, cr_returning_addr_sk#40, cr_return_amt_inc_tax#41, cr_returned_date_sk#42]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(cr_returned_date_sk#42), dynamicpruningexpression(cr_returned_date_sk#42 IN dynamicpruning#24)]
PushedFilters: [IsNotNull(cr_returning_addr_sk)]
ReadSchema: struct<cr_returning_customer_sk:int,cr_returning_addr_sk:int,cr_return_amt_inc_tax:decimal(7,2)>

(57) FilterExecTransformer
Input [4]: [cr_returning_customer_sk#39, cr_returning_addr_sk#40, cr_return_amt_inc_tax#41, cr_returned_date_sk#42]
Arguments: isnotnull(cr_returning_addr_sk#40)

(58) ReusedExchange [Reuses operator id: 105]
Output [1]: [d_date_sk#43]

(59) InputAdapter
Input [1]: [d_date_sk#43]

(60) InputIteratorTransformer
Input [1]: [d_date_sk#43]

(61) BroadcastHashJoinExecTransformer
Left keys [1]: [cr_returned_date_sk#42]
Right keys [1]: [d_date_sk#43]
Join type: Inner
Join condition: None

(62) ProjectExecTransformer
Output [4]: [hash(cr_returning_addr_sk#40, 42) AS hash_partition_key#44, cr_returning_customer_sk#39, cr_returning_addr_sk#40, cr_return_amt_inc_tax#41]
Input [5]: [cr_returning_customer_sk#39, cr_returning_addr_sk#40, cr_return_amt_inc_tax#41, cr_returned_date_sk#42, d_date_sk#43]

(63) WholeStageCodegenTransformer (11)
Input [4]: [hash_partition_key#44, cr_returning_customer_sk#39, cr_returning_addr_sk#40, cr_return_amt_inc_tax#41]
Arguments: false

(64) VeloxResizeBatches
Input [4]: [hash_partition_key#44, cr_returning_customer_sk#39, cr_returning_addr_sk#40, cr_return_amt_inc_tax#41]
Arguments: 1024, 2147483647, 10485760

(65) ColumnarExchange
Input [4]: [hash_partition_key#44, cr_returning_customer_sk#39, cr_returning_addr_sk#40, cr_return_amt_inc_tax#41]
Arguments: hashpartitioning(cr_returning_addr_sk#40, 1), ENSURE_REQUIREMENTS, [cr_returning_customer_sk#39, cr_returning_addr_sk#40, cr_return_amt_inc_tax#41], [plan_id=7], [shuffle_writer_type=hash]

(66) InputAdapter
Input [3]: [cr_returning_customer_sk#39, cr_returning_addr_sk#40, cr_return_amt_inc_tax#41]

(67) InputIteratorTransformer
Input [3]: [cr_returning_customer_sk#39, cr_returning_addr_sk#40, cr_return_amt_inc_tax#41]

(68) ReusedExchange [Reuses operator id: 33]
Output [2]: [ca_address_sk#45, ca_state#46]

(69) InputAdapter
Input [2]: [ca_address_sk#45, ca_state#46]

(70) InputIteratorTransformer
Input [2]: [ca_address_sk#45, ca_state#46]

(71) ShuffledHashJoinExecTransformer
Left keys [1]: [cr_returning_addr_sk#40]
Right keys [1]: [ca_address_sk#45]
Join type: Inner
Join condition: None

(72) ProjectExecTransformer
Output [3]: [cr_returning_customer_sk#39, ca_state#46, UnscaledValue(cr_return_amt_inc_tax#41) AS _pre_2#47]
Input [5]: [cr_returning_customer_sk#39, cr_returning_addr_sk#40, cr_return_amt_inc_tax#41, ca_address_sk#45, ca_state#46]

(73) FlushableHashAggregateExecTransformer
Input [3]: [cr_returning_customer_sk#39, ca_state#46, _pre_2#47]
Keys [2]: [cr_returning_customer_sk#39, ca_state#46]
Functions [1]: [partial_sum(_pre_2#47)]
Aggregate Attributes [1]: [sum#48]
Results [3]: [cr_returning_customer_sk#39, ca_state#46, sum#49]

(74) ProjectExecTransformer
Output [4]: [hash(cr_returning_customer_sk#39, ca_state#46, 42) AS hash_partition_key#50, cr_returning_customer_sk#39, ca_state#46, sum#49]
Input [3]: [cr_returning_customer_sk#39, ca_state#46, sum#49]

(75) WholeStageCodegenTransformer (13)
Input [4]: [hash_partition_key#50, cr_returning_customer_sk#39, ca_state#46, sum#49]
Arguments: false

(76) VeloxResizeBatches
Input [4]: [hash_partition_key#50, cr_returning_customer_sk#39, ca_state#46, sum#49]
Arguments: 1024, 2147483647, 10485760

(77) ColumnarExchange
Input [4]: [hash_partition_key#50, cr_returning_customer_sk#39, ca_state#46, sum#49]
Arguments: hashpartitioning(cr_returning_customer_sk#39, ca_state#46, 1), ENSURE_REQUIREMENTS, [cr_returning_customer_sk#39, ca_state#46, sum#49], [plan_id=8], [shuffle_writer_type=hash]

(78) InputAdapter
Input [3]: [cr_returning_customer_sk#39, ca_state#46, sum#49]

(79) InputIteratorTransformer
Input [3]: [cr_returning_customer_sk#39, ca_state#46, sum#49]

(80) RegularHashAggregateExecTransformer
Input [3]: [cr_returning_customer_sk#39, ca_state#46, sum#49]
Keys [2]: [cr_returning_customer_sk#39, ca_state#46]
Functions [1]: [sum(UnscaledValue(cr_return_amt_inc_tax#41))]
Aggregate Attributes [1]: [sum(UnscaledValue(cr_return_amt_inc_tax#41))#34]
Results [3]: [cr_returning_customer_sk#39, ca_state#46, sum(UnscaledValue(cr_return_amt_inc_tax#41))#34]

(81) ProjectExecTransformer
Output [2]: [ca_state#46 AS ctr_state#51, MakeDecimal(sum(UnscaledValue(cr_return_amt_inc_tax#41))#34,17,2) AS ctr_total_return#52]
Input [3]: [cr_returning_customer_sk#39, ca_state#46, sum(UnscaledValue(cr_return_amt_inc_tax#41))#34]

(82) FlushableHashAggregateExecTransformer
Input [2]: [ctr_state#51, ctr_total_return#52]
Keys [1]: [ctr_state#51]
Functions [1]: [partial_avg(ctr_total_return#52)]
Aggregate Attributes [2]: [sum#53, count#54]
Results [3]: [ctr_state#51, sum#55, count#56]

(83) ProjectExecTransformer
Output [4]: [hash(ctr_state#51, 42) AS hash_partition_key#57, ctr_state#51, sum#55, count#56]
Input [3]: [ctr_state#51, sum#55, count#56]

(84) WholeStageCodegenTransformer (14)
Input [4]: [hash_partition_key#57, ctr_state#51, sum#55, count#56]
Arguments: false

(85) VeloxResizeBatches
Input [4]: [hash_partition_key#57, ctr_state#51, sum#55, count#56]
Arguments: 1024, 2147483647, 10485760

(86) ColumnarExchange
Input [4]: [hash_partition_key#57, ctr_state#51, sum#55, count#56]
Arguments: hashpartitioning(ctr_state#51, 1), ENSURE_REQUIREMENTS, [ctr_state#51, sum#55, count#56], [plan_id=9], [shuffle_writer_type=hash]

(87) InputAdapter
Input [3]: [ctr_state#51, sum#55, count#56]

(88) InputIteratorTransformer
Input [3]: [ctr_state#51, sum#55, count#56]

(89) RegularHashAggregateExecTransformer
Input [3]: [ctr_state#51, sum#55, count#56]
Keys [1]: [ctr_state#51]
Functions [1]: [avg(ctr_total_return#52)]
Aggregate Attributes [1]: [avg(ctr_total_return#52)#58]
Results [2]: [ctr_state#51, avg(ctr_total_return#52)#58]

(90) ProjectExecTransformer
Output [2]: [(avg(ctr_total_return#52)#58 * 1.2) AS (avg(ctr_total_return) * 1.2)#59, ctr_state#51]
Input [2]: [ctr_state#51, avg(ctr_total_return#52)#58]

(91) FilterExecTransformer
Input [2]: [(avg(ctr_total_return) * 1.2)#59, ctr_state#51]
Arguments: isnotnull((avg(ctr_total_return) * 1.2)#59)

(92) WholeStageCodegenTransformer (15)
Input [2]: [(avg(ctr_total_return) * 1.2)#59, ctr_state#51]
Arguments: false

(93) ColumnarBroadcastExchange
Input [2]: [(avg(ctr_total_return) * 1.2)#59, ctr_state#51]
Arguments: HashedRelationBroadcastMode(List(input[1, string, true]),false), [plan_id=10]

(94) InputAdapter
Input [2]: [(avg(ctr_total_return) * 1.2)#59, ctr_state#51]

(95) InputIteratorTransformer
Input [2]: [(avg(ctr_total_return) * 1.2)#59, ctr_state#51]

(96) BroadcastHashJoinExecTransformer
Left keys [1]: [ctr_state#36]
Right keys [1]: [ctr_state#51]
Join type: Inner
Join condition: (cast(ctr_total_return#37 as decimal(24,7)) > (avg(ctr_total_return) * 1.2)#59)

(97) ProjectExecTransformer
Output [16]: [c_customer_id#2, c_salutation#4, c_first_name#5, c_last_name#6, ca_street_number#8, ca_street_name#9, ca_street_type#10, ca_suite_number#11, ca_city#12, ca_county#13, ca_state#14, ca_zip#15, ca_country#16, ca_gmt_offset#17, ca_location_type#18, ctr_total_return#37]
Input [19]: [c_customer_id#2, c_salutation#4, c_first_name#5, c_last_name#6, ca_street_number#8, ca_street_name#9, ca_street_type#10, ca_suite_number#11, ca_city#12, ca_county#13, ca_state#14, ca_zip#15, ca_country#16, ca_gmt_offset#17, ca_location_type#18, ctr_state#36, ctr_total_return#37, (avg(ctr_total_return) * 1.2)#59, ctr_state#51]

(98) WholeStageCodegenTransformer (16)
Input [16]: [c_customer_id#2, c_salutation#4, c_first_name#5, c_last_name#6, ca_street_number#8, ca_street_name#9, ca_street_type#10, ca_suite_number#11, ca_city#12, ca_county#13, ca_state#14, ca_zip#15, ca_country#16, ca_gmt_offset#17, ca_location_type#18, ctr_total_return#37]
Arguments: false

(99) TakeOrderedAndProjectExecTransformer
Input [16]: [c_customer_id#2, c_salutation#4, c_first_name#5, c_last_name#6, ca_street_number#8, ca_street_name#9, ca_street_type#10, ca_suite_number#11, ca_city#12, ca_county#13, ca_state#14, ca_zip#15, ca_country#16, ca_gmt_offset#17, ca_location_type#18, ctr_total_return#37]
Arguments: 100, [c_customer_id#2 ASC NULLS FIRST, c_salutation#4 ASC NULLS FIRST, c_first_name#5 ASC NULLS FIRST, c_last_name#6 ASC NULLS FIRST, ca_street_number#8 ASC NULLS FIRST, ca_street_name#9 ASC NULLS FIRST, ca_street_type#10 ASC NULLS FIRST, ca_suite_number#11 ASC NULLS FIRST, ca_city#12 ASC NULLS FIRST, ca_county#13 ASC NULLS FIRST, ca_state#14 ASC NULLS FIRST, ca_zip#15 ASC NULLS FIRST, ca_country#16 ASC NULLS FIRST, ca_gmt_offset#17 ASC NULLS FIRST, ca_location_type#18 ASC NULLS FIRST, ctr_total_return#37 ASC NULLS FIRST], [c_customer_id#2, c_salutation#4, c_first_name#5, c_last_name#6, ca_street_number#8, ca_street_name#9, ca_street_type#10, ca_suite_number#11, ca_city#12, ca_county#13, ca_state#14, ca_zip#15, ca_country#16, ca_gmt_offset#17, ca_location_type#18, ctr_total_return#37], 0

(100) VeloxColumnarToRow
Input [16]: [c_customer_id#2, c_salutation#4, c_first_name#5, c_last_name#6, ca_street_number#8, ca_street_name#9, ca_street_type#10, ca_suite_number#11, ca_city#12, ca_county#13, ca_state#14, ca_zip#15, ca_country#16, ca_gmt_offset#17, ca_location_type#18, ctr_total_return#37]

===== Subqueries =====

Subquery:1 Hosting operator id = 16 Hosting Expression = cr_returned_date_sk#23 IN dynamicpruning#24
ColumnarBroadcastExchange (105)
+- ^ ProjectExecTransformer (103)
   +- ^ FilterExecTransformer (102)
      +- ^ FileSourceScanExecTransformer parquet spark_catalog.default.date_dim (101)


(101) FileSourceScanExecTransformer parquet spark_catalog.default.date_dim
Output [2]: [d_date_sk#25, d_year#60]
Batched: true
Location: InMemoryFileIndex [{warehouse_dir}/date_dim]
PushedFilters: [IsNotNull(d_year), EqualTo(d_year,2000), IsNotNull(d_date_sk)]
ReadSchema: struct<d_date_sk:int,d_year:int>

(102) FilterExecTransformer
Input [2]: [d_date_sk#25, d_year#60]
Arguments: ((isnotnull(d_year#60) AND (d_year#60 = 2000)) AND isnotnull(d_date_sk#25))

(103) ProjectExecTransformer
Output [1]: [d_date_sk#25]
Input [2]: [d_date_sk#25, d_year#60]

(104) WholeStageCodegenTransformer (3)
Input [1]: [d_date_sk#25]
Arguments: false

(105) ColumnarBroadcastExchange
Input [1]: [d_date_sk#25]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, true] as bigint)),false), [plan_id=11]

Subquery:2 Hosting operator id = 56 Hosting Expression = cr_returned_date_sk#42 IN dynamicpruning#24


