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

Reynold Xin commented on SPARK-8342:
------------------------------------

[~rtreffer] if this patch doesn't fix it, can you open another ticket? Thanks.

https://github.com/apache/spark/pull/6797

> Decimal Math beyond ~2^112 is broken
> ------------------------------------
>
>                 Key: SPARK-8342
>                 URL: https://issues.apache.org/jira/browse/SPARK-8342
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 1.5.0
>            Reporter: Rene Treffer
>             Fix For: 1.5.0
>
>
> Here is a snippet from the spark-shell that should not happen
> {code}
> scala> val d = Decimal(Long.MaxValue,100,0) * Decimal(Long.MaxValue,100,0)
> d: org.apache.spark.sql.types.Decimal = 0
> scala> d.toDebugString
> res3: String = Decimal(expanded,0,1,0})
> {code}
> It looks like precision gets reseted on some operations and values are then 
> truncated.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to