WholeStageCodegen (1)
  CometColumnarToRow
    InputAdapter
      CometTakeOrderedAndProject [i_product_name,i_brand,i_class,i_category,qoh]
        CometUnion [i_product_name,i_brand,i_class,i_category,qoh]
          CometHashAggregate [sum,count] [i_product_name,i_brand,i_class,i_category,qoh,i_product_name,i_brand,i_class,i_category,avg(qoh)]
            CometHashAggregate [qoh] [i_product_name,i_brand,i_class,i_category,sum,count]
              CometHashAggregate [sum,count] [i_product_name,i_brand,i_class,i_category,qoh,avg(inv_quantity_on_hand)]
                CometExchange [i_product_name,i_brand,i_class,i_category] #1
                  CometHashAggregate [inv_quantity_on_hand] [i_product_name,i_brand,i_class,i_category,sum,count]
                    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 [native_iceberg_compat] 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 [native_iceberg_compat] 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 [native_iceberg_compat] 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
                              CometProject [i_brand,i_class,i_category,i_product_name] [i_item_sk,i_brand,i_class,i_category,i_product_name]
                                CometFilter [i_item_sk,i_brand,i_class,i_category,i_product_name]
                                  CometScan [native_iceberg_compat] 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 [native_iceberg_compat] parquet spark_catalog.default.warehouse [w_warehouse_sk]
          CometHashAggregate [sum,count] [i_product_name,i_brand,i_class,i_category,qoh,avg(qoh)]
            CometExchange [i_product_name,i_brand,i_class] #6
              CometHashAggregate [qoh] [i_product_name,i_brand,i_class,sum,count]
                CometHashAggregate [i_category,sum,count] [i_product_name,i_brand,i_class,qoh,avg(inv_quantity_on_hand)]
                  ReusedExchange [i_product_name,i_brand,i_class,i_category,sum,count] #1
          CometHashAggregate [sum,count] [i_product_name,i_brand,i_class,i_category,qoh,avg(qoh)]
            CometExchange [i_product_name,i_brand] #7
              CometHashAggregate [qoh] [i_product_name,i_brand,sum,count]
                CometHashAggregate [i_class,i_category,sum,count] [i_product_name,i_brand,qoh,avg(inv_quantity_on_hand)]
                  ReusedExchange [i_product_name,i_brand,i_class,i_category,sum,count] #1
          CometHashAggregate [sum,count] [i_product_name,i_brand,i_class,i_category,qoh,avg(qoh)]
            CometExchange [i_product_name] #8
              CometHashAggregate [qoh] [i_product_name,sum,count]
                CometHashAggregate [i_brand,i_class,i_category,sum,count] [i_product_name,qoh,avg(inv_quantity_on_hand)]
                  ReusedExchange [i_product_name,i_brand,i_class,i_category,sum,count] #1
          CometHashAggregate [sum,count] [i_product_name,i_brand,i_class,i_category,qoh,avg(qoh)]
            CometExchange #9
              CometHashAggregate [qoh] [sum,count]
                CometHashAggregate [i_product_name,i_brand,i_class,i_category,sum,count] [qoh,avg(inv_quantity_on_hand)]
                  ReusedExchange [i_product_name,i_brand,i_class,i_category,sum,count] #1
