[ https://issues.apache.org/jira/browse/SPARK-37085?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Maciej Szymkiewicz resolved SPARK-37085. ---------------------------------------- Fix Version/s: 3.3.0 Resolution: Fixed Issue resolved by pull request 34354 [https://github.com/apache/spark/pull/34354] > 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 > Fix For: 3.3.0 > > > 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-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org