Constructors, Converters, and Descriptors
Other basic vector operations for Oracle AI Vector Search involve creating, converting, and describing vectors.
- Vector Constructors
TO_VECTOR()
andVECTOR()
are synonymous constructors of vectors. The functions take a string of typeVARCHAR2
orCLOB
as input and return a vector as output. - Vector Serializers
FROM_VECTOR()
andVECTOR_SERIALIZE()
are synonymous serializers of vectors. The functions take a vector as input and return a string of typeVARCHAR2
orCLOB
as output. - VECTOR_NORM
VECTOR_NORM
returns the Euclidean norm of a vector(SQRT(SUM((xi-yi)2)))
as aBINARY_DOUBLE
. This value is also called magnitude or size and represents the Euclidean distance between the vector and the origin. - VECTOR_DIMENSION_COUNT
VECTOR_DIMENSION_COUNT
returns the number of dimensions of a vector as aNUMBER
. - VECTOR_DIMS
VECTOR_DIMS
returns the number of dimensions of a vector as aNUMBER
.VECTOR_DIMS
is synonymous withVECTOR_DIMENSION_COUNT
. - VECTOR_DIMENSION_FORMAT
VECTOR_DIMENSION_FORMAT
returns the storage format of the vector. It returns aVARCHAR2
, which can be one of the following values:INT8
,FLOAT32
, orFLOAT64
.
Parent topic: Use SQL Functions for Vector Operations