beliefer commented on pull request #31128:
URL: https://github.com/apache/spark/pull/31128#issuecomment-759156667


   > There are a number of PRs floating around about this. For the record, I 
don't strongly oppose it, but, does not seem like a semantically useful 
function, even if some legacy DBs support it.
   
   This PR is different from the others, this is also because of my previous 
misunderstanding of `btrim`. At the first, I Investigated the `PostgreSql`, the 
implement of `btrim` in `PostgreSql` accepts byte array and return byte array 
as result.
   So I mistakenly thought that `btrim`'s behavior is like this.
   
   Then I created two PR as you know. But the two PR try to let `btrim` or 
`trim` accepts byte array and return byte array as result.
   
   After that, I Investigated other database and found `btrim` means trim from 
both ends of source string and it is just an alternate form of `TRIM(BOTH 
<chars> FROM <expr>)`.
   `btrim` is a little similar to `ltrim` or `rtrim`. 
   
   This PR only need minor changes (such as giving `trim` an alias) can support 
it.


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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to