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]
                      InputAdapter
                        Exchange [channel,id] #2
                          WholeStageCodegen (20)
                            HashAggregate [channel,id,sales,returns,profit] [sum,isEmpty,sum,isEmpty,sum,isEmpty,sum,isEmpty,sum,isEmpty,sum,isEmpty]
                              InputAdapter
                                Union
                                  WholeStageCodegen (6)
                                    HashAggregate [s_store_id,sum,sum,sum,sum] [sum(UnscaledValue(sales_price)),sum(UnscaledValue(return_amt)),sum(UnscaledValue(profit)),sum(UnscaledValue(net_loss)),channel,id,sales,returns,profit,sum,sum,sum,sum]
                                      InputAdapter
                                        Exchange [s_store_id] #3
                                          WholeStageCodegen (5)
                                            HashAggregate [s_store_id,sales_price,return_amt,profit,net_loss] [sum,sum,sum,sum,sum,sum,sum,sum]
                                              Project [sales_price,profit,return_amt,net_loss,s_store_id]
                                                BroadcastHashJoin [store_sk,s_store_sk]
                                                  Project [store_sk,sales_price,profit,return_amt,net_loss]
                                                    BroadcastHashJoin [date_sk,d_date_sk]
                                                      InputAdapter
                                                        Union
                                                          WholeStageCodegen (1)
                                                            Project [ss_store_sk,ss_sold_date_sk,ss_ext_sales_price,ss_net_profit]
                                                              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 #4
                                                                          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]
                                                          WholeStageCodegen (2)
                                                            Project [sr_store_sk,sr_returned_date_sk,sr_return_amt,sr_net_loss]
                                                              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] #4
                                                  InputAdapter
                                                    BroadcastExchange #5
                                                      WholeStageCodegen (4)
                                                        Filter [s_store_sk]
                                                          ColumnarToRow
                                                            InputAdapter
                                                              Scan parquet spark_catalog.default.store [s_store_sk,s_store_id]
                                  WholeStageCodegen (12)
                                    HashAggregate [cp_catalog_page_id,sum,sum,sum,sum] [sum(UnscaledValue(sales_price)),sum(UnscaledValue(return_amt)),sum(UnscaledValue(profit)),sum(UnscaledValue(net_loss)),channel,id,sales,returns,profit,sum,sum,sum,sum]
                                      InputAdapter
                                        Exchange [cp_catalog_page_id] #6
                                          WholeStageCodegen (11)
                                            HashAggregate [cp_catalog_page_id,sales_price,return_amt,profit,net_loss] [sum,sum,sum,sum,sum,sum,sum,sum]
                                              Project [sales_price,profit,return_amt,net_loss,cp_catalog_page_id]
                                                BroadcastHashJoin [page_sk,cp_catalog_page_sk]
                                                  Project [page_sk,sales_price,profit,return_amt,net_loss]
                                                    BroadcastHashJoin [date_sk,d_date_sk]
                                                      InputAdapter
                                                        Union
                                                          WholeStageCodegen (7)
                                                            Project [cs_catalog_page_sk,cs_sold_date_sk,cs_ext_sales_price,cs_net_profit]
                                                              Filter [cs_catalog_page_sk]
                                                                ColumnarToRow
                                                                  InputAdapter
                                                                    Scan parquet spark_catalog.default.catalog_sales [cs_catalog_page_sk,cs_ext_sales_price,cs_net_profit,cs_sold_date_sk]
                                                                      ReusedSubquery [d_date_sk] #1
                                                          WholeStageCodegen (8)
                                                            Project [cr_catalog_page_sk,cr_returned_date_sk,cr_return_amount,cr_net_loss]
                                                              Filter [cr_catalog_page_sk]
                                                                ColumnarToRow
                                                                  InputAdapter
                                                                    Scan parquet spark_catalog.default.catalog_returns [cr_catalog_page_sk,cr_return_amount,cr_net_loss,cr_returned_date_sk]
                                                                      ReusedSubquery [d_date_sk] #1
                                                      InputAdapter
                                                        ReusedExchange [d_date_sk] #4
                                                  InputAdapter
                                                    BroadcastExchange #7
                                                      WholeStageCodegen (10)
                                                        Filter [cp_catalog_page_sk]
                                                          ColumnarToRow
                                                            InputAdapter
                                                              Scan parquet spark_catalog.default.catalog_page [cp_catalog_page_sk,cp_catalog_page_id]
                                  WholeStageCodegen (19)
                                    HashAggregate [web_site_id,sum,sum,sum,sum] [sum(UnscaledValue(sales_price)),sum(UnscaledValue(return_amt)),sum(UnscaledValue(profit)),sum(UnscaledValue(net_loss)),channel,id,sales,returns,profit,sum,sum,sum,sum]
                                      InputAdapter
                                        Exchange [web_site_id] #8
                                          WholeStageCodegen (18)
                                            HashAggregate [web_site_id,sales_price,return_amt,profit,net_loss] [sum,sum,sum,sum,sum,sum,sum,sum]
                                              Project [sales_price,profit,return_amt,net_loss,web_site_id]
                                                BroadcastHashJoin [wsr_web_site_sk,web_site_sk]
                                                  Project [wsr_web_site_sk,sales_price,profit,return_amt,net_loss]
                                                    BroadcastHashJoin [date_sk,d_date_sk]
                                                      InputAdapter
                                                        Union
                                                          WholeStageCodegen (13)
                                                            Project [ws_web_site_sk,ws_sold_date_sk,ws_ext_sales_price,ws_net_profit]
                                                              Filter [ws_web_site_sk]
                                                                ColumnarToRow
                                                                  InputAdapter
                                                                    Scan parquet spark_catalog.default.web_sales [ws_web_site_sk,ws_ext_sales_price,ws_net_profit,ws_sold_date_sk]
                                                                      ReusedSubquery [d_date_sk] #1
                                                          WholeStageCodegen (15)
                                                            Project [ws_web_site_sk,wr_returned_date_sk,wr_return_amt,wr_net_loss]
                                                              BroadcastHashJoin [wr_item_sk,wr_order_number,ws_item_sk,ws_order_number]
                                                                InputAdapter
                                                                  BroadcastExchange #9
                                                                    WholeStageCodegen (14)
                                                                      ColumnarToRow
                                                                        InputAdapter
                                                                          Scan parquet spark_catalog.default.web_returns [wr_item_sk,wr_order_number,wr_return_amt,wr_net_loss,wr_returned_date_sk]
                                                                            ReusedSubquery [d_date_sk] #1
                                                                Project [ws_item_sk,ws_web_site_sk,ws_order_number]
                                                                  Filter [ws_item_sk,ws_order_number,ws_web_site_sk]
                                                                    ColumnarToRow
                                                                      InputAdapter
                                                                        Scan parquet spark_catalog.default.web_sales [ws_item_sk,ws_web_site_sk,ws_order_number,ws_sold_date_sk]
                                                      InputAdapter
                                                        ReusedExchange [d_date_sk] #4
                                                  InputAdapter
                                                    BroadcastExchange #10
                                                      WholeStageCodegen (17)
                                                        Filter [web_site_sk]
                                                          ColumnarToRow
                                                            InputAdapter
                                                              Scan parquet spark_catalog.default.web_site [web_site_sk,web_site_id]
                  WholeStageCodegen (43)
                    HashAggregate [channel,sum,isEmpty,sum,isEmpty,sum,isEmpty] [sum(sales),sum(returns),sum(profit),id,sum(sales),sum(returns),sum(profit),sum,isEmpty,sum,isEmpty,sum,isEmpty]
                      InputAdapter
                        Exchange [channel] #11
                          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]
                                InputAdapter
                                  ReusedExchange [channel,id,sum,isEmpty,sum,isEmpty,sum,isEmpty] #2
                  WholeStageCodegen (65)
                    HashAggregate [sum,isEmpty,sum,isEmpty,sum,isEmpty] [sum(sales),sum(returns),sum(profit),channel,id,sum(sales),sum(returns),sum(profit),sum,isEmpty,sum,isEmpty,sum,isEmpty]
                      InputAdapter
                        Exchange #12
                          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]
                                InputAdapter
                                  ReusedExchange [channel,id,sum,isEmpty,sum,isEmpty,sum,isEmpty] #2
