yaooqinn commented on issue #26626: [SPARK-29986][SQL] Introduce java like string trim to UTF8String URL: https://github.com/apache/spark/pull/26626#issuecomment-557116866 ```scala scala> " 234\t ".toDouble res0: Double = 234.0 scala> java.lang.Double.valueOf(" 234\t ") res1: Double = 234.0 ``` the way spark deal with casting string to approximate numeric - float and double also trim control characters silently. @cloud-fan @srowen I take a look at SQL standard about string trim > 3) If trim character is not specified, then ' ' is implicit. >b) If <trim character> is specified, then let SC be the value of trim character; otherwise, let SC be space.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
