You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Allow Feast Spark materialization to use staging for large dataset spill (avoid driver OOM) #5671
Is your feature request related to a problem? Please describe.
When running store.materialize_incremental() with a Spark-based offline store, Feast currently converts Spark DataFrames to Arrow tables using toPandas() or collect().
This loads the entire dataset into driver memory, causing OutOfMemoryError or spark.driver.maxResultSize exceeded for large datasets.
Although Feast already supports a staging configuration for exporting data, it is not yet used during materialization. As a result, large-scale jobs cannot leverage staging to spill data to disk or remote storage.
Describe the solution you'd like
Enable the existing staging configuration to be used for materialization in the Spark offline store.
When enabled, Feast should write intermediate Spark DataFrames to the staging location (e.g. local disk or S3) before reading them back as Arrow tables for online ingestion.
I've reviewed the implementation of the SparkComputeEngine and the new FeastDataFrame (v3).
From what I can see, when using the Spark engine, the entire materialization flow runs fully distributed inside Spark (via SparkWriteNode and mapInArrow), avoiding any .collect() or .toPandas() conversions.
However, when running under LocalComputeEngine (or other non-Spark compute engines), Feast still calls RetrievalJob.to_arrow(), which collects the Spark DataFrame into driver memory before converting it to Arrow.
While this proposal might not be as critical for Spark-based compute engines, it could still be useful for LocalComputeEngine and other future engines that operate in a non-distributed or semi-local mode — helping to reduce OOM risk and improve stability for large dataset
Activity
chimeyrock999 commentedon Oct 16, 2025
I've reviewed the implementation of the
SparkComputeEngineand the newFeastDataFrame (v3).From what I can see, when using the Spark engine, the entire materialization flow runs fully distributed inside Spark (via
SparkWriteNodeandmapInArrow), avoiding any.collect()or.toPandas()conversions.However, when running under
LocalComputeEngine(or other non-Spark compute engines), Feast still callsRetrievalJob.to_arrow(), which collects the Spark DataFrame into driver memory before converting it to Arrow.While this proposal might not be as critical for Spark-based compute engines, it could still be useful for
LocalComputeEngineand other future engines that operate in a non-distributed or semi-local mode — helping to reduce OOM risk and improve stability for large datasetfeat: support staging for spark materialization (feast-dev#5671)
feat: support staging for spark materialization (feast-dev#5671)
feat: support staging for spark materialization (feast-dev#5671)
jfw-ppi commentedon Dec 28, 2025
I implemented a solution, would you be able to review it @chimeyrock999 ?
PR: #5797
feat: support staging for spark materialization ([feast-dev#5671](fea…
feat: support staging for spark materialization (feast-dev#5671)
feat: support staging for spark materialization ([feast-dev#5671](fea…
feat: Support staging for spark materialization (#5671) (#5797)
chore(release): release 0.59.0
chore(release): release 0.59.0
chore(release): release 0.59.0
chore(release): release 0.59.0
feat: Support staging for spark materialization (feast-dev#5671) (fea…
chore(release): release 0.59.0