You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/12/10 23:39:09 UTC

[GitHub] [spark] ravwojdyla commented on a change in pull request #34863: [SPARK-37601][PYTHON] sql.DataFrame.transform accept function parameters

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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org