Title: fix: Merge shared ODFV source projections in feature resolution by sanskar-singh-2403 · Pull Request #6622 · feast-dev/feast · GitHub
Open Graph Title: fix: Merge shared ODFV source projections in feature resolution by sanskar-singh-2403 · Pull Request #6622 · feast-dev/feast
X Title: fix: Merge shared ODFV source projections in feature resolution by sanskar-singh-2403 · Pull Request #6622 · feast-dev/feast
Description: What this does Fixes #6621. When several on demand feature views share a source feature view but select different input columns, _get_feature_views_to_use appended the shared source view once per ODFV, each copy carrying only that ODFV's projection. The membership guard if source_fv not in fvs_to_use never matched, because BaseFeatureView.eq compares projections and the freshly-fetched full-projection view never equals an already-stored narrowed copy. Downstream, _group_feature_refs keys its view index by projection.name_to_use(), so the duplicate entries collide and the last one wins, the other ODFVs' source projections are silently dropped. During get_historical_features this means the losing ODFV's input columns are never fetched, so transforms receive missing inputs (NaN in pandas mode). The offline retrieval path is masked on 0.62+ by the ref-injection loop from #6140, but the resolution helper still returns duplicate entries with conflicting projections to its other callers (_get_online_request_context, retrieve_online_documents, retrieve_online_documents_v2). The fix In _get_feature_views_to_use, index accumulated source views by projection.name_to_use() and, on a repeat hit, merge the projections (union of features, deduped by name) instead of appending a duplicate. A shared source view now resolves to a single entry carrying the union of the required input columns. The merge helper reassigns projection.features to a fresh list rather than mutating in place, because the projections in play are shallow copies (copy.copy) that share their features list with the registry object. Tests Added TestGetFeatureViewsToUseSharedSource in tests/unit/test_utils.py: test_shared_source_projections_are_merged two ODFVs (odfv_a on src_fv[["a"]], odfv_b on src_fv[["b"]]) resolve to a single src_fv entry with projection ["a", "b"]. test_shared_source_ref_order_independent result is the same regardless of ODFV request order. Both fail on master (assert 2 == 1 the duplicate entries) and pass with this change. ruff check and ruff format are clean. Related #6099, #6140
Open Graph Description: What this does Fixes #6621. When several on demand feature views share a source feature view but select different input columns, _get_feature_views_to_use appended the shared source view once per O...
X Description: What this does Fixes #6621. When several on demand feature views share a source feature view but select different input columns, _get_feature_views_to_use appended the shared source view once per O...
Opengraph URL: https://github.com/feast-dev/feast/pull/6622
X: @github
Domain: github.com
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:bed5fd46-5cec-68af-c187-83bf7d364d57 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | B632:247D07:10C74AF:170C210:6AFEA270 |
| html-safe-nonce | 0b5a9c8227b12674fad1525b434003042b1059736cef96b5ec762844d9ed29b6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNjMyOjI0N0QwNzoxMEM3NEFGOjE3MEMyMTA6NkFGRUEyNzAiLCJ2aXNpdG9yX2lkIjoiODg5MTAyNjM2OTc3Mzc0MDY1NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 3b90fb245b356225dc5ce587c0a1f8fcbf75548517579c4c4fd096533f45c5f2 |
| hovercard-subject-tag | pull_request:4105495915 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/feast-dev/feast/pull/6622/files |
| twitter:image | https://avatars.githubusercontent.com/u/95009647?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/95009647?s=400&v=4 |
| og:image:alt | What this does Fixes #6621. When several on demand feature views share a source feature view but select different input columns, _get_feature_views_to_use appended the shared source view once per O... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 95b2753c978240785d6cca00783c00a371b2d7d9879bb32e305170a1b19bd28e |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/feast-dev/feast git https://github.com/feast-dev/feast.git |
| octolytics-dimension-user_id | 57027613 |
| octolytics-dimension-user_login | feast-dev |
| octolytics-dimension-repository_id | 161133770 |
| octolytics-dimension-repository_nwo | feast-dev/feast |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 161133770 |
| octolytics-dimension-repository_network_root_nwo | feast-dev/feast |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 3f25273206cd841171bca0002261ae4c9757d934 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width