Github user viirya commented on a diff in the pull request:
https://github.com/apache/spark/pull/19929#discussion_r158599099
--- Diff: python/pyspark/sql/functions.py ---
@@ -2075,9 +2075,10 @@ class PandasUDFType(object):
def udf(f=None, returnType=StringType()):
"""Creates a user defined function (UDF).
- .. note:: The user-defined functions must be deterministic. Due to
optimization,
+ .. note:: The user-defined functions are considered deterministic. Due
to optimization,
duplicate invocations may be eliminated or the function may even
be invoked more times than
- it is present in the query.
+ it is present in the query. If your function is not deterministic,
call
+ `asNondeterministic`.
--- End diff --
yea, I think it is not clear here where to call `asNondeterministic` on.
Maybe add a simple example.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]