wayneguow commented on code in PR #39974:
URL: https://github.com/apache/spark/pull/39974#discussion_r1103996343
##########
python/pyspark/sql/pandas/functions.pyi:
##########
@@ -46,13 +46,21 @@ class PandasUDFType:
GROUPED_MAP: PandasGroupedMapUDFType
GROUPED_AGG: PandasGroupedAggUDFType
+@overload
+def pandas_udf(
+ f: PandasScalarToScalarFunction, returnType: Union[AtomicDataTypeOrString,
ArrayType]
+) -> UserDefinedFunctionLike: ...
@overload
def pandas_udf(
f: PandasScalarToScalarFunction,
returnType: Union[AtomicDataTypeOrString, ArrayType],
functionType: PandasScalarUDFType,
) -> UserDefinedFunctionLike: ...
@overload
+def pandas_udf(
+ f: Union[AtomicDataTypeOrString, ArrayType]
Review Comment:
Add some other overloads which are same to these two to cover all
situations. (with some ignores to pass `mypy` checks like those existing
ignores)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]