size
function
Applies to: Databricks SQL Databricks Runtime
Returns the cardinality of the array or map in expr
.
Returns
An INTEGER
.
Note
In Databricks Runtime, if spark.sql.ansi.enabled is false
, size(NULL)
returns -1
instead of NULL
.