You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "NeilWang (JIRA)" <ji...@apache.org> on 2018/11/06 05:58:00 UTC

[jira] [Commented] (HIVE-20417) Hive converts strings to doubles in a strange manner

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

NeilWang commented on HIVE-20417:
---------------------------------

Please offer me some suggestions on why both convert Bigint or String to Double? what is the purpose of this design?

> 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
>            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)