presto-main/src/main/java/io/prestosql/metadata/FunctionRegistry.java/FunctionRegistry/isAggregationFunction
class FunctionRegistry:    public boolean isAggregationFunction(QualifiedName name)
    {
        return functions.get(name).stream()
                .map(FunctionMetadata::getKind)
                .anyMatch(AGGREGATE::equals);
    }