Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BREAKING] Implicit cast rules for integer literals, and parameterized ANY for binding #10194

Merged
merged 14 commits into from
Jan 10, 2024
Prev Previous commit
Next Next commit
Remove dead code
  • Loading branch information
Mytherin committed Jan 10, 2024
commit e354fa629bc045edc30c837e859e8240d41e9abd
7 changes: 0 additions & 7 deletions src/planner/expression/bound_cast_expression.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,6 @@ unique_ptr<Expression> AddCastToTypeInternal(unique_ptr<Expression> expr, const
auto &def = expr->Cast<BoundDefaultExpression>();
def.return_type = target_type;
}
if (expr->return_type.id() == LogicalTypeId::STRING_LITERAL) {
throw InternalException("FIXME - does this ever happen...?");
// when adding a cast to a string literal we need to transform the constant back into a VARCHAR
auto &constant = expr->Cast<BoundConstantExpression>();
constant.value = Value(StringValue::Get(constant.value));
constant.return_type = LogicalType::VARCHAR;
}
if (!target_type.IsValid()) {
return expr;
}
Expand Down