Skip to content

Commit 88b1715

Browse files
committed
Redis Test Fixed for entity key prefix
Signed-off-by: jyejare <[email protected]>
1 parent 146185e commit 88b1715

File tree

3 files changed

+7
-10
lines changed

3 files changed

+7
-10
lines changed

sdk/python/feast/infra/key_encoding_utils.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ def _deserialize_value(value_type, value_bytes) -> ValueProto:
4242
raise ValueError(f"Unsupported value type: {value_type}")
4343

4444

45-
def serialize_entity_key_prefix(entity_keys: List[str]) -> bytes:
45+
def serialize_entity_key_prefix(
46+
entity_keys: List[str], entity_key_serialization_version: int = 3
47+
) -> bytes:
4648
"""
4749
Serialize keys to a bytestring, so it can be used to prefix-scan through items stored in the online store
4850
using serialize_entity_key.
@@ -52,8 +54,12 @@ def serialize_entity_key_prefix(entity_keys: List[str]) -> bytes:
5254
"""
5355
sorted_keys = sorted(entity_keys)
5456
output: List[bytes] = []
57+
if entity_key_serialization_version > 2:
58+
output.append(struct.pack("<I", len(sorted_keys)))
5559
for k in sorted_keys:
5660
output.append(struct.pack("<I", ValueType.STRING))
61+
if entity_key_serialization_version > 2:
62+
output.append(struct.pack("<I", len(k)))
5763
output.append(k.encode("utf8"))
5864
return b"".join(output)
5965

sdk/python/feast/infra/online_stores/sqlite.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ class SqliteOnlineStoreConfig(FeastConfigBaseModel, VectorStoreConfig):
111111
path: StrictStr = "data/online.db"
112112
""" (optional) Path to sqlite db """
113113

114-
vector_enabled: bool = False
115114
text_search_enabled: bool = False
116115

117116

sdk/python/tests/integration/feature_repos/repo_configuration.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -565,14 +565,6 @@ def construct_test_environment(
565565
cache_ttl_seconds=1,
566566
)
567567

568-
online_store = (
569-
test_repo_config.online_store.get("type")
570-
if isinstance(test_repo_config.online_store, dict)
571-
else test_repo_config.online_store
572-
)
573-
if online_store in ["milvus", "pgvector", "qdrant", "elasticsearch"]:
574-
entity_key_serialization_version = 3
575-
576568
environment_params = {
577569
"name": project,
578570
"provider": test_repo_config.provider,

0 commit comments

Comments
 (0)