-
-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Description
Hello,
I'm working with odbc-api (via arrow-odbc) for bulk inserts and ran into a limitation: AnyBuffer is great for common types, but it doesn't cover some cases like DECIMAL/NUMERIC (especially when using Always Encrypted, as it is very strict with operand type clashes). Right now, the only way to handle this is to drop down to odbc-sys to call SQLBindParameter with a custom implementation of AnyBuffer, which feels a bit clunky & redundant alongside the nice high-level API.
Suggestions:
- Either a way to extend AnyBuffer with custom variants (e.g. Decimal) like AnyBuffer::Timestamp, or
- A trait-based approach so downstream crates can implement their own buffer types and still use ColumnarBulkInserter.
Why this matters:
- Always Encrypted requires exact type binding, so text-based buffers won't work.
- Arrow integration often brings in Decimal128 columns, and mapping those cleanly into bulk inserts would be awesome without resorting to FFI.
Possible directions:
- Add Decimal variant to AnyBuffer.
- Expose a trait like BindableBuffer that ColumnarBulkInserter canwork with.
- Or even document a recommended pattern for mixing AnyBuffer with custom FFI bindings.
Side note?:
As an application depending on arrow-odbc which depends on odbc-api, I'm having to circumvent of both crates due to this limitation.
Happy to help with a PR if this sounds reasonable!
Metadata
Metadata
Assignees
Labels
No labels