MCPcopy
hub / github.com/feast-dev/feast / _convert_arrow_to_proto

Function _convert_arrow_to_proto

sdk/python/feast/utils.py:410–423  ·  view source on GitHub ↗
(
    table: Union[pyarrow.Table, pyarrow.RecordBatch],
    feature_view: Union["FeatureView", "BaseFeatureView", "OnDemandFeatureView"],
    join_keys: Dict[str, ValueType],
)

Source from the content-addressed store, hash-verified

408
409
410def _convert_arrow_to_proto(
411 table: Union[pyarrow.Table, pyarrow.RecordBatch],
412 feature_view: Union["FeatureView", "BaseFeatureView", "OnDemandFeatureView"],
413 join_keys: Dict[str, ValueType],
414) -> List[Tuple[EntityKeyProto, Dict[str, ValueProto], datetime, Optional[datetime]]]:
415 # This is a workaround for isinstance(feature_view, OnDemandFeatureView), which triggers a circular import
416 # Check for source_request_sources or source_feature_view_projections attributes to identify ODFVs
417 if (
418 getattr(feature_view, "source_request_sources", None) is not None
419 or getattr(feature_view, "source_feature_view_projections", None) is not None
420 ):
421 return _convert_arrow_odfv_to_proto(table, feature_view, join_keys) # type: ignore[arg-type]
422 else:
423 return _convert_arrow_fv_to_proto(table, feature_view, join_keys) # type: ignore[arg-type]
424
425
426def _convert_arrow_fv_to_proto(

Callers 10

write_to_online_storeFunction · 0.90
_write_batchFunction · 0.90
map_in_arrowFunction · 0.90
map_in_pandasFunction · 0.90
runMethod · 0.90
handlerFunction · 0.90
executeMethod · 0.90
executeMethod · 0.90
benchmark_writesFunction · 0.90

Calls 2

Tested by

no test coverage detected