GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: Correct entity value type mapping for aliased feature views by leiyangyou · Pull Request #5492 · feast-dev/feast

Conversation

@leiyangyou

@leiyangyou leiyangyou commented Jul 1, 2025

Copy link
Copy Markdown
Contributor

Description

This fix addresses an issue where entity value types were incorrectly mapped when using feature views with join key aliases.

Problem

Previously, when using feature views with join key aliases (like in the example below), the entity_type_map would use the original column name instead of the aliased join key:

user_entity = Entity(
    name="user",
    join_keys=["user_id"],
    value_type=ValueType.INT32,
    description="User entity for the matching platform",
)

match_service = FeatureService(
    name="match_service",
    features=[
        user_profile_fv.with_name("user"),
        user_profile_fv.with_name("target_user").with_join_key_map(
            {"user_id": "target_user_id"}
        ),
    ],
)

This caused target_user_id to be interpreted as ValueType.INT64 instead of the correct entity value type (ValueType.INT32 in this case).

Solution

The fix ensures that when a feature view has a join key map, the entity type mapping uses the correct aliased column name from the projection's join_key_map.

Changes

  • Modified _get_entity_maps function in sdk/python/feast/utils.py
  • Added logic to check for join key aliases in the feature view projection
  • Map entity types to the correct aliased column names

Testing

This fix resolves the issue where aliased feature views would have incorrect entity value type mappings, ensuring that join keys maintain their correct data types even when aliased.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

This fix has been tested with the scenario described above where feature views are aliased with join key mappings. The entity value types are now correctly preserved for aliased join keys.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@leiyangyou
leiyangyou requested a review from a team as a code owner July 1, 2025 19:46
@franciscojavierarceo franciscojavierarceo added the ok-to-test label Jul 1, 2025
@franciscojavierarceo

franciscojavierarceo commented Jul 1, 2025

Copy link
Copy Markdown
Member

@leiyangyou can you. click the DCO?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@leiyangyou
leiyangyou force-pushed the fix/entity-value-type-mapping-for-aliased-fv branch from 1cf98c2 to 979e918 Compare July 2, 2025 00:59
@leiyangyou

leiyangyou commented Jul 2, 2025

Copy link
Copy Markdown
Contributor Author

yeh it's passing now

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@leiyangyou
fix: correct entity value type mapping for aliased feature views
7e0c1f8
Fix issue where entity value types were incorrectly mapped when using
feature views with join key aliases. Previously, the entity_type_map
would use the original column name instead of the aliased join key,
causing target_user_id to be interpreted as ValueType.INT64 instead
of the correct entity value type.

The fix ensures that when a feature view has a join key map, the
entity type mapping uses the correct aliased column name from the
projection's join_key_map.

Signed-off-by: Lei Yang <[email protected]>
@leiyangyou
leiyangyou force-pushed the fix/entity-value-type-mapping-for-aliased-fv branch from 979e918 to 7e0c1f8 Compare July 2, 2025 02:33
@leiyangyou leiyangyou changed the title fix: correct entity value type mapping for aliased feature views fix: Correct entity value type mapping for aliased feature views Jul 2, 2025
jyejare
jyejare approved these changes Jul 2, 2025
View reviewed changes
jyejare
jyejare reviewed Jul 2, 2025
View reviewed changes

@jyejare jyejare left a comment

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The integration tests are failing !

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@leiyangyou

leiyangyou commented Aug 1, 2025

Copy link
Copy Markdown
Contributor Author

it finally passed right, it's probably failing for other reasons

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

franciscojavierarceo
franciscojavierarceo approved these changes Aug 1, 2025
View reviewed changes
@franciscojavierarceo
franciscojavierarceo merged commit bdf20bb into feast-dev:master Aug 1, 2025
haoxu0 pushed a commit that referenced this pull request Aug 11, 2025
@leiyangyou @haoxu0
fix: Correct entity value type mapping for aliased feature views (#5492)
c350dd0
franciscojavierarceo pushed a commit that referenced this pull request Aug 14, 2025
@feast-ci-bot
chore(release): release 0.52.0
acb97fb
# [0.52.0](v0.51.0...v0.52.0) (2025-08-14)

### Bug Fixes

* Correct entity value type mapping for aliased feature views ([#5492](#5492)) ([bdf20bb](bdf20bb))
* Correct namespace reference in remote Feast project setup for operator upgrade and previous version tests ([df391ec](df391ec))
* dell pydantic v1 ([1189512](1189512))
* Fixed the entity to on-demand feature view relationship ([1c59bba](1c59bba))
* Make transformers optional ([#5544](#5544)) ([a4eef38](a4eef38))
* Push Source inherits the timestamp fields from Data Source ([#5550](#5550)) ([b7ea5cc](b7ea5cc))
* Remove the devcontainer folder. ([a9815c2](a9815c2))

### Features

* Added API for discovering Feature Views by popular tags ([#5558](#5558)) ([2e5f564](2e5f564))
* Added filtering support for featureView and featureServices api ([#5552](#5552)) ([897b3f3](897b3f3))
* Added global search api and necessary unit tests ([#5532](#5532)) ([dd3061f](dd3061f))
* Added Ray Compute Engine and Ray Offline Store Support ([#5526](#5526)) ([72de088](72de088))
* Added recent visit logging api for registry server ([#5545](#5545)) ([2adcf2c](2adcf2c))
* **auth:** support client-credentials & static token for OIDC client auth ([fc44222](fc44222))
* **auth:** support client-credentials & static token for OIDC client auth ([795fc06](795fc06))
* Implement and enhance remote document retrieval functionality ([#5487](#5487)) ([d095b96](d095b96))
* Implemented consistent error handling ([7f10151](7f10151))
* Offline Store historical features retrieval without entity df, but based on datatime range ([#5527](#5527)) ([df942b9](df942b9))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@jyejare jyejare jyejare approved these changes
@franciscojavierarceo franciscojavierarceo franciscojavierarceo approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

ok-to-test

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@leiyangyou @franciscojavierarceo @jyejare
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.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.