From 517eac43cbfe9a74b251db9e8b68a8a750393b13 Mon Sep 17 00:00:00 2001 From: Nmroth42 Date: Tue, 26 Mar 2024 13:03:05 +0700 Subject: [PATCH 1/2] fix sql registry update stmt Signed-off-by: Nmroth42 --- sdk/python/feast/infra/registry/sql.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/python/feast/infra/registry/sql.py b/sdk/python/feast/infra/registry/sql.py index 2077ba4aae..69456818b6 100644 --- a/sdk/python/feast/infra/registry/sql.py +++ b/sdk/python/feast/infra/registry/sql.py @@ -691,7 +691,7 @@ def _apply_object( } update_stmt = ( update(table) - .where(getattr(table.c, id_field_name) == name) + .where(getattr(table.c, id_field_name) == name, table.c.project_id == project) .values( values, ) From 20304ba7ae1effc59dcb4af2ff654606a692e711 Mon Sep 17 00:00:00 2001 From: Nmroth42 Date: Tue, 26 Mar 2024 18:48:24 +0700 Subject: [PATCH 2/2] refactor code Signed-off-by: Nmroth42 --- sdk/python/feast/infra/registry/sql.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sdk/python/feast/infra/registry/sql.py b/sdk/python/feast/infra/registry/sql.py index 69456818b6..f9030a6875 100644 --- a/sdk/python/feast/infra/registry/sql.py +++ b/sdk/python/feast/infra/registry/sql.py @@ -691,7 +691,10 @@ def _apply_object( } update_stmt = ( update(table) - .where(getattr(table.c, id_field_name) == name, table.c.project_id == project) + .where( + getattr(table.c, id_field_name) == name, + table.c.project_id == project, + ) .values( values, )