GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: ODFV output projection in offline retrieval (#6099) by jyejare · Pull Request #6140 · feast-dev/feast

Conversation

@jyejare

@jyejare jyejare commented Mar 23, 2026 •
edited by devin-ai-integration Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

Summary

Fixes #6099 - Ensures offline retrieval honors ODFV feature projection, matching online retrieval behavior.

Problem

When requesting a subset of features from an OnDemandFeatureView:

  • Online retrieval ✅ Returns only requested features
  • Offline retrieval ❌ Returns ALL ODFV output features (before this fix)

This caused schema mismatches between training and serving pipelines.

Solution

Modified RetrievalJob.to_arrow() in offline_store.py to:

  1. Parse requested features from metadata.features
  2. Build a mapping of ODFV name → requested feature names
  3. Filter ODFV transformation output to only include requested columns

Example

Before this fix:

features = ["my_odfv:feature_a"]
offline_result = store.get_historical_features(features=features, ...)
# Columns: driver_id, event_timestamp, feature_a, feature_b, feature_c ❌

After this fix:

features = ["my_odfv:feature_a"]
offline_result = store.get_historical_features(features=features, ...)
# Columns: driver_id, event_timestamp, feature_a ✅

Changes

Modified: sdk/python/feast/infra/offline_stores/offline_store.py

  • Updated RetrievalJob.to_arrow() method (lines 140-184)
  • Added filtering logic for ODFV output projection
  • Maintains backward compatibility

Added: Test in sdk/python/tests/integration/offline_store/test_universal_historical_retrieval.py

  • test_odfv_projection() - Comprehensive test verifying:
    • Single feature request returns only that feature
    • Multiple feature request returns only requested features
    • Unrequested features are NOT included
    • Offline and online retrieval have consistent behavior
  • Parametrized for both full_feature_names=True and False

Testing

The new test test_odfv_projection verifies:

  1. ✅ Requesting 1 out of 3 ODFV features → returns only that 1 feature
  2. ✅ Requesting 2 out of 3 ODFV features → returns only those 2 features
  3. ✅ Unrequested features are NOT included in the result
  4. ✅ Offline and online retrieval return consistent schemas

Backward Compatibility

  • ✅ Falls back to old behavior if metadata is unavailable
  • ✅ No breaking changes to existing functionality
  • ✅ Only affects ODFV feature projection

Impact

This fix ensures:

  • ✅ Consistent behavior between online and offline retrieval
  • ✅ No schema mismatches in ML pipelines
  • ✅ More efficient - doesn't compute/return unnecessary features
  • ✅ Matches user expectations - returns exactly what was requested

Open with Devin

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@jyejare
jyejare requested review from a team as code owners March 23, 2026 08:28
@jyejare
jyejare requested review from dmartinol, ejscribner and shuchu and removed request for a team March 23, 2026 08:28
@jyejare jyejare changed the title Fix ODFV output projection in offline retrieval (#6099) fix: ODFV output projection in offline retrieval (#6099) Mar 23, 2026
devin-ai-integration[bot]

This comment was marked as resolved.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jyejare
jyejare marked this pull request as draft March 23, 2026 09:14
franciscojavierarceo
franciscojavierarceo reviewed Mar 23, 2026
View reviewed changes
Comment thread sdk/python/feast/infra/offline_stores/offline_store.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@jyejare
jyejare force-pushed the fix/odfv-output-projection-6099 branch from 6dc5107 to a6bbfda Compare March 23, 2026 15:10
@jyejare
jyejare marked this pull request as ready for review March 23, 2026 15:10
@jyejare
jyejare force-pushed the fix/odfv-output-projection-6099 branch 6 times, most recently from b114f3b to f0bec1a Compare March 30, 2026 16:05
franciscojavierarceo
franciscojavierarceo approved these changes Mar 30, 2026
View reviewed changes
devin-ai-integration[bot]

This comment was marked as resolved.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jyejare
jyejare force-pushed the fix/odfv-output-projection-6099 branch from f0bec1a to 607b640 Compare March 31, 2026 15:09
@ntkathole ntkathole added the ok-to-test label Mar 31, 2026
@ntkathole

ntkathole commented Apr 1, 2026

Copy link
Copy Markdown
Member

@jyejare tests failing

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jyejare
jyejare force-pushed the fix/odfv-output-projection-6099 branch 4 times, most recently from 97a669e to 469cfbb Compare April 2, 2026 07:05
Ambient Code Bot @jyejare
Fix ODFV output projection in offline retrieval (feast-dev#6099)
f9a2751
Changes:
- Modified RetrievalJob.to_arrow() to filter ODFV outputs based on requested
  features from metadata, matching online retrieval behavior
- Added test_odfv_projection to verify the fix and prevent regression

Signed-off-by: Jitendra Yejare <[email protected]>
@jyejare
jyejare force-pushed the fix/odfv-output-projection-6099 branch from 469cfbb to f9a2751 Compare April 2, 2026 07:16
devin-ai-integration[bot]
devin-ai-integration Bot reviewed Apr 2, 2026
View reviewed changes

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

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.

Devin Review found 1 new potential issue.

View 15 additional findings in Devin Review.

Open in Devin Review

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread sdk/python/feast/feature_store.py

@devin-ai-integration devin-ai-integration Bot Apr 2, 2026

Copy link
Copy Markdown
Contributor

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.

🟡 Feature name collision validation bypassed for implicitly-added ODFV dependency refs

_validate_feature_refs at sdk/python/feast/feature_store.py:1476 is called with _feature_refs (the user's original refs), but the provider receives _feature_refs_for_provider which includes additional dependency FV refs added at lines 1454-1461. If full_feature_names=False and an ODFV dependency feature has the same name as a user-requested feature from a different FV (e.g., user requests fv1:conv_rate and the ODFV depends on fv2:conv_rate), the collision is not detected by validation, and both features produce identically-named output columns, leading to data corruption or errors in the offline store's point-in-time join.

(Refers to line 1476)

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
ntkathole
ntkathole approved these changes Apr 2, 2026
View reviewed changes
@ntkathole
ntkathole merged commit b3dcde7 into feast-dev:master Apr 2, 2026
31 of 32 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@addenergyx addenergyx mentioned this pull request Jul 21, 2026
when calling for several ODFVs at once, only fetches one ODFV's column-list per shared source view (last request wins), #6621
Closed
@sanskar-singh-2403 sanskar-singh-2403 mentioned this pull request Jul 22, 2026
fix: Merge shared ODFV source projections in feature resolution #6622
Merged
@luc-pimentel luc-pimentel mentioned this pull request Oct 14, 2026
fix: Keep an ODFV output that shares its name with a source feature #7009
Open
4 of 7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@devin-ai-integration devin-ai-integration[bot] devin-ai-integration[bot] left review comments
@franciscojavierarceo franciscojavierarceo franciscojavierarceo approved these changes
@ntkathole ntkathole ntkathole approved these changes
@shuchu shuchu Awaiting requested review from shuchu shuchu is a code owner automatically assigned from feast-dev/maintainers
@ejscribner ejscribner Awaiting requested review from ejscribner ejscribner is a code owner automatically assigned from feast-dev/maintainers
@dmartinol dmartinol Awaiting requested review from dmartinol dmartinol is a code owner automatically assigned from feast-dev/maintainers

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

ok-to-test

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

get_historical_features returns all ODFV output columns even when a single ODFV feature is requested

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@jyejare @ntkathole @franciscojavierarceo
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.