presto-main/src/main/java/io/prestosql/sql/planner/iterative/rule/SingleDistinctAggregationToGroupBy.java/SingleDistinctAggregationToGroupBy/allDistinctAggregates
class SingleDistinctAggregationToGroupBy:    private static boolean allDistinctAggregates(AggregationNode aggregationNode)
    {
        return aggregationNode.getAggregations()
                .values().stream()
                .allMatch(Aggregation::isDistinct);
    }