presto-main/src/main/java/io/prestosql/sql/planner/optimizations/SetFlatteningOptimizer.java/SetFlatteningOptimizer/isDistinctOperator
class SetFlatteningOptimizer:        private static boolean isDistinctOperator(AggregationNode node)
        {
            return node.getAggregations().isEmpty();
        }