Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Make backwards compatible with python 3.8-
Signed-off-by: Kevin Zhang <kzhang@tecton.ai>
  • Loading branch information
kevjumba authored and adchia committed Apr 20, 2022
commit c4de36ebcd1c8f18912fdd130fdeed20651279e6
5 changes: 3 additions & 2 deletions sdk/python/feast/infra/utils/postgres/utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from typing import Any, Dict

import numpy as np
from numpy import dtype
import pandas as pd
import psycopg2
import psycopg2.extras
Expand Down Expand Up @@ -36,7 +37,7 @@ def df_to_create_table_sql(entity_df, table_name) -> str:

def df_to_postgres_table(
config: PostgreSQLConfig, df: pd.DataFrame, table_name: str
) -> Dict[str, np.dtype[Any]]:
) -> Dict[str, np.dtype]:
"""
Create a table for the data frame, insert all the values, and return the table schema
"""
Expand All @@ -55,7 +56,7 @@ def df_to_postgres_table(

def get_query_schema(
config: PostgreSQLConfig, sql_query: str
) -> Dict[str, np.dtype[Any]]:
) -> Dict[str, np.dtype]:
"""
We'll use the statement when we perform the query rather than copying data to a
new table
Expand Down