== Physical Plan ==
VeloxColumnarToRow (179)
+- TakeOrderedAndProjectExecTransformer (178)
   +- ^ ProjectExecTransformer (176)
      +- ^ BroadcastHashJoinExecTransformer Inner BuildRight (175)
         :- ^ ProjectExecTransformer (146)
         :  +- ^ BroadcastHashJoinExecTransformer Inner BuildRight (145)
         :     :- ^ ProjectExecTransformer (115)
         :     :  +- ^ BroadcastHashJoinExecTransformer Inner BuildRight (114)
         :     :     :- ^ ProjectExecTransformer (85)
         :     :     :  +- ^ BroadcastHashJoinExecTransformer Inner BuildRight (84)
         :     :     :     :- ^ BroadcastHashJoinExecTransformer Inner BuildRight (54)
         :     :     :     :  :- ^ FilterExecTransformer (25)
         :     :     :     :  :  +- ^ ProjectExecTransformer (24)
         :     :     :     :  :     +- ^ RegularHashAggregateExecTransformer (23)
         :     :     :     :  :        +- ^ InputIteratorTransformer (22)
         :     :     :     :  :           +- ColumnarExchange (20)
         :     :     :     :  :              +- VeloxResizeBatches (19)
         :     :     :     :  :                 +- ^ ProjectExecTransformer (17)
         :     :     :     :  :                    +- ^ FlushableHashAggregateExecTransformer (16)
         :     :     :     :  :                       +- ^ ProjectExecTransformer (15)
         :     :     :     :  :                          +- ^ BroadcastHashJoinExecTransformer Inner BuildRight (14)
         :     :     :     :  :                             :- ^ 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.store_sales (3)
         :     :     :     :  :                             +- ^ InputIteratorTransformer (13)
         :     :     :     :  :                                +- ReusedExchange (11)
         :     :     :     :  +- ^ InputIteratorTransformer (53)
         :     :     :     :     +- ColumnarBroadcastExchange (51)
         :     :     :     :        +- ^ ProjectExecTransformer (49)
         :     :     :     :           +- ^ RegularHashAggregateExecTransformer (48)
         :     :     :     :              +- ^ InputIteratorTransformer (47)
         :     :     :     :                 +- ColumnarExchange (45)
         :     :     :     :                    +- VeloxResizeBatches (44)
         :     :     :     :                       +- ^ ProjectExecTransformer (42)
         :     :     :     :                          +- ^ FlushableHashAggregateExecTransformer (41)
         :     :     :     :                             +- ^ ProjectExecTransformer (40)
         :     :     :     :                                +- ^ BroadcastHashJoinExecTransformer Inner BuildRight (39)
         :     :     :     :                                   :- ^ ProjectExecTransformer (35)
         :     :     :     :                                   :  +- ^ BroadcastHashJoinExecTransformer Inner BuildRight (34)
         :     :     :     :                                   :     :- ^ FilterExecTransformer (27)
         :     :     :     :                                   :     :  +- ^ FileSourceScanExecTransformer parquet spark_catalog.default.customer (26)
         :     :     :     :                                   :     +- ^ InputIteratorTransformer (33)
         :     :     :     :                                   :        +- ColumnarBroadcastExchange (31)
         :     :     :     :                                   :           +- ^ FilterExecTransformer (29)
         :     :     :     :                                   :              +- ^ FileSourceScanExecTransformer parquet spark_catalog.default.store_sales (28)
         :     :     :     :                                   +- ^ InputIteratorTransformer (38)
         :     :     :     :                                      +- ReusedExchange (36)
         :     :     :     +- ^ InputIteratorTransformer (83)
         :     :     :        +- ColumnarBroadcastExchange (81)
         :     :     :           +- ^ FilterExecTransformer (79)
         :     :     :              +- ^ ProjectExecTransformer (78)
         :     :     :                 +- ^ RegularHashAggregateExecTransformer (77)
         :     :     :                    +- ^ InputIteratorTransformer (76)
         :     :     :                       +- ColumnarExchange (74)
         :     :     :                          +- VeloxResizeBatches (73)
         :     :     :                             +- ^ ProjectExecTransformer (71)
         :     :     :                                +- ^ FlushableHashAggregateExecTransformer (70)
         :     :     :                                   +- ^ ProjectExecTransformer (69)
         :     :     :                                      +- ^ BroadcastHashJoinExecTransformer Inner BuildRight (68)
         :     :     :                                         :- ^ ProjectExecTransformer (64)
         :     :     :                                         :  +- ^ BroadcastHashJoinExecTransformer Inner BuildRight (63)
         :     :     :                                         :     :- ^ FilterExecTransformer (56)
         :     :     :                                         :     :  +- ^ FileSourceScanExecTransformer parquet spark_catalog.default.customer (55)
         :     :     :                                         :     +- ^ InputIteratorTransformer (62)
         :     :     :                                         :        +- ColumnarBroadcastExchange (60)
         :     :     :                                         :           +- ^ FilterExecTransformer (58)
         :     :     :                                         :              +- ^ FileSourceScanExecTransformer parquet spark_catalog.default.catalog_sales (57)
         :     :     :                                         +- ^ InputIteratorTransformer (67)
         :     :     :                                            +- ReusedExchange (65)
         :     :     +- ^ InputIteratorTransformer (113)
         :     :        +- ColumnarBroadcastExchange (111)
         :     :           +- ^ ProjectExecTransformer (109)
         :     :              +- ^ RegularHashAggregateExecTransformer (108)
         :     :                 +- ^ InputIteratorTransformer (107)
         :     :                    +- ColumnarExchange (105)
         :     :                       +- VeloxResizeBatches (104)
         :     :                          +- ^ ProjectExecTransformer (102)
         :     :                             +- ^ FlushableHashAggregateExecTransformer (101)
         :     :                                +- ^ ProjectExecTransformer (100)
         :     :                                   +- ^ BroadcastHashJoinExecTransformer Inner BuildRight (99)
         :     :                                      :- ^ ProjectExecTransformer (95)
         :     :                                      :  +- ^ BroadcastHashJoinExecTransformer Inner BuildRight (94)
         :     :                                      :     :- ^ FilterExecTransformer (87)
         :     :                                      :     :  +- ^ FileSourceScanExecTransformer parquet spark_catalog.default.customer (86)
         :     :                                      :     +- ^ InputIteratorTransformer (93)
         :     :                                      :        +- ColumnarBroadcastExchange (91)
         :     :                                      :           +- ^ FilterExecTransformer (89)
         :     :                                      :              +- ^ FileSourceScanExecTransformer parquet spark_catalog.default.catalog_sales (88)
         :     :                                      +- ^ InputIteratorTransformer (98)
         :     :                                         +- ReusedExchange (96)
         :     +- ^ InputIteratorTransformer (144)
         :        +- ColumnarBroadcastExchange (142)
         :           +- ^ FilterExecTransformer (140)
         :              +- ^ ProjectExecTransformer (139)
         :                 +- ^ RegularHashAggregateExecTransformer (138)
         :                    +- ^ InputIteratorTransformer (137)
         :                       +- ColumnarExchange (135)
         :                          +- VeloxResizeBatches (134)
         :                             +- ^ ProjectExecTransformer (132)
         :                                +- ^ FlushableHashAggregateExecTransformer (131)
         :                                   +- ^ ProjectExecTransformer (130)
         :                                      +- ^ BroadcastHashJoinExecTransformer Inner BuildRight (129)
         :                                         :- ^ ProjectExecTransformer (125)
         :                                         :  +- ^ BroadcastHashJoinExecTransformer Inner BuildRight (124)
         :                                         :     :- ^ FilterExecTransformer (117)
         :                                         :     :  +- ^ FileSourceScanExecTransformer parquet spark_catalog.default.customer (116)
         :                                         :     +- ^ InputIteratorTransformer (123)
         :                                         :        +- ColumnarBroadcastExchange (121)
         :                                         :           +- ^ FilterExecTransformer (119)
         :                                         :              +- ^ FileSourceScanExecTransformer parquet spark_catalog.default.web_sales (118)
         :                                         +- ^ InputIteratorTransformer (128)
         :                                            +- ReusedExchange (126)
         +- ^ InputIteratorTransformer (174)
            +- ColumnarBroadcastExchange (172)
               +- ^ ProjectExecTransformer (170)
                  +- ^ RegularHashAggregateExecTransformer (169)
                     +- ^ InputIteratorTransformer (168)
                        +- ColumnarExchange (166)
                           +- VeloxResizeBatches (165)
                              +- ^ ProjectExecTransformer (163)
                                 +- ^ FlushableHashAggregateExecTransformer (162)
                                    +- ^ ProjectExecTransformer (161)
                                       +- ^ BroadcastHashJoinExecTransformer Inner BuildRight (160)
                                          :- ^ ProjectExecTransformer (156)
                                          :  +- ^ BroadcastHashJoinExecTransformer Inner BuildRight (155)
                                          :     :- ^ FilterExecTransformer (148)
                                          :     :  +- ^ FileSourceScanExecTransformer parquet spark_catalog.default.customer (147)
                                          :     +- ^ InputIteratorTransformer (154)
                                          :        +- ColumnarBroadcastExchange (152)
                                          :           +- ^ FilterExecTransformer (150)
                                          :              +- ^ FileSourceScanExecTransformer parquet spark_catalog.default.web_sales (149)
                                          +- ^ InputIteratorTransformer (159)
                                             +- ReusedExchange (157)


