Skip to content

Commit 1ea100e

Browse files
authored
fix: Buggy SQL for postgres source (#3424)
* Fix get_table_column_names_and_types for postgres source Signed-off-by: Dimitris Stafylarakis <xanias@gmail.com> * make linter happy Signed-off-by: Dimitris Stafylarakis <xanias@gmail.com> Signed-off-by: Dimitris Stafylarakis <xanias@gmail.com>
1 parent ecb7950 commit 1ea100e

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

sdk/python/feast/infra/offline_stores/contrib/postgres_offline_store/postgres_source.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,7 @@ def get_table_column_names_and_types(
111111
self, config: RepoConfig
112112
) -> Iterable[Tuple[str, str]]:
113113
with _get_conn(config.offline_store) as conn, conn.cursor() as cur:
114-
cur.execute(
115-
f"SELECT * FROM ({self.get_table_query_string()}) AS sub LIMIT 0"
116-
)
114+
cur.execute(f"SELECT * FROM {self.get_table_query_string()} AS sub LIMIT 0")
117115
return (
118116
(c.name, pg_type_code_to_pg_type(c.type_code)) for c in cur.description
119117
)

0 commit comments

Comments
 (0)