array_cosine_distance()

Computes the cosine distance between two arrays of the same size. The array elements can not be NULL. The arrays can have any size as long as the size is the same for both arguments.

Arguments & returns

2 overloads

array_cosine_distance(array1, array2)

Scalar
Overload link array1array2 Returns
#01 DOUBLE[ANY]DOUBLE[ANY] DOUBLE
#02 FLOAT[ANY]FLOAT[ANY] FLOAT

Example

array_cosine_distance example
SQL
Haybarn WASM 1.5.5-rc3 · In your browser

Engine example · Run to view results.