TakeOrderedAndProject [c_last_name,c_first_name,ca_city,bought_city,ss_ticket_number,amt,profit]
  WholeStageCodegen (16)
    Project [c_last_name,c_first_name,ca_city,bought_city,ss_ticket_number,amt,profit]
      SortMergeJoin [c_customer_sk,ss_customer_sk,ca_city,bought_city]
        InputAdapter
          WholeStageCodegen (6)
            Sort [c_customer_sk]
              InputAdapter
                Exchange [c_customer_sk] #1
                  WholeStageCodegen (5)
                    Project [c_customer_sk,c_first_name,c_last_name,ca_city]
                      SortMergeJoin [c_current_addr_sk,ca_address_sk]
                        InputAdapter
                          WholeStageCodegen (2)
                            Sort [c_current_addr_sk]
                              InputAdapter
                                Exchange [c_current_addr_sk] #2
                                  WholeStageCodegen (1)
                                    Filter [c_customer_sk,c_current_addr_sk]
                                      ColumnarToRow
                                        InputAdapter
                                          Scan parquet spark_catalog.default.customer [c_customer_sk,c_current_addr_sk,c_first_name,c_last_name]
                        InputAdapter
                          WholeStageCodegen (4)
                            Sort [ca_address_sk]
                              InputAdapter
                                Exchange [ca_address_sk] #3
                                  WholeStageCodegen (3)
                                    Filter [ca_address_sk,ca_city]
                                      ColumnarToRow
                                        InputAdapter
                                          Scan parquet spark_catalog.default.customer_address [ca_address_sk,ca_city]
        InputAdapter
          WholeStageCodegen (15)
            Sort [ss_customer_sk]
              InputAdapter
                Exchange [ss_customer_sk] #4
                  WholeStageCodegen (14)
                    HashAggregate [ss_ticket_number,ss_customer_sk,ss_addr_sk,ca_city,sum,sum] [sum(UnscaledValue(ss_coupon_amt)),sum(UnscaledValue(ss_net_profit)),bought_city,amt,profit,sum,sum]
                      HashAggregate [ss_ticket_number,ss_customer_sk,ss_addr_sk,ca_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,ca_city]
                          SortMergeJoin [ss_addr_sk,ca_address_sk]
                            InputAdapter
                              WholeStageCodegen (11)
                                Sort [ss_addr_sk]
                                  InputAdapter
                                    Exchange [ss_addr_sk] #5
                                      WholeStageCodegen (10)
                                        Project [ss_customer_sk,ss_addr_sk,ss_ticket_number,ss_coupon_amt,ss_net_profit]
                                          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]
                                              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_addr_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 #6
                                                                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] #6
                                                InputAdapter
                                                  BroadcastExchange #7
                                                    WholeStageCodegen (8)
                                                      Project [s_store_sk]
                                                        Filter [s_city,s_store_sk]
                                                          ColumnarToRow
                                                            InputAdapter
                                                              Scan parquet spark_catalog.default.store [s_store_sk,s_city]
                                            InputAdapter
                                              BroadcastExchange #8
                                                WholeStageCodegen (9)
                                                  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
                              WholeStageCodegen (13)
                                Sort [ca_address_sk]
                                  InputAdapter
                                    ReusedExchange [ca_address_sk,ca_city] #3
