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/10/21 09:40:00 UTC
[jira] [Assigned] (SPARK-37085) Missing overloads in functions
accepting both varargs and single arg collection
[ https://issues.apache.org/jira/browse/SPARK-37085?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Apache Spark reassigned SPARK-37085:
------------------------------------
Assignee: Apache Spark
> Missing overloads in functions accepting both varargs and single arg collection
> -------------------------------------------------------------------------------
>
> Key: SPARK-37085
> URL: https://issues.apache.org/jira/browse/SPARK-37085
> Project: Spark
> Issue Type: Improvement
> Components: PySpark, SQL
> Affects Versions: 3.1.0, 3.2.0, 3.3.0
> Reporter: Maciej Szymkiewicz
> Assignee: Apache Spark
> Priority: Minor
>
> There are a few functions that have vararg signature, but can accept a single item ({{list}} or {{tuple}}):
> - {{def create_map(*cols: "ColumnOrName") -> Column: ...}}
> - {{def struct(*cols: "ColumnOrName") -> Column: ...}}
> - {{def array(*cols: "ColumnOrName") -> Column: ...}}
> - {{def map_concat(*cols: "ColumnOrName") -> Column: ...}}
>
> We should add overloads of the following form
>
> {code:python}
> @overload
> def _(cols: Union[List["ColumnOrName"], Tuple["ColumnOrName", ...]]) -> Column:
> ...
> @overload
> def _(*cols: "ColumnOrName") -> Column:
> ...
> def _(
> *cols: Union["ColumnOrName", List["ColumnOrName"], Tuple["ColumnOrName", ...]]
> ) -> Column:
> ...
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org