cloud-fan commented on issue #24872: [SPARK-28023][SQL] Trim the string when 
cast string type to Boolean/Numeric types
URL: https://github.com/apache/spark/pull/24872#issuecomment-556917834
 
 
   The problem I see is not about pgsql compatibility, but about internal 
consistency. Why casting to date/timestamp trims the spaces but casting to 
numeric does not?
   
   BTW for parsing, we don't really need a "safe" trim that copies the data. We 
can do a "cheap" trim that only changes the `UTF8String` offsets. The trimmed 
`UTF8String` instance will only be used in the parsing method. I don't think it 
will have a big perf overhead.

----------------------------------------------------------------
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]

Reply via email to