Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add validation when feature type is changed #1102

Merged
merged 4 commits into from
Oct 28, 2020

Conversation

terryyylim
Copy link
Member

Signed-off-by: Terence terencelimxp@gmail.com

What this PR does / why we need it:
In the past, we didn't allow changes to feature types so this validation was not necessary. As we think about implementing deletion of feature tables, we'll need to consider how old values stored in redis will be retrieved. This PR is the first step to handling older values that are based of older types.

Which issue(s) this PR fixes:

Fixes #

Does this PR introduce a user-facing change?:

NONE

allValueMaps.putAll(valueMap);

boolean isNotFound = false;
Copy link
Collaborator

Choose a reason for hiding this comment

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

isn't it the same as
isNotFound = !isSameType

HashMap<String, String> typingMap =
new HashMap<>() {
{
put("BYTES", "BYTES_VAL");
Copy link
Collaborator

Choose a reason for hiding this comment

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

why convert to string? Can we use original enum values instead?

@@ -196,11 +241,11 @@ public GetOnlineFeaturesResponse getOnlineFeatures(GetOnlineFeaturesRequestV2 re
}

private static Map<String, ValueProto.Value> unpackValueMap(
Optional<Feature> feature, boolean isOutsideMaxAge) {
Optional<Feature> feature, boolean isOutsideMaxAge, boolean isSameType) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

sameType name seems not very clear here

Signed-off-by: Terence <terencelimxp@gmail.com>
Signed-off-by: Terence <terencelimxp@gmail.com>
Signed-off-by: Terence <terencelimxp@gmail.com>
Signed-off-by: Terence <terencelimxp@gmail.com>
@terryyylim
Copy link
Member Author

/test test-end-to-end-gcp

@feast-ci-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: pyalex, terryyylim

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@pyalex
Copy link
Collaborator

pyalex commented Oct 28, 2020

/lgtm

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.

3 participants