[ https://issues.apache.org/jira/browse/HIVE-14863?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sergey Shelukhin updated HIVE-14863: ------------------------------------ Attachment: HIVE-14863.patch This fixes all sorts of casts from decimal. Seems like vectorized casts are still broken for smaller types, presumably because LongCV is converted to smaller types in a different place, and the decimal is only cast to long. > 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 > 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)