hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Takuma Wakamori (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-13928) Hive2: float value need to be single quoted inside where clause to return rows when it doesn't have to be
Date Tue, 14 Jun 2016 05:20:57 GMT

    [ https://issues.apache.org/jira/browse/HIVE-13928?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15328965#comment-15328965
] 

Takuma Wakamori commented on HIVE-13928:
----------------------------------------

Hi.
Does anyone working on this issue?
If not, I would like to fix it. Thanks!

> Hive2: float value need to be single quoted inside where clause to return rows when it
doesn't have to be
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-13928
>                 URL: https://issues.apache.org/jira/browse/HIVE-13928
>             Project: Hive
>          Issue Type: Bug
>    Affects Versions: 2.1.0
>            Reporter: Takahiko Saito
>            Priority: Critical
>
> The below select where with float value does not return any row:
> {noformat}
> 0: jdbc:hive2://os-r7-mvjkcu-hiveserver2-11-4> drop table test;
> No rows affected (0.212 seconds)
> 0: jdbc:hive2://os-r7-mvjkcu-hiveserver2-11-4> create table test (f float);
> No rows affected (1.131 seconds)
> 0: jdbc:hive2://os-r7-mvjkcu-hiveserver2-11-4> insert into table test values (-35664.76),(29497.34);
> No rows affected (2.482 seconds)
> 0: jdbc:hive2://os-r7-mvjkcu-hiveserver2-11-4> select * from test;
> +------------+--+
> |   test.f   |
> +------------+--+
> | -35664.76  |
> | 29497.34   |
> +------------+--+
> 2 rows selected (0.142 seconds)
> 0: jdbc:hive2://os-r7-mvjkcu-hiveserver2-11-4> select * from test where f = -35664.76;
> +---------+--+
> | test.f  |
> +---------+--+
> +---------+--+
> {noformat}
> The workaround is to single quote float value:
> {noformat}
> 0: jdbc:hive2://os-r7-mvjkcu-hiveserver2-11-4> select * from test where f = '-35664.76';
> +------------+--+
> |   test.f   |
> +------------+--+
> | -35664.76  |
> +------------+--+
> 1 row selected (0.163 seconds)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message