scylladb / scylladb/cpp-rs-driver
Implement vector type support
@wprzytula is already working on this.
Since Feb 26, 2026.
- Dominant language
- C++
- Stars
- 26
- Forks
- 19
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 7
Description
Summary
The cass_statement_bind_custom(), cass_statement_bind_custom_n(), cass_collection_append_custom(), and cass_collection_append_custom_n() functions are currently unimplemented (listed in api.rs:398,570). This prevents binding data to columns with CASS_VALUE_TYPE_CUSTOM type, which includes vector<float, N> columns.
Problem
CQL vector<float, N> columns are reported as CASS_VALUE_TYPE_CUSTOM by the driver. There is no C API path to bind data to these columns:
cass_statement_bind_bytes()createsCassCqlValue::Blob, butis_type_compatible()invalue.rs:119-124only allowsBlobforCASS_VALUE_TYPE_BLOBandCASS_VALUE_TYPE_VARINT, rejectingCASS_VALUE_TYPE_CUSTOMcass_statement_bind_custom()/cass_statement_bind_custom_n()are not implemented- No other bind function produces a value compatible with CUSTOM columns
The same issue applies to collection elements via cass_collection_append_custom() / cass_collection_append_custom_n(), which prevents binding list<vector<float, N>> columns.
Reproduction
// Prepare a statement for a table with a vector<float, 3> column
const CassPrepared* prepared = ...;
CassStatement* stmt = cass_prepared_bind(prepared);
// This silently fails with CASS_ERROR_LIB_INVALID_VALUE_TYPE
float data[] = {1.0f, 2.0f, 3.0f};
CassError rc = cass_statement_bind_bytes(stmt, idx, (const cass_byte_t*)data, sizeof(data));
// rc == CASS_ERROR_LIB_INVALID_VALUE_TYPE — value remains unset (NULL)
Expected behavior
The DataStax C++ driver provides cass_statement_bind_custom() which accepts a class name and raw bytes for CUSTOM type columns. The cpp-rs-driver should implement the same API to maintain compatibility and enable vector column support.
Affected functions
From api.rs:
cass_statement_bind_custom(line 398)cass_statement_bind_custom_by_name(line 399)cass_statement_bind_custom_n(line 400)cass_collection_append_custom(line 570)cass_collection_append_custom_n(line 571)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.