You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "liuxian (JIRA)" <ji...@apache.org> on 2017/06/01 09:17:04 UTC

[jira] [Closed] (SPARK-20933) when the input parameter is float type for ’round ’ or ‘bround’ ,it can't work well

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

liuxian closed SPARK-20933.
---------------------------
    Resolution: Fixed

> when the input parameter is float type for ’round ’ or  ‘bround’ ,it can't work well
> ------------------------------------------------------------------------------------
>
>                 Key: SPARK-20933
>                 URL: https://issues.apache.org/jira/browse/SPARK-20933
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 2.2.0
>            Reporter: liuxian
>
> spark-sql>select round(cast(3.1415 as float), 3);
> spark-sql>3.141
> For this case, the result we expected is 3.142
> spark-sql>select bround(cast(3.1415 as float), 3);
> spark-sql>3.141
> For this case, the result we expected is 3.142



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

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org