We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Whitespace is not allowed when casting to integer (or other exact numeric types including bigint, decimal)
integer
bigint
decimal
trino> SELECT CAST(' 123' AS integer); Query 20240911_093239_00097_snjt3 failed: Cannot cast ' 123' to INT
trino> SELECT CAST('123 ' AS integer); Query 20240911_093248_00098_snjt3 failed: Cannot cast '123 ' to INT
trino> SELECT CAST(' 123 ' AS integer); Query 20240911_093336_00104_snjt3 failed: Cannot cast ' 123 ' to INT
but it's allowed when casting to real, double
real
double
trino> SELECT CAST(' 123 ' AS real); _col0 ------- 123.0
trino> SELECT CAST(' 123 ' AS double); _col0 ------- 123.0
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Whitespace is not allowed when casting to
integer
(or other exact numeric types includingbigint
,decimal
)but it's allowed when casting to
real
,double
The text was updated successfully, but these errors were encountered: