The trim logic in Cast expression introduced in https://github.com/apache/spark/pull/26622 will trim chinese characters unexpectly.
For example, sql select cast("1中文" as float) gives 1 instead of null
- is caused by
-
SPARK-28023 Trim the string when cast string type to other types
-
- Resolved
-
- links to