You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Maciej Szymkiewicz (Jira)" <ji...@apache.org> on 2022/01/08 23:54: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 ]
Maciej Szymkiewicz reassigned SPARK-37085:
------------------------------------------
Assignee: Maciej Szymkiewicz
> 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: Maciej Szymkiewicz
> 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.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org