Github user mstewart141 commented on a diff in the pull request:
https://github.com/apache/spark/pull/20728#discussion_r172063118
--- 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 --
can do.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]