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

    https://github.com/apache/spark/pull/20728#discussion_r172043971
  
    --- Diff: python/pyspark/sql/udf.py ---
    @@ -42,10 +42,15 @@ def _create_udf(f, returnType, evalType):
                         PythonEvalType.SQL_GROUPED_AGG_PANDAS_UDF):
     
             import inspect
    +        import sys
             from pyspark.sql.utils import require_minimum_pyarrow_version
     
             require_minimum_pyarrow_version()
    -        argspec = inspect.getargspec(f)
    +
    +        if sys.version_info[0] < 3:
    +            argspec = inspect.getargspec(f)
    +        else:
    +            argspec = inspect.getfullargspec(f)
    --- End diff --
    
    Shall we add a small comment while we are here like `'getargspec ' is 
deprecated since version 3.0 and calling it with type hints causes an actual 
issue. See SPARK-23569`?


---

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

Reply via email to