feat: Support feature view versioning in the Cassandra online store - #6766
Open
alekseevpavel04 wants to merge 2 commits into
Open
Conversation
Feature view versioning was added in feast-dev#6101 and implemented for SQLite only. Every other online store raises VersionedOnlineReadNotSupported as soon as a version-qualified reference reaches it, so a Feast deployment on Cassandra could not use the feature at all. Cassandra builds every table name in one place, _fq_table_name(), which is used by the insert, select, create and drop paths alike. It now takes the versioning flag and defers to compute_versioned_name(), the same helper SQLite, MySQL and PostgreSQL reach through compute_table_id(), so each version of a feature view is stored in a table of its own and an unversioned deployment keeps exactly the names it has today. Deleting a versioned view drops every version of it rather than only the current one, following the MySQL and PostgreSQL implementations: the in-memory feature view carries a single version, so dropping just that one would leave the other tables orphaned in the keyspace. CassandraOnlineStore is added to the list of stores that support versioned reads. Signed-off-by: Pavel Alekseev <alekceevpavel@mail.ru>
The versioning reference still said version-qualified reads were SQLite-only. Seven stores support them now, so the page understated the feature by six stores before this branch and by seven after it. The list is taken from OnlineStore._is_versioned_read_supported, which is what actually decides. Signed-off-by: Pavel Alekseev <alekceevpavel@mail.ru>
alekseevpavel04
requested review from
ejscribner,
robhowley and
tokoko
and removed request for
a team
August 20, 2026 20:55
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.
What this PR does / why we need it:
Feature view versioning landed in #6101, but the online-store half of it was
only ever implemented for SQLite. Every other store raises
VersionedOnlineReadNotSupportedthe moment a version-qualified reference suchas
driver_stats@v2:trips_todayreaches it, so a deployment on Cassandra orAstra DB cannot use the feature at all. This adds the missing half for
Cassandra, following the six stores that already have it — FAISS (#6256), Redis
and DynamoDB (#6257), PostgreSQL and MySQL (#6193) and Milvus (#6330).
Cassandra builds every table name in one place,
_fq_table_name(), shared bythe insert, select, create and drop paths. It now takes the versioning flag and
defers to
compute_versioned_name()— the same helper SQLite, MySQL andPostgreSQL reach through
compute_table_id()— so each version of a featureview gets a table of its own (
test_project_driver_stats_v2). The parameterdefaults to
False, and withenable_online_feature_view_versioningoff thecomputed names are byte-for-byte what they are today.
Two details worth flagging for review:
current one. This follows
_drop_all_version_tablesin the MySQL andPostgreSQL stores rather than SQLite: the in-memory
FeatureViewcarries asingle version, so dropping only that one would leave the other tables
orphaned in the keyspace.
system_schemacannot match a pattern, so thekeyspace is listed and the names are filtered in Python.
formatted statement text, which contains the fully-qualified table name, so
two versions of a view naturally get two prepared statements.
ScyllaDBOnlineStorehas its own copy of_fq_table_nameand is deliberatelyleft alone here — it has a sibling issue of its own.
Which issue(s) this PR fixes:
Fixes #6170
Checks
git commit -s)Testing Strategy
New unit tests in
sdk/python/tests/unit/infra/online_store/test_cassandra_versioning.py, 13 ofthem, following the shape of
test_redis_versioning.py. Ten of the thirteenfail without the change. They cover the computed name (off by default, off when
versioning is disabled even with a version set, on with
current_version_number,projection.version_tagtaking priority over it,version
0taking no suffix, and two versions landing on two differenttables), the fact that a version-qualified read no longer raises, and the drop
path — base plus
_v1plus_v2all removed, a similarly nameddriver_stats_extraleft alone, and the unversionedteardownstill issuingexactly one
DROP.The full unit suite passes locally: 2648 passed, 44 skipped, 0 failed, against
2635 passed on
masterbefore the change — the difference is the 13 new tests.Misc
I have not exercised this against a live Cassandra cluster; the store's
existing unit tests patch
Clusterso nothing connects, and thetestcontainers-based creator in
tests/universalis not wired intorepo_configuration.py. The part that would most benefit from a maintainer'seye on real hardware is the
system_schema.tablesquery in_drop_all_version_tables— happy to adjust it, or to drop that behaviour backto SQLite's "current version only" if you would rather keep the six
implementations identical.
The second commit (
docs:) is separable.docs/reference/alpha-feature-view-versioning.mdstill said version-qualified reads were SQLite-only, which was already six
stores out of date before this branch; the list it now carries is taken from
OnlineStore._is_versioned_read_supported. Happy to drop that commit if youwould rather keep this PR to the Cassandra store alone.