-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
feat: Add implicit casting to TypeSignature::String
#13404
base: main
Are you sure you want to change the base?
Conversation
Please remove the changes to regexp_match as that change adds in support for utf8view which breaks that function (see ci output). It's a much larger issue than those changes. See #11911 (comment) for some details. |
Will fix this tommorow. |
NULL | ||
|
||
query T | ||
SELECT ltrim(12345, '1') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DuckDB doesn't allow this query 🤔
Numeric string casting is quite confusing to me
D SELECT ltrim(12345, '1');
Binder Error: No function matches the given name and argument types 'ltrim(INTEGER_LITERAL, STRING_LITERAL)'. You might need to add explicit type casts.
Candidate functions:
ltrim(VARCHAR) -> VARCHAR
ltrim(VARCHAR, VARCHAR) -> VARCHAR
LINE 1: SELECT ltrim(12345, '1');
Same with postgres
postgres=# SELECT ltrim(12345, '1');
ERROR: function ltrim(integer, unknown) does not exist
LINE 1: SELECT ltrim(12345, '1');
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
Mark this as draft as it is not ready for review |
Which issue does this PR close?
Closes #.
Rationale for this change
#13402 #13394 were running into some problems with implicit casting due to TypeSignature::String not dealing with implicit casting properly
What changes are included in this PR?
Added implicit casting to TypeSignature::String
Are these changes tested?
Yes
Are there any user-facing changes?