Github user HyukjinKwon commented on a diff in the pull request:
https://github.com/apache/spark/pull/21121#discussion_r183214315
--- Diff: sql/core/src/main/scala/org/apache/spark/sql/functions.scala ---
@@ -3340,6 +3340,17 @@ object functions {
*/
def reverse(e: Column): Column = withExpr { Reverse(e.expr) }
+ /**
+ * Transforms the input array by encapsulating elements into pairs
+ * with indexes indicating the order.
+ *
+ * @group collection_funcs
+ * @since 2.4.0
+ */
+ def zip_with_index(e: Column, indexFirst: Boolean = false): Column =
withExpr {
--- End diff --
Let's avoid using a default value in APIs. It doesn't work in Java.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]