shrirangmhalgi commented on PR #56240:
URL: https://github.com/apache/spark/pull/56240#issuecomment-4608866649
The change LGTM. It is a clean API addition that mirrors the existing 3-arg
pattern.
`One minor suggestion`: The PySpark docstring mentions the `position`
parameter but the `Examples` section only shows 3-arg usage. Consider adding a
doctest for the 4-arg form so that users discover it via
`help(F.regexp_replace)`:
```
>>> df = spark.createDataFrame([("100-200",)], ["str"])
>>> df.select(regexp_replace('str', r'(\d+)', '--', 5).alias('d')).collect()
[Row(d='100---')]
```
(Minor / non-blocking - just for docs completeness.)
--
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]