presto-main/src/main/java/io/prestosql/sql/planner/planprinter/ValuePrinter.java/ValuePrinter/castToVarcharOrFail
class ValuePrinter:    public String castToVarcharOrFail(Type type, Object value)
            throws OperatorNotFoundException
    {
        if (value == null) {
            return "NULL";
        }

        ResolvedFunction coercion = metadata.getCoercion(type, VARCHAR);
        Slice coerced = (Slice) new InterpretedFunctionInvoker(metadata).invoke(coercion, session.toConnectorSession(), value);
        return coerced.toStringUtf8();
    }