WholeStageCodegen (11)
  CometColumnarToRow
    InputAdapter
      CometHashAggregate [sum,isEmpty] [sum(sales),sum(sales)]
        CometExchange #1
          CometHashAggregate [sales] [sum,isEmpty]
            CometUnion [sales]
              CometProject [cs_quantity,cs_list_price] [sales]
                CometBroadcastHashJoin [cs_quantity,cs_list_price,cs_sold_date_sk,d_date_sk]
                  CometProject [cs_quantity,cs_list_price,cs_sold_date_sk]
                    CometSortMergeJoin [cs_bill_customer_sk,cs_quantity,cs_list_price,cs_sold_date_sk,c_customer_sk]
                      CometSort [cs_bill_customer_sk,cs_quantity,cs_list_price,cs_sold_date_sk]
                        CometColumnarExchange [cs_bill_customer_sk] #2
                          WholeStageCodegen (5)
                            Project [cs_bill_customer_sk,cs_quantity,cs_list_price,cs_sold_date_sk]
                              BroadcastHashJoin [cs_item_sk,item_sk]
                                ColumnarToRow
                                  InputAdapter
                                    Scan parquet spark_catalog.default.catalog_sales [cs_bill_customer_sk,cs_item_sk,cs_quantity,cs_list_price,cs_sold_date_sk]
                                      SubqueryBroadcast [d_date_sk] #1
                                        BroadcastExchange #3
                                          WholeStageCodegen (1)
                                            CometColumnarToRow
                                              InputAdapter
                                                CometProject [d_date_sk]
                                                  CometFilter [d_date_sk,d_year,d_moy]
                                                    CometNativeScan parquet spark_catalog.default.date_dim [d_date_sk,d_year,d_moy]
                                InputAdapter
                                  BroadcastExchange #4
                                    WholeStageCodegen (4)
                                      Project [item_sk]
                                        Filter [cnt]
                                          HashAggregate [_groupingexpression,i_item_sk,d_date,count] [count(1),item_sk,cnt,count]
                                            CometColumnarToRow
                                              InputAdapter
                                                CometColumnarExchange [_groupingexpression,i_item_sk,d_date] #5
                                                  WholeStageCodegen (3)
                                                    HashAggregate [_groupingexpression,i_item_sk,d_date] [count,count]
                                                      Project [d_date,i_item_sk,i_item_desc]
                                                        BroadcastHashJoin [ss_item_sk,i_item_sk]
                                                          Project [ss_item_sk,d_date]
                                                            BroadcastHashJoin [ss_sold_date_sk,d_date_sk]
                                                              Filter [ss_item_sk]
                                                                ColumnarToRow
                                                                  InputAdapter
                                                                    Scan parquet spark_catalog.default.store_sales [ss_item_sk,ss_sold_date_sk]
                                                                      SubqueryBroadcast [d_date_sk] #2
                                                                        BroadcastExchange #6
                                                                          WholeStageCodegen (1)
                                                                            CometColumnarToRow
                                                                              InputAdapter
                                                                                CometProject [d_date_sk,d_date]
                                                                                  CometFilter [d_date_sk,d_date,d_year]
                                                                                    CometNativeScan parquet spark_catalog.default.date_dim [d_date_sk,d_date,d_year]
                                                              InputAdapter
                                                                ReusedExchange [d_date_sk,d_date] #6
                                                          InputAdapter
                                                            BroadcastExchange #7
                                                              WholeStageCodegen (2)
                                                                CometColumnarToRow
                                                                  InputAdapter
                                                                    CometFilter [i_item_sk,i_item_desc]
                                                                      CometNativeScan parquet spark_catalog.default.item [i_item_sk,i_item_desc]
                      CometSort [c_customer_sk]
                        CometProject [c_customer_sk]
                          CometFilter [c_customer_sk,ssales]
                            Subquery #3
                              WholeStageCodegen (5)
                                HashAggregate [max] [max(csales),tpcds_cmax,max]
                                  CometColumnarToRow
                                    InputAdapter
                                      CometColumnarExchange #10
                                        WholeStageCodegen (4)
                                          HashAggregate [csales] [max,max]
                                            HashAggregate [c_customer_sk,sum,isEmpty] [sum((cast(ss_quantity as decimal(10,0)) * ss_sales_price)),csales,sum,isEmpty]
                                              CometColumnarToRow
                                                InputAdapter
                                                  CometColumnarExchange [c_customer_sk] #11
                                                    WholeStageCodegen (3)
                                                      HashAggregate [c_customer_sk,ss_quantity,ss_sales_price] [sum,isEmpty,sum,isEmpty]
                                                        Project [ss_quantity,ss_sales_price,c_customer_sk]
                                                          BroadcastHashJoin [ss_sold_date_sk,d_date_sk]
                                                            Project [ss_quantity,ss_sales_price,ss_sold_date_sk,c_customer_sk]
                                                              BroadcastHashJoin [ss_customer_sk,c_customer_sk]
                                                                Filter [ss_customer_sk]
                                                                  ColumnarToRow
                                                                    InputAdapter
                                                                      Scan parquet spark_catalog.default.store_sales [ss_customer_sk,ss_quantity,ss_sales_price,ss_sold_date_sk]
                                                                        SubqueryBroadcast [d_date_sk] #4
                                                                          BroadcastExchange #12
                                                                            WholeStageCodegen (1)
                                                                              CometColumnarToRow
                                                                                InputAdapter
                                                                                  CometProject [d_date_sk]
                                                                                    CometFilter [d_date_sk,d_year]
                                                                                      CometNativeScan parquet spark_catalog.default.date_dim [d_date_sk,d_year]
                                                                InputAdapter
                                                                  BroadcastExchange #13
                                                                    WholeStageCodegen (1)
                                                                      CometColumnarToRow
                                                                        InputAdapter
                                                                          CometFilter [c_customer_sk]
                                                                            CometNativeScan parquet spark_catalog.default.customer [c_customer_sk]
                                                            InputAdapter
                                                              ReusedExchange [d_date_sk] #12
                            CometHashAggregate [sum,isEmpty] [c_customer_sk,ssales,sum((cast(ss_quantity as decimal(10,0)) * ss_sales_price))]
                              CometExchange [c_customer_sk] #8
                                CometHashAggregate [ss_quantity,ss_sales_price] [c_customer_sk,sum,isEmpty]
                                  CometProject [ss_quantity,ss_sales_price,c_customer_sk]
                                    CometBroadcastHashJoin [ss_customer_sk,ss_quantity,ss_sales_price,c_customer_sk]
                                      CometProject [ss_customer_sk,ss_quantity,ss_sales_price]
                                        CometFilter [ss_customer_sk,ss_quantity,ss_sales_price,ss_sold_date_sk]
                                          CometNativeScan parquet spark_catalog.default.store_sales [ss_customer_sk,ss_quantity,ss_sales_price,ss_sold_date_sk]
                                      CometBroadcastExchange [c_customer_sk] #9
                                        CometFilter [c_customer_sk]
                                          CometNativeScan parquet spark_catalog.default.customer [c_customer_sk]
                  CometBroadcastExchange [d_date_sk] #14
                    CometProject [d_date_sk]
                      CometFilter [d_date_sk,d_year,d_moy]
                        CometNativeScan parquet spark_catalog.default.date_dim [d_date_sk,d_year,d_moy]
              CometProject [ws_quantity,ws_list_price] [sales]
                CometBroadcastHashJoin [ws_quantity,ws_list_price,ws_sold_date_sk,d_date_sk]
                  CometProject [ws_quantity,ws_list_price,ws_sold_date_sk]
                    CometSortMergeJoin [ws_bill_customer_sk,ws_quantity,ws_list_price,ws_sold_date_sk,c_customer_sk]
                      CometSort [ws_bill_customer_sk,ws_quantity,ws_list_price,ws_sold_date_sk]
                        CometColumnarExchange [ws_bill_customer_sk] #15
                          WholeStageCodegen (10)
                            Project [ws_bill_customer_sk,ws_quantity,ws_list_price,ws_sold_date_sk]
                              BroadcastHashJoin [ws_item_sk,item_sk]
                                ColumnarToRow
                                  InputAdapter
                                    Scan parquet spark_catalog.default.web_sales [ws_item_sk,ws_bill_customer_sk,ws_quantity,ws_list_price,ws_sold_date_sk]
                                      ReusedSubquery [d_date_sk] #1
                                InputAdapter
                                  ReusedExchange [item_sk] #4
                      CometSort [c_customer_sk]
                        CometProject [c_customer_sk]
                          CometFilter [c_customer_sk,ssales]
                            ReusedSubquery [tpcds_cmax] #3
                            CometHashAggregate [sum,isEmpty] [c_customer_sk,ssales,sum((cast(ss_quantity as decimal(10,0)) * ss_sales_price))]
                              ReusedExchange [c_customer_sk,sum,isEmpty] #8
                  ReusedExchange [d_date_sk] #14
