Skip to content

Commit 473f8d9

Browse files
gbmarc1adchia
andauthored
fix: Add description attribute to the Field.from_proto method (#3469)
* fix: Add description attribute to the from_proto method Signed-off-by: gbmarc1 <[email protected]> * lint Signed-off-by: Danny Chiao <[email protected]> --------- Signed-off-by: gbmarc1 <[email protected]> Signed-off-by: Danny Chiao <[email protected]> Co-authored-by: Danny Chiao <[email protected]>
1 parent d3b7c06 commit 473f8d9

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

sdk/python/feast/field.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ def from_proto(cls, field_proto: FieldProto):
109109
name=field_proto.name,
110110
dtype=from_value_type(value_type=value_type),
111111
tags=dict(field_proto.tags),
112+
description=field_proto.description,
112113
)
113114

114115
@classmethod

sdk/python/tests/unit/test_feature.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,6 @@ def test_field_serialization_with_description():
2727

2828
assert serialized_field.description == expected_description
2929
assert field_from_feature.description == expected_description
30+
31+
field = Field.from_proto(serialized_field)
32+
assert field.description == expected_description

0 commit comments

Comments
 (0)