hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hive QA (JIRA)" <>
Subject [jira] [Commented] (HIVE-5352) cast('1.0' as int) returns null
Date Thu, 26 Sep 2013 22:44:02 GMT


Hive QA commented on HIVE-5352:

{color:red}Overall{color}: -1 at least one tests failed

Here are the results of testing the latest attachment:

{color:red}ERROR:{color} -1 due to 1 failed/errored test(s), 3163 tests executed
*Failed tests:*

Test results:
Console output:

Executing org.apache.hive.ptest.execution.PrepPhase
Executing org.apache.hive.ptest.execution.ExecutionPhase
Executing org.apache.hive.ptest.execution.ReportingPhase
Tests failed with: TestsFailedException: 1 tests failed

This message is automatically generated.
> cast('1.0' as int) returns null
> -------------------------------
>                 Key: HIVE-5352
>                 URL:
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Gunther Hagleitner
>            Assignee: Gunther Hagleitner
>         Attachments: HIVE-5352.1.patch, HIVE-5352.2.patch, HIVE-5352.3.patch, HIVE-5352.4.patch,
> Casting strings to int/smallint/bigint/tinyint yields null if the string isn't a 'pure'
integer. '1.0', '2.4' all return null. I think for those cases the cast should return the
truncated int (i.e.: if c is string, cast(c as int) should be the same as cast(cast(c as float)
as int).
> This is in line with the standard and is the same behavior as mysql and oracle. (postgres
and sql server throw error, see first answer here:

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message