hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Shelukhin (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HIVE-20417) Hive converts strings to doubles in a strange manner
Date Fri, 17 Aug 2018 23:04:00 GMT

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

Sergey Shelukhin updated HIVE-20417:
------------------------------------
    Description: 
This is not on master, but on a close enough version, so it needs to be dbl checked... running
with vectorization on:
{noformat}
POSTHOOK: query: create table cross_numbers(i string)
POSTHOOK: query: insert into table cross_numbers select key from src limit 20
POSTHOOK: query: select c1.i, c2.i, c1.i + c2.i, c1.i + '' + c2.i from cross_numbers c1 cross
join cross_numbers c2
401	265	666.0	NULL
401	255	656.0	NULL
401	165	566.0	NULL
{noformat}

Why are strings added as numbers, and string + '' + string converted to null is not clear..

[~ashutoshc] is plus supposed to work for string?

  was:
This is not on master, but on a close enough version, so it needs to be dbl checked... running
with vectorization on:
{noformat}
POSTHOOK: query: create table cross_numbers(i string)
POSTHOOK: query: insert into table cross_numbers select key from src limit 20
POSTHOOK: query: select c1.i, c2.i, c1.i + c2.i, c1.i + '' + c2.i from cross_numbers c1 cross

401	265	666.0	NULL
401	255	656.0	NULL
401	165	566.0	NULL
{noformat}

Why are strings added as numbers, and string + '' + string converted to null is not clear..

[~ashutoshc] is plus supposed to work for string?


> Hive converts strings to doubles in a strange manner
> ----------------------------------------------------
>
>                 Key: HIVE-20417
>                 URL: https://issues.apache.org/jira/browse/HIVE-20417
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Sergey Shelukhin
>            Assignee: Matt McCline
>            Priority: Major
>
> This is not on master, but on a close enough version, so it needs to be dbl checked...
running with vectorization on:
> {noformat}
> POSTHOOK: query: create table cross_numbers(i string)
> POSTHOOK: query: insert into table cross_numbers select key from src limit 20
> POSTHOOK: query: select c1.i, c2.i, c1.i + c2.i, c1.i + '' + c2.i from cross_numbers
c1 cross join cross_numbers c2
> 401	265	666.0	NULL
> 401	255	656.0	NULL
> 401	165	566.0	NULL
> {noformat}
> Why are strings added as numbers, and string + '' + string converted to null is not clear..
> [~ashutoshc] is plus supposed to work for string?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message