From ef62defbd80172ba3c536c413388234707278be1 Mon Sep 17 00:00:00 2001 From: Nmroth42 <38186683+Nmroth42@users.noreply.github.com> Date: Thu, 28 Mar 2024 00:54:26 +0700 Subject: [PATCH] fix: SqlRegistry _apply_object update statement (#4042) * fix sql registry update stmt Signed-off-by: Nmroth42 * refactor code Signed-off-by: Nmroth42 --------- 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 2077ba4aae..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) + .where( + getattr(table.c, id_field_name) == name, + table.c.project_id == project, + ) .values( values, )