Repository navigation
Vector data type support - #1812
Draft
tsegismont wants to merge 2 commits into
Draft
tsegismont wants to merge 2 commits into
tsegismont wants to merge 2 commits into
Conversation
Add a vector type hierarchy in the `io.vertx.sqlclient.data` package: a `Vector` interface with `FloatVector`, `HalfFloatVector`, `DoubleVector`, `ByteVector`, `BitVector` and `SparseFloatVector` implementations, all with value-based `equals` and `hashCode`. Expose `NullValue` constants for the new types. Cover the new types with unit tests. Assisted-by: Z.ai GLM (rits/zai-org/glm-5-3) Signed-off-by: Thomas Segismont <tsegismont@gmail.com>
Add support for the `vector`, `halfvec` and `sparsevec` types of the pgvector extension, mapped to `FloatVector`, `HalfFloatVector` and `SparseFloatVector`, in the binary and text protocols. The `bit` and `varbit` types are decoded to a `Buffer` that includes the bit length header with the binary protocol, and `PgRow.get` converts them to `BitVector`. Discover the OIDs of the pgvector types, which are members of the extension, when a connection is initialized if `PgConnectOptions#setVectorTypeEnabled` is `true`, an option that can also be set with the `vector_type_enabled` URI parameter and the `PGVECTORTYPEENABLED` environment variable. A warning is logged when a type is not found. Cover the new types with `PgVectorDataTypeTest` running against a pgvector container, and document the feature in the reference guide and `PgClientExamples`. Assisted-by: IBM Bob (agent mode) Signed-off-by: Thomas Segismont <tsegismont@gmail.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1526
Introduces vector data type support for the SQL clients.
The change is split into five stages, one commit per stage, so that each commit can be reviewed individually:
FloatVector,HalfFloatVector,DoubleVector,ByteVector,BitVector,SparseFloatVector)vector,halfvec,sparsevec)