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

Jason Dere commented on HIVE-10270:
-----------------------------------

Looks like Hive is relying on the value of BigDecimal.precision() here to get 
the precision, but this is causing problems.
For BigDecimal(0.09765625BD):
* precision = 7
* scale = 8
However Hive precision must be >= scale. Looking at how MySQL treats 0.09765625 
this should be decimal(9,8)

> Cannot use Decimal constant 0.09765625BD
> ----------------------------------------
>
>                 Key: HIVE-10270
>                 URL: https://issues.apache.org/jira/browse/HIVE-10270
>             Project: Hive
>          Issue Type: Bug
>          Components: Types
>            Reporter: Jason Dere
>
> {noformat}
> hive> select 0.09765625BD;
> FAILED: IllegalArgumentException Decimal scale must be less than or equal to 
> precision
> {noformat}



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

Reply via email to