You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/01/13 02:12:02 UTC
[GitHub] [spark] beliefer edited a comment on pull request #31128: [SPARK-28123][SQL] String Functions: support btrim
beliefer edited a comment 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 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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org