Skip to content

Commit

Permalink
fix: fix compile
Browse files Browse the repository at this point in the history
  • Loading branch information
wfxr committed Nov 12, 2021
1 parent 7c6d386 commit 072cfe5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 19 deletions.
3 changes: 2 additions & 1 deletion internal/database/online/types.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package online

import (
"github.com/oom-ai/oomstore/pkg/oomstore/types"
"github.com/oom-ai/oomstore/pkg/oomstore/typesv2"
)

Expand All @@ -21,6 +22,6 @@ type MultiGetOpt struct {
type ImportOpt struct {
Revision *typesv2.Revision
Entity *typesv2.Entity
Stream <-chan *typesv2.RawFeatureValueRecord
Stream <-chan *types.RawFeatureValueRecord
FeatureList typesv2.FeatureList
}
8 changes: 4 additions & 4 deletions pkg/oomstore/online_feature_value.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func (s *OomStore) GetOnlineFeatureValues(ctx context.Context, opt types.GetOnli
continue
}
featureValues, err := s.online.Get(ctx, online.GetOpt{
EntityID: entity.Name,
Entity: entity,
RevisionID: onlineRevisionId,
EntityKey: opt.EntityKey,
FeatureList: features,
Expand Down Expand Up @@ -65,15 +65,15 @@ func (s *OomStore) MultiGetOnlineFeatureValues(ctx context.Context, opt types.Mu
featureMap := groupFeaturesByRevisionId(features)

// entity_key -> feature_name -> feature_value
featureValueMap, err := s.getFeatureValueMap(ctx, opt.EntityKeys, featureMap, entity.Name)
featureValueMap, err := s.getFeatureValueMap(ctx, opt.EntityKeys, featureMap, entity)
if err != nil {
return nil, err
}

return buildFeatureDataSet(featureValueMap, features.Names(), opt.EntityKeys)
}

func (s *OomStore) getFeatureValueMap(ctx context.Context, entityKeys []string, featureMap map[int32]typesv2.FeatureList, entityName string) (map[string]dbutil.RowMap, error) {
func (s *OomStore) getFeatureValueMap(ctx context.Context, entityKeys []string, featureMap map[int32]typesv2.FeatureList, entity *typesv2.Entity) (map[string]dbutil.RowMap, error) {
// entity_key -> types.RecordMap
featureValueMap := make(map[string]dbutil.RowMap)

Expand All @@ -82,7 +82,7 @@ func (s *OomStore) getFeatureValueMap(ctx context.Context, entityKeys []string,
continue
}
featureValues, err := s.online.MultiGet(ctx, online.MultiGetOpt{
EntityName: entityName,
Entity: entity,
RevisionID: onlineRevisionId,
EntityKeys: entityKeys,
FeatureList: features,
Expand Down
14 changes: 0 additions & 14 deletions pkg/oomstore/typesv2/raw_feature_value_record.go

This file was deleted.

0 comments on commit 072cfe5

Please sign in to comment.