HyukjinKwon commented on code in PR #37652:
URL: https://github.com/apache/spark/pull/37652#discussion_r954490084


##########
python/pyspark/sql/functions.py:
##########
@@ -4845,6 +4849,73 @@ def element_at(col: "ColumnOrName", extraction: Any) -> 
Column:
     return _invoke_function_over_columns("element_at", col, lit(extraction))
 
 
+def get(col: "ColumnOrName", index: Union["ColumnOrName", int]) -> Column:
+    """
+    Collection function: Returns element of array at given (0-based) index.
+    If the index points outside of the array boundaries, then this function
+    returns NULL.
+
+    .. versionadded:: 3.4.0
+
+    Parameters
+    ----------
+    col : :class:`~pyspark.sql.Column` or str
+        name of column containing array
+    index : :class:`~pyspark.sql.Column` or str or int
+        index to check for in array
+
+    Notes
+    -----
+    The position is not 1 based, but 0 based index.
+
+    See Also
+    --------
+    :meth:`element_at`
+
+    Examples
+    --------
+    >>> from pyspark.sql.functions import col, get

Review Comment:
   Let's remove this line since we're in this module.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to