landlord-matt commented on PR #43787:
URL: https://github.com/apache/spark/pull/43787#issuecomment-1816499683
This is how other functions have solved this
```python
@_try_remote_functions
def find_in_set(str: "ColumnOrName", str_array: "ColumnOrName") -> Column:
"""
Returns the index (1-based) of the given string (`str`) in the
comma-delimited
list (`strArray`). Returns 0, if the string was not found or if the
given string (`str`)
contains a comma.
.. versionadded:: 3.5.0
```
```python
def split(str: "ColumnOrName", pattern: str, limit: int = -1) -> Column:
"""
Splits str around matches of the given pattern.
Returns
-------
:class:`~pyspark.sql.Column`
array of separated strings.
```
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]