Skip to content

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

Merged
ntkathole merged 2 commits into
feast-dev:masterfrom
anshishrivastava:fix/5965-odfv-materialize-join-keys
Jul 30, 2026
Merged

fix: Use join keys instead of entity names in ODFV materialization#6645
ntkathole merged 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.

@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.27%. Comparing base (adb8c1c) to head (71463c6).
⚠️ Report is 3 commits behind head on master.
❗ 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.98%   46.27%   +0.28%     
==========================================
  Files         414      414              
  Lines       50037    50045       +8     
  Branches     7147     7147              
==========================================
+ Hits        23012    23157     +145     
+ Misses      25413    25251     -162     
- Partials     1612     1637      +25     
Flag Coverage Δ
go-feature-server 30.58% <ø> (+0.05%) ⬆️
python-unit 47.56% <100.00%> (+0.30%) ⬆️
Files with missing lines Coverage Δ
sdk/python/feast/feature_store.py 44.45% <100.00%> (+4.50%) ⬆️

... and 7 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 40fb788...71463c6. 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.

_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>
Signed-off-by: Anshi Shrivastava <anshi4shrivastava@gmail.com>
@ntkathole
ntkathole force-pushed the fix/5965-odfv-materialize-join-keys branch from 3964cca to 71463c6 Compare July 30, 2026 06:05
@ntkathole
ntkathole merged commit abffebc into feast-dev:master Jul 30, 2026
18 of 22 checks passed
@anshishrivastava
anshishrivastava deleted the fix/5965-odfv-materialize-join-keys branch August 13, 2026 23:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: _materialize_odfv uses entity names instead of join keys

3 participants