Skip to content

Commit

Permalink
feat: Set value_type of entity directly in from_proto (#5092)
Browse files Browse the repository at this point in the history
Set value_type of entity directly in from_proto

Signed-off-by: hkuepers <[email protected]>
Co-authored-by: hkuepers <[email protected]>
  • Loading branch information
nanohanno and hkuepers authored Feb 25, 2025
1 parent d1bf58f commit 90e7498
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions sdk/python/feast/entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,13 +173,12 @@ def from_proto(cls, entity_proto: EntityProto):
entity = cls(
name=entity_proto.spec.name,
join_keys=[entity_proto.spec.join_key],
value_type=ValueType(entity_proto.spec.value_type),
description=entity_proto.spec.description,
tags=dict(entity_proto.spec.tags),
owner=entity_proto.spec.owner,
)

entity.value_type = ValueType(entity_proto.spec.value_type)

if entity_proto.meta.HasField("created_timestamp"):
entity.created_timestamp = entity_proto.meta.created_timestamp.ToDatetime()
if entity_proto.meta.HasField("last_updated_timestamp"):
Expand Down

0 comments on commit 90e7498

Please sign in to comment.