[
https://issues.apache.org/jira/browse/SPARK-30000?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Wenchen Fan resolved SPARK-30000.
---------------------------------
Resolution: Fixed
Issue resolved by pull request 26640
[https://github.com/apache/spark/pull/26640]
> 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: [email protected]
For additional commands, e-mail: [email protected]