presto-main/src/main/java/io/prestosql/sql/analyzer/ExpressionAnalyzer.java/Visitor/visitGenericLiteral
class Visitor:        @Override
        protected Type visitGenericLiteral(GenericLiteral node, StackableAstVisitorContext<Context> context)
        {
            Type type;
            try {
                type = metadata.fromSqlType(node.getType());
            }
            catch (TypeNotFoundException e) {
                throw semanticException(TYPE_NOT_FOUND, node, "Unknown type: " + node.getType());
            }

            if (!JSON.equals(type)) {
                try {
                    metadata.getCoercion(VARCHAR, type);
                }
                catch (IllegalArgumentException e) {
                    throw semanticException(INVALID_LITERAL, node, "No literal form for type %s", type);
                }
            }

            return setExpressionType(node, type);
        }