You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Kent Yao (Jira)" <ji...@apache.org> on 2019/11/22 12:02:00 UTC

[jira] [Commented] (SPARK-30000) Trim the string when cast string type to decimals

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

Kent Yao commented on SPARK-30000:
----------------------------------

working on this.

> Trim the string when cast string type to decimals
> -------------------------------------------------
>
>                 Key: SPARK-30000
>                 URL: https://issues.apache.org/jira/browse/SPARK-30000
>             Project: Spark
>          Issue Type: Sub-task
>          Components: SQL
>    Affects Versions: 3.0.0
>            Reporter: Kent Yao
>            Assignee: Kent Yao
>            Priority: Major
>             Fix For: 3.0.0
>
>
> https://bugs.openjdk.java.net/browse/JDK-8170259
> https://bugs.openjdk.java.net/browse/JDK-8170563
> When we cast string type to decimal type, we rely on java.math. BigDecimal. It can't accept leading and training spaces, as you can see in the above links. This behavior is not consistent with other numeric types now. we need to fix it and keep consistency.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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