Get started
Load & manage data
Work with data
Administration
Reference & resources
CLUSTER BY
mask
ROW FILTER
Updated Nov 13, 2024
Send us feedback
shuffle
Applies to: Databricks SQL Databricks Runtime
Returns a random permutation of the array in expr.
expr
shuffle(expr)
expr: An ARRAY expression.
ARRAY
The result type matches the type expr.
This function is non-deterministic.
> SELECT shuffle(array(1, 20, 3, 5)); [3,1,5,20] > SELECT shuffle(array(1, 20, NULL, 3)); [20,NULL,3,1]
array_sort function
sort_array function