TakeOrderedAndProject [substr(r_reason_desc, 1, 20),avg(ws_quantity),avg(wr_refunded_cash),avg(wr_fee)]
  WholeStageCodegen (9)
    HashAggregate [r_reason_desc,sum,count,sum,count,sum,count] [avg(ws_quantity),avg(UnscaledValue(wr_refunded_cash)),avg(UnscaledValue(wr_fee)),substr(r_reason_desc, 1, 20),avg(ws_quantity),avg(wr_refunded_cash),avg(wr_fee),sum,count,sum,count,sum,count]
      InputAdapter
        Exchange [r_reason_desc] #1
          WholeStageCodegen (8)
            HashAggregate [r_reason_desc,ws_quantity,wr_refunded_cash,wr_fee] [sum,count,sum,count,sum,count,sum,count,sum,count,sum,count]
              Project [ws_quantity,wr_fee,wr_refunded_cash,r_reason_desc]
                BroadcastHashJoin [wr_reason_sk,r_reason_sk]
                  Project [ws_quantity,wr_reason_sk,wr_fee,wr_refunded_cash]
                    BroadcastHashJoin [ws_sold_date_sk,d_date_sk]
                      Project [ws_quantity,ws_sold_date_sk,wr_reason_sk,wr_fee,wr_refunded_cash]
                        BroadcastHashJoin [wr_refunded_addr_sk,ca_address_sk,ca_state,ws_net_profit]
                          Project [ws_quantity,ws_net_profit,ws_sold_date_sk,wr_refunded_addr_sk,wr_reason_sk,wr_fee,wr_refunded_cash]
                            BroadcastHashJoin [wr_returning_cdemo_sk,cd_marital_status,cd_education_status,cd_demo_sk,cd_marital_status,cd_education_status]
                              Project [ws_quantity,ws_net_profit,ws_sold_date_sk,wr_refunded_addr_sk,wr_returning_cdemo_sk,wr_reason_sk,wr_fee,wr_refunded_cash,cd_marital_status,cd_education_status]
                                BroadcastHashJoin [wr_refunded_cdemo_sk,cd_demo_sk,cd_marital_status,cd_education_status,ws_sales_price]
                                  Project [ws_quantity,ws_sales_price,ws_net_profit,ws_sold_date_sk,wr_refunded_cdemo_sk,wr_refunded_addr_sk,wr_returning_cdemo_sk,wr_reason_sk,wr_fee,wr_refunded_cash]
                                    BroadcastHashJoin [ws_web_page_sk,wp_web_page_sk]
                                      Project [ws_web_page_sk,ws_quantity,ws_sales_price,ws_net_profit,ws_sold_date_sk,wr_refunded_cdemo_sk,wr_refunded_addr_sk,wr_returning_cdemo_sk,wr_reason_sk,wr_fee,wr_refunded_cash]
                                        BroadcastHashJoin [ws_item_sk,ws_order_number,wr_item_sk,wr_order_number]
                                          InputAdapter
                                            BroadcastExchange #2
                                              WholeStageCodegen (1)
                                                Filter [ws_item_sk,ws_order_number,ws_web_page_sk,ws_sales_price,ws_net_profit]
                                                  ColumnarToRow
                                                    InputAdapter
                                                      Scan parquet spark_catalog.default.web_sales [ws_item_sk,ws_web_page_sk,ws_order_number,ws_quantity,ws_sales_price,ws_net_profit,ws_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]
                                          Project [wr_item_sk,wr_refunded_cdemo_sk,wr_refunded_addr_sk,wr_returning_cdemo_sk,wr_reason_sk,wr_order_number,wr_fee,wr_refunded_cash]
                                            Filter [wr_item_sk,wr_order_number,wr_refunded_cdemo_sk,wr_returning_cdemo_sk,wr_refunded_addr_sk,wr_reason_sk]
                                              ColumnarToRow
                                                InputAdapter
                                                  Scan parquet spark_catalog.default.web_returns [wr_item_sk,wr_refunded_cdemo_sk,wr_refunded_addr_sk,wr_returning_cdemo_sk,wr_reason_sk,wr_order_number,wr_fee,wr_refunded_cash,wr_returned_date_sk]
                                      InputAdapter
                                        BroadcastExchange #4
                                          WholeStageCodegen (2)
                                            Filter [wp_web_page_sk]
                                              ColumnarToRow
                                                InputAdapter
                                                  Scan parquet spark_catalog.default.web_page [wp_web_page_sk]
                                  InputAdapter
                                    BroadcastExchange #5
                                      WholeStageCodegen (3)
                                        Filter [cd_demo_sk,cd_marital_status,cd_education_status]
                                          ColumnarToRow
                                            InputAdapter
                                              Scan parquet spark_catalog.default.customer_demographics [cd_demo_sk,cd_marital_status,cd_education_status]
                              InputAdapter
                                BroadcastExchange #6
                                  WholeStageCodegen (4)
                                    Filter [cd_demo_sk,cd_marital_status,cd_education_status]
                                      ColumnarToRow
                                        InputAdapter
                                          Scan parquet spark_catalog.default.customer_demographics [cd_demo_sk,cd_marital_status,cd_education_status]
                          InputAdapter
                            BroadcastExchange #7
                              WholeStageCodegen (5)
                                Project [ca_address_sk,ca_state]
                                  Filter [ca_country,ca_address_sk,ca_state]
                                    ColumnarToRow
                                      InputAdapter
                                        Scan parquet spark_catalog.default.customer_address [ca_address_sk,ca_state,ca_country]
                      InputAdapter
                        ReusedExchange [d_date_sk] #3
                  InputAdapter
                    BroadcastExchange #8
                      WholeStageCodegen (7)
                        Filter [r_reason_sk]
                          ColumnarToRow
                            InputAdapter
                              Scan parquet spark_catalog.default.reason [r_reason_sk,r_reason_desc]
