TakeOrderedAndProject [channel,id,sales,returns,profit]
  WholeStageCodegen (67)
    HashAggregate [channel,id,sales,returns,profit]
      InputAdapter
        Exchange [channel,id,sales,returns,profit] #1
          WholeStageCodegen (66)
            HashAggregate [channel,id,sales,returns,profit]
              InputAdapter
                Union
                  WholeStageCodegen (21)
                    HashAggregate [channel,id,sum,isEmpty,sum,isEmpty,sum,isEmpty] [sum(sales),sum(returns),sum(profit),sales,returns,profit,sum,isEmpty,sum,isEmpty,sum,isEmpty]
                      HashAggregate [channel,id,sales,returns,profit] [sum,isEmpty,sum,isEmpty,sum,isEmpty,sum,isEmpty,sum,isEmpty,sum,isEmpty]
                        InputAdapter
                          Union
                            WholeStageCodegen (8)
                              Project [s_store_sk,sales,returns,profit,profit_loss]
                                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 (12)
                              Project [cs_call_center_sk,sales,returns,profit,profit_loss]
                                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 (11)
                                        Project
                                          Subquery #2
                                            WholeStageCodegen (3)
                                              Project [returns,profit_loss]
                                                HashAggregate [sum,sum] [sum(UnscaledValue(cr_return_amount)),sum(UnscaledValue(cr_net_loss)),returns,profit_loss,sum,sum]
                                                  InputAdapter
                                                    Exchange #9
                                                      WholeStageCodegen (2)
                                                        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
                                          ReusedSubquery [mergedValue] #2
                                          Scan OneRowRelation
                            WholeStageCodegen (20)
                              Project [wp_web_page_sk,sales,returns,profit,profit_loss]
                                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 (15)
                                          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 (14)
                                                      Filter [wp_web_page_sk]
                                                        ColumnarToRow
                                                          InputAdapter
                                                            Scan parquet spark_catalog.default.web_page [wp_web_page_sk]
                                  InputAdapter
                                    BroadcastExchange #12
                                      WholeStageCodegen (19)
                                        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 (18)
                                                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
                  WholeStageCodegen (43)
                    HashAggregate [channel,sum,isEmpty,sum,isEmpty,sum,isEmpty] [sum(sales),sum(returns),sum(profit),id,sales,returns,profit,sum,isEmpty,sum,isEmpty,sum,isEmpty]
                      InputAdapter
                        Exchange [channel] #14
                          WholeStageCodegen (42)
                            HashAggregate [channel,sales,returns,profit] [sum,isEmpty,sum,isEmpty,sum,isEmpty,sum,isEmpty,sum,isEmpty,sum,isEmpty]
                              HashAggregate [channel,id,sum,isEmpty,sum,isEmpty,sum,isEmpty] [sum(sales),sum(returns),sum(profit),sales,returns,profit,sum,isEmpty,sum,isEmpty,sum,isEmpty]
                                HashAggregate [channel,id,sales,returns,profit] [sum,isEmpty,sum,isEmpty,sum,isEmpty,sum,isEmpty,sum,isEmpty,sum,isEmpty]
                                  InputAdapter
                                    Union
                                      WholeStageCodegen (29)
                                        Project [s_store_sk,sales,returns,profit,profit_loss]
                                          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
                                                ReusedExchange [s_store_sk,sum,sum] #2
                                            InputAdapter
                                              ReusedExchange [s_store_sk,returns,profit_loss] #5
                                      WholeStageCodegen (33)
                                        Project [cs_call_center_sk,sales,returns,profit,profit_loss]
                                          BroadcastNestedLoopJoin
                                            HashAggregate [cs_call_center_sk,sum,sum] [sum(UnscaledValue(cs_ext_sales_price)),sum(UnscaledValue(cs_net_profit)),sales,profit,sum,sum]
                                              InputAdapter
                                                ReusedExchange [cs_call_center_sk,sum,sum] #7
                                            InputAdapter
                                              ReusedExchange [returns,profit_loss] #8
                                      WholeStageCodegen (41)
                                        Project [wp_web_page_sk,sales,returns,profit,profit_loss]
                                          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
                                                ReusedExchange [wp_web_page_sk,sum,sum] #10
                                            InputAdapter
                                              ReusedExchange [wp_web_page_sk,returns,profit_loss] #12
                  WholeStageCodegen (65)
                    HashAggregate [sum,isEmpty,sum,isEmpty,sum,isEmpty] [sum(sales),sum(returns),sum(profit),channel,id,sales,returns,profit,sum,isEmpty,sum,isEmpty,sum,isEmpty]
                      InputAdapter
                        Exchange #15
                          WholeStageCodegen (64)
                            HashAggregate [sales,returns,profit] [sum,isEmpty,sum,isEmpty,sum,isEmpty,sum,isEmpty,sum,isEmpty,sum,isEmpty]
                              HashAggregate [channel,id,sum,isEmpty,sum,isEmpty,sum,isEmpty] [sum(sales),sum(returns),sum(profit),sales,returns,profit,sum,isEmpty,sum,isEmpty,sum,isEmpty]
                                HashAggregate [channel,id,sales,returns,profit] [sum,isEmpty,sum,isEmpty,sum,isEmpty,sum,isEmpty,sum,isEmpty,sum,isEmpty]
                                  InputAdapter
                                    Union
                                      WholeStageCodegen (51)
                                        Project [s_store_sk,sales,returns,profit,profit_loss]
                                          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
                                                ReusedExchange [s_store_sk,sum,sum] #2
                                            InputAdapter
                                              ReusedExchange [s_store_sk,returns,profit_loss] #5
                                      WholeStageCodegen (55)
                                        Project [cs_call_center_sk,sales,returns,profit,profit_loss]
                                          BroadcastNestedLoopJoin
                                            HashAggregate [cs_call_center_sk,sum,sum] [sum(UnscaledValue(cs_ext_sales_price)),sum(UnscaledValue(cs_net_profit)),sales,profit,sum,sum]
                                              InputAdapter
                                                ReusedExchange [cs_call_center_sk,sum,sum] #7
                                            InputAdapter
                                              ReusedExchange [returns,profit_loss] #8
                                      WholeStageCodegen (63)
                                        Project [wp_web_page_sk,sales,returns,profit,profit_loss]
                                          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
                                                ReusedExchange [wp_web_page_sk,sum,sum] #10
                                            InputAdapter
                                              ReusedExchange [wp_web_page_sk,returns,profit_loss] #12
