-
Notifications
You must be signed in to change notification settings - Fork 1.3k
feat: Add SingleStore online store support for feature view versioning #6195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
1308981
dfb0a38
a557a52
8a78be4
bef7975
3f3aedd
630d6d0
e3bd360
bc0e487
a5e343f
e5e3ee7
dc3a739
1c7ca08
48bfb8c
e03179e
546c9fd
d1fcc89
8a64179
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,10 @@ | ||
| import struct | ||
| from datetime import datetime, timezone | ||
| from typing import Any, List | ||
| from typing import Any, List, Optional | ||
|
|
||
| import mmh3 | ||
|
|
||
| from feast.feature_view import FeatureView | ||
| from feast.importer import import_class | ||
| from feast.infra.key_encoding_utils import ( | ||
| serialize_entity_key, | ||
|
|
@@ -72,18 +73,23 @@ def _to_naive_utc(ts: datetime) -> datetime: | |
| return ts.astimezone(tz=timezone.utc).replace(tzinfo=None) | ||
|
|
||
|
|
||
| def compute_versioned_name(table: Any, enable_versioning: bool = False) -> str: | ||
| """Return the table name with a ``_v{N}`` suffix when versioning is enabled.""" | ||
| def online_store_table_id( | ||
| project: str, | ||
| table: FeatureView, | ||
| enable_versioning: bool = False, | ||
| version: Optional[int] = None, | ||
| ) -> str: | ||
| name = table.name | ||
| if enable_versioning: | ||
| version = getattr(table.projection, "version_tag", None) | ||
| if version is None: | ||
| version = getattr(table, "current_version_number", None) | ||
| if version is not None and version > 0: | ||
| name = f"{table.name}_v{version}" | ||
| return name | ||
| resolved_version = version | ||
| if resolved_version is None: | ||
| resolved_version = getattr(table.projection, "version_tag", None) | ||
| if resolved_version is None: | ||
| resolved_version = getattr(table, "current_version_number", None) | ||
| if resolved_version is not None and resolved_version > 0: | ||
| name = f"{table.name}_v{resolved_version}" | ||
| return f"{project}_{name}" | ||
|
|
||
|
|
||
| def compute_table_id(project: str, table: Any, enable_versioning: bool = False) -> str: | ||
| """Build the online-store table name, appending a version suffix when versioning is enabled.""" | ||
| return f"{project}_{compute_versioned_name(table, enable_versioning)}" | ||
| return online_store_table_id(project, table, enable_versioning) | ||
|
Comment on lines
+76
to
+95
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔴 Removed The PR refactored Prompt for agentsWas this helpful? React with 👍 or 👎 to provide feedback. |
||
|
antznette1 marked this conversation as resolved.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡 VersionedOnlineReadNotSupported error message lists FAISS, Redis, DynamoDB as supported but they are no longer recognized
The error message at
errors.py:145was updated to include SingleStore but still lists "FAISS, Redis, DynamoDB" as supporting versioned reads. However, the new_check_versioned_read_supportlogic atonline_store.py:280only allows stores that setsupports_versioned_online_reads = True(or areSqliteOnlineStore).FaissOnlineStoredoes not set this property, andRedisOnlineStore/DynamoDBOnlineStoredon't either. So when users encounter this error on these stores, the message incorrectly tells them the store should work.Was this helpful? React with 👍 or 👎 to provide feedback.