beliefer opened a new pull request #31390:
URL: https://github.com/apache/spark/pull/31390


   ### What changes were proposed in this pull request?
   Spark support `trim`/`ltrim`/`rtrim` now. The function `btrim` is an 
alternate form of `TRIM(BOTH <chars> FROM <expr>)`.
   `btrim` removes the longest string consisting only of specified characters 
from the start and end of a string.
   
   The mainstream database support this feature show below:
   
   **Postgresql**
   https://www.postgresql.org/docs/11/functions-binarystring.html
   
   **Vertica**
   
https://www.vertica.com/docs/9.2.x/HTML/Content/Authoring/SQLReferenceManual/Functions/String/BTRIM.htm?tocpath=SQL%20Reference%20Manual%7CSQL%20Functions%7CString%20Functions%7C_____5
   
   **Redshift**
   https://docs.aws.amazon.com/redshift/latest/dg/r_BTRIM.html
   
   **Druid**
   https://druid.apache.org/docs/latest/querying/sql.html#string-functions
   
   **Greenplum**
   http://docs.greenplum.org/6-8/ref_guide/function-summary.html
   
   
   ### Why are the changes needed?
   btrim is very useful.
   
   
   ### Does this PR introduce _any_ user-facing change?
   Yes. btrim is a new function
   
   
   ### How was this patch tested?
   Jenkins test.
   


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