You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (Jira)" <ji...@apache.org> on 2021/12/10 21:45:00 UTC
[jira] [Commented] (SPARK-37601) Could/should sql.DataFrame.transform accept function parameters?
[ https://issues.apache.org/jira/browse/SPARK-37601?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17457379#comment-17457379 ]
Apache Spark commented on SPARK-37601:
--------------------------------------
User 'ravwojdyla' has created a pull request for this issue:
https://github.com/apache/spark/pull/34863
> Could/should sql.DataFrame.transform accept function parameters?
> ----------------------------------------------------------------
>
> Key: SPARK-37601
> URL: https://issues.apache.org/jira/browse/SPARK-37601
> Project: Spark
> Issue Type: Improvement
> Components: PySpark
> Affects Versions: 3.1.2, 3.2.0
> Reporter: Rafal Wojdyla
> Priority: Major
>
> {code:python}
> def foo(df: DataFrame, p: int) -> DataFrame
> ...
> # current:
> from functools import partial
> df.transform(partial(foo, p=3))
> # or:
> df.transform(lambda df: foo(df, p=3))
> # vs suggested:
> df.transform(foo, p=3)
> {code}
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org