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

Sergey Shelukhin commented on HIVE-14863:
-----------------------------------------

They would not be affected by the same issue... the issue here is the usage of 
longValue()/etc methods on BigDecimal, that return truncated values by design, 
unlike e.g. longValueExact().
There may be problems with downcasting ints, in fact judging by the vectorized 
results in the out files there are problems at least on that path.


> Decimal to int conversion produces incorrect values
> ---------------------------------------------------
>
>                 Key: HIVE-14863
>                 URL: https://issues.apache.org/jira/browse/HIVE-14863
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Sergey Shelukhin
>            Assignee: Sergey Shelukhin
>            Priority: Critical
>         Attachments: HIVE-14863.patch
>
>
> {noformat}
> > select cast(cast ('111111111111111' as decimal(38,0)) as int);
> OK
> 307163591
> {noformat}



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

Reply via email to