Skip to content

Commit

Permalink
reuse timestamp in response generation
Browse files Browse the repository at this point in the history
Signed-off-by: pyalex <[email protected]>
  • Loading branch information
pyalex committed Mar 21, 2022
1 parent ddebd86 commit 1c8e5cb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sdk/python/feast/feature_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -1472,14 +1472,15 @@ def _populate_result_rows_from_columnar(
online_features_response: GetOnlineFeaturesResponse,
data: Dict[str, List[Value]],
):
timestamp = Timestamp() # Only initialize this timestamp once.
# Add more values to the existing result rows
for feature_name, feature_values in data.items():
online_features_response.metadata.feature_names.val.append(feature_name)
online_features_response.results.append(
GetOnlineFeaturesResponse.FeatureVector(
values=feature_values,
statuses=[FieldStatus.PRESENT] * len(feature_values),
event_timestamps=[Timestamp()] * len(feature_values),
event_timestamps=[timestamp] * len(feature_values),
)
)

Expand Down

0 comments on commit 1c8e5cb

Please sign in to comment.