ravwojdyla commented on a change in pull request #34863:
URL: https://github.com/apache/spark/pull/34863#discussion_r767045781



##########
File path: python/pyspark/sql/dataframe.py
##########
@@ -3058,7 +3058,7 @@ def toDF(self, *cols: "ColumnOrName") -> "DataFrame":
         jdf = self._jdf.toDF(self._jseq(cols))
         return DataFrame(jdf, self.sql_ctx)
 
-    def transform(self, func: Callable[["DataFrame"], "DataFrame"]) -> 
"DataFrame":
+    def transform(self, func: Callable[..., "DataFrame"], *args: Any, 
**kwargs: Any) -> "DataFrame":

Review comment:
       Note: to properly type this, we would need 
[PEP-612](https://www.python.org/dev/peps/pep-0612/) and python 3.10. An 
alternative is to provide a long list of overloads for "most" cases.




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