TakeOrderedAndProject [qoh,i_product_name,i_brand,i_class,i_category]
  Union
    WholeStageCodegen (2)
      HashAggregate [i_product_name,i_brand,i_class,i_category,sum,count] [avg(qoh),i_product_name,i_brand,i_class,i_category,qoh,sum,count]
        HashAggregate [i_product_name,i_brand,i_class,i_category,qoh] [sum,count,sum,count]
          HashAggregate [i_product_name,i_brand,i_class,i_category,sum,count] [avg(inv_quantity_on_hand),qoh,sum,count]
            CometColumnarToRow
              InputAdapter
                CometColumnarExchange [i_product_name,i_brand,i_class,i_category] #1
                  WholeStageCodegen (1)
                    HashAggregate [i_product_name,i_brand,i_class,i_category,inv_quantity_on_hand] [sum,count,sum,count]
                      CometColumnarToRow
                        InputAdapter
                          CometProject [inv_quantity_on_hand,i_brand,i_class,i_category,i_product_name]
                            CometBroadcastHashJoin [inv_warehouse_sk,inv_quantity_on_hand,i_brand,i_class,i_category,i_product_name,w_warehouse_sk]
                              CometProject [inv_warehouse_sk,inv_quantity_on_hand,i_brand,i_class,i_category,i_product_name]
                                CometBroadcastHashJoin [inv_item_sk,inv_warehouse_sk,inv_quantity_on_hand,i_item_sk,i_brand,i_class,i_category,i_product_name]
                                  CometProject [inv_item_sk,inv_warehouse_sk,inv_quantity_on_hand]
                                    CometBroadcastHashJoin [inv_item_sk,inv_warehouse_sk,inv_quantity_on_hand,inv_date_sk,d_date_sk]
                                      CometFilter [inv_item_sk,inv_warehouse_sk,inv_quantity_on_hand,inv_date_sk]
                                        CometScan parquet spark_catalog.default.inventory [inv_item_sk,inv_warehouse_sk,inv_quantity_on_hand,inv_date_sk]
                                          SubqueryBroadcast [d_date_sk] #1
                                            BroadcastExchange #2
                                              WholeStageCodegen (1)
                                                CometColumnarToRow
                                                  InputAdapter
                                                    CometProject [d_date_sk]
                                                      CometFilter [d_date_sk,d_month_seq]
                                                        CometScan parquet spark_catalog.default.date_dim [d_date_sk,d_month_seq]
                                      CometBroadcastExchange [d_date_sk] #3
                                        CometProject [d_date_sk]
                                          CometFilter [d_date_sk,d_month_seq]
                                            CometScan parquet spark_catalog.default.date_dim [d_date_sk,d_month_seq]
                                  CometBroadcastExchange [i_item_sk,i_brand,i_class,i_category,i_product_name] #4
                                    CometFilter [i_item_sk,i_brand,i_class,i_category,i_product_name]
                                      CometScan parquet spark_catalog.default.item [i_item_sk,i_brand,i_class,i_category,i_product_name]
                              CometBroadcastExchange [w_warehouse_sk] #5
                                CometFilter [w_warehouse_sk]
                                  CometScan parquet spark_catalog.default.warehouse [w_warehouse_sk]
    WholeStageCodegen (5)
      HashAggregate [i_product_name,i_brand,i_class,sum,count] [avg(qoh),i_category,qoh,sum,count]
        CometColumnarToRow
          InputAdapter
            CometColumnarExchange [i_product_name,i_brand,i_class] #6
              WholeStageCodegen (4)
                HashAggregate [i_product_name,i_brand,i_class,qoh] [sum,count,sum,count]
                  HashAggregate [i_product_name,i_brand,i_class,i_category,sum,count] [avg(inv_quantity_on_hand),qoh,sum,count]
                    CometColumnarToRow
                      InputAdapter
                        ReusedExchange [i_product_name,i_brand,i_class,i_category,sum,count] #1
    WholeStageCodegen (8)
      HashAggregate [i_product_name,i_brand,sum,count] [avg(qoh),i_class,i_category,qoh,sum,count]
        CometColumnarToRow
          InputAdapter
            CometColumnarExchange [i_product_name,i_brand] #7
              WholeStageCodegen (7)
                HashAggregate [i_product_name,i_brand,qoh] [sum,count,sum,count]
                  HashAggregate [i_product_name,i_brand,i_class,i_category,sum,count] [avg(inv_quantity_on_hand),qoh,sum,count]
                    CometColumnarToRow
                      InputAdapter
                        ReusedExchange [i_product_name,i_brand,i_class,i_category,sum,count] #1
    WholeStageCodegen (11)
      HashAggregate [i_product_name,sum,count] [avg(qoh),i_brand,i_class,i_category,qoh,sum,count]
        CometColumnarToRow
          InputAdapter
            CometColumnarExchange [i_product_name] #8
              WholeStageCodegen (10)
                HashAggregate [i_product_name,qoh] [sum,count,sum,count]
                  HashAggregate [i_product_name,i_brand,i_class,i_category,sum,count] [avg(inv_quantity_on_hand),qoh,sum,count]
                    CometColumnarToRow
                      InputAdapter
                        ReusedExchange [i_product_name,i_brand,i_class,i_category,sum,count] #1
    WholeStageCodegen (14)
      HashAggregate [sum,count] [avg(qoh),i_product_name,i_brand,i_class,i_category,qoh,sum,count]
        CometColumnarToRow
          InputAdapter
            CometColumnarExchange #9
              WholeStageCodegen (13)
                HashAggregate [qoh] [sum,count,sum,count]
                  HashAggregate [i_product_name,i_brand,i_class,i_category,sum,count] [avg(inv_quantity_on_hand),qoh,sum,count]
                    CometColumnarToRow
                      InputAdapter
                        ReusedExchange [i_product_name,i_brand,i_class,i_category,sum,count] #1
