fix: Preserve all join keys in remote online store read requests#6603
Open
AmosBunde wants to merge 1 commit into
Open
fix: Preserve all join keys in remote online store read requests#6603AmosBunde wants to merge 1 commit into
AmosBunde wants to merge 1 commit into
Conversation
Signed-off-by: AmosBunde <[email protected]>
AmosBunde
force-pushed
the
fix/remote-online-read-composite-join-keys
branch
from
July 13, 2026 22:44
a2a5eac to
10fb95f
Compare
Sanjays2402
reviewed
Jul 18, 2026
| ) | ||
| for join_key, value in zip(row.join_keys, row.entity_values): | ||
| entity_columns.setdefault(join_key, []).append( | ||
| getattr(value, value.WhichOneof("val")) # type: ignore[arg-type] |
There was a problem hiding this comment.
WhichOneof("val") returns None for an unset ValueProto, so getattr(value, None) raises TypeError here. The issue specifically calls out null entity values; this should append None instead.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What this PR does / why we need it:
RemoteOnlineStore._construct_online_read_api_json_requestbuilt the request body fromrow.join_keys[0]androw.entity_values[0]only. For a feature view with a composite entity key, every join key after the first was dropped before the request left the client. The feature server then joined on a partial key, matched a row, and returned it with statusPRESENT. No exception was raised anywhere in the path, so callers silently received features belonging to the wrong entity.Reproduced on 0.64.0 with a two-entity feature view keyed on
(driver_id, customer_id). The request that reached the server was:customer_idis not null or truncated. It is absent.Two notes for reviewers:
The issue title attributes this to
get_online_features, but that method already builds a correct columnar request across all keys. The defect is one layer down, in theonline_readpath taken when a localFeatureStoreis configured with an online store oftype: remote.get_online_featuresis covered bytest_columnar_entity_rows. Theonline_readrequest builder had no test coverage at all, which is why the divergence between the two went unnoticed.This PR builds the request from every
(join_key, entity_value)pair, keyed on join key name rather than position, and raises on a length mismatch betweenjoin_keysandentity_valuesrather than silently truncating.Which issue(s) this PR fixes:
Fixes #6488
Checks
git commit -s)Testing Strategy