[ 
https://issues.apache.org/jira/browse/SPARK-37085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17432281#comment-17432281
 ] 

Maciej Szymkiewicz commented on SPARK-37085:
--------------------------------------------

FYI [~ueshin]

> 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
>            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-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to