Cassandra's native vector index type is StorageAttachedIndex (SAI). Libraries such as CassIO, LangChain, and LlamaIndex generate `CREATE CUSTOM INDEX` statements using the SAI class name. Previously, ScyllaDB rejected these with "Non-supported custom class". This PR adds compatibility so that SAI-style CQL statements work on ScyllaDB without modification. 1. **test: enable SAI_VECTOR_ALLOW_CUSTOM_PARAMETERS for Cassandra tests** Enables the `SAI_VECTOR_ALLOW_CUSTOM_PARAMETERS` Cassandra system property so that `search_beam_width` tests pass against Cassandra 5.0.7. 2. **test: modernize vector index test comments and fix xfail** Updates test comments from "Reproduces" to "Validates fix for" for clarity, and converts the `test_ann_query_with_pk_restriction` xfail into a stripped-down CREATE INDEX syntax test (removing unused INSERT/SELECT lines). Removes the redundant `test_ann_query_with_non_pk_restriction` test. 3. **cql: add Cassandra SAI (StorageAttachedIndex) compatibility** Core implementation: the SAI class name is detected and translated to ScyllaDB's native `vector_index`. The fully-qualified class name (`org.apache.cassandra.index.sai.StorageAttachedIndex`) requires exact case; short names (`StorageAttachedIndex`, `sai`) are matched case-insensitively — matching Cassandra's behavior. Non-vector and multi-column SAI targets are rejected with clear errors. Adds `skip_on_scylla_vnodes` fixture, SAI compatibility docs, and the Cassandra compatibility table entry (split into "SAI general" vs "SAI for vector search"). 4. **cql: accept source_model option for Cassandra SAI compatibility** The `source_model` option is a Cassandra SAI property used by Cassandra libraries (e.g., CassIO) to tag vector indexes with the name of the embedding model. ScyllaDB accepts it for compatibility but does not use it — the validator is a no-op lambda. The option is preserved in index metadata and returned in DESCRIBE INDEX output. - `cql3/statements/create_index_statement.cc`: SAI class detection and rewriting logic - `index/secondary_index_manager.cc`: case-insensitive class name lookup (lowercasing restored before `classes.find()`) - `index/vector_index.cc`: `source_model` accepted as a valid option with no-op validator - `docs/cql/secondary-indexes.rst`: SAI compatibility documentation with `source_model` table row - `docs/using-scylla/cassandra-compatibility.rst`: SAI entry split into general (not supported) and vector search (supported) - `test/cqlpy/conftest.py`: `scylla_with_tablets` renamed to `skip_on_scylla_vnodes` - `test/cqlpy/test_vector_index.py`: SAI tests inlined (no constants), `check_bad_option()` helper for numeric validation, uppercase class name test, merged `source_model` tests with DESCRIBE check | Backend | Passed | Skipped | Failed | |--------------------|--------|---------|--------| | ScyllaDB (dev) | 42 | 0 | 0 | | Cassandra 5.0.7 | 16 | 26 | 0 | None: new feature. Fixes: SCYLLADB-239 Closes scylladb/scylladb#28645 * github.com:scylladb/scylladb: cql: accept source_model option and show options in DESCRIBE cql: add Cassandra SAI (StorageAttachedIndex) compatibility test: modernize vector index test comments and fix xfail test: enable SAI_VECTOR_ALLOW_CUSTOM_PARAMETERS for Cassandra tests
Scylla in-source tests.
For details on how to run the tests, see docs/dev/testing.md
Shared C++ utils, libraries are in lib/, for Python - pylib/
alternator - Python tests which connect to a single server and use the DynamoDB API unit, boost, raft - unit tests in C++ cqlpy - Python tests which connect to a single server and use CQL topology* - tests that set up clusters and add/remove nodes cql - approval tests that use CQL and pre-recorded output rest_api - tests for Scylla REST API Port 9000 scylla-gdb - tests for scylla-gdb.py helper script nodetool - tests for C++ implementation of nodetool
If you can use an existing folder, consider adding your test to it. New folders should be used for new large categories/subsystems, or when the test environment is significantly different from some existing suite, e.g. you plan to start scylladb with different configuration, and you intend to add many tests and would like them to reuse an existing Scylla cluster (clusters can be reused for tests within the same folder).
To add a new folder, create a new directory, and then
copy & edit its suite.ini.