v.22.7New Feature
Added L2 Squared Distance and Norm Functions for Arrays and Tuples
Added L2 Squared distance and norm functions for both arrays and tuples. #38545 (Julian Gilyadov).
Why it matters
These new functions provide a straightforward way to compute the L2 Squared distance and norms directly within ClickHouse, enabling more efficient and accurate vector computations for array and tuple data types. This feature is valuable for analytics and machine learning tasks where such distance metrics are commonly used.How to use it
You can use the new functions by passing either arrays or tuples as arguments. For example, useL2SquaredDistance(array1, array2) to calculate the squared L2 distance between two arrays, or L2Norm(array_or_tuple) to compute the L2 norm of a single array or tuple.