SELECT COUNT(*) from
reviews
group by stars;

distribute result [$$33]
-- DISTRIBUTE_RESULT  |PARTITIONED|
  exchange
  -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
    project ([$$33])
    -- STREAM_PROJECT  |PARTITIONED|
      assign [$$33] <- [{"$1": $$37}]
      -- ASSIGN  |PARTITIONED|
        project ([$$37])
        -- STREAM_PROJECT  |PARTITIONED|
          exchange
          -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
            group by ([$$stars := $$39]) decor ([]) {
                      aggregate [$$37] <- [agg-sql-sum($$38)]
                      -- AGGREGATE  |LOCAL|
                        nested tuple source
                        -- NESTED_TUPLE_SOURCE  |LOCAL|
                   }
            -- SORT_GROUP_BY[$$39]  |PARTITIONED|
              exchange
              -- HASH_PARTITION_EXCHANGE [$$39]  |PARTITIONED|
                group by ([$$39 := $$34]) decor ([]) {
                          aggregate [$$38] <- [agg-sql-count(1)]
                          -- AGGREGATE  |LOCAL|
                            nested tuple source
                            -- NESTED_TUPLE_SOURCE  |LOCAL|
                       }
                -- SORT_GROUP_BY[$$34]  |PARTITIONED|
                  exchange
                  -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                    project ([$$34])
                    -- STREAM_PROJECT  |PARTITIONED|
                      assign [$$34] <- [$$reviews.getField("stars")]
                      -- ASSIGN  |PARTITIONED|
                        project ([$$reviews])
                        -- STREAM_PROJECT  |PARTITIONED|
                          exchange
                          -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                            data-scan []<-[$$35, $$reviews, $$36] <- Default.reviews
                            -- DATASOURCE_SCAN  |PARTITIONED|
                              exchange
                              -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                empty-tuple-source
                                -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
