Skip to content

Commit dfdef02

Browse files
committed
fix: narrow Arrow type lookup before assignment
Signed-off-by: Mrunmayee Daware <165297479+Mrun25@users.noreply.github.com>
1 parent f2829bd commit dfdef02

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎sdk/python/feast/type_map.py‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1699,12 +1699,13 @@ def pa_to_feast_value_type(pa_type_as_str: str) -> ValueType:
16991699
"list<element: bytes>": ValueType.BYTES_LIST,
17001700
"list<element: float>": ValueType.FLOAT_LIST,
17011701
}
1702-
value_type = type_map.get(pa_type_as_str)
1703-
if value_type is None:
1702+
mapped_value_type = type_map.get(pa_type_as_str)
1703+
if mapped_value_type is None:
17041704
raise ValueError(
17051705
f"Feast cannot infer a value type for the Arrow type '{pa_type_as_str}'. "
17061706
"Declare the feature view schema explicitly, or extend the Arrow type mapping."
17071707
)
1708+
value_type = mapped_value_type
17081709

17091710
if is_list:
17101711
value_type = ValueType[value_type.name + "_LIST"]

0 commit comments

Comments
 (0)