TakeOrderedAndProject [sum_sales,avg_monthly_sales,d_moy,i_category,d_year,psum,nsum]
  WholeStageCodegen (22)
    Project [i_category,d_year,d_moy,avg_monthly_sales,sum_sales,sum_sales,sum_sales]
      BroadcastHashJoin [i_category,i_brand,s_store_name,s_company_name,rn,i_category,i_brand,s_store_name,s_company_name,rn]
        Project [i_category,i_brand,s_store_name,s_company_name,d_year,d_moy,sum_sales,avg_monthly_sales,rn,sum_sales]
          BroadcastHashJoin [i_category,i_brand,s_store_name,s_company_name,rn,i_category,i_brand,s_store_name,s_company_name,rn]
            Project [i_category,i_brand,s_store_name,s_company_name,d_year,d_moy,sum_sales,avg_monthly_sales,rn]
              Filter [avg_monthly_sales,sum_sales]
                InputAdapter
                  Window [_w0,i_category,i_brand,s_store_name,s_company_name,d_year]
                    WholeStageCodegen (7)
                      Filter [d_year]
                        InputAdapter
                          Window [d_year,d_moy,i_category,i_brand,s_store_name,s_company_name]
                            WholeStageCodegen (6)
                              Sort [i_category,i_brand,s_store_name,s_company_name,d_year,d_moy]
                                InputAdapter
                                  Exchange [i_category,i_brand,s_store_name,s_company_name] #1
                                    WholeStageCodegen (5)
                                      HashAggregate [i_category,i_brand,s_store_name,s_company_name,d_year,d_moy,sum] [sum(UnscaledValue(ss_sales_price)),sum_sales,_w0,sum]
                                        InputAdapter
                                          Exchange [i_category,i_brand,s_store_name,s_company_name,d_year,d_moy] #2
                                            WholeStageCodegen (4)
                                              HashAggregate [i_category,i_brand,s_store_name,s_company_name,d_year,d_moy,ss_sales_price] [sum,sum]
                                                Project [i_brand,i_category,ss_sales_price,d_year,d_moy,s_store_name,s_company_name]
                                                  BroadcastHashJoin [ss_store_sk,s_store_sk]
                                                    Project [i_brand,i_category,ss_store_sk,ss_sales_price,d_year,d_moy]
                                                      BroadcastHashJoin [ss_sold_date_sk,d_date_sk]
                                                        Project [i_brand,i_category,ss_store_sk,ss_sales_price,ss_sold_date_sk]
                                                          BroadcastHashJoin [i_item_sk,ss_item_sk]
                                                            Filter [i_item_sk,i_category,i_brand]
                                                              ColumnarToRow
                                                                InputAdapter
                                                                  Scan parquet spark_catalog.default.item [i_item_sk,i_brand,i_category]
                                                            InputAdapter
                                                              BroadcastExchange #3
                                                                WholeStageCodegen (1)
                                                                  Filter [ss_item_sk,ss_store_sk]
                                                                    ColumnarToRow
                                                                      InputAdapter
                                                                        Scan parquet spark_catalog.default.store_sales [ss_item_sk,ss_store_sk,ss_sales_price,ss_sold_date_sk]
                                                                          SubqueryBroadcast [d_date_sk] #1
                                                                            BroadcastExchange #4
                                                                              WholeStageCodegen (1)
                                                                                Filter [d_year,d_moy,d_date_sk]
                                                                                  ColumnarToRow
                                                                                    InputAdapter
                                                                                      Scan parquet spark_catalog.default.date_dim [d_date_sk,d_year,d_moy]
                                                        InputAdapter
                                                          ReusedExchange [d_date_sk,d_year,d_moy] #4
                                                    InputAdapter
                                                      BroadcastExchange #5
                                                        WholeStageCodegen (3)
                                                          Filter [s_store_sk,s_store_name,s_company_name]
                                                            ColumnarToRow
                                                              InputAdapter
                                                                Scan parquet spark_catalog.default.store [s_store_sk,s_store_name,s_company_name]
            InputAdapter
              BroadcastExchange #6
                WholeStageCodegen (14)
                  Project [i_category,i_brand,s_store_name,s_company_name,sum_sales,rn]
                    InputAdapter
                      Window [d_year,d_moy,i_category,i_brand,s_store_name,s_company_name]
                        WholeStageCodegen (13)
                          Sort [i_category,i_brand,s_store_name,s_company_name,d_year,d_moy]
                            InputAdapter
                              Exchange [i_category,i_brand,s_store_name,s_company_name] #7
                                WholeStageCodegen (12)
                                  HashAggregate [i_category,i_brand,s_store_name,s_company_name,d_year,d_moy,sum] [sum(UnscaledValue(ss_sales_price)),sum_sales,sum]
                                    InputAdapter
                                      ReusedExchange [i_category,i_brand,s_store_name,s_company_name,d_year,d_moy,sum] #2
        InputAdapter
          BroadcastExchange #8
            WholeStageCodegen (21)
              Project [i_category,i_brand,s_store_name,s_company_name,sum_sales,rn]
                InputAdapter
                  Window [d_year,d_moy,i_category,i_brand,s_store_name,s_company_name]
                    WholeStageCodegen (20)
                      Sort [i_category,i_brand,s_store_name,s_company_name,d_year,d_moy]
                        InputAdapter
                          ReusedExchange [i_category,i_brand,s_store_name,s_company_name,d_year,d_moy,sum_sales] #7
