presto-main/src/main/java/io/prestosql/operator/scalar/FormatFunction.java/FormatFunction/castToVarchar
class FormatFunction:    private static MethodHandle castToVarchar(Metadata metadata, Type type)
    {
        try {
            ResolvedFunction cast = metadata.getCoercion(type, VARCHAR);
            return metadata.getScalarFunctionImplementation(cast).getMethodHandle();
        }
        catch (OperatorNotFoundException e) {
            return null;
        }
    }