TakeOrderedAndProject [channel,id,sales,returns,profit]
  WholeStageCodegen (24)
    HashAggregate [channel,id,spark_grouping_id,sum,isEmpty,sum,isEmpty,sum,isEmpty] [sum(sales),sum(returns),sum(profit),sales,returns,profit,sum,isEmpty,sum,isEmpty,sum,isEmpty]
      InputAdapter
        Exchange [channel,id,spark_grouping_id] #1
          WholeStageCodegen (23)
            HashAggregate [channel,id,spark_grouping_id,sales,returns,profit] [sum,isEmpty,sum,isEmpty,sum,isEmpty,sum,isEmpty,sum,isEmpty,sum,isEmpty]
              Expand [sales,returns,profit,channel,id]
                InputAdapter
                  Union
                    WholeStageCodegen (8)
                      Project [sales,returns,profit,profit_loss,s_store_sk]
                        BroadcastHashJoin [s_store_sk,s_store_sk]
                          HashAggregate [s_store_sk,sum,sum] [sum(UnscaledValue(ss_ext_sales_price)),sum(UnscaledValue(ss_net_profit)),sales,profit,sum,sum]
                            InputAdapter
                              Exchange [s_store_sk] #2
                                WholeStageCodegen (3)
                                  HashAggregate [s_store_sk,ss_ext_sales_price,ss_net_profit] [sum,sum,sum,sum]
                                    Project [ss_ext_sales_price,ss_net_profit,s_store_sk]
                                      BroadcastHashJoin [ss_store_sk,s_store_sk]
                                        Project [ss_store_sk,ss_ext_sales_price,ss_net_profit]
                                          BroadcastHashJoin [ss_sold_date_sk,d_date_sk]
                                            Filter [ss_store_sk]
                                              ColumnarToRow
                                                InputAdapter
                                                  Scan parquet spark_catalog.default.store_sales [ss_store_sk,ss_ext_sales_price,ss_net_profit,ss_sold_date_sk]
                                                    SubqueryBroadcast [d_date_sk] #1
                                                      BroadcastExchange #3
                                                        WholeStageCodegen (1)
                                                          Project [d_date_sk]
                                                            Filter [d_date,d_date_sk]
                                                              ColumnarToRow
                                                                InputAdapter
                                                                  Scan parquet spark_catalog.default.date_dim [d_date_sk,d_date]
                                            InputAdapter
                                              ReusedExchange [d_date_sk] #3
                                        InputAdapter
                                          BroadcastExchange #4
                                            WholeStageCodegen (2)
                                              Filter [s_store_sk]
                                                ColumnarToRow
                                                  InputAdapter
                                                    Scan parquet spark_catalog.default.store [s_store_sk]
                          InputAdapter
                            BroadcastExchange #5
                              WholeStageCodegen (7)
                                HashAggregate [s_store_sk,sum,sum] [sum(UnscaledValue(sr_return_amt)),sum(UnscaledValue(sr_net_loss)),returns,profit_loss,sum,sum]
                                  InputAdapter
                                    Exchange [s_store_sk] #6
                                      WholeStageCodegen (6)
                                        HashAggregate [s_store_sk,sr_return_amt,sr_net_loss] [sum,sum,sum,sum]
                                          Project [sr_return_amt,sr_net_loss,s_store_sk]
                                            BroadcastHashJoin [sr_store_sk,s_store_sk]
                                              Project [sr_store_sk,sr_return_amt,sr_net_loss]
                                                BroadcastHashJoin [sr_returned_date_sk,d_date_sk]
                                                  Filter [sr_store_sk]
                                                    ColumnarToRow
                                                      InputAdapter
                                                        Scan parquet spark_catalog.default.store_returns [sr_store_sk,sr_return_amt,sr_net_loss,sr_returned_date_sk]
                                                          ReusedSubquery [d_date_sk] #1
                                                  InputAdapter
                                                    ReusedExchange [d_date_sk] #3
                                              InputAdapter
                                                ReusedExchange [s_store_sk] #4
                    WholeStageCodegen (14)
                      Project [sales,returns,profit,profit_loss,cs_call_center_sk]
                        BroadcastNestedLoopJoin
                          HashAggregate [cs_call_center_sk,sum,sum] [sum(UnscaledValue(cs_ext_sales_price)),sum(UnscaledValue(cs_net_profit)),sales,profit,sum,sum]
                            InputAdapter
                              Exchange [cs_call_center_sk] #7
                                WholeStageCodegen (10)
                                  HashAggregate [cs_call_center_sk,cs_ext_sales_price,cs_net_profit] [sum,sum,sum,sum]
                                    Project [cs_call_center_sk,cs_ext_sales_price,cs_net_profit]
                                      BroadcastHashJoin [cs_sold_date_sk,d_date_sk]
                                        ColumnarToRow
                                          InputAdapter
                                            Scan parquet spark_catalog.default.catalog_sales [cs_call_center_sk,cs_ext_sales_price,cs_net_profit,cs_sold_date_sk]
                                              ReusedSubquery [d_date_sk] #1
                                        InputAdapter
                                          ReusedExchange [d_date_sk] #3
                          InputAdapter
                            BroadcastExchange #8
                              WholeStageCodegen (13)
                                HashAggregate [sum,sum] [sum(UnscaledValue(cr_return_amount)),sum(UnscaledValue(cr_net_loss)),returns,profit_loss,sum,sum]
                                  InputAdapter
                                    Exchange #9
                                      WholeStageCodegen (12)
                                        HashAggregate [cr_return_amount,cr_net_loss] [sum,sum,sum,sum]
                                          Project [cr_return_amount,cr_net_loss]
                                            BroadcastHashJoin [cr_returned_date_sk,d_date_sk]
                                              ColumnarToRow
                                                InputAdapter
                                                  Scan parquet spark_catalog.default.catalog_returns [cr_return_amount,cr_net_loss,cr_returned_date_sk]
                                                    ReusedSubquery [d_date_sk] #1
                                              InputAdapter
                                                ReusedExchange [d_date_sk] #3
                    WholeStageCodegen (22)
                      Project [sales,returns,profit,profit_loss,wp_web_page_sk]
                        BroadcastHashJoin [wp_web_page_sk,wp_web_page_sk]
                          HashAggregate [wp_web_page_sk,sum,sum] [sum(UnscaledValue(ws_ext_sales_price)),sum(UnscaledValue(ws_net_profit)),sales,profit,sum,sum]
                            InputAdapter
                              Exchange [wp_web_page_sk] #10
                                WholeStageCodegen (17)
                                  HashAggregate [wp_web_page_sk,ws_ext_sales_price,ws_net_profit] [sum,sum,sum,sum]
                                    Project [ws_ext_sales_price,ws_net_profit,wp_web_page_sk]
                                      BroadcastHashJoin [ws_web_page_sk,wp_web_page_sk]
                                        Project [ws_web_page_sk,ws_ext_sales_price,ws_net_profit]
                                          BroadcastHashJoin [ws_sold_date_sk,d_date_sk]
                                            Filter [ws_web_page_sk]
                                              ColumnarToRow
                                                InputAdapter
                                                  Scan parquet spark_catalog.default.web_sales [ws_web_page_sk,ws_ext_sales_price,ws_net_profit,ws_sold_date_sk]
                                                    ReusedSubquery [d_date_sk] #1
                                            InputAdapter
                                              ReusedExchange [d_date_sk] #3
                                        InputAdapter
                                          BroadcastExchange #11
                                            WholeStageCodegen (16)
                                              Filter [wp_web_page_sk]
                                                ColumnarToRow
                                                  InputAdapter
                                                    Scan parquet spark_catalog.default.web_page [wp_web_page_sk]
                          InputAdapter
                            BroadcastExchange #12
                              WholeStageCodegen (21)
                                HashAggregate [wp_web_page_sk,sum,sum] [sum(UnscaledValue(wr_return_amt)),sum(UnscaledValue(wr_net_loss)),returns,profit_loss,sum,sum]
                                  InputAdapter
                                    Exchange [wp_web_page_sk] #13
                                      WholeStageCodegen (20)
                                        HashAggregate [wp_web_page_sk,wr_return_amt,wr_net_loss] [sum,sum,sum,sum]
                                          Project [wr_return_amt,wr_net_loss,wp_web_page_sk]
                                            BroadcastHashJoin [wr_web_page_sk,wp_web_page_sk]
                                              Project [wr_web_page_sk,wr_return_amt,wr_net_loss]
                                                BroadcastHashJoin [wr_returned_date_sk,d_date_sk]
                                                  Filter [wr_web_page_sk]
                                                    ColumnarToRow
                                                      InputAdapter
                                                        Scan parquet spark_catalog.default.web_returns [wr_web_page_sk,wr_return_amt,wr_net_loss,wr_returned_date_sk]
                                                          ReusedSubquery [d_date_sk] #1
                                                  InputAdapter
                                                    ReusedExchange [d_date_sk] #3
                                              InputAdapter
                                                ReusedExchange [wp_web_page_sk] #11
