fix: Invalid column names in get_historical_features when there are field mappings on join keys #4886
+106
−5
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:
When there are field mappings on an entity's join keys,
get_historical_features()
fails because it does not use the original column name in the data source.This is needed when the source data cannot be modified, and a field mapping is used to map the source data's column to the join key.
Example:
Without this fix (Spark example):
Underlying Spark query:
With this fix, the field mapping is respected and the query becomes:
Which issue(s) this PR fixes:
#4889
Misc
This only works if the entity join key is specified in the schema of the FeatureView (see above).