presto-main/src/main/java/io/prestosql/sql/rewrite/ShowQueriesRewrite.java/Visitor/getFunctionType
class Visitor:        private static String getFunctionType(FunctionMetadata function)
        {
            FunctionKind kind = function.getKind();
            switch (kind) {
                case AGGREGATE:
                    return "aggregate";
                case WINDOW:
                    return "window";
                case SCALAR:
                    return "scalar";
            }
            throw new IllegalArgumentException("Unsupported function kind: " + kind);
        }