GeezerVison is showing github.com — feat: Offline Store historical features retrieval based on datetime range in Ray by aniketpalu · Pull Request #5738 · feast-dev/feast
Conversation
What this PR does / why we need it:
-
Add support for entity_df=None in RayOfflineStore.get_historical_features with start_date/end_date.
-- Derives entity set by reading distinct join keys from each FeatureView source within the time window, applies field mappings and join_key_map, filters by timestamp, and unions aligned schemas.
-- Adds stable event_timestamp = end_date for PIT joins.
-
Signature change: get_historical_features accepts entity_df: Optional[Union[pd.DataFrame, str]] and **kwargs.
-- Why: Match base interface and support date-only retrieval.
Which issue(s) this PR fixes:
RHOAIENG-38643
Misc
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good initially, have some doubts.
Also needs to add tests.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
return pa.Table.from_pandas(df).schema
|
|
|
|
|
|
|
|
|
def _compute_non_entity_dates_ray(
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should have make a common utility function for this, so that it can be used in all stores without repeating the code.
wdyt ?
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
return _filter_range
|
|
|
|
|
|
|
|
|
def _make_select_distinct_keys(join_keys: List[str]):
|
jyejare
Dec 2, 2025
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should not drop rows with duplicate IDs, because there could be multiple transactions per ID and we need to choose the row based on timestamp while joining the colums from another table/view. I think this is the same case with your spark PR.
Please check the postgres implementation to understand the case.
Or Am I misreading this ?
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Testing the case after discussion
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previously, when entity_df=None was passed to get_historical_features(), the Ray offline store would extract only distinct entity keys and assign a single fixed timestamp (end_date) to all entities. This broke point-in-time joins for cases where multiple transactions exist per entity ID in date-time range.
Now extracts distinct (entity_keys, event_timestamp) combinations, aligning with Postgres based offline store's behaviour.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
jyejare reacted with thumbs up emoji
Uh oh!
There was an error while loading. Please reload this page.
jyejare
pushed a commit
to opendatahub-io/feast
that referenced
this pull request
Mar 9, 2026
Reviewers
jyejare
jyejare approved these changes
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|