luranhe commented on a change in pull request #33399:
URL: https://github.com/apache/spark/pull/33399#discussion_r675633352



##########
File path: python/pyspark/sql/_typing.pyi
##########
@@ -54,4 +54,10 @@ class SupportsClose(Protocol):
     def close(self, error: Exception) -> None: ...
 
 class UserDefinedFunctionLike(Protocol):
-    def __call__(self, *_: ColumnOrName) -> Column: ...
+    func: Callable[..., Any]
+    evalType: int
+    deterministic: bool
+    @property
+    def returnType(self) -> pyspark.sql.types.DataType: ...
+    def __call__(self, *cols: ColumnOrName) -> Column: ...

Review comment:
       Oh my bad, that's a good catch! However, if we change this to be `args` 
then a `UserDefinedFunction` wouldn't type properly as a 
`UserDefinedFunctionLike`, would it?




-- 
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]

Reply via email to