TakeOrderedAndProject [lochierarchy,i_category,rank_within_parent,total_sum,i_class]
  WholeStageCodegen (18)
    Project [total_sum,i_category,i_class,lochierarchy,rank_within_parent]
      InputAdapter
        Window [total_sum,lochierarchy,_w0]
          WholeStageCodegen (17)
            Sort [lochierarchy,_w0,total_sum]
              InputAdapter
                Exchange [lochierarchy,_w0] #1
                  WholeStageCodegen (16)
                    HashAggregate [total_sum,i_category,i_class,g_category,g_class,lochierarchy] [_w0]
                      InputAdapter
                        Exchange [total_sum,i_category,i_class,g_category,g_class,lochierarchy] #2
                          WholeStageCodegen (15)
                            HashAggregate [total_sum,i_category,i_class,g_category,g_class,lochierarchy]
                              InputAdapter
                                Union
                                  WholeStageCodegen (4)
                                    HashAggregate [i_category,i_class,sum] [sum(UnscaledValue(ws_net_paid)),total_sum,g_category,g_class,lochierarchy,sum]
                                      InputAdapter
                                        Exchange [i_category,i_class] #3
                                          WholeStageCodegen (3)
                                            HashAggregate [i_category,i_class,ws_net_paid] [sum,sum]
                                              Project [ws_net_paid,i_class,i_category]
                                                BroadcastHashJoin [ws_item_sk,i_item_sk]
                                                  Project [ws_item_sk,ws_net_paid]
                                                    BroadcastHashJoin [ws_sold_date_sk,d_date_sk]
                                                      Filter [ws_item_sk]
                                                        ColumnarToRow
                                                          InputAdapter
                                                            Scan parquet spark_catalog.default.web_sales [ws_item_sk,ws_net_paid,ws_sold_date_sk]
                                                              SubqueryBroadcast [d_date_sk] #1
                                                                BroadcastExchange #4
                                                                  WholeStageCodegen (1)
                                                                    Project [d_date_sk]
                                                                      Filter [d_month_seq,d_date_sk]
                                                                        ColumnarToRow
                                                                          InputAdapter
                                                                            Scan parquet spark_catalog.default.date_dim [d_date_sk,d_month_seq]
                                                      InputAdapter
                                                        ReusedExchange [d_date_sk] #4
                                                  InputAdapter
                                                    BroadcastExchange #5
                                                      WholeStageCodegen (2)
                                                        Filter [i_item_sk]
                                                          ColumnarToRow
                                                            InputAdapter
                                                              Scan parquet spark_catalog.default.item [i_item_sk,i_class,i_category]
                                  WholeStageCodegen (9)
                                    HashAggregate [i_category,sum,isEmpty] [sum(total_sum),total_sum,i_class,g_category,g_class,lochierarchy,sum,isEmpty]
                                      InputAdapter
                                        Exchange [i_category] #6
                                          WholeStageCodegen (8)
                                            HashAggregate [i_category,total_sum] [sum,isEmpty,sum,isEmpty]
                                              HashAggregate [i_category,i_class,sum] [sum(UnscaledValue(ws_net_paid)),total_sum,sum]
                                                InputAdapter
                                                  ReusedExchange [i_category,i_class,sum] #3
                                  WholeStageCodegen (14)
                                    HashAggregate [sum,isEmpty] [sum(total_sum),total_sum,i_category,i_class,g_category,g_class,lochierarchy,sum,isEmpty]
                                      InputAdapter
                                        Exchange #7
                                          WholeStageCodegen (13)
                                            HashAggregate [total_sum] [sum,isEmpty,sum,isEmpty]
                                              HashAggregate [i_category,i_class,sum] [sum(UnscaledValue(ws_net_paid)),total_sum,sum]
                                                InputAdapter
                                                  ReusedExchange [i_category,i_class,sum] #3
