Wire ComputeEngine.get_historical_features() into the standard retrieval path to replace per-store BFV transformation duplication
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Refactor
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- python, spark
- Domain
- data-engineering, machine-learning
Research direction
Start with sdk/python/feast/infra/passthrough_provider.py and sdk/python/feast/infra/common/retrieval_task.py, then compare ComputeEngine.get_historical_features() with the Ray and Spark offline-store paths. Done means HistoricalRetrievalTask supports multiple views, PIT coordination moves into the compute engine, the provider routes retrieval through batch_engine, and duplicated per-store BFV transformation logic is removed.
Written by the indexing model from the issue text.
Description
Background
Feast currently has two separate mechanisms for applying BatchFeatureView (BFV) transformations during historical feature retrieval:
-
Compute Engine DAG path (SparkComputeEngine.get_historical_features(), RayComputeEngine.get_historical_features()) — uses FeatureBuilder + ExecutionPlan with proper node sequencing: source → transform → filter → dedup. This path already handles BFV transformations correctly for both materialization and retrieval.
-
Offline Store path (passthrough_provider.get_historical_features() → offline_store.get_historical_features()) — the standard path invoked by FeatureStore.get_historical_features(). This path bypasses the compute engine entirely.
Because of this split, each offline store that wants BFV compute-on-read during historical retrieval must re-implement transformation detection and application logic independently:
- RayOfflineStore.get_historical_features() implements it via resolve_feature_view_source_with_fallback() + map_batches()
- PR #6357 adds a parallel implementation for SparkOfflineStore
This means transformation logic is duplicated across stores rather than living in the shared compute engine layer.
Root Cause
passthrough_provider.get_historical_features() always delegates to self.offline_store, never to self.batch_engine:
# sdk/python/feast/infra/passthrough_provider.py
def get_historical_features(self, config, feature_views, ...):
job = self.offline_store.get_historical_features(...) # batch_engine never called
return job
Note the contrast with materialization, which correctly routes through the engine:
jobs = self.batch_engine.materialize(registry, task)
Blocking Interface Mismatch
The compute engine cannot be directly substituted today because of a fundamental impedance mismatch:
- passthrough_provider.get_historical_features() receives feature_views: List[FeatureView] — multiple views for a single multi-view PIT join
- HistoricalRetrievalTask (the compute engine's input) has feature_view: Union[BatchFeatureView, StreamFeatureView] — a single view
# sdk/python/feast/infra/common/retrieval_task.py
@dataclass
class HistoricalRetrievalTask:
feature_view: Union[BatchFeatureView, StreamFeatureView] # singular
entity_df: Union[pd.DataFrame, str]
...
The compute engine is designed for per-view DAG execution. The PIT join logic that combines multiple views into one entity-aligned training dataset lives in each offline store's SQL template, not in the compute engine.
Proposed Solution
This is a multi-step refactor:
Step 1 — Extend HistoricalRetrievalTask to support multiple feature views:
@dataclass
class HistoricalRetrievalTask:
feature_views: List[Union[BatchFeatureView, FeatureView]] # plural
entity_df: Union[pd.DataFrame, str]
feature_refs: List[str]
Step 2 — Move PIT join coordination into ComputeEngine.get_historical_features():
The base ComputeEngine should orchestrate per-view DAG execution across all requested feature views and join the results back to entity_df — making the PIT join logic engine-owned rather than SQL-template-owned.
Step 3 — Wire the provider to call batch_engine for historical retrieval:
# passthrough_provider.py
def get_historical_features(self, config, feature_views, feature_refs, entity_df, ...):
task = HistoricalRetrievalTask(
feature_views=feature_views,
feature_refs=feature_refs,
entity_df=entity_df,
...
)
return self.batch_engine.get_historical_features(registry, task)
Step 4 — Retire per-store transformation logic:
Once the compute engine owns this path, the custom BFV transformation code in RayOfflineStore and SparkOfflineStore can be removed. All stores get transformation support for free through the engine's FeatureBuilder.
- Dominant language
- Python
- Stars
- 7.4k
- Forks
- 1.5k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 107
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from feast-dev/feast
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
BigQuery data quality monitoring fails: PRIMARY KEY placed outside the column list in monitoring table DDLPossibly taken @liron-velocity claimed this 50 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
get_online_features silently drops a join key value when it shares a name with an OnDemandFeatureView's RequestSource fieldPossibly taken @OHMFOHS claimed this 99 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
kind/bug priority/p2
Difficulty 1/5 Under an hour Newbie friendliness 90/100
feast-dev/feast#6778 · 1 comment ·
Maintainers usually reply within 1 day
Similar issues
-
accepted
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
future-agi/future-agi#6392 ·
Maintainers usually reply within 1 day
-
memmapped_arange ignores the start value and drops the last point above the memmap thresholdPossibly taken @prathameshfuke claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
StingraySoftware/HENDRICS#213 ·
-
Bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 2 days
-
bot-triaged module: decompositions module: edge cases module: int overflow module: primTorch oncall: pt2 triage review
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day