spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Maynard (JIRA)" <>
Subject [jira] [Commented] (SPARK-22436) New function strip() to remove all whitespace from string
Date Sat, 04 Nov 2017 02:28:00 GMT


Eric Maynard commented on SPARK-22436:

[~asmaier] Wouldn't the right way to implement this be to use the existing function `regexp_replace`?
I'm not sure why this needs to be a built-in function.
Furthermore, if this was implemented, imo it should exist in all APIs, not just pyspark.

> New function strip() to remove all whitespace from string
> ---------------------------------------------------------
>                 Key: SPARK-22436
>                 URL:
>             Project: Spark
>          Issue Type: Improvement
>          Components: PySpark, Spark Core
>    Affects Versions: 2.2.0
>            Reporter: Andreas Maier
>            Priority: Minor
>              Labels: features
> Since ticket SPARK-17299 the [trim() function|]
will not remove any whitespace characters from beginning and end of a string but only spaces.
This is correct in regard to the SQL standard, but it opens a gap in functionality. 
> My suggestion is to add to the Spark API in analogy to pythons standard library the functions
l/r/strip(), which should remove all whitespace characters from a string from beginning and/or
end of a string respectively. 

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message