feat: Add feature view versioning support to PostgreSQL and MySQL online stores#6193
Open
YassinNouh21 wants to merge 9 commits intofeast-dev:masterfrom
Open
feat: Add feature view versioning support to PostgreSQL and MySQL online stores#6193YassinNouh21 wants to merge 9 commits intofeast-dev:masterfrom
YassinNouh21 wants to merge 9 commits intofeast-dev:masterfrom
Conversation
744eaa9 to
b35410f
Compare
…ine stores Add versioned read/write support so that version-qualified feature references (e.g., driver_stats@v2:trips_today) resolve to the correct versioned table in both PostgreSQL and MySQL online stores. Changes: - PostgreSQL: Updated _table_id() and all callers to support enable_versioning - MySQL: Updated _table_id(), _execute_batch(), write_to_table(), and _drop_table_and_index() to thread versioning flag through - online_store.py: Registered PostgreSQLOnlineStore and MySQLOnlineStore in _check_versioned_read_support() - errors.py: Updated VersionedOnlineReadNotSupported message - Unit tests split per store in tests/unit/infra/online_store/ - Integration tests in tests/integration/online_store/ (Docker, testcontainers) Closes feast-dev#6168 Closes feast-dev#6169 Part of feast-dev#2728 Signed-off-by: yassinnouh21 <[email protected]>
b35410f to
0e56ae2
Compare
…upport Unconditional imports of pymysql and psycopg broke online reads for users on other stores (Redis, DynamoDB, etc.) that don't have these optional dependencies installed. Signed-off-by: yassinnouh21 <[email protected]>
75923e7 to
ca254af
Compare
Collaborator
Author
|
@franciscojavierarceo @ntkathole Can you guys check it ? |
ntkathole
reviewed
Apr 5, 2026
sdk/python/feast/infra/online_stores/mysql_online_store/mysql.py
Outdated
Show resolved
Hide resolved
ntkathole
reviewed
Apr 5, 2026
Teardown was only dropping the current version's table, orphaning older versioned tables (e.g. _v1, _v2). Now queries the database catalog to find and drop all versioned tables for each feature view. Also extracts the duplicated _table_id logic from SQLite, MySQL, and Postgres into a shared compute_table_id helper. Signed-off-by: yassinnouh21 <[email protected]>
Signed-off-by: yassinnouh21 <[email protected]>
Signed-off-by: yassinnouh21 <[email protected]>
LIKE _v% could match unrelated tables (e.g. driver_verbose when dropping versions for driver). Switch to REGEXP/~ with _v[0-9]+$ pattern. Also scope Postgres pg_tables query by schemaname. Signed-off-by: yassinnouh21 <[email protected]>
Signed-off-by: yassinnouh21 <[email protected]>
Collaborator
Author
|
@ntkathole can you check again ? |
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.
Summary
enable_online_feature_view_versioningis enabled, data is routed to version-specific tables (e.g.,project_driver_stats_v2)_check_versioned_read_support()so version-qualified feature references (driver_stats@v2:trips_today) work correctlyChanges
PostgreSQL (
postgres.py):_table_id()to acceptenable_versioningparameter with version suffix logiconline_write_batch,_construct_query_and_params,update,teardown,retrieve_online_documents,retrieve_online_documents_v2MySQL (
mysql.py):_table_id()with same versioning patternenable_versioningthrough_execute_batch(),write_to_table(), and_drop_table_and_index()online_read,update, andteardowncallersShared (
online_store.py,errors.py):PostgreSQLOnlineStoreandMySQLOnlineStoreto_check_versioned_read_support()allowlistVersionedOnlineReadNotSupportederror messageTest plan
_table_id(no version, disabled, enabled, v0, version_tag priority)_table_id(same coverage)_check_versioned_read_support(PostgreSQL/MySQL/SQLite allowed, unsupported raises, no tag no error)Closes #6168
Closes #6169
Part of #2728