You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Marek Novotny (JIRA)" <ji...@apache.org> on 2018/04/21 12:27:00 UTC

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

Marek Novotny created SPARK-24042:
-------------------------------------

             Summary: 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


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