You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "David Scarlatti (JIRA)" <ji...@apache.org> on 2017/10/07 16:01:06 UTC

[jira] [Resolved] (HIVE-17724) Cast from string to float gives strange result

     [ https://issues.apache.org/jira/browse/HIVE-17724?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Scarlatti resolved HIVE-17724.
------------------------------------
    Resolution: Not A Bug

Hive is Ok. The float data type can't handle that number.

> Cast from string to float gives strange result
> ----------------------------------------------
>
>                 Key: HIVE-17724
>                 URL: https://issues.apache.org/jira/browse/HIVE-17724
>             Project: Hive
>          Issue Type: Bug
>    Affects Versions: 1.1.0
>         Environment: Hive 1.1.0-cdh5.10.0
> Subversion file:///data0/jenkins/workspace/generic-package-ubuntu64-14-04/CDH5.10.0-Packaging-Hive-2017-01-20_11-52-43/hive-1.1.0+cdh5.10.0+859-1.cdh5.10.0.p0.71~trusty -r Unknown
>            Reporter: David Scarlatti
>
> this query:"select CAST ('1507284611' as int), CAST ('1507284611' as bigint),  CAST ('1507284611' as float),   CAST ('1507284611' as double),   CAST ('1507284611' as decimal)"
> returns
> 1507284611	1507284611	1507284608	1507284611	1507284611
> cast as float is the only one changing the numeric value.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)