array_size
function
Applies to: Databricks SQL Databricks Runtime
Returns the number of elements in array
.
Syntax
array_size(array)
Arguments
array
: An ARRAY expression.
Returns
An INTEGER.
Examples
> SELECT array_size(array(1, NULL, 3, NULL));
4
> SELECT array_size(array());
0