Add VECTOR and BSON data types support#16
Conversation
| private string? m_physicalName; | ||
|
|
||
| public bool IsBson => ExtendedTypeCode == SingleStoreExtendedTypeCode.Bson; | ||
| public bool IsVector => ExtendedTypeCode == SingleStoreExtendedTypeCode.Vector; |
There was a problem hiding this comment.
Unused IsBson and IsVector properties are dead code
Low Severity
The newly added IsBson and IsVector properties on ColumnDefinitionPayload are never referenced anywhere in the codebase. A grep confirms the only matches are their definitions. All other code that needs to check the extended type uses ExtendedTypeCode directly (e.g., the switch in ColumnReader.Create). These are dead code on an internal class with no consumers.
Reviewed by Cursor Bugbot for commit 8716569. Configure here.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit d0af192. Configure here.
|
|
||
| outputSpan[index++] = quote; | ||
| writer.Advance(index); | ||
| } |
There was a problem hiding this comment.
WriteBinaryLiteral duplicates inline binary escaping logic
Medium Severity
The new WriteBinaryLiteral method contains identical binary-literal escaping logic to the inline code in AppendSqlString (the byte[]/float[] branch). This security-sensitive SQL escaping logic now exists in two places, meaning a bug fix in one copy could be missed in the other. The existing inline code could call WriteBinaryLiteral instead.
Reviewed by Cursor Bugbot for commit d0af192. Configure here.


Note
Medium Risk
Medium risk because it changes low-level protocol metadata parsing, type mapping, and parameter serialization, which can affect result reading/writing across many queries. Also introduces a new session-setting toggle gated by server version that could break connections if misconfigured.
Overview
Adds opt-in support for SingleStore extended data types by introducing
EnableExtendedDataTypes(connection string + settings) that enablesenable_extended_types_metadataduring connection open and after connection reset (requires SingleStore >= 8.5.28).Extends column definition parsing with SingleStore-specific extended metadata (
SingleStoreExtendedTypeCode, VECTOR dimensions/element type) and updates type mapping/metadata so BSON/VECTOR surface asSingleStoreDbType.Bson/SingleStoreDbType.Vectorwhile still transporting as BLOB in the wire protocol.Implements typed VECTOR value reading (new
Vector*ColumnReaders returningReadOnlyMemory<T>with length/endianness validation), adjusts row byte access rules for VECTOR vs BSON, and adds BSON/VECTOR parameter serialization (binary literal for text mode; length-encoded bytes for binary/prepared mode) for common input types.Reviewed by Cursor Bugbot for commit d0af192. Bugbot is set up for automated code reviews on this repo. Configure here.