You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Ian Hellstrom (JIRA)" <ji...@apache.org> on 2016/03/11 14:11:53 UTC
[jira] [Created] (DRILL-4497) Casting strings with leading/trailing
spaces to integers does not work
Ian Hellstrom created DRILL-4497:
------------------------------------
Summary: Casting strings with leading/trailing spaces to integers does not work
Key: DRILL-4497
URL: https://issues.apache.org/jira/browse/DRILL-4497
Project: Apache Drill
Issue Type: Bug
Reporter: Ian Hellstrom
When casting a string with leading and/or trailing spaces to an integer type (e.g. INT or BIGINT), an exception is thrown. Casting the same numbers to floating-point numbers works.
This is inconsistent and extremely confusing. Simply using TRIM() before casting works though.
{code}
SELECT CAST(' 1' AS INT) FROM ...
SELECT CAST('1 ' AS INT) FROM ...
{code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)