@@ -228,14 +228,14 @@ def _coerce_datetime(ts):
228228
229229def _convert_arrow_to_proto (
230230 table : Union [pyarrow .Table , pyarrow .RecordBatch ],
231- feature_view : "FeatureView" ,
231+ feature_view : Union [ "FeatureView" , "OnDemandFeatureView" ] ,
232232 join_keys : Dict [str , ValueType ],
233233) -> List [Tuple [EntityKeyProto , Dict [str , ValueProto ], datetime , Optional [datetime ]]]:
234234 # This is a workaround for isinstance(feature_view, OnDemandFeatureView), which triggers a circular import
235235 if getattr (feature_view , "source_request_sources" , None ):
236- return _convert_arrow_odfv_to_proto (table , feature_view , join_keys )
236+ return _convert_arrow_odfv_to_proto (table , feature_view , join_keys ) # type: ignore[arg-type]
237237 else :
238- return _convert_arrow_fv_to_proto (table , feature_view , join_keys )
238+ return _convert_arrow_fv_to_proto (table , feature_view , join_keys ) # type: ignore[arg-type]
239239
240240
241241def _convert_arrow_fv_to_proto (
@@ -301,7 +301,7 @@ def _convert_arrow_fv_to_proto(
301301
302302def _convert_arrow_odfv_to_proto (
303303 table : Union [pyarrow .Table , pyarrow .RecordBatch ],
304- feature_view : "FeatureView " ,
304+ feature_view : "OnDemandFeatureView " ,
305305 join_keys : Dict [str , ValueType ],
306306) -> List [Tuple [EntityKeyProto , Dict [str , ValueProto ], datetime , Optional [datetime ]]]:
307307 # Avoid ChunkedArrays which guarantees `zero_copy_only` available.
@@ -1013,7 +1013,7 @@ def _prepare_entities_to_read_from_online_store(
10131013
10141014 num_rows = _validate_entity_values (entity_proto_values )
10151015
1016- odfv_entities = []
1016+ odfv_entities : List [ Entity ] = []
10171017 request_source_keys = []
10181018 for on_demand_feature_view in requested_on_demand_feature_views :
10191019 odfv_entities .append (* getattr (on_demand_feature_view , "entities" , None ))
0 commit comments