Skip to content

Conversation

@StephenCathcart
Copy link
Contributor

@StephenCathcart StephenCathcart commented Oct 29, 2025

Closes DRIVERS-115

  • Accept dbtype.Vector[T] (where T is in set int8/16/32/64, float32/64), aliases of T, aliases of Vector, and pointers to vectors.
  • Compile-time error for new element types, e.g. type MyI8 int8; dbtype.Vector[MyI8]{...}.
  • Serialize new types wrapping vectors as List, e.g. type MyVec dbtype.Vector[int8]; MyVec{1,2,3}.

Fixed VectorElement by tightening constraint; added pointer-to-vector support.

Valid vectors:
- dbtype.Vector[T] where T is int8/16/32/64, float32/64, or their aliases
- Type aliases: type MyVec = dbtype.Vector[int8]
- Element aliases: type MyInt = int8; dbtype.Vector[MyInt]
- Pointers: *dbtype.Vector[T]

Invalid vectors:
- New types wrapping vectors: type MyVec dbtype.Vector[int8]
- New element types: type MyInt int8; dbtype.Vector[MyInt]

Check regular slices serialize as lists, not vectors
@StephenCathcart StephenCathcart changed the title Fix and clarify vector type acceptance rules Clarify vector rules and bug fixes Oct 29, 2025
@StephenCathcart StephenCathcart marked this pull request as ready for review October 29, 2025 23:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant