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


(1) Scan parquet default.catalog_sales
Output [9]: [cs_sold_date_sk#1, cs_bill_customer_sk#2, cs_bill_cdemo_sk#3, cs_item_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, cs_net_profit#9]
Batched: true
Location [not included in comparison]/{warehouse_dir}/catalog_sales]
PushedFilters: [IsNotNull(cs_bill_cdemo_sk), IsNotNull(cs_bill_customer_sk), IsNotNull(cs_sold_date_sk), IsNotNull(cs_item_sk)]
ReadSchema: struct<cs_sold_date_sk:int,cs_bill_customer_sk:int,cs_bill_cdemo_sk:int,cs_item_sk:int,cs_quantity:int,cs_list_price:decimal(7,2),cs_sales_price:decimal(7,2),cs_coupon_amt:decimal(7,2),cs_net_profit:decimal(7,2)>

(2) ColumnarToRow [codegen id : 7]
Input [9]: [cs_sold_date_sk#1, cs_bill_customer_sk#2, cs_bill_cdemo_sk#3, cs_item_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, cs_net_profit#9]

(3) Filter [codegen id : 7]
Input [9]: [cs_sold_date_sk#1, cs_bill_customer_sk#2, cs_bill_cdemo_sk#3, cs_item_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, cs_net_profit#9]
Condition : (((isnotnull(cs_bill_cdemo_sk#3) AND isnotnull(cs_bill_customer_sk#2)) AND isnotnull(cs_sold_date_sk#1)) AND isnotnull(cs_item_sk#4))

(4) Scan parquet default.customer_demographics
Output [4]: [cd_demo_sk#10, cd_gender#11, cd_education_status#12, cd_dep_count#13]
Batched: true
Location [not included in comparison]/{warehouse_dir}/customer_demographics]
PushedFilters: [IsNotNull(cd_gender), IsNotNull(cd_education_status), EqualTo(cd_gender,M), EqualTo(cd_education_status,College), IsNotNull(cd_demo_sk)]
ReadSchema: struct<cd_demo_sk:int,cd_gender:string,cd_education_status:string,cd_dep_count:int>

(5) ColumnarToRow [codegen id : 1]
Input [4]: [cd_demo_sk#10, cd_gender#11, cd_education_status#12, cd_dep_count#13]

(6) Filter [codegen id : 1]
Input [4]: [cd_demo_sk#10, cd_gender#11, cd_education_status#12, cd_dep_count#13]
Condition : ((((isnotnull(cd_gender#11) AND isnotnull(cd_education_status#12)) AND (cd_gender#11 = M)) AND (cd_education_status#12 = College)) AND isnotnull(cd_demo_sk#10))

(7) Project [codegen id : 1]
Output [2]: [cd_demo_sk#10, cd_dep_count#13]
Input [4]: [cd_demo_sk#10, cd_gender#11, cd_education_status#12, cd_dep_count#13]

(8) BroadcastExchange
Input [2]: [cd_demo_sk#10, cd_dep_count#13]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, true] as bigint)),false), [id=#14]

(9) BroadcastHashJoin [codegen id : 7]
Left keys [1]: [cs_bill_cdemo_sk#3]
Right keys [1]: [cd_demo_sk#10]
Join condition: None

(10) Project [codegen id : 7]
Output [9]: [cs_sold_date_sk#1, cs_bill_customer_sk#2, cs_item_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, cs_net_profit#9, cd_dep_count#13]
Input [11]: [cs_sold_date_sk#1, cs_bill_customer_sk#2, cs_bill_cdemo_sk#3, cs_item_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, cs_net_profit#9, cd_demo_sk#10, cd_dep_count#13]

(11) Scan parquet default.customer
Output [5]: [c_customer_sk#15, c_current_cdemo_sk#16, c_current_addr_sk#17, c_birth_month#18, c_birth_year#19]
Batched: true
Location [not included in comparison]/{warehouse_dir}/customer]
PushedFilters: [In(c_birth_month, [9,5,12,4,1,10]), IsNotNull(c_customer_sk), IsNotNull(c_current_cdemo_sk), IsNotNull(c_current_addr_sk)]
ReadSchema: struct<c_customer_sk:int,c_current_cdemo_sk:int,c_current_addr_sk:int,c_birth_month:int,c_birth_year:int>

(12) ColumnarToRow [codegen id : 2]
Input [5]: [c_customer_sk#15, c_current_cdemo_sk#16, c_current_addr_sk#17, c_birth_month#18, c_birth_year#19]

(13) Filter [codegen id : 2]
Input [5]: [c_customer_sk#15, c_current_cdemo_sk#16, c_current_addr_sk#17, c_birth_month#18, c_birth_year#19]
Condition : (((c_birth_month#18 IN (9,5,12,4,1,10) AND isnotnull(c_customer_sk#15)) AND isnotnull(c_current_cdemo_sk#16)) AND isnotnull(c_current_addr_sk#17))

(14) Project [codegen id : 2]
Output [4]: [c_customer_sk#15, c_current_cdemo_sk#16, c_current_addr_sk#17, c_birth_year#19]
Input [5]: [c_customer_sk#15, c_current_cdemo_sk#16, c_current_addr_sk#17, c_birth_month#18, c_birth_year#19]

(15) BroadcastExchange
Input [4]: [c_customer_sk#15, c_current_cdemo_sk#16, c_current_addr_sk#17, c_birth_year#19]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, true] as bigint)),false), [id=#20]

(16) BroadcastHashJoin [codegen id : 7]
Left keys [1]: [cs_bill_customer_sk#2]
Right keys [1]: [c_customer_sk#15]
Join condition: None

(17) Project [codegen id : 7]
Output [11]: [cs_sold_date_sk#1, cs_item_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, cs_net_profit#9, cd_dep_count#13, c_current_cdemo_sk#16, c_current_addr_sk#17, c_birth_year#19]
Input [13]: [cs_sold_date_sk#1, cs_bill_customer_sk#2, cs_item_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, cs_net_profit#9, cd_dep_count#13, c_customer_sk#15, c_current_cdemo_sk#16, c_current_addr_sk#17, c_birth_year#19]

(18) Scan parquet default.customer_demographics
Output [1]: [cd_demo_sk#21]
Batched: true
Location [not included in comparison]/{warehouse_dir}/customer_demographics]
PushedFilters: [IsNotNull(cd_demo_sk)]
ReadSchema: struct<cd_demo_sk:int>

(19) ColumnarToRow [codegen id : 3]
Input [1]: [cd_demo_sk#21]

(20) Filter [codegen id : 3]
Input [1]: [cd_demo_sk#21]
Condition : isnotnull(cd_demo_sk#21)

(21) BroadcastExchange
Input [1]: [cd_demo_sk#21]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, false] as bigint)),false), [id=#22]

(22) BroadcastHashJoin [codegen id : 7]
Left keys [1]: [c_current_cdemo_sk#16]
Right keys [1]: [cd_demo_sk#21]
Join condition: None

(23) Project [codegen id : 7]
Output [10]: [cs_sold_date_sk#1, cs_item_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, cs_net_profit#9, cd_dep_count#13, c_current_addr_sk#17, c_birth_year#19]
Input [12]: [cs_sold_date_sk#1, cs_item_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, cs_net_profit#9, cd_dep_count#13, c_current_cdemo_sk#16, c_current_addr_sk#17, c_birth_year#19, cd_demo_sk#21]

(24) Scan parquet default.customer_address
Output [4]: [ca_address_sk#23, ca_county#24, ca_state#25, ca_country#26]
Batched: true
Location [not included in comparison]/{warehouse_dir}/customer_address]
PushedFilters: [In(ca_state, [ND,WI,AL,NC,OK,MS,TN]), IsNotNull(ca_address_sk)]
ReadSchema: struct<ca_address_sk:int,ca_county:string,ca_state:string,ca_country:string>

(25) ColumnarToRow [codegen id : 4]
Input [4]: [ca_address_sk#23, ca_county#24, ca_state#25, ca_country#26]

(26) Filter [codegen id : 4]
Input [4]: [ca_address_sk#23, ca_county#24, ca_state#25, ca_country#26]
Condition : (ca_state#25 IN (ND,WI,AL,NC,OK,MS,TN) AND isnotnull(ca_address_sk#23))

(27) BroadcastExchange
Input [4]: [ca_address_sk#23, ca_county#24, ca_state#25, ca_country#26]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, false] as bigint)),false), [id=#27]

(28) BroadcastHashJoin [codegen id : 7]
Left keys [1]: [c_current_addr_sk#17]
Right keys [1]: [ca_address_sk#23]
Join condition: None

(29) Project [codegen id : 7]
Output [12]: [cs_sold_date_sk#1, cs_item_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, cs_net_profit#9, cd_dep_count#13, c_birth_year#19, ca_county#24, ca_state#25, ca_country#26]
Input [14]: [cs_sold_date_sk#1, cs_item_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, cs_net_profit#9, cd_dep_count#13, c_current_addr_sk#17, c_birth_year#19, ca_address_sk#23, ca_county#24, ca_state#25, ca_country#26]

(30) Scan parquet default.date_dim
Output [2]: [d_date_sk#28, d_year#29]
Batched: true
Location [not included in comparison]/{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>

(31) ColumnarToRow [codegen id : 5]
Input [2]: [d_date_sk#28, d_year#29]

(32) Filter [codegen id : 5]
Input [2]: [d_date_sk#28, d_year#29]
Condition : ((isnotnull(d_year#29) AND (d_year#29 = 2001)) AND isnotnull(d_date_sk#28))

(33) Project [codegen id : 5]
Output [1]: [d_date_sk#28]
Input [2]: [d_date_sk#28, d_year#29]

(34) BroadcastExchange
Input [1]: [d_date_sk#28]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, true] as bigint)),false), [id=#30]

(35) BroadcastHashJoin [codegen id : 7]
Left keys [1]: [cs_sold_date_sk#1]
Right keys [1]: [d_date_sk#28]
Join condition: None

(36) Project [codegen id : 7]
Output [11]: [cs_item_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, cs_net_profit#9, cd_dep_count#13, c_birth_year#19, ca_county#24, ca_state#25, ca_country#26]
Input [13]: [cs_sold_date_sk#1, cs_item_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, cs_net_profit#9, cd_dep_count#13, c_birth_year#19, ca_county#24, ca_state#25, ca_country#26, d_date_sk#28]

(37) Scan parquet default.item
Output [2]: [i_item_sk#31, i_item_id#32]
Batched: true
Location [not included in comparison]/{warehouse_dir}/item]
PushedFilters: [IsNotNull(i_item_sk)]
ReadSchema: struct<i_item_sk:int,i_item_id:string>

(38) ColumnarToRow [codegen id : 6]
Input [2]: [i_item_sk#31, i_item_id#32]

(39) Filter [codegen id : 6]
Input [2]: [i_item_sk#31, i_item_id#32]
Condition : isnotnull(i_item_sk#31)

(40) BroadcastExchange
Input [2]: [i_item_sk#31, i_item_id#32]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, false] as bigint)),false), [id=#33]

(41) BroadcastHashJoin [codegen id : 7]
Left keys [1]: [cs_item_sk#4]
Right keys [1]: [i_item_sk#31]
Join condition: None

(42) Project [codegen id : 7]
Output [11]: [i_item_id#32, ca_country#26, ca_state#25, ca_county#24, cast(cs_quantity#5 as decimal(12,2)) AS agg1#34, cast(cs_list_price#6 as decimal(12,2)) AS agg2#35, cast(cs_coupon_amt#8 as decimal(12,2)) AS agg3#36, cast(cs_sales_price#7 as decimal(12,2)) AS agg4#37, cast(cs_net_profit#9 as decimal(12,2)) AS agg5#38, cast(c_birth_year#19 as decimal(12,2)) AS agg6#39, cast(cd_dep_count#13 as decimal(12,2)) AS agg7#40]
Input [13]: [cs_item_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, cs_net_profit#9, cd_dep_count#13, c_birth_year#19, ca_county#24, ca_state#25, ca_country#26, i_item_sk#31, i_item_id#32]

(43) HashAggregate [codegen id : 7]
Input [11]: [i_item_id#32, ca_country#26, ca_state#25, ca_county#24, agg1#34, agg2#35, agg3#36, agg4#37, agg5#38, agg6#39, agg7#40]
Keys [4]: [i_item_id#32, ca_country#26, ca_state#25, ca_county#24]
Functions [7]: [partial_avg(agg1#34), partial_avg(agg2#35), partial_avg(agg3#36), partial_avg(agg4#37), partial_avg(agg5#38), partial_avg(agg6#39), partial_avg(agg7#40)]
Aggregate Attributes [14]: [sum#41, count#42, sum#43, count#44, sum#45, count#46, sum#47, count#48, sum#49, count#50, sum#51, count#52, sum#53, count#54]
Results [18]: [i_item_id#32, ca_country#26, ca_state#25, ca_county#24, sum#55, count#56, sum#57, count#58, sum#59, count#60, sum#61, count#62, sum#63, count#64, sum#65, count#66, sum#67, count#68]

(44) Exchange
Input [18]: [i_item_id#32, ca_country#26, ca_state#25, ca_county#24, sum#55, count#56, sum#57, count#58, sum#59, count#60, sum#61, count#62, sum#63, count#64, sum#65, count#66, sum#67, count#68]
Arguments: hashpartitioning(i_item_id#32, ca_country#26, ca_state#25, ca_county#24, 5), true, [id=#69]

(45) HashAggregate [codegen id : 8]
Input [18]: [i_item_id#32, ca_country#26, ca_state#25, ca_county#24, sum#55, count#56, sum#57, count#58, sum#59, count#60, sum#61, count#62, sum#63, count#64, sum#65, count#66, sum#67, count#68]
Keys [4]: [i_item_id#32, ca_country#26, ca_state#25, ca_county#24]
Functions [7]: [avg(agg1#34), avg(agg2#35), avg(agg3#36), avg(agg4#37), avg(agg5#38), avg(agg6#39), avg(agg7#40)]
Aggregate Attributes [7]: [avg(agg1#34)#70, avg(agg2#35)#71, avg(agg3#36)#72, avg(agg4#37)#73, avg(agg5#38)#74, avg(agg6#39)#75, avg(agg7#40)#76]
Results [11]: [i_item_id#32, ca_country#26, ca_state#25, ca_county#24, avg(agg1#34)#70 AS agg1#77, avg(agg2#35)#71 AS agg2#78, avg(agg3#36)#72 AS agg3#79, avg(agg4#37)#73 AS agg4#80, avg(agg5#38)#74 AS agg5#81, avg(agg6#39)#75 AS agg6#82, avg(agg7#40)#76 AS agg7#83]

(46) Scan parquet default.catalog_sales
Output [9]: [cs_sold_date_sk#1, cs_bill_customer_sk#2, cs_bill_cdemo_sk#3, cs_item_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, cs_net_profit#9]
Batched: true
Location [not included in comparison]/{warehouse_dir}/catalog_sales]
PushedFilters: [IsNotNull(cs_bill_cdemo_sk), IsNotNull(cs_bill_customer_sk), IsNotNull(cs_sold_date_sk), IsNotNull(cs_item_sk)]
ReadSchema: struct<cs_sold_date_sk:int,cs_bill_customer_sk:int,cs_bill_cdemo_sk:int,cs_item_sk:int,cs_quantity:int,cs_list_price:decimal(7,2),cs_sales_price:decimal(7,2),cs_coupon_amt:decimal(7,2),cs_net_profit:decimal(7,2)>

(47) ColumnarToRow [codegen id : 15]
Input [9]: [cs_sold_date_sk#1, cs_bill_customer_sk#2, cs_bill_cdemo_sk#3, cs_item_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, cs_net_profit#9]

(48) Filter [codegen id : 15]
Input [9]: [cs_sold_date_sk#1, cs_bill_customer_sk#2, cs_bill_cdemo_sk#3, cs_item_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, cs_net_profit#9]
Condition : (((isnotnull(cs_bill_cdemo_sk#3) AND isnotnull(cs_bill_customer_sk#2)) AND isnotnull(cs_sold_date_sk#1)) AND isnotnull(cs_item_sk#4))

(49) ReusedExchange [Reuses operator id: 8]
Output [2]: [cd_demo_sk#10, cd_dep_count#13]

(50) BroadcastHashJoin [codegen id : 15]
Left keys [1]: [cs_bill_cdemo_sk#3]
Right keys [1]: [cd_demo_sk#10]
Join condition: None

(51) Project [codegen id : 15]
Output [9]: [cs_sold_date_sk#1, cs_bill_customer_sk#2, cs_item_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, cs_net_profit#9, cd_dep_count#13]
Input [11]: [cs_sold_date_sk#1, cs_bill_customer_sk#2, cs_bill_cdemo_sk#3, cs_item_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, cs_net_profit#9, cd_demo_sk#10, cd_dep_count#13]

(52) ReusedExchange [Reuses operator id: 15]
Output [4]: [c_customer_sk#15, c_current_cdemo_sk#16, c_current_addr_sk#17, c_birth_year#19]

(53) BroadcastHashJoin [codegen id : 15]
Left keys [1]: [cs_bill_customer_sk#2]
Right keys [1]: [c_customer_sk#15]
Join condition: None

(54) Project [codegen id : 15]
Output [11]: [cs_sold_date_sk#1, cs_item_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, cs_net_profit#9, cd_dep_count#13, c_current_cdemo_sk#16, c_current_addr_sk#17, c_birth_year#19]
Input [13]: [cs_sold_date_sk#1, cs_bill_customer_sk#2, cs_item_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, cs_net_profit#9, cd_dep_count#13, c_customer_sk#15, c_current_cdemo_sk#16, c_current_addr_sk#17, c_birth_year#19]

(55) ReusedExchange [Reuses operator id: 21]
Output [1]: [cd_demo_sk#84]

(56) BroadcastHashJoin [codegen id : 15]
Left keys [1]: [c_current_cdemo_sk#16]
Right keys [1]: [cd_demo_sk#84]
Join condition: None

(57) Project [codegen id : 15]
Output [10]: [cs_sold_date_sk#1, cs_item_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, cs_net_profit#9, cd_dep_count#13, c_current_addr_sk#17, c_birth_year#19]
Input [12]: [cs_sold_date_sk#1, cs_item_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, cs_net_profit#9, cd_dep_count#13, c_current_cdemo_sk#16, c_current_addr_sk#17, c_birth_year#19, cd_demo_sk#84]

(58) Scan parquet default.customer_address
Output [3]: [ca_address_sk#23, ca_state#25, ca_country#26]
Batched: true
Location [not included in comparison]/{warehouse_dir}/customer_address]
PushedFilters: [In(ca_state, [ND,WI,AL,NC,OK,MS,TN]), IsNotNull(ca_address_sk)]
ReadSchema: struct<ca_address_sk:int,ca_state:string,ca_country:string>

(59) ColumnarToRow [codegen id : 12]
Input [3]: [ca_address_sk#23, ca_state#25, ca_country#26]

(60) Filter [codegen id : 12]
Input [3]: [ca_address_sk#23, ca_state#25, ca_country#26]
Condition : (ca_state#25 IN (ND,WI,AL,NC,OK,MS,TN) AND isnotnull(ca_address_sk#23))

(61) BroadcastExchange
Input [3]: [ca_address_sk#23, ca_state#25, ca_country#26]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, false] as bigint)),false), [id=#85]

(62) BroadcastHashJoin [codegen id : 15]
Left keys [1]: [c_current_addr_sk#17]
Right keys [1]: [ca_address_sk#23]
Join condition: None

(63) Project [codegen id : 15]
Output [11]: [cs_sold_date_sk#1, cs_item_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, cs_net_profit#9, cd_dep_count#13, c_birth_year#19, ca_state#25, ca_country#26]
Input [13]: [cs_sold_date_sk#1, cs_item_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, cs_net_profit#9, cd_dep_count#13, c_current_addr_sk#17, c_birth_year#19, ca_address_sk#23, ca_state#25, ca_country#26]

(64) ReusedExchange [Reuses operator id: 34]
Output [1]: [d_date_sk#28]

(65) BroadcastHashJoin [codegen id : 15]
Left keys [1]: [cs_sold_date_sk#1]
Right keys [1]: [d_date_sk#28]
Join condition: None

(66) Project [codegen id : 15]
Output [10]: [cs_item_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, cs_net_profit#9, cd_dep_count#13, c_birth_year#19, ca_state#25, ca_country#26]
Input [12]: [cs_sold_date_sk#1, cs_item_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, cs_net_profit#9, cd_dep_count#13, c_birth_year#19, ca_state#25, ca_country#26, d_date_sk#28]

(67) ReusedExchange [Reuses operator id: 40]
Output [2]: [i_item_sk#31, i_item_id#32]

(68) BroadcastHashJoin [codegen id : 15]
Left keys [1]: [cs_item_sk#4]
Right keys [1]: [i_item_sk#31]
Join condition: None

(69) Project [codegen id : 15]
Output [10]: [i_item_id#32, ca_country#26, ca_state#25, cast(cs_quantity#5 as decimal(12,2)) AS agg1#34, cast(cs_list_price#6 as decimal(12,2)) AS agg2#35, cast(cs_coupon_amt#8 as decimal(12,2)) AS agg3#36, cast(cs_sales_price#7 as decimal(12,2)) AS agg4#37, cast(cs_net_profit#9 as decimal(12,2)) AS agg5#38, cast(c_birth_year#19 as decimal(12,2)) AS agg6#39, cast(cd_dep_count#13 as decimal(12,2)) AS agg7#40]
Input [12]: [cs_item_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, cs_net_profit#9, cd_dep_count#13, c_birth_year#19, ca_state#25, ca_country#26, i_item_sk#31, i_item_id#32]

(70) HashAggregate [codegen id : 15]
Input [10]: [i_item_id#32, ca_country#26, ca_state#25, agg1#34, agg2#35, agg3#36, agg4#37, agg5#38, agg6#39, agg7#40]
Keys [3]: [i_item_id#32, ca_country#26, ca_state#25]
Functions [7]: [partial_avg(agg1#34), partial_avg(agg2#35), partial_avg(agg3#36), partial_avg(agg4#37), partial_avg(agg5#38), partial_avg(agg6#39), partial_avg(agg7#40)]
Aggregate Attributes [14]: [sum#86, count#87, sum#88, count#89, sum#90, count#91, sum#92, count#93, sum#94, count#95, sum#96, count#97, sum#98, count#99]
Results [17]: [i_item_id#32, ca_country#26, ca_state#25, sum#100, count#101, sum#102, count#103, sum#104, count#105, sum#106, count#107, sum#108, count#109, sum#110, count#111, sum#112, count#113]

(71) Exchange
Input [17]: [i_item_id#32, ca_country#26, ca_state#25, sum#100, count#101, sum#102, count#103, sum#104, count#105, sum#106, count#107, sum#108, count#109, sum#110, count#111, sum#112, count#113]
Arguments: hashpartitioning(i_item_id#32, ca_country#26, ca_state#25, 5), true, [id=#114]

(72) HashAggregate [codegen id : 16]
Input [17]: [i_item_id#32, ca_country#26, ca_state#25, sum#100, count#101, sum#102, count#103, sum#104, count#105, sum#106, count#107, sum#108, count#109, sum#110, count#111, sum#112, count#113]
Keys [3]: [i_item_id#32, ca_country#26, ca_state#25]
Functions [7]: [avg(agg1#34), avg(agg2#35), avg(agg3#36), avg(agg4#37), avg(agg5#38), avg(agg6#39), avg(agg7#40)]
Aggregate Attributes [7]: [avg(agg1#34)#115, avg(agg2#35)#116, avg(agg3#36)#117, avg(agg4#37)#118, avg(agg5#38)#119, avg(agg6#39)#120, avg(agg7#40)#121]
Results [11]: [i_item_id#32, ca_country#26, ca_state#25, null AS county#122, avg(agg1#34)#115 AS agg1#123, avg(agg2#35)#116 AS agg2#124, avg(agg3#36)#117 AS agg3#125, avg(agg4#37)#118 AS agg4#126, avg(agg5#38)#119 AS agg5#127, avg(agg6#39)#120 AS agg6#128, avg(agg7#40)#121 AS agg7#129]

(73) Scan parquet default.catalog_sales
Output [9]: [cs_sold_date_sk#1, cs_bill_customer_sk#2, cs_bill_cdemo_sk#3, cs_item_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, cs_net_profit#9]
Batched: true
Location [not included in comparison]/{warehouse_dir}/catalog_sales]
PushedFilters: [IsNotNull(cs_bill_cdemo_sk), IsNotNull(cs_bill_customer_sk), IsNotNull(cs_sold_date_sk), IsNotNull(cs_item_sk)]
ReadSchema: struct<cs_sold_date_sk:int,cs_bill_customer_sk:int,cs_bill_cdemo_sk:int,cs_item_sk:int,cs_quantity:int,cs_list_price:decimal(7,2),cs_sales_price:decimal(7,2),cs_coupon_amt:decimal(7,2),cs_net_profit:decimal(7,2)>

(74) ColumnarToRow [codegen id : 23]
Input [9]: [cs_sold_date_sk#1, cs_bill_customer_sk#2, cs_bill_cdemo_sk#3, cs_item_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, cs_net_profit#9]

(75) Filter [codegen id : 23]
Input [9]: [cs_sold_date_sk#1, cs_bill_customer_sk#2, cs_bill_cdemo_sk#3, cs_item_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, cs_net_profit#9]
Condition : (((isnotnull(cs_bill_cdemo_sk#3) AND isnotnull(cs_bill_customer_sk#2)) AND isnotnull(cs_sold_date_sk#1)) AND isnotnull(cs_item_sk#4))

(76) ReusedExchange [Reuses operator id: 8]
Output [2]: [cd_demo_sk#10, cd_dep_count#13]

(77) BroadcastHashJoin [codegen id : 23]
Left keys [1]: [cs_bill_cdemo_sk#3]
Right keys [1]: [cd_demo_sk#10]
Join condition: None

(78) Project [codegen id : 23]
Output [9]: [cs_sold_date_sk#1, cs_bill_customer_sk#2, cs_item_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, cs_net_profit#9, cd_dep_count#13]
Input [11]: [cs_sold_date_sk#1, cs_bill_customer_sk#2, cs_bill_cdemo_sk#3, cs_item_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, cs_net_profit#9, cd_demo_sk#10, cd_dep_count#13]

(79) ReusedExchange [Reuses operator id: 15]
Output [4]: [c_customer_sk#15, c_current_cdemo_sk#16, c_current_addr_sk#17, c_birth_year#19]

(80) BroadcastHashJoin [codegen id : 23]
Left keys [1]: [cs_bill_customer_sk#2]
Right keys [1]: [c_customer_sk#15]
Join condition: None

(81) Project [codegen id : 23]
Output [11]: [cs_sold_date_sk#1, cs_item_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, cs_net_profit#9, cd_dep_count#13, c_current_cdemo_sk#16, c_current_addr_sk#17, c_birth_year#19]
Input [13]: [cs_sold_date_sk#1, cs_bill_customer_sk#2, cs_item_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, cs_net_profit#9, cd_dep_count#13, c_customer_sk#15, c_current_cdemo_sk#16, c_current_addr_sk#17, c_birth_year#19]

(82) ReusedExchange [Reuses operator id: 21]
Output [1]: [cd_demo_sk#130]

(83) BroadcastHashJoin [codegen id : 23]
Left keys [1]: [c_current_cdemo_sk#16]
Right keys [1]: [cd_demo_sk#130]
Join condition: None

(84) Project [codegen id : 23]
Output [10]: [cs_sold_date_sk#1, cs_item_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, cs_net_profit#9, cd_dep_count#13, c_current_addr_sk#17, c_birth_year#19]
Input [12]: [cs_sold_date_sk#1, cs_item_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, cs_net_profit#9, cd_dep_count#13, c_current_cdemo_sk#16, c_current_addr_sk#17, c_birth_year#19, cd_demo_sk#130]

(85) Scan parquet default.customer_address
Output [3]: [ca_address_sk#23, ca_state#25, ca_country#26]
Batched: true
Location [not included in comparison]/{warehouse_dir}/customer_address]
PushedFilters: [In(ca_state, [ND,WI,AL,NC,OK,MS,TN]), IsNotNull(ca_address_sk)]
ReadSchema: struct<ca_address_sk:int,ca_state:string,ca_country:string>

(86) ColumnarToRow [codegen id : 20]
Input [3]: [ca_address_sk#23, ca_state#25, ca_country#26]

(87) Filter [codegen id : 20]
Input [3]: [ca_address_sk#23, ca_state#25, ca_country#26]
Condition : (ca_state#25 IN (ND,WI,AL,NC,OK,MS,TN) AND isnotnull(ca_address_sk#23))

(88) Project [codegen id : 20]
Output [2]: [ca_address_sk#23, ca_country#26]
Input [3]: [ca_address_sk#23, ca_state#25, ca_country#26]

(89) BroadcastExchange
Input [2]: [ca_address_sk#23, ca_country#26]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, true] as bigint)),false), [id=#131]

(90) BroadcastHashJoin [codegen id : 23]
Left keys [1]: [c_current_addr_sk#17]
Right keys [1]: [ca_address_sk#23]
Join condition: None

(91) Project [codegen id : 23]
Output [10]: [cs_sold_date_sk#1, cs_item_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, cs_net_profit#9, cd_dep_count#13, c_birth_year#19, ca_country#26]
Input [12]: [cs_sold_date_sk#1, cs_item_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, cs_net_profit#9, cd_dep_count#13, c_current_addr_sk#17, c_birth_year#19, ca_address_sk#23, ca_country#26]

(92) ReusedExchange [Reuses operator id: 34]
Output [1]: [d_date_sk#28]

(93) BroadcastHashJoin [codegen id : 23]
Left keys [1]: [cs_sold_date_sk#1]
Right keys [1]: [d_date_sk#28]
Join condition: None

(94) Project [codegen id : 23]
Output [9]: [cs_item_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, cs_net_profit#9, cd_dep_count#13, c_birth_year#19, ca_country#26]
Input [11]: [cs_sold_date_sk#1, cs_item_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, cs_net_profit#9, cd_dep_count#13, c_birth_year#19, ca_country#26, d_date_sk#28]

(95) ReusedExchange [Reuses operator id: 40]
Output [2]: [i_item_sk#31, i_item_id#32]

(96) BroadcastHashJoin [codegen id : 23]
Left keys [1]: [cs_item_sk#4]
Right keys [1]: [i_item_sk#31]
Join condition: None

(97) Project [codegen id : 23]
Output [9]: [i_item_id#32, ca_country#26, cast(cs_quantity#5 as decimal(12,2)) AS agg1#34, cast(cs_list_price#6 as decimal(12,2)) AS agg2#35, cast(cs_coupon_amt#8 as decimal(12,2)) AS agg3#36, cast(cs_sales_price#7 as decimal(12,2)) AS agg4#37, cast(cs_net_profit#9 as decimal(12,2)) AS agg5#38, cast(c_birth_year#19 as decimal(12,2)) AS agg6#39, cast(cd_dep_count#13 as decimal(12,2)) AS agg7#40]
Input [11]: [cs_item_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, cs_net_profit#9, cd_dep_count#13, c_birth_year#19, ca_country#26, i_item_sk#31, i_item_id#32]

(98) HashAggregate [codegen id : 23]
Input [9]: [i_item_id#32, ca_country#26, agg1#34, agg2#35, agg3#36, agg4#37, agg5#38, agg6#39, agg7#40]
Keys [2]: [i_item_id#32, ca_country#26]
Functions [7]: [partial_avg(agg1#34), partial_avg(agg2#35), partial_avg(agg3#36), partial_avg(agg4#37), partial_avg(agg5#38), partial_avg(agg6#39), partial_avg(agg7#40)]
Aggregate Attributes [14]: [sum#132, count#133, sum#134, count#135, sum#136, count#137, sum#138, count#139, sum#140, count#141, sum#142, count#143, sum#144, count#145]
Results [16]: [i_item_id#32, ca_country#26, sum#146, count#147, sum#148, count#149, sum#150, count#151, sum#152, count#153, sum#154, count#155, sum#156, count#157, sum#158, count#159]

(99) Exchange
Input [16]: [i_item_id#32, ca_country#26, sum#146, count#147, sum#148, count#149, sum#150, count#151, sum#152, count#153, sum#154, count#155, sum#156, count#157, sum#158, count#159]
Arguments: hashpartitioning(i_item_id#32, ca_country#26, 5), true, [id=#160]

(100) HashAggregate [codegen id : 24]
Input [16]: [i_item_id#32, ca_country#26, sum#146, count#147, sum#148, count#149, sum#150, count#151, sum#152, count#153, sum#154, count#155, sum#156, count#157, sum#158, count#159]
Keys [2]: [i_item_id#32, ca_country#26]
Functions [7]: [avg(agg1#34), avg(agg2#35), avg(agg3#36), avg(agg4#37), avg(agg5#38), avg(agg6#39), avg(agg7#40)]
Aggregate Attributes [7]: [avg(agg1#34)#161, avg(agg2#35)#162, avg(agg3#36)#163, avg(agg4#37)#164, avg(agg5#38)#165, avg(agg6#39)#166, avg(agg7#40)#167]
Results [11]: [i_item_id#32, ca_country#26, null AS ca_state#168, null AS county#169, avg(agg1#34)#161 AS agg1#170, avg(agg2#35)#162 AS agg2#171, avg(agg3#36)#163 AS agg3#172, avg(agg4#37)#164 AS agg4#173, avg(agg5#38)#165 AS agg5#174, avg(agg6#39)#166 AS agg6#175, avg(agg7#40)#167 AS agg7#176]

(101) Scan parquet default.catalog_sales
Output [9]: [cs_sold_date_sk#1, cs_bill_customer_sk#2, cs_bill_cdemo_sk#3, cs_item_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, cs_net_profit#9]
Batched: true
Location [not included in comparison]/{warehouse_dir}/catalog_sales]
PushedFilters: [IsNotNull(cs_bill_cdemo_sk), IsNotNull(cs_bill_customer_sk), IsNotNull(cs_sold_date_sk), IsNotNull(cs_item_sk)]
ReadSchema: struct<cs_sold_date_sk:int,cs_bill_customer_sk:int,cs_bill_cdemo_sk:int,cs_item_sk:int,cs_quantity:int,cs_list_price:decimal(7,2),cs_sales_price:decimal(7,2),cs_coupon_amt:decimal(7,2),cs_net_profit:decimal(7,2)>

(102) ColumnarToRow [codegen id : 31]
Input [9]: [cs_sold_date_sk#1, cs_bill_customer_sk#2, cs_bill_cdemo_sk#3, cs_item_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, cs_net_profit#9]

(103) Filter [codegen id : 31]
Input [9]: [cs_sold_date_sk#1, cs_bill_customer_sk#2, cs_bill_cdemo_sk#3, cs_item_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, cs_net_profit#9]
Condition : (((isnotnull(cs_bill_cdemo_sk#3) AND isnotnull(cs_bill_customer_sk#2)) AND isnotnull(cs_sold_date_sk#1)) AND isnotnull(cs_item_sk#4))

(104) ReusedExchange [Reuses operator id: 8]
Output [2]: [cd_demo_sk#10, cd_dep_count#13]

(105) BroadcastHashJoin [codegen id : 31]
Left keys [1]: [cs_bill_cdemo_sk#3]
Right keys [1]: [cd_demo_sk#10]
Join condition: None

(106) Project [codegen id : 31]
Output [9]: [cs_sold_date_sk#1, cs_bill_customer_sk#2, cs_item_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, cs_net_profit#9, cd_dep_count#13]
Input [11]: [cs_sold_date_sk#1, cs_bill_customer_sk#2, cs_bill_cdemo_sk#3, cs_item_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, cs_net_profit#9, cd_demo_sk#10, cd_dep_count#13]

(107) ReusedExchange [Reuses operator id: 15]
Output [4]: [c_customer_sk#15, c_current_cdemo_sk#16, c_current_addr_sk#17, c_birth_year#19]

(108) BroadcastHashJoin [codegen id : 31]
Left keys [1]: [cs_bill_customer_sk#2]
Right keys [1]: [c_customer_sk#15]
Join condition: None

(109) Project [codegen id : 31]
Output [11]: [cs_sold_date_sk#1, cs_item_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, cs_net_profit#9, cd_dep_count#13, c_current_cdemo_sk#16, c_current_addr_sk#17, c_birth_year#19]
Input [13]: [cs_sold_date_sk#1, cs_bill_customer_sk#2, cs_item_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, cs_net_profit#9, cd_dep_count#13, c_customer_sk#15, c_current_cdemo_sk#16, c_current_addr_sk#17, c_birth_year#19]

(110) ReusedExchange [Reuses operator id: 21]
Output [1]: [cd_demo_sk#177]

(111) BroadcastHashJoin [codegen id : 31]
Left keys [1]: [c_current_cdemo_sk#16]
Right keys [1]: [cd_demo_sk#177]
Join condition: None

(112) Project [codegen id : 31]
Output [10]: [cs_sold_date_sk#1, cs_item_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, cs_net_profit#9, cd_dep_count#13, c_current_addr_sk#17, c_birth_year#19]
Input [12]: [cs_sold_date_sk#1, cs_item_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, cs_net_profit#9, cd_dep_count#13, c_current_cdemo_sk#16, c_current_addr_sk#17, c_birth_year#19, cd_demo_sk#177]

(113) Scan parquet default.customer_address
Output [2]: [ca_address_sk#23, ca_state#25]
Batched: true
Location [not included in comparison]/{warehouse_dir}/customer_address]
PushedFilters: [In(ca_state, [ND,WI,AL,NC,OK,MS,TN]), IsNotNull(ca_address_sk)]
ReadSchema: struct<ca_address_sk:int,ca_state:string>

(114) ColumnarToRow [codegen id : 28]
Input [2]: [ca_address_sk#23, ca_state#25]

(115) Filter [codegen id : 28]
Input [2]: [ca_address_sk#23, ca_state#25]
Condition : (ca_state#25 IN (ND,WI,AL,NC,OK,MS,TN) AND isnotnull(ca_address_sk#23))

(116) Project [codegen id : 28]
Output [1]: [ca_address_sk#23]
Input [2]: [ca_address_sk#23, ca_state#25]

(117) BroadcastExchange
Input [1]: [ca_address_sk#23]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, true] as bigint)),false), [id=#178]

(118) BroadcastHashJoin [codegen id : 31]
Left keys [1]: [c_current_addr_sk#17]
Right keys [1]: [ca_address_sk#23]
Join condition: None

(119) Project [codegen id : 31]
Output [9]: [cs_sold_date_sk#1, cs_item_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, cs_net_profit#9, cd_dep_count#13, c_birth_year#19]
Input [11]: [cs_sold_date_sk#1, cs_item_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, cs_net_profit#9, cd_dep_count#13, c_current_addr_sk#17, c_birth_year#19, ca_address_sk#23]

(120) ReusedExchange [Reuses operator id: 34]
Output [1]: [d_date_sk#28]

(121) BroadcastHashJoin [codegen id : 31]
Left keys [1]: [cs_sold_date_sk#1]
Right keys [1]: [d_date_sk#28]
Join condition: None

(122) Project [codegen id : 31]
Output [8]: [cs_item_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, cs_net_profit#9, cd_dep_count#13, c_birth_year#19]
Input [10]: [cs_sold_date_sk#1, cs_item_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, cs_net_profit#9, cd_dep_count#13, c_birth_year#19, d_date_sk#28]

(123) ReusedExchange [Reuses operator id: 40]
Output [2]: [i_item_sk#31, i_item_id#32]

(124) BroadcastHashJoin [codegen id : 31]
Left keys [1]: [cs_item_sk#4]
Right keys [1]: [i_item_sk#31]
Join condition: None

(125) Project [codegen id : 31]
Output [8]: [i_item_id#32, cast(cs_quantity#5 as decimal(12,2)) AS agg1#34, cast(cs_list_price#6 as decimal(12,2)) AS agg2#35, cast(cs_coupon_amt#8 as decimal(12,2)) AS agg3#36, cast(cs_sales_price#7 as decimal(12,2)) AS agg4#37, cast(cs_net_profit#9 as decimal(12,2)) AS agg5#38, cast(c_birth_year#19 as decimal(12,2)) AS agg6#39, cast(cd_dep_count#13 as decimal(12,2)) AS agg7#40]
Input [10]: [cs_item_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, cs_net_profit#9, cd_dep_count#13, c_birth_year#19, i_item_sk#31, i_item_id#32]

(126) HashAggregate [codegen id : 31]
Input [8]: [i_item_id#32, agg1#34, agg2#35, agg3#36, agg4#37, agg5#38, agg6#39, agg7#40]
Keys [1]: [i_item_id#32]
Functions [7]: [partial_avg(agg1#34), partial_avg(agg2#35), partial_avg(agg3#36), partial_avg(agg4#37), partial_avg(agg5#38), partial_avg(agg6#39), partial_avg(agg7#40)]
Aggregate Attributes [14]: [sum#179, count#180, sum#181, count#182, sum#183, count#184, sum#185, count#186, sum#187, count#188, sum#189, count#190, sum#191, count#192]
Results [15]: [i_item_id#32, sum#193, count#194, sum#195, count#196, sum#197, count#198, sum#199, count#200, sum#201, count#202, sum#203, count#204, sum#205, count#206]

(127) Exchange
Input [15]: [i_item_id#32, sum#193, count#194, sum#195, count#196, sum#197, count#198, sum#199, count#200, sum#201, count#202, sum#203, count#204, sum#205, count#206]
Arguments: hashpartitioning(i_item_id#32, 5), true, [id=#207]

(128) HashAggregate [codegen id : 32]
Input [15]: [i_item_id#32, sum#193, count#194, sum#195, count#196, sum#197, count#198, sum#199, count#200, sum#201, count#202, sum#203, count#204, sum#205, count#206]
Keys [1]: [i_item_id#32]
Functions [7]: [avg(agg1#34), avg(agg2#35), avg(agg3#36), avg(agg4#37), avg(agg5#38), avg(agg6#39), avg(agg7#40)]
Aggregate Attributes [7]: [avg(agg1#34)#208, avg(agg2#35)#209, avg(agg3#36)#210, avg(agg4#37)#211, avg(agg5#38)#212, avg(agg6#39)#213, avg(agg7#40)#214]
Results [11]: [i_item_id#32, null AS ca_country#215, null AS ca_state#216, null AS county#217, avg(agg1#34)#208 AS agg1#218, avg(agg2#35)#209 AS agg2#219, avg(agg3#36)#210 AS agg3#220, avg(agg4#37)#211 AS agg4#221, avg(agg5#38)#212 AS agg5#222, avg(agg6#39)#213 AS agg6#223, avg(agg7#40)#214 AS agg7#224]

(129) Scan parquet default.catalog_sales
Output [9]: [cs_sold_date_sk#1, cs_bill_customer_sk#2, cs_bill_cdemo_sk#3, cs_item_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, cs_net_profit#9]
Batched: true
Location [not included in comparison]/{warehouse_dir}/catalog_sales]
PushedFilters: [IsNotNull(cs_bill_cdemo_sk), IsNotNull(cs_bill_customer_sk), IsNotNull(cs_sold_date_sk), IsNotNull(cs_item_sk)]
ReadSchema: struct<cs_sold_date_sk:int,cs_bill_customer_sk:int,cs_bill_cdemo_sk:int,cs_item_sk:int,cs_quantity:int,cs_list_price:decimal(7,2),cs_sales_price:decimal(7,2),cs_coupon_amt:decimal(7,2),cs_net_profit:decimal(7,2)>

(130) ColumnarToRow [codegen id : 39]
Input [9]: [cs_sold_date_sk#1, cs_bill_customer_sk#2, cs_bill_cdemo_sk#3, cs_item_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, cs_net_profit#9]

(131) Filter [codegen id : 39]
Input [9]: [cs_sold_date_sk#1, cs_bill_customer_sk#2, cs_bill_cdemo_sk#3, cs_item_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, cs_net_profit#9]
Condition : (((isnotnull(cs_bill_cdemo_sk#3) AND isnotnull(cs_bill_customer_sk#2)) AND isnotnull(cs_sold_date_sk#1)) AND isnotnull(cs_item_sk#4))

(132) ReusedExchange [Reuses operator id: 8]
Output [2]: [cd_demo_sk#10, cd_dep_count#13]

(133) BroadcastHashJoin [codegen id : 39]
Left keys [1]: [cs_bill_cdemo_sk#3]
Right keys [1]: [cd_demo_sk#10]
Join condition: None

(134) Project [codegen id : 39]
Output [9]: [cs_sold_date_sk#1, cs_bill_customer_sk#2, cs_item_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, cs_net_profit#9, cd_dep_count#13]
Input [11]: [cs_sold_date_sk#1, cs_bill_customer_sk#2, cs_bill_cdemo_sk#3, cs_item_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, cs_net_profit#9, cd_demo_sk#10, cd_dep_count#13]

(135) ReusedExchange [Reuses operator id: 15]
Output [4]: [c_customer_sk#15, c_current_cdemo_sk#16, c_current_addr_sk#17, c_birth_year#19]

(136) BroadcastHashJoin [codegen id : 39]
Left keys [1]: [cs_bill_customer_sk#2]
Right keys [1]: [c_customer_sk#15]
Join condition: None

(137) Project [codegen id : 39]
Output [11]: [cs_sold_date_sk#1, cs_item_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, cs_net_profit#9, cd_dep_count#13, c_current_cdemo_sk#16, c_current_addr_sk#17, c_birth_year#19]
Input [13]: [cs_sold_date_sk#1, cs_bill_customer_sk#2, cs_item_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, cs_net_profit#9, cd_dep_count#13, c_customer_sk#15, c_current_cdemo_sk#16, c_current_addr_sk#17, c_birth_year#19]

(138) ReusedExchange [Reuses operator id: 21]
Output [1]: [cd_demo_sk#225]

(139) BroadcastHashJoin [codegen id : 39]
Left keys [1]: [c_current_cdemo_sk#16]
Right keys [1]: [cd_demo_sk#225]
Join condition: None

(140) Project [codegen id : 39]
Output [10]: [cs_sold_date_sk#1, cs_item_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, cs_net_profit#9, cd_dep_count#13, c_current_addr_sk#17, c_birth_year#19]
Input [12]: [cs_sold_date_sk#1, cs_item_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, cs_net_profit#9, cd_dep_count#13, c_current_cdemo_sk#16, c_current_addr_sk#17, c_birth_year#19, cd_demo_sk#225]

(141) ReusedExchange [Reuses operator id: 117]
Output [1]: [ca_address_sk#23]

(142) BroadcastHashJoin [codegen id : 39]
Left keys [1]: [c_current_addr_sk#17]
Right keys [1]: [ca_address_sk#23]
Join condition: None

(143) Project [codegen id : 39]
Output [9]: [cs_sold_date_sk#1, cs_item_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, cs_net_profit#9, cd_dep_count#13, c_birth_year#19]
Input [11]: [cs_sold_date_sk#1, cs_item_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, cs_net_profit#9, cd_dep_count#13, c_current_addr_sk#17, c_birth_year#19, ca_address_sk#23]

(144) ReusedExchange [Reuses operator id: 34]
Output [1]: [d_date_sk#28]

(145) BroadcastHashJoin [codegen id : 39]
Left keys [1]: [cs_sold_date_sk#1]
Right keys [1]: [d_date_sk#28]
Join condition: None

(146) Project [codegen id : 39]
Output [8]: [cs_item_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, cs_net_profit#9, cd_dep_count#13, c_birth_year#19]
Input [10]: [cs_sold_date_sk#1, cs_item_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, cs_net_profit#9, cd_dep_count#13, c_birth_year#19, d_date_sk#28]

(147) Scan parquet default.item
Output [1]: [i_item_sk#31]
Batched: true
Location [not included in comparison]/{warehouse_dir}/item]
PushedFilters: [IsNotNull(i_item_sk)]
ReadSchema: struct<i_item_sk:int>

(148) ColumnarToRow [codegen id : 38]
Input [1]: [i_item_sk#31]

(149) Filter [codegen id : 38]
Input [1]: [i_item_sk#31]
Condition : isnotnull(i_item_sk#31)

(150) BroadcastExchange
Input [1]: [i_item_sk#31]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, false] as bigint)),false), [id=#226]

(151) BroadcastHashJoin [codegen id : 39]
Left keys [1]: [cs_item_sk#4]
Right keys [1]: [i_item_sk#31]
Join condition: None

(152) Project [codegen id : 39]
Output [7]: [cast(cs_quantity#5 as decimal(12,2)) AS agg1#34, cast(cs_list_price#6 as decimal(12,2)) AS agg2#35, cast(cs_coupon_amt#8 as decimal(12,2)) AS agg3#36, cast(cs_sales_price#7 as decimal(12,2)) AS agg4#37, cast(cs_net_profit#9 as decimal(12,2)) AS agg5#38, cast(c_birth_year#19 as decimal(12,2)) AS agg6#39, cast(cd_dep_count#13 as decimal(12,2)) AS agg7#40]
Input [9]: [cs_item_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, cs_net_profit#9, cd_dep_count#13, c_birth_year#19, i_item_sk#31]

(153) HashAggregate [codegen id : 39]
Input [7]: [agg1#34, agg2#35, agg3#36, agg4#37, agg5#38, agg6#39, agg7#40]
Keys: []
Functions [7]: [partial_avg(agg1#34), partial_avg(agg2#35), partial_avg(agg3#36), partial_avg(agg4#37), partial_avg(agg5#38), partial_avg(agg6#39), partial_avg(agg7#40)]
Aggregate Attributes [14]: [sum#227, count#228, sum#229, count#230, sum#231, count#232, sum#233, count#234, sum#235, count#236, sum#237, count#238, sum#239, count#240]
Results [14]: [sum#241, count#242, sum#243, count#244, sum#245, count#246, sum#247, count#248, sum#249, count#250, sum#251, count#252, sum#253, count#254]

(154) Exchange
Input [14]: [sum#241, count#242, sum#243, count#244, sum#245, count#246, sum#247, count#248, sum#249, count#250, sum#251, count#252, sum#253, count#254]
Arguments: SinglePartition, true, [id=#255]

(155) HashAggregate [codegen id : 40]
Input [14]: [sum#241, count#242, sum#243, count#244, sum#245, count#246, sum#247, count#248, sum#249, count#250, sum#251, count#252, sum#253, count#254]
Keys: []
Functions [7]: [avg(agg1#34), avg(agg2#35), avg(agg3#36), avg(agg4#37), avg(agg5#38), avg(agg6#39), avg(agg7#40)]
Aggregate Attributes [7]: [avg(agg1#34)#256, avg(agg2#35)#257, avg(agg3#36)#258, avg(agg4#37)#259, avg(agg5#38)#260, avg(agg6#39)#261, avg(agg7#40)#262]
Results [11]: [null AS i_item_id#263, null AS ca_country#264, null AS ca_state#265, null AS county#266, avg(agg1#34)#256 AS agg1#267, avg(agg2#35)#257 AS agg2#268, avg(agg3#36)#258 AS agg3#269, avg(agg4#37)#259 AS agg4#270, avg(agg5#38)#260 AS agg5#271, avg(agg6#39)#261 AS agg6#272, avg(agg7#40)#262 AS agg7#273]

(156) Union

(157) TakeOrderedAndProject
Input [11]: [i_item_id#32, ca_country#26, ca_state#25, ca_county#24, agg1#77, agg2#78, agg3#79, agg4#80, agg5#81, agg6#82, agg7#83]
Arguments: 100, [ca_country#26 ASC NULLS FIRST, ca_state#25 ASC NULLS FIRST, ca_county#24 ASC NULLS FIRST, i_item_id#32 ASC NULLS FIRST], [i_item_id#32, ca_country#26, ca_state#25, ca_county#24, agg1#77, agg2#78, agg3#79, agg4#80, agg5#81, agg6#82, agg7#83]

