presto-main/src/main/java/io/prestosql/sql/planner/iterative/rule/MultipleDistinctAggregationToMarkDistinct.java/MultipleDistinctAggregationToMarkDistinct/hasNoDistinctWithFilterOrMask
class MultipleDistinctAggregationToMarkDistinct:    private static boolean hasNoDistinctWithFilterOrMask(AggregationNode aggregationNode)
    {
        return aggregationNode.getAggregations()
                .values().stream()
                .noneMatch(aggregation -> aggregation.isDistinct() && (aggregation.getFilter().isPresent() || aggregation.getMask().isPresent()));
    }