Description
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.
Attachments
Issue Links
- is a clone of
-
SPARK-28023 Trim the string when cast string type to other types
- Resolved
- is duplicated by
-
SPARK-29980 Whitespaces handling for Cast and BinaryOperation between StringType and NumericTypes
- Resolved
- is related to
-
SPARK-27931 Accept 'on' and 'off' as input for boolean data type
- Resolved
-
SPARK-25098 Trim the string when cast stringToTimestamp and stringToDate
- Resolved
- links to