[ https://issues.apache.org/jira/browse/HIVE-13928?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jesus Camacho Rodriguez updated HIVE-13928: ------------------------------------------- Target Version/s: 2.2.0, 2.1.1 (was: 2.1.0) > 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 > > 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)