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
last commit before PR
Signed-off-by: alex.eijssen <alex.eijssen@energyessentials.nl>
  • Loading branch information
alex.eijssen committed Aug 11, 2022
commit c302f4b91a3303e5ac95f3ef84119603ba91c690
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,6 @@ def get_historical_features(
full_feature_names: bool = False,
) -> RetrievalJob:

# (
# entity_schema,
# df_query,
# table_name,
# ) = _get_entity_schema_df_query_and_table_name(
# config=config,
# entity_df=entity_df,
# )

entity_schema = _get_entity_schema(entity_df, config)

entity_df_event_timestamp_col = (
Expand Down Expand Up @@ -420,26 +411,6 @@ def _get_entity_schema(
raise InvalidEntityType(type(entity_df))


def _get_entity_schema_df_query_and_table_name(
config: RepoConfig, entity_df: Union[pd.DataFrame, str]
) -> Tuple[Dict[str, np.dtype], str, Optional[str]]:

table_name = None
if isinstance(entity_df, pd.DataFrame):
table_name = offline_utils.get_temp_entity_table_name()
entity_schema = df_to_postgres_table(
config.offline_store, entity_df, table_name
)
df_query = table_name
elif isinstance(entity_df, str):
df_query = f"({entity_df}) AS sub"
entity_schema = get_query_schema(config.offline_store, df_query)
else:
raise TypeError(entity_df)

return entity_schema, df_query, table_name


# Copied from the Feast Redshift offline store implementation
# Note: Keep this in sync with sdk/python/feast/infra/offline_stores/redshift.py:
# MULTIPLE_FEATURE_VIEW_POINT_IN_TIME_JOIN
Expand Down