Github user HyukjinKwon commented on a diff in the pull request:

    https://github.com/apache/spark/pull/19929#discussion_r158584224
  
    --- 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 --
    
    Let's say this more explicitly like .. call `asNondeterministic()` in the 
user-defined function. It's partly because I think `UserDefinedFunction` is not 
documented in PySpark.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to