You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 940e0f0
Browse filesBrowse the repository at this point in the historyBrowse files
feat: Add feature view versioning support to PostgreSQL and MySQL online stores (#6193)
* feat: Add feature view versioning support to PostgreSQL and MySQL online 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#6168Closes#6169
Part of #2728
Signed-off-by: yassinnouh21 <[email protected]>
* fix: guard optional MySQL/Postgres imports in _check_versioned_read_support
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]>
* fix: drop all versioned tables on teardown and extract shared _table_id
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]>
* style: fix ruff formatting for _table_id signatures
Signed-off-by: yassinnouh21 <[email protected]>
* style: collapse remaining multi-line signatures to single line
Signed-off-by: yassinnouh21 <[email protected]>
* fix: use regex for precise version table matching in teardown
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]>
* style: wrap long _drop_all_version_tables signature
Signed-off-by: yassinnouh21 <[email protected]>
* fix: remove redundant DROP INDEX in MySQL _drop_table_and_index
MySQL DROP TABLE already removes all indexes. The separate DROP INDEX
was failing on versioned tables that were created via online_write_batch
(which doesn't create the _ek index). Also reuse _drop_table_and_index
in _drop_all_version_tables instead of duplicating logic.
Signed-off-by: yassinnouh21 <[email protected]>
---------
Signed-off-by: yassinnouh21 <[email protected]>
0 commit comments