presto-main/src/main/java/io/prestosql/sql/planner/ParameterRewriter.java/ParameterRewriter/coerceIfNecessary
class ParameterRewriter:    private Expression coerceIfNecessary(Expression original, Expression rewritten)
    {
        if (analysis == null) {
            return rewritten;
        }

        Type coercion = analysis.getCoercion(original);
        if (coercion != null) {
            rewritten = new Cast(
                    rewritten,
                    toSqlType(coercion),
                    false,
                    analysis.isTypeOnlyCoercion(original));
        }
        return rewritten;
    }