gengliangwang commented on pull request #31390: URL: https://github.com/apache/spark/pull/31390#issuecomment-783212402
> I created #31080 before this PR to implement the behavior that is returns Binary. But that was a mistake. I don't think it's a total mistake. Is there any existing database that has the behavior? ``` btrim(Binary) => String ``` I checked PostgreSQL and Google Bigquery and they all return **Binary** type for btrim(Binary). It seems more reasonable for trim/btrim functions: if a users wants to trim a binary column, he/she has to run `cast(trim(binary_col) as binary)` and Spark converts binary to string and then convert the trimmed result as binary. ---------------------------------------------------------------- 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: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org