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

    https://github.com/apache/spark/pull/21053#discussion_r181623519
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/collectionOperations.scala
 ---
    @@ -287,3 +287,106 @@ case class ArrayContains(left: Expression, right: 
Expression)
     
       override def prettyName: String = "array_contains"
     }
    +
    +/**
    + * Returns the value of index `right` in Array `left` or the value for key 
`right` in Map `left`.
    + */
    +@ExpressionDescription(
    +  usage = """
    +    _FUNC_(array, index) - Returns element of array at given index. If 
index < 0, accesses elements
    +      from the last to the first.
    --- End diff --
    
    nit: `Returns NULL if the index exceeds the length of the array`.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to