Skip to content

feat: Add SingleStore online store support for feature view versioning#6195

Open
antznette1 wants to merge 2 commits intofeast-dev:masterfrom
antznette1:singlestore-online-versioning
Open

feat: Add SingleStore online store support for feature view versioning#6195
antznette1 wants to merge 2 commits intofeast-dev:masterfrom
antznette1:singlestore-online-versioning

Conversation

@antznette1
Copy link
Copy Markdown
Contributor

@antznette1 antznette1 commented Mar 29, 2026

What this PR does / why we need it:

This PR adds online feature view versioning support for the SingleStore online store when registry.enable_online_feature_view_versioning is enabled.

It updates SingleStore’s table routing to read/write from versioned namespaces (e.g. {project}_{feature_view}_v{N}) so version-qualified refs like driver_stats@v1:avg_daily_trips can be served from the correct underlying online table. It also updates the global online-store guard to allow version-qualified reads for SingleStore (and still reject unsupported stores) when versioning is enabled.

Additionally, it adds an integration/universal test covering SingleStore version-qualified reads.

Which issue(s) this PR fixes:

Fixes #6181

Checks

  • I've made sure the tests are passing.
  • My commits are signed off (git commit -s)
  • My PR title follows conventional commits format

Testing Strategy

  • Unit tests
  • Integration tests
  • Manual tests
  • Testing is not required for this change

Misc

Notes:

  • Version-qualified reads are only allowed when registry.enable_online_feature_view_versioning is enabled; otherwise VersionedOnlineReadNotSupported is raised.
  • The new SingleStore integration/universal test may be skipped locally if the universal SingleStore environment is not part of the parametrized test matrix (it should run in CI where SingleStore is enabled).

Open with Devin

@antznette1 antznette1 requested review from a team as code owners March 29, 2026 22:42
@antznette1 antznette1 requested review from ejscribner, franciscojavierarceo and shuchu and removed request for a team March 29, 2026 22:42
devin-ai-integration[bot]

This comment was marked as resolved.

Signed-off-by: antznette1 <ochiezeanthonette@gmail.com>
@antznette1 antznette1 force-pushed the singlestore-online-versioning branch from 88a6e5b to 0de8845 Compare March 30, 2026 15:26
@antznette1
Copy link
Copy Markdown
Contributor Author

Good day @franciscojavierarceo
I have created the PR, awaiting your review.


def _table_id(project: str, table: FeatureView) -> str:
return f"{project}_{table.name}"
def _table_id(project: str, table: FeatureView, enable_versioning: bool = False) -> str:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is going to repeat in all stores, probbaly good to move it to common utils

with self._get_cursor(config) as cur:
for table in tables:
_drop_table_and_index(cur, project, table)
_drop_table_and_index(cur, project, table, versioning)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Teardown only drops current version's table, needs logic to enumerates all version numbers from the registry's version history and drops each corresponding table.

def _check_versioned_read_support(self, grouped_refs):
def _check_versioned_read_support(self, grouped_refs, config: RepoConfig):
"""Raise an error if versioned reads are attempted on unsupported stores."""
from feast.infra.online_stores.singlestore_online_store.singlestore import (
Copy link
Copy Markdown
Member

@ntkathole ntkathole Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this import will break for users where singlestore optional dependency is not installed ?

super().__init__(
f"Versioned feature reads (@v{version}) are not yet supported by {store_name}. "
f"Currently only SQLite supports version-qualified feature references. "
f"Currently only SQLite and SingleStore support version-qualified feature references. "
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

best to remove this line altogether

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add feature view versioning support to SingleStore online store

2 participants