get
function
Applies to: Databricks SQL Databricks Runtime 11.3 LTS and above
Returns the element of an arrayExpr
at index
, starting with 0
.
Arguments
arrayExpr
: An ARRAY expression.index
: An INTEGER expression specifying the index in the array.
Returns
The result is of the type of the elements of arrayExpr
.
If the index
is negative or outside the bounds of the array the resut is NULL
.
To return an INVALID_ARRAY_INDEX error instead, use the arrayExpr[index] operator.