Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
11 changes: 10 additions & 1 deletion sdk/python/feast/infra/offline_stores/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,16 @@ def get_table_column_names_and_types_from_data_source(
return zip(table.column("name").to_pylist(), table.column("type").to_pylist())


def _create_retrieval_metadata(feature_refs: List[str], entity_df: pd.DataFrame):
def _create_retrieval_metadata(
feature_refs: List[str], entity_df: Optional[pd.DataFrame] = None
):
if entity_df is None:
return RetrievalMetadata(
features=feature_refs,
keys=[], # No entity keys when no entity_df provided
min_event_timestamp=None,
max_event_timestamp=None,
)
entity_schema = _get_entity_schema(
entity_df=entity_df,
)
Expand Down
3 changes: 3 additions & 0 deletions sdk/python/feast/offline_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,9 @@ def get_historical_features(self, command: dict, key: Optional[str] = None):
# Extract parameters from the internal flights dictionary
entity_df_value = self.flights[key]
entity_df = pa.Table.to_pandas(entity_df_value)
# Check if this is a mock/empty table (contains only 'key' column)
if len(entity_df.columns) == 1 and "key" in entity_df.columns:
entity_df = None

feature_view_names = command["feature_view_names"]
name_aliases = command["name_aliases"]
Expand Down
Loading