TakeOrderedAndProject [c_last_name,c_first_name,s_city,profit,substr(s_city, 1, 30),ss_ticket_number,amt]
  WholeStageCodegen (6)
    Project [c_last_name,c_first_name,s_city,ss_ticket_number,amt,profit]
      BroadcastHashJoin [ss_customer_sk,c_customer_sk]
        HashAggregate [ss_ticket_number,ss_customer_sk,ss_addr_sk,s_city,sum,sum] [sum(UnscaledValue(ss_coupon_amt)),sum(UnscaledValue(ss_net_profit)),amt,profit,sum,sum]
          InputAdapter
            Exchange [ss_ticket_number,ss_customer_sk,ss_addr_sk,s_city] #1
              WholeStageCodegen (4)
                HashAggregate [ss_ticket_number,ss_customer_sk,ss_addr_sk,s_city,ss_coupon_amt,ss_net_profit] [sum,sum,sum,sum]
                  Project [ss_customer_sk,ss_addr_sk,ss_ticket_number,ss_coupon_amt,ss_net_profit,s_city]
                    BroadcastHashJoin [ss_hdemo_sk,hd_demo_sk]
                      Project [ss_customer_sk,ss_hdemo_sk,ss_addr_sk,ss_ticket_number,ss_coupon_amt,ss_net_profit,s_city]
                        BroadcastHashJoin [ss_store_sk,s_store_sk]
                          Project [ss_customer_sk,ss_hdemo_sk,ss_addr_sk,ss_store_sk,ss_ticket_number,ss_coupon_amt,ss_net_profit]
                            BroadcastHashJoin [ss_sold_date_sk,d_date_sk]
                              Filter [ss_store_sk,ss_hdemo_sk,ss_customer_sk]
                                ColumnarToRow
                                  InputAdapter
                                    Scan parquet spark_catalog.default.store_sales [ss_customer_sk,ss_hdemo_sk,ss_addr_sk,ss_store_sk,ss_ticket_number,ss_coupon_amt,ss_net_profit,ss_sold_date_sk]
                                      SubqueryBroadcast [d_date_sk] #1
                                        BroadcastExchange #2
                                          WholeStageCodegen (1)
                                            Project [d_date_sk]
                                              Filter [d_dow,d_year,d_date_sk]
                                                ColumnarToRow
                                                  InputAdapter
                                                    Scan parquet spark_catalog.default.date_dim [d_date_sk,d_year,d_dow]
                              InputAdapter
                                ReusedExchange [d_date_sk] #2
                          InputAdapter
                            BroadcastExchange #3
                              WholeStageCodegen (2)
                                Project [s_store_sk,s_city]
                                  Filter [s_number_employees,s_store_sk]
                                    ColumnarToRow
                                      InputAdapter
                                        Scan parquet spark_catalog.default.store [s_store_sk,s_number_employees,s_city]
                      InputAdapter
                        BroadcastExchange #4
                          WholeStageCodegen (3)
                            Project [hd_demo_sk]
                              Filter [hd_dep_count,hd_vehicle_count,hd_demo_sk]
                                ColumnarToRow
                                  InputAdapter
                                    Scan parquet spark_catalog.default.household_demographics [hd_demo_sk,hd_dep_count,hd_vehicle_count]
        InputAdapter
          BroadcastExchange #5
            WholeStageCodegen (5)
              Filter [c_customer_sk]
                ColumnarToRow
                  InputAdapter
                    Scan parquet spark_catalog.default.customer [c_customer_sk,c_first_name,c_last_name]
