GitHub user HyukjinKwon opened a pull request:
https://github.com/apache/spark/pull/20173
[SPARK-22901][PYTHON][FOLLOWUP] Adds the doc for asNondeterministic for
wrapped UDF function
## What changes were proposed in this pull request?
This PR wraps the `asNondeterministic` attribute in the wrapped UDF
function to set the docstring properly.
```python
from pyspark.sql.functions import udf
help(udf(lambda x: x).asNondeterministic)
```
Before:
```
Help on function <lambda> in module pyspark.sql.udf:
<lambda> lambda
(END
```
After:
```
Help on function asNondeterministic in module pyspark.sql.udf:
asNondeterministic()
Updates UserDefinedFunction to nondeterministic.
.. versionadded:: 2.3
(END)
```
## How was this patch tested?
Manually tested and a simple test was added.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/HyukjinKwon/spark SPARK-22901-followup
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/20173.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #20173
----
commit d92dac3f73f8bd0f72ee04e5a2fbccc3887b4b4b
Author: hyukjinkwon <gurwls223@...>
Date: 2018-01-06T09:13:59Z
Adds the doc for asNondeterministic for wrapped UDF function
----
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]