Skip to content

Array functions

This section provides an overview of functions that are specifically designed to work with ARRAY data types. An example of such a class of functions are similarity search functions, like dot product or cosine similarity. The full list of functions is provided in the table below.

array_value(arg1, arg2, arg3..)creates an array containing the argument valuesarray_value(1,2,3,4,5,56,2)[1,2,3,4,5,56,2]
array_dot_product(array1, array2)calculates the dot product of two arraysarray_dot_product([1,2,3], [4,5,6])32
array_inner_product(array1, array2)calculates the inner product of two arraysarray_inner_product([1,2,3], [4,5,6])32
array_cross_product(array1, array2)calculates the cross product of two arraysarray_cross_product([1,2,3], [4,5,6])[[-3,6,-3],[6,-12,6],[-3,6,-3]]
array_cosine_similarity(array1, array2)calculates the cosine similarity of two arraysarray_cosine_similarity([1,2,3], [4,5,6])0.9746318461970762