xinrong-meng commented on code in PR #41989:
URL: https://github.com/apache/spark/pull/41989#discussion_r1264028428
##########
python/pyspark/sql/connect/functions.py:
##########
@@ -3891,6 +3894,21 @@ def udf(
udf.__doc__ = pysparkfuncs.udf.__doc__
+def udtf(
+ cls: Optional[Type] = None,
+ *,
+ returnType: Union[StructType, str],
+ useArrow: Optional[bool] = None,
+) -> Union["UserDefinedTableFunction", functools.partial]:
Review Comment:
We typically do not use `functools.partial` as a type hint in Python. Shall
we use `Callable` following the `udf` return type hints?
--
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]