You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Xiao Li (JIRA)" <ji...@apache.org> on 2017/05/22 05:42:05 UTC
[jira] [Resolved] (SPARK-20786) Improve ceil and floor handle the
value which is not expected
[ https://issues.apache.org/jira/browse/SPARK-20786?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Xiao Li resolved SPARK-20786.
-----------------------------
Resolution: Fixed
Fix Version/s: 2.3.0
> Improve ceil and floor handle the value which is not expected
> -------------------------------------------------------------
>
> Key: SPARK-20786
> URL: https://issues.apache.org/jira/browse/SPARK-20786
> Project: Spark
> Issue Type: Bug
> Components: SQL
> Affects Versions: 2.2.0
> Reporter: caoxuewen
> Assignee: caoxuewen
> Fix For: 2.3.0
>
>
> spark-sql>SELECT ceil(1234567890123456);
> 1234567890123456
> spark-sql>SELECT ceil(12345678901234567);
> 12345678901234568
> spark-sql>SELECT ceil(123456789012345678);
> 123456789012345680
> when the length of the getText is greater than 16. long to double will be precision loss.
> but mysql handle the value is ok.
> mysql> SELECT ceil(1234567890123456);
> +------------------------+
> | ceil(1234567890123456) |
> +------------------------+
> | 1234567890123456 |
> +------------------------+
> 1 row in set (0.00 sec)
> mysql> SELECT ceil(12345678901234567);
> +-------------------------+
> | ceil(12345678901234567) |
> +-------------------------+
> | 12345678901234567 |
> +-------------------------+
> 1 row in set (0.00 sec)
> mysql> SELECT ceil(123456789012345678);
> +--------------------------+
> | ceil(123456789012345678) |
> +--------------------------+
> | 123456789012345678 |
> +--------------------------+
> 1 row in set (0.00 sec)
--
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