(1) FileSourceScanExecTransformer parquet spark_catalog.default.customer
Output [8]: [c_customer_sk#1, c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8]
Batched: true
Location: InMemoryFileIndex [{warehouse_dir}/customer]
PushedFilters: [IsNotNull(c_customer_sk), IsNotNull(c_customer_id)]
ReadSchema: struct<c_customer_sk:int,c_customer_id:string,c_first_name:string,c_last_name:string,c_preferred_cust_flag:string,c_birth_country:string,c_login:string,c_email_address:string>

(2) FilterExecTransformer
Input [8]: [c_customer_sk#1, c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8]
Arguments: (isnotnull(c_customer_sk#1) AND isnotnull(c_customer_id#2))

(3) FileSourceScanExecTransformer parquet spark_catalog.default.store_sales
Output [6]: [ss_customer_sk#9, ss_ext_discount_amt#10, ss_ext_sales_price#11, ss_ext_wholesale_cost#12, ss_ext_list_price#13, ss_sold_date_sk#14]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(ss_sold_date_sk#14), dynamicpruningexpression(ss_sold_date_sk#14 IN dynamicpruning#15)]
PushedFilters: [IsNotNull(ss_customer_sk)]
ReadSchema: struct<ss_customer_sk:int,ss_ext_discount_amt:decimal(7,2),ss_ext_sales_price:decimal(7,2),ss_ext_wholesale_cost:decimal(7,2),ss_ext_list_price:decimal(7,2)>

(4) FilterExecTransformer
Input [6]: [ss_customer_sk#9, ss_ext_discount_amt#10, ss_ext_sales_price#11, ss_ext_wholesale_cost#12, ss_ext_list_price#13, ss_sold_date_sk#14]
Arguments: isnotnull(ss_customer_sk#9)

(5) WholeStageCodegenTransformer (2)
Input [6]: [ss_customer_sk#9, ss_ext_discount_amt#10, ss_ext_sales_price#11, ss_ext_wholesale_cost#12, ss_ext_list_price#13, ss_sold_date_sk#14]
Arguments: false

(6) ColumnarBroadcastExchange
Input [6]: [ss_customer_sk#9, ss_ext_discount_amt#10, ss_ext_sales_price#11, ss_ext_wholesale_cost#12, ss_ext_list_price#13, ss_sold_date_sk#14]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, false] as bigint)),false), [plan_id=1]

(7) InputAdapter
Input [6]: [ss_customer_sk#9, ss_ext_discount_amt#10, ss_ext_sales_price#11, ss_ext_wholesale_cost#12, ss_ext_list_price#13, ss_sold_date_sk#14]

(8) InputIteratorTransformer
Input [6]: [ss_customer_sk#9, ss_ext_discount_amt#10, ss_ext_sales_price#11, ss_ext_wholesale_cost#12, ss_ext_list_price#13, ss_sold_date_sk#14]

(9) BroadcastHashJoinExecTransformer
Left keys [1]: [c_customer_sk#1]
Right keys [1]: [ss_customer_sk#9]
Join type: Inner
Join condition: None

(10) ProjectExecTransformer
Output [12]: [c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, ss_ext_discount_amt#10, ss_ext_sales_price#11, ss_ext_wholesale_cost#12, ss_ext_list_price#13, ss_sold_date_sk#14]
Input [14]: [c_customer_sk#1, c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, ss_customer_sk#9, ss_ext_discount_amt#10, ss_ext_sales_price#11, ss_ext_wholesale_cost#12, ss_ext_list_price#13, ss_sold_date_sk#14]

(11) ReusedExchange [Reuses operator id: 183]
Output [2]: [d_date_sk#16, d_year#17]

(12) InputAdapter
Input [2]: [d_date_sk#16, d_year#17]

(13) InputIteratorTransformer
Input [2]: [d_date_sk#16, d_year#17]

(14) BroadcastHashJoinExecTransformer
Left keys [1]: [ss_sold_date_sk#14]
Right keys [1]: [d_date_sk#16]
Join type: Inner
Join condition: None

(15) ProjectExecTransformer
Output [9]: [c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, d_year#17, ((((ss_ext_list_price#13 - ss_ext_wholesale_cost#12) - ss_ext_discount_amt#10) + ss_ext_sales_price#11) / 2) AS _pre_1#18]
Input [14]: [c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, ss_ext_discount_amt#10, ss_ext_sales_price#11, ss_ext_wholesale_cost#12, ss_ext_list_price#13, ss_sold_date_sk#14, d_date_sk#16, d_year#17]

(16) FlushableHashAggregateExecTransformer
Input [9]: [c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, d_year#17, _pre_1#18]
Keys [8]: [c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, d_year#17]
Functions [1]: [partial_sum(_pre_1#18)]
Aggregate Attributes [2]: [sum#19, isEmpty#20]
Results [10]: [c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, d_year#17, sum#21, isEmpty#22]

(17) ProjectExecTransformer
Output [11]: [hash(c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, d_year#17, 42) AS hash_partition_key#23, c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, d_year#17, sum#21, isEmpty#22]
Input [10]: [c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, d_year#17, sum#21, isEmpty#22]

(18) WholeStageCodegenTransformer (4)
Input [11]: [hash_partition_key#23, c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, d_year#17, sum#21, isEmpty#22]
Arguments: false

(19) VeloxResizeBatches
Input [11]: [hash_partition_key#23, c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, d_year#17, sum#21, isEmpty#22]
Arguments: 1024, 2147483647, 10485760

(20) ColumnarExchange
Input [11]: [hash_partition_key#23, c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, d_year#17, sum#21, isEmpty#22]
Arguments: hashpartitioning(c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, d_year#17, 1), ENSURE_REQUIREMENTS, [c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, d_year#17, sum#21, isEmpty#22], [plan_id=2], [shuffle_writer_type=hash]

(21) InputAdapter
Input [10]: [c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, d_year#17, sum#21, isEmpty#22]

(22) InputIteratorTransformer
Input [10]: [c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, d_year#17, sum#21, isEmpty#22]

(23) RegularHashAggregateExecTransformer
Input [10]: [c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, d_year#17, sum#21, isEmpty#22]
Keys [8]: [c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, d_year#17]
Functions [1]: [sum(((((ss_ext_list_price#13 - ss_ext_wholesale_cost#12) - ss_ext_discount_amt#10) + ss_ext_sales_price#11) / 2))]
Aggregate Attributes [1]: [sum(((((ss_ext_list_price#13 - ss_ext_wholesale_cost#12) - ss_ext_discount_amt#10) + ss_ext_sales_price#11) / 2))#24]
Results [9]: [c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, d_year#17, sum(((((ss_ext_list_price#13 - ss_ext_wholesale_cost#12) - ss_ext_discount_amt#10) + ss_ext_sales_price#11) / 2))#24]

(24) ProjectExecTransformer
Output [2]: [c_customer_id#2 AS customer_id#25, sum(((((ss_ext_list_price#13 - ss_ext_wholesale_cost#12) - ss_ext_discount_amt#10) + ss_ext_sales_price#11) / 2))#24 AS year_total#26]
Input [9]: [c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, d_year#17, sum(((((ss_ext_list_price#13 - ss_ext_wholesale_cost#12) - ss_ext_discount_amt#10) + ss_ext_sales_price#11) / 2))#24]

(25) FilterExecTransformer
Input [2]: [customer_id#25, year_total#26]
Arguments: (isnotnull(year_total#26) AND (year_total#26 > 0.000000))

(26) FileSourceScanExecTransformer parquet spark_catalog.default.customer
Output [8]: [c_customer_sk#27, c_customer_id#28, c_first_name#29, c_last_name#30, c_preferred_cust_flag#31, c_birth_country#32, c_login#33, c_email_address#34]
Batched: true
Location: InMemoryFileIndex [{warehouse_dir}/customer]
PushedFilters: [IsNotNull(c_customer_sk), IsNotNull(c_customer_id)]
ReadSchema: struct<c_customer_sk:int,c_customer_id:string,c_first_name:string,c_last_name:string,c_preferred_cust_flag:string,c_birth_country:string,c_login:string,c_email_address:string>

(27) FilterExecTransformer
Input [8]: [c_customer_sk#27, c_customer_id#28, c_first_name#29, c_last_name#30, c_preferred_cust_flag#31, c_birth_country#32, c_login#33, c_email_address#34]
Arguments: (isnotnull(c_customer_sk#27) AND isnotnull(c_customer_id#28))

(28) FileSourceScanExecTransformer parquet spark_catalog.default.store_sales
Output [6]: [ss_customer_sk#35, ss_ext_discount_amt#36, ss_ext_sales_price#37, ss_ext_wholesale_cost#38, ss_ext_list_price#39, ss_sold_date_sk#40]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(ss_sold_date_sk#40), dynamicpruningexpression(ss_sold_date_sk#40 IN dynamicpruning#41)]
PushedFilters: [IsNotNull(ss_customer_sk)]
ReadSchema: struct<ss_customer_sk:int,ss_ext_discount_amt:decimal(7,2),ss_ext_sales_price:decimal(7,2),ss_ext_wholesale_cost:decimal(7,2),ss_ext_list_price:decimal(7,2)>

(29) FilterExecTransformer
Input [6]: [ss_customer_sk#35, ss_ext_discount_amt#36, ss_ext_sales_price#37, ss_ext_wholesale_cost#38, ss_ext_list_price#39, ss_sold_date_sk#40]
Arguments: isnotnull(ss_customer_sk#35)

(30) WholeStageCodegenTransformer (6)
Input [6]: [ss_customer_sk#35, ss_ext_discount_amt#36, ss_ext_sales_price#37, ss_ext_wholesale_cost#38, ss_ext_list_price#39, ss_sold_date_sk#40]
Arguments: false

(31) ColumnarBroadcastExchange
Input [6]: [ss_customer_sk#35, ss_ext_discount_amt#36, ss_ext_sales_price#37, ss_ext_wholesale_cost#38, ss_ext_list_price#39, ss_sold_date_sk#40]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, false] as bigint)),false), [plan_id=3]

(32) InputAdapter
Input [6]: [ss_customer_sk#35, ss_ext_discount_amt#36, ss_ext_sales_price#37, ss_ext_wholesale_cost#38, ss_ext_list_price#39, ss_sold_date_sk#40]

(33) InputIteratorTransformer
Input [6]: [ss_customer_sk#35, ss_ext_discount_amt#36, ss_ext_sales_price#37, ss_ext_wholesale_cost#38, ss_ext_list_price#39, ss_sold_date_sk#40]

(34) BroadcastHashJoinExecTransformer
Left keys [1]: [c_customer_sk#27]
Right keys [1]: [ss_customer_sk#35]
Join type: Inner
Join condition: None

(35) ProjectExecTransformer
Output [12]: [c_customer_id#28, c_first_name#29, c_last_name#30, c_preferred_cust_flag#31, c_birth_country#32, c_login#33, c_email_address#34, ss_ext_discount_amt#36, ss_ext_sales_price#37, ss_ext_wholesale_cost#38, ss_ext_list_price#39, ss_sold_date_sk#40]
Input [14]: [c_customer_sk#27, c_customer_id#28, c_first_name#29, c_last_name#30, c_preferred_cust_flag#31, c_birth_country#32, c_login#33, c_email_address#34, ss_customer_sk#35, ss_ext_discount_amt#36, ss_ext_sales_price#37, ss_ext_wholesale_cost#38, ss_ext_list_price#39, ss_sold_date_sk#40]

(36) ReusedExchange [Reuses operator id: 187]
Output [2]: [d_date_sk#42, d_year#43]

(37) InputAdapter
Input [2]: [d_date_sk#42, d_year#43]

(38) InputIteratorTransformer
Input [2]: [d_date_sk#42, d_year#43]

(39) BroadcastHashJoinExecTransformer
Left keys [1]: [ss_sold_date_sk#40]
Right keys [1]: [d_date_sk#42]
Join type: Inner
Join condition: None

(40) ProjectExecTransformer
Output [9]: [c_customer_id#28, c_first_name#29, c_last_name#30, c_preferred_cust_flag#31, c_birth_country#32, c_login#33, c_email_address#34, d_year#43, ((((ss_ext_list_price#39 - ss_ext_wholesale_cost#38) - ss_ext_discount_amt#36) + ss_ext_sales_price#37) / 2) AS _pre_2#44]
Input [14]: [c_customer_id#28, c_first_name#29, c_last_name#30, c_preferred_cust_flag#31, c_birth_country#32, c_login#33, c_email_address#34, ss_ext_discount_amt#36, ss_ext_sales_price#37, ss_ext_wholesale_cost#38, ss_ext_list_price#39, ss_sold_date_sk#40, d_date_sk#42, d_year#43]

(41) FlushableHashAggregateExecTransformer
Input [9]: [c_customer_id#28, c_first_name#29, c_last_name#30, c_preferred_cust_flag#31, c_birth_country#32, c_login#33, c_email_address#34, d_year#43, _pre_2#44]
Keys [8]: [c_customer_id#28, c_first_name#29, c_last_name#30, c_preferred_cust_flag#31, c_birth_country#32, c_login#33, c_email_address#34, d_year#43]
Functions [1]: [partial_sum(_pre_2#44)]
Aggregate Attributes [2]: [sum#45, isEmpty#46]
Results [10]: [c_customer_id#28, c_first_name#29, c_last_name#30, c_preferred_cust_flag#31, c_birth_country#32, c_login#33, c_email_address#34, d_year#43, sum#47, isEmpty#48]

(42) ProjectExecTransformer
Output [11]: [hash(c_customer_id#28, c_first_name#29, c_last_name#30, c_preferred_cust_flag#31, c_birth_country#32, c_login#33, c_email_address#34, d_year#43, 42) AS hash_partition_key#49, c_customer_id#28, c_first_name#29, c_last_name#30, c_preferred_cust_flag#31, c_birth_country#32, c_login#33, c_email_address#34, d_year#43, sum#47, isEmpty#48]
Input [10]: [c_customer_id#28, c_first_name#29, c_last_name#30, c_preferred_cust_flag#31, c_birth_country#32, c_login#33, c_email_address#34, d_year#43, sum#47, isEmpty#48]

(43) WholeStageCodegenTransformer (8)
Input [11]: [hash_partition_key#49, c_customer_id#28, c_first_name#29, c_last_name#30, c_preferred_cust_flag#31, c_birth_country#32, c_login#33, c_email_address#34, d_year#43, sum#47, isEmpty#48]
Arguments: false

(44) VeloxResizeBatches
Input [11]: [hash_partition_key#49, c_customer_id#28, c_first_name#29, c_last_name#30, c_preferred_cust_flag#31, c_birth_country#32, c_login#33, c_email_address#34, d_year#43, sum#47, isEmpty#48]
Arguments: 1024, 2147483647, 10485760

(45) ColumnarExchange
Input [11]: [hash_partition_key#49, c_customer_id#28, c_first_name#29, c_last_name#30, c_preferred_cust_flag#31, c_birth_country#32, c_login#33, c_email_address#34, d_year#43, sum#47, isEmpty#48]
Arguments: hashpartitioning(c_customer_id#28, c_first_name#29, c_last_name#30, c_preferred_cust_flag#31, c_birth_country#32, c_login#33, c_email_address#34, d_year#43, 1), ENSURE_REQUIREMENTS, [c_customer_id#28, c_first_name#29, c_last_name#30, c_preferred_cust_flag#31, c_birth_country#32, c_login#33, c_email_address#34, d_year#43, sum#47, isEmpty#48], [plan_id=4], [shuffle_writer_type=hash]

(46) InputAdapter
Input [10]: [c_customer_id#28, c_first_name#29, c_last_name#30, c_preferred_cust_flag#31, c_birth_country#32, c_login#33, c_email_address#34, d_year#43, sum#47, isEmpty#48]

(47) InputIteratorTransformer
Input [10]: [c_customer_id#28, c_first_name#29, c_last_name#30, c_preferred_cust_flag#31, c_birth_country#32, c_login#33, c_email_address#34, d_year#43, sum#47, isEmpty#48]

(48) RegularHashAggregateExecTransformer
Input [10]: [c_customer_id#28, c_first_name#29, c_last_name#30, c_preferred_cust_flag#31, c_birth_country#32, c_login#33, c_email_address#34, d_year#43, sum#47, isEmpty#48]
Keys [8]: [c_customer_id#28, c_first_name#29, c_last_name#30, c_preferred_cust_flag#31, c_birth_country#32, c_login#33, c_email_address#34, d_year#43]
Functions [1]: [sum(((((ss_ext_list_price#39 - ss_ext_wholesale_cost#38) - ss_ext_discount_amt#36) + ss_ext_sales_price#37) / 2))]
Aggregate Attributes [1]: [sum(((((ss_ext_list_price#39 - ss_ext_wholesale_cost#38) - ss_ext_discount_amt#36) + ss_ext_sales_price#37) / 2))#24]
Results [9]: [c_customer_id#28, c_first_name#29, c_last_name#30, c_preferred_cust_flag#31, c_birth_country#32, c_login#33, c_email_address#34, d_year#43, sum(((((ss_ext_list_price#39 - ss_ext_wholesale_cost#38) - ss_ext_discount_amt#36) + ss_ext_sales_price#37) / 2))#24]

(49) ProjectExecTransformer
Output [8]: [c_customer_id#28 AS customer_id#50, c_first_name#29 AS customer_first_name#51, c_last_name#30 AS customer_last_name#52, c_preferred_cust_flag#31 AS customer_preferred_cust_flag#53, c_birth_country#32 AS customer_birth_country#54, c_login#33 AS customer_login#55, c_email_address#34 AS customer_email_address#56, sum(((((ss_ext_list_price#39 - ss_ext_wholesale_cost#38) - ss_ext_discount_amt#36) + ss_ext_sales_price#37) / 2))#24 AS year_total#57]
Input [9]: [c_customer_id#28, c_first_name#29, c_last_name#30, c_preferred_cust_flag#31, c_birth_country#32, c_login#33, c_email_address#34, d_year#43, sum(((((ss_ext_list_price#39 - ss_ext_wholesale_cost#38) - ss_ext_discount_amt#36) + ss_ext_sales_price#37) / 2))#24]

(50) WholeStageCodegenTransformer (9)
Input [8]: [customer_id#50, customer_first_name#51, customer_last_name#52, customer_preferred_cust_flag#53, customer_birth_country#54, customer_login#55, customer_email_address#56, year_total#57]
Arguments: false

(51) ColumnarBroadcastExchange
Input [8]: [customer_id#50, customer_first_name#51, customer_last_name#52, customer_preferred_cust_flag#53, customer_birth_country#54, customer_login#55, customer_email_address#56, year_total#57]
Arguments: HashedRelationBroadcastMode(List(input[0, string, true]),false), [plan_id=5]

(52) InputAdapter
Input [8]: [customer_id#50, customer_first_name#51, customer_last_name#52, customer_preferred_cust_flag#53, customer_birth_country#54, customer_login#55, customer_email_address#56, year_total#57]

(53) InputIteratorTransformer
Input [8]: [customer_id#50, customer_first_name#51, customer_last_name#52, customer_preferred_cust_flag#53, customer_birth_country#54, customer_login#55, customer_email_address#56, year_total#57]

(54) BroadcastHashJoinExecTransformer
Left keys [1]: [customer_id#25]
Right keys [1]: [customer_id#50]
Join type: Inner
Join condition: None

(55) FileSourceScanExecTransformer parquet spark_catalog.default.customer
Output [8]: [c_customer_sk#58, c_customer_id#59, c_first_name#60, c_last_name#61, c_preferred_cust_flag#62, c_birth_country#63, c_login#64, c_email_address#65]
Batched: true
Location: InMemoryFileIndex [{warehouse_dir}/customer]
PushedFilters: [IsNotNull(c_customer_sk), IsNotNull(c_customer_id)]
ReadSchema: struct<c_customer_sk:int,c_customer_id:string,c_first_name:string,c_last_name:string,c_preferred_cust_flag:string,c_birth_country:string,c_login:string,c_email_address:string>

(56) FilterExecTransformer
Input [8]: [c_customer_sk#58, c_customer_id#59, c_first_name#60, c_last_name#61, c_preferred_cust_flag#62, c_birth_country#63, c_login#64, c_email_address#65]
Arguments: (isnotnull(c_customer_sk#58) AND isnotnull(c_customer_id#59))

(57) FileSourceScanExecTransformer parquet spark_catalog.default.catalog_sales
Output [6]: [cs_bill_customer_sk#66, cs_ext_discount_amt#67, cs_ext_sales_price#68, cs_ext_wholesale_cost#69, cs_ext_list_price#70, cs_sold_date_sk#71]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(cs_sold_date_sk#71), dynamicpruningexpression(cs_sold_date_sk#71 IN dynamicpruning#15)]
PushedFilters: [IsNotNull(cs_bill_customer_sk)]
ReadSchema: struct<cs_bill_customer_sk:int,cs_ext_discount_amt:decimal(7,2),cs_ext_sales_price:decimal(7,2),cs_ext_wholesale_cost:decimal(7,2),cs_ext_list_price:decimal(7,2)>

(58) FilterExecTransformer
Input [6]: [cs_bill_customer_sk#66, cs_ext_discount_amt#67, cs_ext_sales_price#68, cs_ext_wholesale_cost#69, cs_ext_list_price#70, cs_sold_date_sk#71]
Arguments: isnotnull(cs_bill_customer_sk#66)

(59) WholeStageCodegenTransformer (11)
Input [6]: [cs_bill_customer_sk#66, cs_ext_discount_amt#67, cs_ext_sales_price#68, cs_ext_wholesale_cost#69, cs_ext_list_price#70, cs_sold_date_sk#71]
Arguments: false

(60) ColumnarBroadcastExchange
Input [6]: [cs_bill_customer_sk#66, cs_ext_discount_amt#67, cs_ext_sales_price#68, cs_ext_wholesale_cost#69, cs_ext_list_price#70, cs_sold_date_sk#71]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, false] as bigint)),false), [plan_id=6]

(61) InputAdapter
Input [6]: [cs_bill_customer_sk#66, cs_ext_discount_amt#67, cs_ext_sales_price#68, cs_ext_wholesale_cost#69, cs_ext_list_price#70, cs_sold_date_sk#71]

(62) InputIteratorTransformer
Input [6]: [cs_bill_customer_sk#66, cs_ext_discount_amt#67, cs_ext_sales_price#68, cs_ext_wholesale_cost#69, cs_ext_list_price#70, cs_sold_date_sk#71]

(63) BroadcastHashJoinExecTransformer
Left keys [1]: [c_customer_sk#58]
Right keys [1]: [cs_bill_customer_sk#66]
Join type: Inner
Join condition: None

(64) ProjectExecTransformer
Output [12]: [c_customer_id#59, c_first_name#60, c_last_name#61, c_preferred_cust_flag#62, c_birth_country#63, c_login#64, c_email_address#65, cs_ext_discount_amt#67, cs_ext_sales_price#68, cs_ext_wholesale_cost#69, cs_ext_list_price#70, cs_sold_date_sk#71]
Input [14]: [c_customer_sk#58, c_customer_id#59, c_first_name#60, c_last_name#61, c_preferred_cust_flag#62, c_birth_country#63, c_login#64, c_email_address#65, cs_bill_customer_sk#66, cs_ext_discount_amt#67, cs_ext_sales_price#68, cs_ext_wholesale_cost#69, cs_ext_list_price#70, cs_sold_date_sk#71]

(65) ReusedExchange [Reuses operator id: 183]
Output [2]: [d_date_sk#72, d_year#73]

(66) InputAdapter
Input [2]: [d_date_sk#72, d_year#73]

(67) InputIteratorTransformer
Input [2]: [d_date_sk#72, d_year#73]

(68) BroadcastHashJoinExecTransformer
Left keys [1]: [cs_sold_date_sk#71]
Right keys [1]: [d_date_sk#72]
Join type: Inner
Join condition: None

(69) ProjectExecTransformer
Output [9]: [c_customer_id#59, c_first_name#60, c_last_name#61, c_preferred_cust_flag#62, c_birth_country#63, c_login#64, c_email_address#65, d_year#73, ((((cs_ext_list_price#70 - cs_ext_wholesale_cost#69) - cs_ext_discount_amt#67) + cs_ext_sales_price#68) / 2) AS _pre_3#74]
Input [14]: [c_customer_id#59, c_first_name#60, c_last_name#61, c_preferred_cust_flag#62, c_birth_country#63, c_login#64, c_email_address#65, cs_ext_discount_amt#67, cs_ext_sales_price#68, cs_ext_wholesale_cost#69, cs_ext_list_price#70, cs_sold_date_sk#71, d_date_sk#72, d_year#73]

(70) FlushableHashAggregateExecTransformer
Input [9]: [c_customer_id#59, c_first_name#60, c_last_name#61, c_preferred_cust_flag#62, c_birth_country#63, c_login#64, c_email_address#65, d_year#73, _pre_3#74]
Keys [8]: [c_customer_id#59, c_first_name#60, c_last_name#61, c_preferred_cust_flag#62, c_birth_country#63, c_login#64, c_email_address#65, d_year#73]
Functions [1]: [partial_sum(_pre_3#74)]
Aggregate Attributes [2]: [sum#75, isEmpty#76]
Results [10]: [c_customer_id#59, c_first_name#60, c_last_name#61, c_preferred_cust_flag#62, c_birth_country#63, c_login#64, c_email_address#65, d_year#73, sum#77, isEmpty#78]

(71) ProjectExecTransformer
Output [11]: [hash(c_customer_id#59, c_first_name#60, c_last_name#61, c_preferred_cust_flag#62, c_birth_country#63, c_login#64, c_email_address#65, d_year#73, 42) AS hash_partition_key#79, c_customer_id#59, c_first_name#60, c_last_name#61, c_preferred_cust_flag#62, c_birth_country#63, c_login#64, c_email_address#65, d_year#73, sum#77, isEmpty#78]
Input [10]: [c_customer_id#59, c_first_name#60, c_last_name#61, c_preferred_cust_flag#62, c_birth_country#63, c_login#64, c_email_address#65, d_year#73, sum#77, isEmpty#78]

(72) WholeStageCodegenTransformer (13)
Input [11]: [hash_partition_key#79, c_customer_id#59, c_first_name#60, c_last_name#61, c_preferred_cust_flag#62, c_birth_country#63, c_login#64, c_email_address#65, d_year#73, sum#77, isEmpty#78]
Arguments: false

(73) VeloxResizeBatches
Input [11]: [hash_partition_key#79, c_customer_id#59, c_first_name#60, c_last_name#61, c_preferred_cust_flag#62, c_birth_country#63, c_login#64, c_email_address#65, d_year#73, sum#77, isEmpty#78]
Arguments: 1024, 2147483647, 10485760

(74) ColumnarExchange
Input [11]: [hash_partition_key#79, c_customer_id#59, c_first_name#60, c_last_name#61, c_preferred_cust_flag#62, c_birth_country#63, c_login#64, c_email_address#65, d_year#73, sum#77, isEmpty#78]
Arguments: hashpartitioning(c_customer_id#59, c_first_name#60, c_last_name#61, c_preferred_cust_flag#62, c_birth_country#63, c_login#64, c_email_address#65, d_year#73, 1), ENSURE_REQUIREMENTS, [c_customer_id#59, c_first_name#60, c_last_name#61, c_preferred_cust_flag#62, c_birth_country#63, c_login#64, c_email_address#65, d_year#73, sum#77, isEmpty#78], [plan_id=7], [shuffle_writer_type=hash]

(75) InputAdapter
Input [10]: [c_customer_id#59, c_first_name#60, c_last_name#61, c_preferred_cust_flag#62, c_birth_country#63, c_login#64, c_email_address#65, d_year#73, sum#77, isEmpty#78]

(76) InputIteratorTransformer
Input [10]: [c_customer_id#59, c_first_name#60, c_last_name#61, c_preferred_cust_flag#62, c_birth_country#63, c_login#64, c_email_address#65, d_year#73, sum#77, isEmpty#78]

(77) RegularHashAggregateExecTransformer
Input [10]: [c_customer_id#59, c_first_name#60, c_last_name#61, c_preferred_cust_flag#62, c_birth_country#63, c_login#64, c_email_address#65, d_year#73, sum#77, isEmpty#78]
Keys [8]: [c_customer_id#59, c_first_name#60, c_last_name#61, c_preferred_cust_flag#62, c_birth_country#63, c_login#64, c_email_address#65, d_year#73]
Functions [1]: [sum(((((cs_ext_list_price#70 - cs_ext_wholesale_cost#69) - cs_ext_discount_amt#67) + cs_ext_sales_price#68) / 2))]
Aggregate Attributes [1]: [sum(((((cs_ext_list_price#70 - cs_ext_wholesale_cost#69) - cs_ext_discount_amt#67) + cs_ext_sales_price#68) / 2))#80]
Results [9]: [c_customer_id#59, c_first_name#60, c_last_name#61, c_preferred_cust_flag#62, c_birth_country#63, c_login#64, c_email_address#65, d_year#73, sum(((((cs_ext_list_price#70 - cs_ext_wholesale_cost#69) - cs_ext_discount_amt#67) + cs_ext_sales_price#68) / 2))#80]

(78) ProjectExecTransformer
Output [2]: [c_customer_id#59 AS customer_id#81, sum(((((cs_ext_list_price#70 - cs_ext_wholesale_cost#69) - cs_ext_discount_amt#67) + cs_ext_sales_price#68) / 2))#80 AS year_total#82]
Input [9]: [c_customer_id#59, c_first_name#60, c_last_name#61, c_preferred_cust_flag#62, c_birth_country#63, c_login#64, c_email_address#65, d_year#73, sum(((((cs_ext_list_price#70 - cs_ext_wholesale_cost#69) - cs_ext_discount_amt#67) + cs_ext_sales_price#68) / 2))#80]

(79) FilterExecTransformer
Input [2]: [customer_id#81, year_total#82]
Arguments: (isnotnull(year_total#82) AND (year_total#82 > 0.000000))

(80) WholeStageCodegenTransformer (14)
Input [2]: [customer_id#81, year_total#82]
Arguments: false

(81) ColumnarBroadcastExchange
Input [2]: [customer_id#81, year_total#82]
Arguments: HashedRelationBroadcastMode(List(input[0, string, true]),false), [plan_id=8]

(82) InputAdapter
Input [2]: [customer_id#81, year_total#82]

(83) InputIteratorTransformer
Input [2]: [customer_id#81, year_total#82]

(84) BroadcastHashJoinExecTransformer
Left keys [1]: [customer_id#25]
Right keys [1]: [customer_id#81]
Join type: Inner
Join condition: None

(85) ProjectExecTransformer
Output [11]: [customer_id#25, year_total#26, customer_id#50, customer_first_name#51, customer_last_name#52, customer_preferred_cust_flag#53, customer_birth_country#54, customer_login#55, customer_email_address#56, year_total#57, year_total#82]
Input [12]: [customer_id#25, year_total#26, customer_id#50, customer_first_name#51, customer_last_name#52, customer_preferred_cust_flag#53, customer_birth_country#54, customer_login#55, customer_email_address#56, year_total#57, customer_id#81, year_total#82]

(86) FileSourceScanExecTransformer parquet spark_catalog.default.customer
Output [8]: [c_customer_sk#83, c_customer_id#84, c_first_name#85, c_last_name#86, c_preferred_cust_flag#87, c_birth_country#88, c_login#89, c_email_address#90]
Batched: true
Location: InMemoryFileIndex [{warehouse_dir}/customer]
PushedFilters: [IsNotNull(c_customer_sk), IsNotNull(c_customer_id)]
ReadSchema: struct<c_customer_sk:int,c_customer_id:string,c_first_name:string,c_last_name:string,c_preferred_cust_flag:string,c_birth_country:string,c_login:string,c_email_address:string>

(87) FilterExecTransformer
Input [8]: [c_customer_sk#83, c_customer_id#84, c_first_name#85, c_last_name#86, c_preferred_cust_flag#87, c_birth_country#88, c_login#89, c_email_address#90]
Arguments: (isnotnull(c_customer_sk#83) AND isnotnull(c_customer_id#84))

(88) FileSourceScanExecTransformer parquet spark_catalog.default.catalog_sales
Output [6]: [cs_bill_customer_sk#91, cs_ext_discount_amt#92, cs_ext_sales_price#93, cs_ext_wholesale_cost#94, cs_ext_list_price#95, cs_sold_date_sk#96]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(cs_sold_date_sk#96), dynamicpruningexpression(cs_sold_date_sk#96 IN dynamicpruning#41)]
PushedFilters: [IsNotNull(cs_bill_customer_sk)]
ReadSchema: struct<cs_bill_customer_sk:int,cs_ext_discount_amt:decimal(7,2),cs_ext_sales_price:decimal(7,2),cs_ext_wholesale_cost:decimal(7,2),cs_ext_list_price:decimal(7,2)>

(89) FilterExecTransformer
Input [6]: [cs_bill_customer_sk#91, cs_ext_discount_amt#92, cs_ext_sales_price#93, cs_ext_wholesale_cost#94, cs_ext_list_price#95, cs_sold_date_sk#96]
Arguments: isnotnull(cs_bill_customer_sk#91)

(90) WholeStageCodegenTransformer (16)
Input [6]: [cs_bill_customer_sk#91, cs_ext_discount_amt#92, cs_ext_sales_price#93, cs_ext_wholesale_cost#94, cs_ext_list_price#95, cs_sold_date_sk#96]
Arguments: false

(91) ColumnarBroadcastExchange
Input [6]: [cs_bill_customer_sk#91, cs_ext_discount_amt#92, cs_ext_sales_price#93, cs_ext_wholesale_cost#94, cs_ext_list_price#95, cs_sold_date_sk#96]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, false] as bigint)),false), [plan_id=9]

(92) InputAdapter
Input [6]: [cs_bill_customer_sk#91, cs_ext_discount_amt#92, cs_ext_sales_price#93, cs_ext_wholesale_cost#94, cs_ext_list_price#95, cs_sold_date_sk#96]

(93) InputIteratorTransformer
Input [6]: [cs_bill_customer_sk#91, cs_ext_discount_amt#92, cs_ext_sales_price#93, cs_ext_wholesale_cost#94, cs_ext_list_price#95, cs_sold_date_sk#96]

(94) BroadcastHashJoinExecTransformer
Left keys [1]: [c_customer_sk#83]
Right keys [1]: [cs_bill_customer_sk#91]
Join type: Inner
Join condition: None

(95) ProjectExecTransformer
Output [12]: [c_customer_id#84, c_first_name#85, c_last_name#86, c_preferred_cust_flag#87, c_birth_country#88, c_login#89, c_email_address#90, cs_ext_discount_amt#92, cs_ext_sales_price#93, cs_ext_wholesale_cost#94, cs_ext_list_price#95, cs_sold_date_sk#96]
Input [14]: [c_customer_sk#83, c_customer_id#84, c_first_name#85, c_last_name#86, c_preferred_cust_flag#87, c_birth_country#88, c_login#89, c_email_address#90, cs_bill_customer_sk#91, cs_ext_discount_amt#92, cs_ext_sales_price#93, cs_ext_wholesale_cost#94, cs_ext_list_price#95, cs_sold_date_sk#96]

(96) ReusedExchange [Reuses operator id: 187]
Output [2]: [d_date_sk#97, d_year#98]

(97) InputAdapter
Input [2]: [d_date_sk#97, d_year#98]

(98) InputIteratorTransformer
Input [2]: [d_date_sk#97, d_year#98]

(99) BroadcastHashJoinExecTransformer
Left keys [1]: [cs_sold_date_sk#96]
Right keys [1]: [d_date_sk#97]
Join type: Inner
Join condition: None

(100) ProjectExecTransformer
Output [9]: [c_customer_id#84, c_first_name#85, c_last_name#86, c_preferred_cust_flag#87, c_birth_country#88, c_login#89, c_email_address#90, d_year#98, ((((cs_ext_list_price#95 - cs_ext_wholesale_cost#94) - cs_ext_discount_amt#92) + cs_ext_sales_price#93) / 2) AS _pre_4#99]
Input [14]: [c_customer_id#84, c_first_name#85, c_last_name#86, c_preferred_cust_flag#87, c_birth_country#88, c_login#89, c_email_address#90, cs_ext_discount_amt#92, cs_ext_sales_price#93, cs_ext_wholesale_cost#94, cs_ext_list_price#95, cs_sold_date_sk#96, d_date_sk#97, d_year#98]

(101) FlushableHashAggregateExecTransformer
Input [9]: [c_customer_id#84, c_first_name#85, c_last_name#86, c_preferred_cust_flag#87, c_birth_country#88, c_login#89, c_email_address#90, d_year#98, _pre_4#99]
Keys [8]: [c_customer_id#84, c_first_name#85, c_last_name#86, c_preferred_cust_flag#87, c_birth_country#88, c_login#89, c_email_address#90, d_year#98]
Functions [1]: [partial_sum(_pre_4#99)]
Aggregate Attributes [2]: [sum#100, isEmpty#101]
Results [10]: [c_customer_id#84, c_first_name#85, c_last_name#86, c_preferred_cust_flag#87, c_birth_country#88, c_login#89, c_email_address#90, d_year#98, sum#102, isEmpty#103]

(102) ProjectExecTransformer
Output [11]: [hash(c_customer_id#84, c_first_name#85, c_last_name#86, c_preferred_cust_flag#87, c_birth_country#88, c_login#89, c_email_address#90, d_year#98, 42) AS hash_partition_key#104, c_customer_id#84, c_first_name#85, c_last_name#86, c_preferred_cust_flag#87, c_birth_country#88, c_login#89, c_email_address#90, d_year#98, sum#102, isEmpty#103]
Input [10]: [c_customer_id#84, c_first_name#85, c_last_name#86, c_preferred_cust_flag#87, c_birth_country#88, c_login#89, c_email_address#90, d_year#98, sum#102, isEmpty#103]

(103) WholeStageCodegenTransformer (18)
Input [11]: [hash_partition_key#104, c_customer_id#84, c_first_name#85, c_last_name#86, c_preferred_cust_flag#87, c_birth_country#88, c_login#89, c_email_address#90, d_year#98, sum#102, isEmpty#103]
Arguments: false

(104) VeloxResizeBatches
Input [11]: [hash_partition_key#104, c_customer_id#84, c_first_name#85, c_last_name#86, c_preferred_cust_flag#87, c_birth_country#88, c_login#89, c_email_address#90, d_year#98, sum#102, isEmpty#103]
Arguments: 1024, 2147483647, 10485760

(105) ColumnarExchange
Input [11]: [hash_partition_key#104, c_customer_id#84, c_first_name#85, c_last_name#86, c_preferred_cust_flag#87, c_birth_country#88, c_login#89, c_email_address#90, d_year#98, sum#102, isEmpty#103]
Arguments: hashpartitioning(c_customer_id#84, c_first_name#85, c_last_name#86, c_preferred_cust_flag#87, c_birth_country#88, c_login#89, c_email_address#90, d_year#98, 1), ENSURE_REQUIREMENTS, [c_customer_id#84, c_first_name#85, c_last_name#86, c_preferred_cust_flag#87, c_birth_country#88, c_login#89, c_email_address#90, d_year#98, sum#102, isEmpty#103], [plan_id=10], [shuffle_writer_type=hash]

(106) InputAdapter
Input [10]: [c_customer_id#84, c_first_name#85, c_last_name#86, c_preferred_cust_flag#87, c_birth_country#88, c_login#89, c_email_address#90, d_year#98, sum#102, isEmpty#103]

(107) InputIteratorTransformer
Input [10]: [c_customer_id#84, c_first_name#85, c_last_name#86, c_preferred_cust_flag#87, c_birth_country#88, c_login#89, c_email_address#90, d_year#98, sum#102, isEmpty#103]

(108) RegularHashAggregateExecTransformer
Input [10]: [c_customer_id#84, c_first_name#85, c_last_name#86, c_preferred_cust_flag#87, c_birth_country#88, c_login#89, c_email_address#90, d_year#98, sum#102, isEmpty#103]
Keys [8]: [c_customer_id#84, c_first_name#85, c_last_name#86, c_preferred_cust_flag#87, c_birth_country#88, c_login#89, c_email_address#90, d_year#98]
Functions [1]: [sum(((((cs_ext_list_price#95 - cs_ext_wholesale_cost#94) - cs_ext_discount_amt#92) + cs_ext_sales_price#93) / 2))]
Aggregate Attributes [1]: [sum(((((cs_ext_list_price#95 - cs_ext_wholesale_cost#94) - cs_ext_discount_amt#92) + cs_ext_sales_price#93) / 2))#80]
Results [9]: [c_customer_id#84, c_first_name#85, c_last_name#86, c_preferred_cust_flag#87, c_birth_country#88, c_login#89, c_email_address#90, d_year#98, sum(((((cs_ext_list_price#95 - cs_ext_wholesale_cost#94) - cs_ext_discount_amt#92) + cs_ext_sales_price#93) / 2))#80]

(109) ProjectExecTransformer
Output [2]: [c_customer_id#84 AS customer_id#105, sum(((((cs_ext_list_price#95 - cs_ext_wholesale_cost#94) - cs_ext_discount_amt#92) + cs_ext_sales_price#93) / 2))#80 AS year_total#106]
Input [9]: [c_customer_id#84, c_first_name#85, c_last_name#86, c_preferred_cust_flag#87, c_birth_country#88, c_login#89, c_email_address#90, d_year#98, sum(((((cs_ext_list_price#95 - cs_ext_wholesale_cost#94) - cs_ext_discount_amt#92) + cs_ext_sales_price#93) / 2))#80]

(110) WholeStageCodegenTransformer (19)
Input [2]: [customer_id#105, year_total#106]
Arguments: false

(111) ColumnarBroadcastExchange
Input [2]: [customer_id#105, year_total#106]
Arguments: HashedRelationBroadcastMode(List(input[0, string, true]),false), [plan_id=11]

(112) InputAdapter
Input [2]: [customer_id#105, year_total#106]

(113) InputIteratorTransformer
Input [2]: [customer_id#105, year_total#106]

(114) BroadcastHashJoinExecTransformer
Left keys [1]: [customer_id#25]
Right keys [1]: [customer_id#105]
Join type: Inner
Join condition: (CASE WHEN (year_total#82 > 0.000000) THEN (year_total#106 / year_total#82) END > CASE WHEN (year_total#26 > 0.000000) THEN (year_total#57 / year_total#26) END)

(115) ProjectExecTransformer
Output [10]: [customer_id#25, customer_id#50, customer_first_name#51, customer_last_name#52, customer_preferred_cust_flag#53, customer_birth_country#54, customer_login#55, customer_email_address#56, year_total#82, year_total#106]
Input [13]: [customer_id#25, year_total#26, customer_id#50, customer_first_name#51, customer_last_name#52, customer_preferred_cust_flag#53, customer_birth_country#54, customer_login#55, customer_email_address#56, year_total#57, year_total#82, customer_id#105, year_total#106]

(116) FileSourceScanExecTransformer parquet spark_catalog.default.customer
Output [8]: [c_customer_sk#107, c_customer_id#108, c_first_name#109, c_last_name#110, c_preferred_cust_flag#111, c_birth_country#112, c_login#113, c_email_address#114]
Batched: true
Location: InMemoryFileIndex [{warehouse_dir}/customer]
PushedFilters: [IsNotNull(c_customer_sk), IsNotNull(c_customer_id)]
ReadSchema: struct<c_customer_sk:int,c_customer_id:string,c_first_name:string,c_last_name:string,c_preferred_cust_flag:string,c_birth_country:string,c_login:string,c_email_address:string>

(117) FilterExecTransformer
Input [8]: [c_customer_sk#107, c_customer_id#108, c_first_name#109, c_last_name#110, c_preferred_cust_flag#111, c_birth_country#112, c_login#113, c_email_address#114]
Arguments: (isnotnull(c_customer_sk#107) AND isnotnull(c_customer_id#108))

(118) FileSourceScanExecTransformer parquet spark_catalog.default.web_sales
Output [6]: [ws_bill_customer_sk#115, ws_ext_discount_amt#116, ws_ext_sales_price#117, ws_ext_wholesale_cost#118, ws_ext_list_price#119, ws_sold_date_sk#120]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(ws_sold_date_sk#120), dynamicpruningexpression(ws_sold_date_sk#120 IN dynamicpruning#15)]
PushedFilters: [IsNotNull(ws_bill_customer_sk)]
ReadSchema: struct<ws_bill_customer_sk:int,ws_ext_discount_amt:decimal(7,2),ws_ext_sales_price:decimal(7,2),ws_ext_wholesale_cost:decimal(7,2),ws_ext_list_price:decimal(7,2)>

(119) FilterExecTransformer
Input [6]: [ws_bill_customer_sk#115, ws_ext_discount_amt#116, ws_ext_sales_price#117, ws_ext_wholesale_cost#118, ws_ext_list_price#119, ws_sold_date_sk#120]
Arguments: isnotnull(ws_bill_customer_sk#115)

(120) WholeStageCodegenTransformer (21)
Input [6]: [ws_bill_customer_sk#115, ws_ext_discount_amt#116, ws_ext_sales_price#117, ws_ext_wholesale_cost#118, ws_ext_list_price#119, ws_sold_date_sk#120]
Arguments: false

(121) ColumnarBroadcastExchange
Input [6]: [ws_bill_customer_sk#115, ws_ext_discount_amt#116, ws_ext_sales_price#117, ws_ext_wholesale_cost#118, ws_ext_list_price#119, ws_sold_date_sk#120]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, false] as bigint)),false), [plan_id=12]

(122) InputAdapter
Input [6]: [ws_bill_customer_sk#115, ws_ext_discount_amt#116, ws_ext_sales_price#117, ws_ext_wholesale_cost#118, ws_ext_list_price#119, ws_sold_date_sk#120]

(123) InputIteratorTransformer
Input [6]: [ws_bill_customer_sk#115, ws_ext_discount_amt#116, ws_ext_sales_price#117, ws_ext_wholesale_cost#118, ws_ext_list_price#119, ws_sold_date_sk#120]

(124) BroadcastHashJoinExecTransformer
Left keys [1]: [c_customer_sk#107]
Right keys [1]: [ws_bill_customer_sk#115]
Join type: Inner
Join condition: None

(125) ProjectExecTransformer
Output [12]: [c_customer_id#108, c_first_name#109, c_last_name#110, c_preferred_cust_flag#111, c_birth_country#112, c_login#113, c_email_address#114, ws_ext_discount_amt#116, ws_ext_sales_price#117, ws_ext_wholesale_cost#118, ws_ext_list_price#119, ws_sold_date_sk#120]
Input [14]: [c_customer_sk#107, c_customer_id#108, c_first_name#109, c_last_name#110, c_preferred_cust_flag#111, c_birth_country#112, c_login#113, c_email_address#114, ws_bill_customer_sk#115, ws_ext_discount_amt#116, ws_ext_sales_price#117, ws_ext_wholesale_cost#118, ws_ext_list_price#119, ws_sold_date_sk#120]

(126) ReusedExchange [Reuses operator id: 183]
Output [2]: [d_date_sk#121, d_year#122]

(127) InputAdapter
Input [2]: [d_date_sk#121, d_year#122]

(128) InputIteratorTransformer
Input [2]: [d_date_sk#121, d_year#122]

(129) BroadcastHashJoinExecTransformer
Left keys [1]: [ws_sold_date_sk#120]
Right keys [1]: [d_date_sk#121]
Join type: Inner
Join condition: None

(130) ProjectExecTransformer
Output [9]: [c_customer_id#108, c_first_name#109, c_last_name#110, c_preferred_cust_flag#111, c_birth_country#112, c_login#113, c_email_address#114, d_year#122, ((((ws_ext_list_price#119 - ws_ext_wholesale_cost#118) - ws_ext_discount_amt#116) + ws_ext_sales_price#117) / 2) AS _pre_5#123]
Input [14]: [c_customer_id#108, c_first_name#109, c_last_name#110, c_preferred_cust_flag#111, c_birth_country#112, c_login#113, c_email_address#114, ws_ext_discount_amt#116, ws_ext_sales_price#117, ws_ext_wholesale_cost#118, ws_ext_list_price#119, ws_sold_date_sk#120, d_date_sk#121, d_year#122]

(131) FlushableHashAggregateExecTransformer
Input [9]: [c_customer_id#108, c_first_name#109, c_last_name#110, c_preferred_cust_flag#111, c_birth_country#112, c_login#113, c_email_address#114, d_year#122, _pre_5#123]
Keys [8]: [c_customer_id#108, c_first_name#109, c_last_name#110, c_preferred_cust_flag#111, c_birth_country#112, c_login#113, c_email_address#114, d_year#122]
Functions [1]: [partial_sum(_pre_5#123)]
Aggregate Attributes [2]: [sum#124, isEmpty#125]
Results [10]: [c_customer_id#108, c_first_name#109, c_last_name#110, c_preferred_cust_flag#111, c_birth_country#112, c_login#113, c_email_address#114, d_year#122, sum#126, isEmpty#127]

(132) ProjectExecTransformer
Output [11]: [hash(c_customer_id#108, c_first_name#109, c_last_name#110, c_preferred_cust_flag#111, c_birth_country#112, c_login#113, c_email_address#114, d_year#122, 42) AS hash_partition_key#128, c_customer_id#108, c_first_name#109, c_last_name#110, c_preferred_cust_flag#111, c_birth_country#112, c_login#113, c_email_address#114, d_year#122, sum#126, isEmpty#127]
Input [10]: [c_customer_id#108, c_first_name#109, c_last_name#110, c_preferred_cust_flag#111, c_birth_country#112, c_login#113, c_email_address#114, d_year#122, sum#126, isEmpty#127]

(133) WholeStageCodegenTransformer (23)
Input [11]: [hash_partition_key#128, c_customer_id#108, c_first_name#109, c_last_name#110, c_preferred_cust_flag#111, c_birth_country#112, c_login#113, c_email_address#114, d_year#122, sum#126, isEmpty#127]
Arguments: false

(134) VeloxResizeBatches
Input [11]: [hash_partition_key#128, c_customer_id#108, c_first_name#109, c_last_name#110, c_preferred_cust_flag#111, c_birth_country#112, c_login#113, c_email_address#114, d_year#122, sum#126, isEmpty#127]
Arguments: 1024, 2147483647, 10485760

(135) ColumnarExchange
Input [11]: [hash_partition_key#128, c_customer_id#108, c_first_name#109, c_last_name#110, c_preferred_cust_flag#111, c_birth_country#112, c_login#113, c_email_address#114, d_year#122, sum#126, isEmpty#127]
Arguments: hashpartitioning(c_customer_id#108, c_first_name#109, c_last_name#110, c_preferred_cust_flag#111, c_birth_country#112, c_login#113, c_email_address#114, d_year#122, 1), ENSURE_REQUIREMENTS, [c_customer_id#108, c_first_name#109, c_last_name#110, c_preferred_cust_flag#111, c_birth_country#112, c_login#113, c_email_address#114, d_year#122, sum#126, isEmpty#127], [plan_id=13], [shuffle_writer_type=hash]

(136) InputAdapter
Input [10]: [c_customer_id#108, c_first_name#109, c_last_name#110, c_preferred_cust_flag#111, c_birth_country#112, c_login#113, c_email_address#114, d_year#122, sum#126, isEmpty#127]

(137) InputIteratorTransformer
Input [10]: [c_customer_id#108, c_first_name#109, c_last_name#110, c_preferred_cust_flag#111, c_birth_country#112, c_login#113, c_email_address#114, d_year#122, sum#126, isEmpty#127]

(138) RegularHashAggregateExecTransformer
Input [10]: [c_customer_id#108, c_first_name#109, c_last_name#110, c_preferred_cust_flag#111, c_birth_country#112, c_login#113, c_email_address#114, d_year#122, sum#126, isEmpty#127]
Keys [8]: [c_customer_id#108, c_first_name#109, c_last_name#110, c_preferred_cust_flag#111, c_birth_country#112, c_login#113, c_email_address#114, d_year#122]
Functions [1]: [sum(((((ws_ext_list_price#119 - ws_ext_wholesale_cost#118) - ws_ext_discount_amt#116) + ws_ext_sales_price#117) / 2))]
Aggregate Attributes [1]: [sum(((((ws_ext_list_price#119 - ws_ext_wholesale_cost#118) - ws_ext_discount_amt#116) + ws_ext_sales_price#117) / 2))#129]
Results [9]: [c_customer_id#108, c_first_name#109, c_last_name#110, c_preferred_cust_flag#111, c_birth_country#112, c_login#113, c_email_address#114, d_year#122, sum(((((ws_ext_list_price#119 - ws_ext_wholesale_cost#118) - ws_ext_discount_amt#116) + ws_ext_sales_price#117) / 2))#129]

(139) ProjectExecTransformer
Output [2]: [c_customer_id#108 AS customer_id#130, sum(((((ws_ext_list_price#119 - ws_ext_wholesale_cost#118) - ws_ext_discount_amt#116) + ws_ext_sales_price#117) / 2))#129 AS year_total#131]
Input [9]: [c_customer_id#108, c_first_name#109, c_last_name#110, c_preferred_cust_flag#111, c_birth_country#112, c_login#113, c_email_address#114, d_year#122, sum(((((ws_ext_list_price#119 - ws_ext_wholesale_cost#118) - ws_ext_discount_amt#116) + ws_ext_sales_price#117) / 2))#129]

(140) FilterExecTransformer
Input [2]: [customer_id#130, year_total#131]
Arguments: (isnotnull(year_total#131) AND (year_total#131 > 0.000000))

(141) WholeStageCodegenTransformer (24)
Input [2]: [customer_id#130, year_total#131]
Arguments: false

(142) ColumnarBroadcastExchange
Input [2]: [customer_id#130, year_total#131]
Arguments: HashedRelationBroadcastMode(List(input[0, string, true]),false), [plan_id=14]

(143) InputAdapter
Input [2]: [customer_id#130, year_total#131]

(144) InputIteratorTransformer
Input [2]: [customer_id#130, year_total#131]

(145) BroadcastHashJoinExecTransformer
Left keys [1]: [customer_id#25]
Right keys [1]: [customer_id#130]
Join type: Inner
Join condition: None

(146) ProjectExecTransformer
Output [11]: [customer_id#25, customer_id#50, customer_first_name#51, customer_last_name#52, customer_preferred_cust_flag#53, customer_birth_country#54, customer_login#55, customer_email_address#56, year_total#82, year_total#106, year_total#131]
Input [12]: [customer_id#25, customer_id#50, customer_first_name#51, customer_last_name#52, customer_preferred_cust_flag#53, customer_birth_country#54, customer_login#55, customer_email_address#56, year_total#82, year_total#106, customer_id#130, year_total#131]

(147) FileSourceScanExecTransformer parquet spark_catalog.default.customer
Output [8]: [c_customer_sk#132, c_customer_id#133, c_first_name#134, c_last_name#135, c_preferred_cust_flag#136, c_birth_country#137, c_login#138, c_email_address#139]
Batched: true
Location: InMemoryFileIndex [{warehouse_dir}/customer]
PushedFilters: [IsNotNull(c_customer_sk), IsNotNull(c_customer_id)]
ReadSchema: struct<c_customer_sk:int,c_customer_id:string,c_first_name:string,c_last_name:string,c_preferred_cust_flag:string,c_birth_country:string,c_login:string,c_email_address:string>

(148) FilterExecTransformer
Input [8]: [c_customer_sk#132, c_customer_id#133, c_first_name#134, c_last_name#135, c_preferred_cust_flag#136, c_birth_country#137, c_login#138, c_email_address#139]
Arguments: (isnotnull(c_customer_sk#132) AND isnotnull(c_customer_id#133))

(149) FileSourceScanExecTransformer parquet spark_catalog.default.web_sales
Output [6]: [ws_bill_customer_sk#140, ws_ext_discount_amt#141, ws_ext_sales_price#142, ws_ext_wholesale_cost#143, ws_ext_list_price#144, ws_sold_date_sk#145]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(ws_sold_date_sk#145), dynamicpruningexpression(ws_sold_date_sk#145 IN dynamicpruning#41)]
PushedFilters: [IsNotNull(ws_bill_customer_sk)]
ReadSchema: struct<ws_bill_customer_sk:int,ws_ext_discount_amt:decimal(7,2),ws_ext_sales_price:decimal(7,2),ws_ext_wholesale_cost:decimal(7,2),ws_ext_list_price:decimal(7,2)>

(150) FilterExecTransformer
Input [6]: [ws_bill_customer_sk#140, ws_ext_discount_amt#141, ws_ext_sales_price#142, ws_ext_wholesale_cost#143, ws_ext_list_price#144, ws_sold_date_sk#145]
Arguments: isnotnull(ws_bill_customer_sk#140)

(151) WholeStageCodegenTransformer (26)
Input [6]: [ws_bill_customer_sk#140, ws_ext_discount_amt#141, ws_ext_sales_price#142, ws_ext_wholesale_cost#143, ws_ext_list_price#144, ws_sold_date_sk#145]
Arguments: false

(152) ColumnarBroadcastExchange
Input [6]: [ws_bill_customer_sk#140, ws_ext_discount_amt#141, ws_ext_sales_price#142, ws_ext_wholesale_cost#143, ws_ext_list_price#144, ws_sold_date_sk#145]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, false] as bigint)),false), [plan_id=15]

(153) InputAdapter
Input [6]: [ws_bill_customer_sk#140, ws_ext_discount_amt#141, ws_ext_sales_price#142, ws_ext_wholesale_cost#143, ws_ext_list_price#144, ws_sold_date_sk#145]

(154) InputIteratorTransformer
Input [6]: [ws_bill_customer_sk#140, ws_ext_discount_amt#141, ws_ext_sales_price#142, ws_ext_wholesale_cost#143, ws_ext_list_price#144, ws_sold_date_sk#145]

(155) BroadcastHashJoinExecTransformer
Left keys [1]: [c_customer_sk#132]
Right keys [1]: [ws_bill_customer_sk#140]
Join type: Inner
Join condition: None

(156) ProjectExecTransformer
Output [12]: [c_customer_id#133, c_first_name#134, c_last_name#135, c_preferred_cust_flag#136, c_birth_country#137, c_login#138, c_email_address#139, ws_ext_discount_amt#141, ws_ext_sales_price#142, ws_ext_wholesale_cost#143, ws_ext_list_price#144, ws_sold_date_sk#145]
Input [14]: [c_customer_sk#132, c_customer_id#133, c_first_name#134, c_last_name#135, c_preferred_cust_flag#136, c_birth_country#137, c_login#138, c_email_address#139, ws_bill_customer_sk#140, ws_ext_discount_amt#141, ws_ext_sales_price#142, ws_ext_wholesale_cost#143, ws_ext_list_price#144, ws_sold_date_sk#145]

(157) ReusedExchange [Reuses operator id: 187]
Output [2]: [d_date_sk#146, d_year#147]

(158) InputAdapter
Input [2]: [d_date_sk#146, d_year#147]

(159) InputIteratorTransformer
Input [2]: [d_date_sk#146, d_year#147]

(160) BroadcastHashJoinExecTransformer
Left keys [1]: [ws_sold_date_sk#145]
Right keys [1]: [d_date_sk#146]
Join type: Inner
Join condition: None

(161) ProjectExecTransformer
Output [9]: [c_customer_id#133, c_first_name#134, c_last_name#135, c_preferred_cust_flag#136, c_birth_country#137, c_login#138, c_email_address#139, d_year#147, ((((ws_ext_list_price#144 - ws_ext_wholesale_cost#143) - ws_ext_discount_amt#141) + ws_ext_sales_price#142) / 2) AS _pre_6#148]
Input [14]: [c_customer_id#133, c_first_name#134, c_last_name#135, c_preferred_cust_flag#136, c_birth_country#137, c_login#138, c_email_address#139, ws_ext_discount_amt#141, ws_ext_sales_price#142, ws_ext_wholesale_cost#143, ws_ext_list_price#144, ws_sold_date_sk#145, d_date_sk#146, d_year#147]

(162) FlushableHashAggregateExecTransformer
Input [9]: [c_customer_id#133, c_first_name#134, c_last_name#135, c_preferred_cust_flag#136, c_birth_country#137, c_login#138, c_email_address#139, d_year#147, _pre_6#148]
Keys [8]: [c_customer_id#133, c_first_name#134, c_last_name#135, c_preferred_cust_flag#136, c_birth_country#137, c_login#138, c_email_address#139, d_year#147]
Functions [1]: [partial_sum(_pre_6#148)]
Aggregate Attributes [2]: [sum#149, isEmpty#150]
Results [10]: [c_customer_id#133, c_first_name#134, c_last_name#135, c_preferred_cust_flag#136, c_birth_country#137, c_login#138, c_email_address#139, d_year#147, sum#151, isEmpty#152]

(163) ProjectExecTransformer
Output [11]: [hash(c_customer_id#133, c_first_name#134, c_last_name#135, c_preferred_cust_flag#136, c_birth_country#137, c_login#138, c_email_address#139, d_year#147, 42) AS hash_partition_key#153, c_customer_id#133, c_first_name#134, c_last_name#135, c_preferred_cust_flag#136, c_birth_country#137, c_login#138, c_email_address#139, d_year#147, sum#151, isEmpty#152]
Input [10]: [c_customer_id#133, c_first_name#134, c_last_name#135, c_preferred_cust_flag#136, c_birth_country#137, c_login#138, c_email_address#139, d_year#147, sum#151, isEmpty#152]

(164) WholeStageCodegenTransformer (28)
Input [11]: [hash_partition_key#153, c_customer_id#133, c_first_name#134, c_last_name#135, c_preferred_cust_flag#136, c_birth_country#137, c_login#138, c_email_address#139, d_year#147, sum#151, isEmpty#152]
Arguments: false

(165) VeloxResizeBatches
Input [11]: [hash_partition_key#153, c_customer_id#133, c_first_name#134, c_last_name#135, c_preferred_cust_flag#136, c_birth_country#137, c_login#138, c_email_address#139, d_year#147, sum#151, isEmpty#152]
Arguments: 1024, 2147483647, 10485760

(166) ColumnarExchange
Input [11]: [hash_partition_key#153, c_customer_id#133, c_first_name#134, c_last_name#135, c_preferred_cust_flag#136, c_birth_country#137, c_login#138, c_email_address#139, d_year#147, sum#151, isEmpty#152]
Arguments: hashpartitioning(c_customer_id#133, c_first_name#134, c_last_name#135, c_preferred_cust_flag#136, c_birth_country#137, c_login#138, c_email_address#139, d_year#147, 1), ENSURE_REQUIREMENTS, [c_customer_id#133, c_first_name#134, c_last_name#135, c_preferred_cust_flag#136, c_birth_country#137, c_login#138, c_email_address#139, d_year#147, sum#151, isEmpty#152], [plan_id=16], [shuffle_writer_type=hash]

(167) InputAdapter
Input [10]: [c_customer_id#133, c_first_name#134, c_last_name#135, c_preferred_cust_flag#136, c_birth_country#137, c_login#138, c_email_address#139, d_year#147, sum#151, isEmpty#152]

(168) InputIteratorTransformer
Input [10]: [c_customer_id#133, c_first_name#134, c_last_name#135, c_preferred_cust_flag#136, c_birth_country#137, c_login#138, c_email_address#139, d_year#147, sum#151, isEmpty#152]

(169) RegularHashAggregateExecTransformer
Input [10]: [c_customer_id#133, c_first_name#134, c_last_name#135, c_preferred_cust_flag#136, c_birth_country#137, c_login#138, c_email_address#139, d_year#147, sum#151, isEmpty#152]
Keys [8]: [c_customer_id#133, c_first_name#134, c_last_name#135, c_preferred_cust_flag#136, c_birth_country#137, c_login#138, c_email_address#139, d_year#147]
Functions [1]: [sum(((((ws_ext_list_price#144 - ws_ext_wholesale_cost#143) - ws_ext_discount_amt#141) + ws_ext_sales_price#142) / 2))]
Aggregate Attributes [1]: [sum(((((ws_ext_list_price#144 - ws_ext_wholesale_cost#143) - ws_ext_discount_amt#141) + ws_ext_sales_price#142) / 2))#129]
Results [9]: [c_customer_id#133, c_first_name#134, c_last_name#135, c_preferred_cust_flag#136, c_birth_country#137, c_login#138, c_email_address#139, d_year#147, sum(((((ws_ext_list_price#144 - ws_ext_wholesale_cost#143) - ws_ext_discount_amt#141) + ws_ext_sales_price#142) / 2))#129]

(170) ProjectExecTransformer
Output [2]: [c_customer_id#133 AS customer_id#154, sum(((((ws_ext_list_price#144 - ws_ext_wholesale_cost#143) - ws_ext_discount_amt#141) + ws_ext_sales_price#142) / 2))#129 AS year_total#155]
Input [9]: [c_customer_id#133, c_first_name#134, c_last_name#135, c_preferred_cust_flag#136, c_birth_country#137, c_login#138, c_email_address#139, d_year#147, sum(((((ws_ext_list_price#144 - ws_ext_wholesale_cost#143) - ws_ext_discount_amt#141) + ws_ext_sales_price#142) / 2))#129]

(171) WholeStageCodegenTransformer (29)
Input [2]: [customer_id#154, year_total#155]
Arguments: false

(172) ColumnarBroadcastExchange
Input [2]: [customer_id#154, year_total#155]
Arguments: HashedRelationBroadcastMode(List(input[0, string, true]),false), [plan_id=17]

(173) InputAdapter
Input [2]: [customer_id#154, year_total#155]

(174) InputIteratorTransformer
Input [2]: [customer_id#154, year_total#155]

(175) BroadcastHashJoinExecTransformer
Left keys [1]: [customer_id#25]
Right keys [1]: [customer_id#154]
Join type: Inner
Join condition: (CASE WHEN (year_total#82 > 0.000000) THEN (year_total#106 / year_total#82) END > CASE WHEN (year_total#131 > 0.000000) THEN (year_total#155 / year_total#131) END)

(176) ProjectExecTransformer
Output [7]: [customer_id#50, customer_first_name#51, customer_last_name#52, customer_preferred_cust_flag#53, customer_birth_country#54, customer_login#55, customer_email_address#56]
Input [13]: [customer_id#25, customer_id#50, customer_first_name#51, customer_last_name#52, customer_preferred_cust_flag#53, customer_birth_country#54, customer_login#55, customer_email_address#56, year_total#82, year_total#106, year_total#131, customer_id#154, year_total#155]

(177) WholeStageCodegenTransformer (30)
Input [7]: [customer_id#50, customer_first_name#51, customer_last_name#52, customer_preferred_cust_flag#53, customer_birth_country#54, customer_login#55, customer_email_address#56]
Arguments: false

(178) TakeOrderedAndProjectExecTransformer
Input [7]: [customer_id#50, customer_first_name#51, customer_last_name#52, customer_preferred_cust_flag#53, customer_birth_country#54, customer_login#55, customer_email_address#56]
Arguments: 100, [customer_id#50 ASC NULLS FIRST, customer_first_name#51 ASC NULLS FIRST, customer_last_name#52 ASC NULLS FIRST, customer_preferred_cust_flag#53 ASC NULLS FIRST, customer_birth_country#54 ASC NULLS FIRST, customer_login#55 ASC NULLS FIRST, customer_email_address#56 ASC NULLS FIRST], [customer_id#50, customer_first_name#51, customer_last_name#52, customer_preferred_cust_flag#53, customer_birth_country#54, customer_login#55, customer_email_address#56], 0

(179) VeloxColumnarToRow
Input [7]: [customer_id#50, customer_first_name#51, customer_last_name#52, customer_preferred_cust_flag#53, customer_birth_country#54, customer_login#55, customer_email_address#56]

===== Subqueries =====

Subquery:1 Hosting operator id = 3 Hosting Expression = ss_sold_date_sk#14 IN dynamicpruning#15
ColumnarBroadcastExchange (183)
+- ^ FilterExecTransformer (181)
   +- ^ FileSourceScanExecTransformer parquet spark_catalog.default.date_dim (180)


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

(181) FilterExecTransformer
Input [2]: [d_date_sk#16, d_year#17]
Arguments: ((isnotnull(d_year#17) AND (d_year#17 = 2001)) AND isnotnull(d_date_sk#16))

(182) WholeStageCodegenTransformer (1)
Input [2]: [d_date_sk#16, d_year#17]
Arguments: false

(183) ColumnarBroadcastExchange
Input [2]: [d_date_sk#16, d_year#17]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, false] as bigint)),false), [plan_id=18]

Subquery:2 Hosting operator id = 28 Hosting Expression = ss_sold_date_sk#40 IN dynamicpruning#41
ColumnarBroadcastExchange (187)
+- ^ FilterExecTransformer (185)
   +- ^ FileSourceScanExecTransformer parquet spark_catalog.default.date_dim (184)


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

(185) FilterExecTransformer
Input [2]: [d_date_sk#42, d_year#43]
Arguments: ((isnotnull(d_year#43) AND (d_year#43 = 2002)) AND isnotnull(d_date_sk#42))

(186) WholeStageCodegenTransformer (5)
Input [2]: [d_date_sk#42, d_year#43]
Arguments: false

(187) ColumnarBroadcastExchange
Input [2]: [d_date_sk#42, d_year#43]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, false] as bigint)),false), [plan_id=19]

Subquery:3 Hosting operator id = 57 Hosting Expression = cs_sold_date_sk#71 IN dynamicpruning#15

Subquery:4 Hosting operator id = 88 Hosting Expression = cs_sold_date_sk#96 IN dynamicpruning#41

Subquery:5 Hosting operator id = 118 Hosting Expression = ws_sold_date_sk#120 IN dynamicpruning#15

Subquery:6 Hosting operator id = 149 Hosting Expression = ws_sold_date_sk#145 IN dynamicpruning#41


