TakeOrderedAndProject [i_category,i_class,i_brand,i_product_name,d_year,d_qoy,d_moy,s_store_id,sumsales,rk]
  WholeStageCodegen (7)
    Filter [rk]
      InputAdapter
        Window [sumsales,i_category]
          WholeStageCodegen (6)
            Sort [i_category,sumsales]
              InputAdapter
                Exchange [i_category] #1
                  WholeStageCodegen (5)
                    HashAggregate [i_category,i_class,i_brand,i_product_name,d_year,d_qoy,d_moy,s_store_id,spark_grouping_id,sum,isEmpty] [sum(coalesce((ss_sales_price * cast(ss_quantity as decimal(10,0))), 0.00)),sumsales,sum,isEmpty]
                      InputAdapter
                        Exchange [i_category,i_class,i_brand,i_product_name,d_year,d_qoy,d_moy,s_store_id,spark_grouping_id] #2
                          WholeStageCodegen (4)
                            HashAggregate [i_category,i_class,i_brand,i_product_name,d_year,d_qoy,d_moy,s_store_id,spark_grouping_id,ss_sales_price,ss_quantity] [sum,isEmpty,sum,isEmpty]
                              Expand [ss_quantity,ss_sales_price,i_category,i_class,i_brand,i_product_name,d_year,d_qoy,d_moy,s_store_id]
                                Project [ss_quantity,ss_sales_price,i_category,i_class,i_brand,i_product_name,d_year,d_qoy,d_moy,s_store_id]
                                  BroadcastHashJoin [ss_item_sk,i_item_sk]
                                    Project [ss_item_sk,ss_quantity,ss_sales_price,d_year,d_moy,d_qoy,s_store_id]
                                      BroadcastHashJoin [ss_store_sk,s_store_sk]
                                        Project [ss_item_sk,ss_store_sk,ss_quantity,ss_sales_price,d_year,d_moy,d_qoy]
                                          BroadcastHashJoin [ss_sold_date_sk,d_date_sk]
                                            Filter [ss_store_sk,ss_item_sk]
                                              ColumnarToRow
                                                InputAdapter
                                                  Scan parquet spark_catalog.default.store_sales [ss_item_sk,ss_store_sk,ss_quantity,ss_sales_price,ss_sold_date_sk]
                                            InputAdapter
                                              BroadcastExchange #3
                                                WholeStageCodegen (1)
                                                  Project [d_date_sk,d_year,d_moy,d_qoy]
                                                    Filter [d_month_seq,d_date_sk]
                                                      ColumnarToRow
                                                        InputAdapter
                                                          Scan parquet spark_catalog.default.date_dim [d_date_sk,d_month_seq,d_year,d_moy,d_qoy]
                                        InputAdapter
                                          BroadcastExchange #4
                                            WholeStageCodegen (2)
                                              Filter [s_store_sk]
                                                ColumnarToRow
                                                  InputAdapter
                                                    Scan parquet spark_catalog.default.store [s_store_sk,s_store_id]
                                    InputAdapter
                                      BroadcastExchange #5
                                        WholeStageCodegen (3)
                                          Filter [i_item_sk]
                                            ColumnarToRow
                                              InputAdapter
                                                Scan parquet spark_catalog.default.item [i_item_sk,i_brand,i_class,i_category,i_product_name]
