CLUSTER BY
clause (TABLE)mask
clauseROW FILTER
clauseUpdated Oct 07, 2024
array_position
function Applies to: Databricks SQL Databricks Runtime
Returns the position of the first occurrence of element
in array
.
array
: An ARRAY with comparable elements.
element
: An expression matching the types of the elements in array
.
> SELECT array_position(array(3, 2, 1, 4, 1), 1);
3
> SELECT array_position(array(3, NULL, 1), NULL)
NULL