ARRAY_DISTINCT
Returns all the distinct elements in the array.
Syntax
ARRAY_DISTINCT(input)
Arguments
| Name | Type | Description | Default Value |
|---|---|---|---|
| input | any | The values to transform |
Returns
an array of distinct values from the input. this function will maintain the order of the input. a primitive input will be considered an array with a single value and will return an array containing that value.
Examples
| input | Output |
|---|---|
| array[1, 2, 3, 4, 4, 1] | [1, 2, 3, 4] |