Context
pgvector provides element-wise vector arithmetic, while dbkit currently exposes distance/similarity operations only.
Supported pgvector operators include:
vector + vector — element-wise addition
vector - vector — element-wise subtraction
vector * vector — element-wise multiplication
Expected behavior
- Support
+, -, and * for PgVector<N> expressions.
- Return
PgVector<N> for required operands and Option<PgVector<N>> when either operand is nullable.
- Require matching const dimensions at compile time.
- Reject vector/scalar and mismatched-dimension pairs.
- Cover column, literal, and computed-expression operands in both required/nullable combinations.
- Verify projected results against pgvector integration tests.
pgvector vector operators
Context
pgvector provides element-wise vector arithmetic, while dbkit currently exposes distance/similarity operations only.
Supported pgvector operators include:
vector + vector— element-wise additionvector - vector— element-wise subtractionvector * vector— element-wise multiplicationExpected behavior
+,-, and*forPgVector<N>expressions.PgVector<N>for required operands andOption<PgVector<N>>when either operand is nullable.pgvector vector operators