- Categories:
VECTOR_MIN¶
Computes the element-wise minimum of vectors in an aggregate. Returns a vector where each element is the minimum of the corresponding elements across all input vectors.
- See also:
VECTOR_SUM , VECTOR_MAX , VECTOR_AVG , MIN, Vector Embeddings
Syntax¶
Arguments¶
vector_columnA column containing VECTOR values. All vectors in the column must have the same element type and dimension.
Returns¶
Returns a VECTOR value with the same element type and dimension as the input vectors. Each element in the result vector is the minimum of the corresponding elements across all input vectors.
Usage notes¶
NULL values are ignored in the aggregation.
If all values in the group are NULL, the function returns NULL.
All input vectors in the column must have the same dimension and element type.
Vector functions are optimized in a way that can reduce floating point precision. This function’s results have a margin of error up to
1e-4.
Examples¶
This example demonstrates computing the element-wise minimum of vectors:
This example shows scalar aggregation (no GROUP BY):