[ 
https://issues.apache.org/jira/browse/SPARK-20834?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

liuxian updated SPARK-20834:
----------------------------
    Summary: TypeCoercion:loss of precision when widening long and float,or int 
and float  (was: TypeCoercion:In case 1,loss of precision is not acceptable)

> TypeCoercion:loss of precision when widening long and float,or int and float
> ----------------------------------------------------------------------------
>
>                 Key: SPARK-20834
>                 URL: https://issues.apache.org/jira/browse/SPARK-20834
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 2.1.0, 2.2.0
>            Reporter: liuxian
>
> spark-sql>select if(true, 123456789, cast(1.23 as float));
> spark-sql>1.23456792E8
> select if(true, 123456789012345678, cast(1.23 as double));
> spark-sql>1.2345678901234568E17
> For these two cases, the result is not we expected, it lost precision.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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

Reply via email to