VECTOR
Description
Creates a vector type value. A vector is a special array type designed specifically for vector computation and similarity search.
Parameters
- value1, value2, ...: Numeric values, can be tinyint, smallint, int, bigint, float, double, or decimal.
Return Result
- Returns a vector type containing all the parameter values.
- The element type of the vector is automatically inferred from the input parameters.
- The dimension of the vector equals the number of parameters.
Examples
More Examples
Notes
- The vector type is a specialized form of the array type, specifically optimized for vector computation.
- Supported element types: tinyint (i8), smallint (i16), int (i32), bigint (i64), float, double.
- Vectors can be mutually converted and used interchangeably with the array type.
- Vectors support basic operations such as equality comparison and sorting.
- Vectors are commonly used for vector similarity search, machine learning, and recommendation systems.
- Use the
size()function to get the dimension of a vector.
