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 2018/04/21 12:34:00 UTC

[jira] [Commented] (SPARK-24042) High-order function: zip_with_index

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

Apache Spark commented on SPARK-24042:
--------------------------------------

User 'mn-mikke' has created a pull request for this issue:
https://github.com/apache/spark/pull/21121

> High-order function: zip_with_index
> -----------------------------------
>
>                 Key: SPARK-24042
>                 URL: https://issues.apache.org/jira/browse/SPARK-24042
>             Project: Spark
>          Issue Type: Sub-task
>          Components: SQL
>    Affects Versions: 2.4.0
>            Reporter: Marek Novotny
>            Priority: Major
>
> Implement function {{zip_with_index(array[, indexFirst])}} that transforms the input array by encapsulating elements into pairs with indexes indicating the order.
> Examples:
> {{zip_with_index(array("d", "a", null, "b")) => [("d",0),("a",1),(null,2),("b",3)]}}
> {{zip_with_index(array("d", "a", null, "b"), true) => [(0,"d"),(1,"a"),(2,null),(3,"b")]}}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org