Github user ueshin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/21053#discussion_r182323290
  
    --- Diff: python/pyspark/sql/functions.py ---
    @@ -1846,6 +1846,28 @@ def array_contains(col, value):
         return Column(sc._jvm.functions.array_contains(_to_java_column(col), 
value))
     
     
    +@ignore_unicode_prefix
    +@since(2.4)
    +def element_at(col, value):
    +    """
    +    Collection function: returns element of array at given index in value 
if col is array.
    +    returns value for the given key in value if col is map.
    +
    +    :param col: name of column containing array or map
    +    :param value: value to check for in array or key to check for in map
    --- End diff --
    
    Can you add a note or something to notice the index is 1-based.


---

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

Reply via email to