VECTOR_NORM
VECTOR_NORM
returns the Euclidean norm of a vector
(SQRT(SUM((xi-yi)2)))
as a BINARY_DOUBLE
. This value
is also called magnitude or size and represents the Euclidean distance between the vector
and the origin.
Parameters
expr
must evaluate to a vector.
If expr
is NULL, NULL is returned.
Example
SELECT VECTOR_NORM( TO_VECTOR('[4, 3]', 2, FLOAT32) ); VECTOR_NORM(TO_VECTOR('[4,3]',2,FLOAT32)) ----------------------------------------- 5.0E+000