Skip to content

fix: Use join keys instead of entity names in ODFV materialization#6645

Open
anshishrivastava wants to merge 2 commits into
feast-dev:masterfrom
anshishrivastava:fix/5965-odfv-materialize-join-keys
Open

fix: Use join keys instead of entity names in ODFV materialization#6645
anshishrivastava wants to merge 2 commits into
feast-dev:masterfrom
anshishrivastava:fix/5965-odfv-materialize-join-keys

Conversation

@anshishrivastava

@anshishrivastava anshishrivastava commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

_materialize_odfv used FeatureView.entities (entity names) instead of
FeatureView.join_keys (actual join key column names) when building the
entity DataFrame and querying the offline store during ODFV materialization.

When an Entity's name differs from its join_keys (a supported, documented
pattern), this caused materialization to query for a nonexistent column,
breaking materialize()/materialize_incremental() for any
OnDemandFeatureView with write_to_online_store=True sourced from such a
feature view.

This fixes both call sites in _materialize_odfv to use source_fv.join_keys
instead of source_fv.entities.

Which issue(s) this PR fixes:

Fixes #5965

Checks

  • I've made sure the tests are passing.
  • My commits are signed off (git commit -s)
  • My PR title follows conventional commits format

Testing Strategy

  • Unit tests

Misc

Added a regression test (test_materialize_incremental_odfv_entity_name_differs_from_join_key
in sdk/python/tests/unit/local_feast_tests/test_local_feature_store.py) with
an Entity whose name differs from its join_keys. Confirmed it fails on
master and passes with this fix.

_materialize_odfv used FeatureView.entities (entity names) instead of
FeatureView.join_keys (actual join key column names) when building the
entity DataFrame and querying the offline store during ODFV
materialization. When an Entity's name differs from its join_keys (a
supported, documented pattern), this caused materialization to query
for a nonexistent column, breaking materialize()/materialize_incremental()
for any OnDemandFeatureView with write_to_online_store=True sourced from
such a feature view.

Fixes feast-dev#5965

Signed-off-by: Anshi Shrivastava <anshi4shrivastava@gmail.com>
@anshishrivastava
anshishrivastava requested a review from a team as a code owner July 24, 2026 20:08
@codecov-commenter

codecov-commenter commented Jul 24, 2026

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 46.09%. Comparing base (f843c63) to head (35c0c36).
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6645      +/-   ##
==========================================
+ Coverage   45.88%   46.09%   +0.21%     
==========================================
  Files         414      414              
  Lines       49950    49950              
  Branches     7140     7140              
==========================================
+ Hits        22918    23024     +106     
+ Misses      25431    25302     -129     
- Partials     1601     1624      +23     
Flag Coverage Δ
go-feature-server 30.58% <ø> (ø)
python-unit 47.37% <100.00%> (+0.22%) ⬆️
Files with missing lines Coverage Δ
sdk/python/feast/feature_store.py 44.42% <100.00%> (+4.55%) ⬆️

... and 5 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f843c63...35c0c36. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Signed-off-by: Anshi Shrivastava <anshi4shrivastava@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: _materialize_odfv uses entity names instead of join keys

2 participants