TakeOrderedAndProject [ca_country,ca_state,ca_county,i_item_id,agg1,agg2,agg3,agg4,agg5,agg6,agg7]
  WholeStageCodegen (14)
    HashAggregate [i_item_id,ca_country,ca_state,ca_county,spark_grouping_id,sum,count,sum,count,sum,count,sum,count,sum,count,sum,count,sum,count] [avg(cast(cs_quantity as decimal(12,2))),avg(cast(cs_list_price as decimal(12,2))),avg(cast(cs_coupon_amt as decimal(12,2))),avg(cast(cs_sales_price as decimal(12,2))),avg(cast(cs_net_profit as decimal(12,2))),avg(cast(c_birth_year as decimal(12,2))),avg(cast(cd_dep_count as decimal(12,2))),agg1,agg2,agg3,agg4,agg5,agg6,agg7,sum,count,sum,count,sum,count,sum,count,sum,count,sum,count,sum,count]
      InputAdapter
        Exchange [i_item_id,ca_country,ca_state,ca_county,spark_grouping_id] #1
          WholeStageCodegen (13)
            HashAggregate [i_item_id,ca_country,ca_state,ca_county,spark_grouping_id,cs_quantity,cs_list_price,cs_coupon_amt,cs_sales_price,cs_net_profit,c_birth_year,cd_dep_count] [sum,count,sum,count,sum,count,sum,count,sum,count,sum,count,sum,count,sum,count,sum,count,sum,count,sum,count,sum,count,sum,count,sum,count]
              Expand [cs_quantity,cs_list_price,cs_sales_price,cs_coupon_amt,cs_net_profit,cd_dep_count,c_birth_year,i_item_id,ca_country,ca_state,ca_county]
                Project [cs_quantity,cs_list_price,cs_sales_price,cs_coupon_amt,cs_net_profit,cd_dep_count,c_birth_year,i_item_id,ca_country,ca_state,ca_county]
                  SortMergeJoin [cs_bill_customer_sk,c_customer_sk]
                    InputAdapter
                      WholeStageCodegen (5)
                        Sort [cs_bill_customer_sk]
                          InputAdapter
                            Exchange [cs_bill_customer_sk] #2
                              WholeStageCodegen (4)
                                Project [cs_bill_customer_sk,cs_quantity,cs_list_price,cs_sales_price,cs_coupon_amt,cs_net_profit,cd_dep_count,i_item_id]
                                  BroadcastHashJoin [cs_item_sk,i_item_sk]
                                    Project [cs_bill_customer_sk,cs_item_sk,cs_quantity,cs_list_price,cs_sales_price,cs_coupon_amt,cs_net_profit,cd_dep_count]
                                      BroadcastHashJoin [cs_sold_date_sk,d_date_sk]
                                        Project [cs_bill_customer_sk,cs_item_sk,cs_quantity,cs_list_price,cs_sales_price,cs_coupon_amt,cs_net_profit,cs_sold_date_sk,cd_dep_count]
                                          BroadcastHashJoin [cs_bill_cdemo_sk,cd_demo_sk]
                                            Filter [cs_bill_cdemo_sk,cs_bill_customer_sk,cs_item_sk]
                                              ColumnarToRow
                                                InputAdapter
                                                  Scan parquet spark_catalog.default.catalog_sales [cs_bill_customer_sk,cs_bill_cdemo_sk,cs_item_sk,cs_quantity,cs_list_price,cs_sales_price,cs_coupon_amt,cs_net_profit,cs_sold_date_sk]
                                                    SubqueryBroadcast [d_date_sk] #1
                                                      BroadcastExchange #3
                                                        WholeStageCodegen (1)
                                                          Project [d_date_sk]
                                                            Filter [d_year,d_date_sk]
                                                              ColumnarToRow
                                                                InputAdapter
                                                                  Scan parquet spark_catalog.default.date_dim [d_date_sk,d_year]
                                            InputAdapter
                                              BroadcastExchange #4
                                                WholeStageCodegen (1)
                                                  Project [cd_demo_sk,cd_dep_count]
                                                    Filter [cd_gender,cd_education_status,cd_demo_sk]
                                                      ColumnarToRow
                                                        InputAdapter
                                                          Scan parquet spark_catalog.default.customer_demographics [cd_demo_sk,cd_gender,cd_education_status,cd_dep_count]
                                        InputAdapter
                                          ReusedExchange [d_date_sk] #3
                                    InputAdapter
                                      BroadcastExchange #5
                                        WholeStageCodegen (3)
                                          Filter [i_item_sk]
                                            ColumnarToRow
                                              InputAdapter
                                                Scan parquet spark_catalog.default.item [i_item_sk,i_item_id]
                    InputAdapter
                      WholeStageCodegen (12)
                        Sort [c_customer_sk]
                          InputAdapter
                            Exchange [c_customer_sk] #6
                              WholeStageCodegen (11)
                                Project [c_customer_sk,c_birth_year,ca_county,ca_state,ca_country]
                                  SortMergeJoin [c_current_cdemo_sk,cd_demo_sk]
                                    InputAdapter
                                      WholeStageCodegen (8)
                                        Sort [c_current_cdemo_sk]
                                          InputAdapter
                                            Exchange [c_current_cdemo_sk] #7
                                              WholeStageCodegen (7)
                                                Project [c_customer_sk,c_current_cdemo_sk,c_birth_year,ca_county,ca_state,ca_country]
                                                  BroadcastHashJoin [c_current_addr_sk,ca_address_sk]
                                                    Project [c_customer_sk,c_current_cdemo_sk,c_current_addr_sk,c_birth_year]
                                                      Filter [c_birth_month,c_customer_sk,c_current_cdemo_sk,c_current_addr_sk]
                                                        ColumnarToRow
                                                          InputAdapter
                                                            Scan parquet spark_catalog.default.customer [c_customer_sk,c_current_cdemo_sk,c_current_addr_sk,c_birth_month,c_birth_year]
                                                    InputAdapter
                                                      BroadcastExchange #8
                                                        WholeStageCodegen (6)
                                                          Filter [ca_state,ca_address_sk]
                                                            ColumnarToRow
                                                              InputAdapter
                                                                Scan parquet spark_catalog.default.customer_address [ca_address_sk,ca_county,ca_state,ca_country]
                                    InputAdapter
                                      WholeStageCodegen (10)
                                        Sort [cd_demo_sk]
                                          InputAdapter
                                            Exchange [cd_demo_sk] #9
                                              WholeStageCodegen (9)
                                                Filter [cd_demo_sk]
                                                  ColumnarToRow
                                                    InputAdapter
                                                      Scan parquet spark_catalog.default.customer_demographics [cd_demo_sk]
