Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion go/internal/feast/onlineserving/serving.go
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,9 @@ func ValidateEntityValues(joinKeyValues map[string]*prototypes.RepeatedValue,
requestData map[string]*prototypes.RepeatedValue,
expectedJoinKeysSet map[string]interface{}) (int, error) {
numRows := -1

if err := validateJoinKeys(joinKeyValues, expectedJoinKeysSet); err != nil {
return -1, errors.New("valueError: " + err.Error())
}
for joinKey, values := range joinKeyValues {
if _, ok := expectedJoinKeysSet[joinKey]; !ok {
requestData[joinKey] = values
Expand Down Expand Up @@ -647,6 +649,17 @@ func getQualifiedFeatureName(viewName string, featureName string, fullFeatureNam
}
}

func validateJoinKeys(
joinKeyValues map[string]*prototypes.RepeatedValue,
expectedJoinKeysSet map[string]interface{}) error {
for joinKey, _ := range joinKeyValues {
if _, ok := expectedJoinKeysSet[joinKey]; !ok {
return fmt.Errorf("Invalid entity join key. key=%s", joinKey)
}
}
return nil
}

type featureNameCollisionError struct {
featureRefCollisions []string
fullFeatureNames bool
Expand Down
Loading