TakeOrderedAndProject [substr(r_reason_desc, 1, 20),avg(ws_quantity),avg(wr_refunded_cash),avg(wr_fee)]
  WholeStageCodegen (15)
    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 (14)
            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]
                            SortMergeJoin [wr_returning_cdemo_sk,cd_marital_status,cd_education_status,cd_demo_sk,cd_marital_status,cd_education_status]
                              InputAdapter
                                WholeStageCodegen (8)
                                  Sort [wr_returning_cdemo_sk,cd_marital_status,cd_education_status]
                                    InputAdapter
                                      Exchange [wr_returning_cdemo_sk,cd_marital_status,cd_education_status] #2
                                        WholeStageCodegen (7)
                                          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]
                                                SortMergeJoin [ws_item_sk,ws_order_number,wr_item_sk,wr_order_number]
                                                  InputAdapter
                                                    WholeStageCodegen (3)
                                                      Sort [ws_item_sk,ws_order_number]
                                                        InputAdapter
                                                          Exchange [ws_item_sk,ws_order_number] #3
                                                            WholeStageCodegen (2)
                                                              Project [ws_item_sk,ws_order_number,ws_quantity,ws_sales_price,ws_net_profit,ws_sold_date_sk]
                                                                BroadcastHashJoin [ws_web_page_sk,wp_web_page_sk]
                                                                  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 #4
                                                                              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 #5
                                                                      WholeStageCodegen (1)
                                                                        Filter [wp_web_page_sk]
                                                                          ColumnarToRow
                                                                            InputAdapter
                                                                              Scan parquet spark_catalog.default.web_page [wp_web_page_sk]
                                                  InputAdapter
                                                    WholeStageCodegen (5)
                                                      Sort [wr_item_sk,wr_order_number]
                                                        InputAdapter
                                                          Exchange [wr_item_sk,wr_order_number] #6
                                                            WholeStageCodegen (4)
                                                              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]
                                                                  Subquery #2
                                                                    ObjectHashAggregate [buf] [bloom_filter_agg(xxhash64(cd_demo_sk, 42), 159981, 2239471, 0, 0),bloomFilter,buf]
                                                                      Exchange #7
                                                                        ObjectHashAggregate [cd_demo_sk] [buf,buf]
                                                                          WholeStageCodegen (1)
                                                                            Project [cd_demo_sk]
                                                                              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]
                                                                  Subquery #3
                                                                    ObjectHashAggregate [buf] [bloom_filter_agg(xxhash64(ca_address_sk, 42), 152837, 2153999, 0, 0),bloomFilter,buf]
                                                                      Exchange #8
                                                                        ObjectHashAggregate [ca_address_sk] [buf,buf]
                                                                          WholeStageCodegen (1)
                                                                            Project [ca_address_sk]
                                                                              Filter [ca_country,ca_address_sk,ca_state]
                                                                                ColumnarToRow
                                                                                  InputAdapter
                                                                                    Scan parquet spark_catalog.default.customer_address [ca_address_sk,ca_state,ca_country]
                                                                  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 #9
                                                  WholeStageCodegen (6)
                                                    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
                                WholeStageCodegen (10)
                                  Sort [cd_demo_sk,cd_marital_status,cd_education_status]
                                    InputAdapter
                                      Exchange [cd_demo_sk,cd_marital_status,cd_education_status] #10
                                        WholeStageCodegen (9)
                                          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 #11
                              WholeStageCodegen (11)
                                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] #4
                  InputAdapter
                    BroadcastExchange #12
                      WholeStageCodegen (13)
                        Filter [r_reason_sk]
                          ColumnarToRow
                            InputAdapter
                              Scan parquet spark_catalog.default.reason [r_reason_sk,r_reason_desc]
