Repository navigation
Conversation
…offline store The Dask offline store read every FileSource through dd.read_parquet on the source directory, ignoring file_format=DeltaFormat(). After a Delta overwrite or compaction, data files removed by the transaction log can remain on disk until they are vacuumed, so historical retrieval, materialization pulls, and monitoring reads could return stale or duplicated rows instead of the current snapshot. - Read the Delta snapshot's Arrow dataset: partition values and their types come from the transaction log, an empty snapshot still exposes its columns, and reader features the installed delta-rs reader does not support are rejected instead of being bypassed with a raw Parquet read. Data is read only inside Dask tasks, one fragment per task, and nullable integers keep their pandas dtypes when fragments are assembled. - Treat timezone-naive Delta timestamps and time bounds as UTC when comparing times, in retrieval and monitoring. - compute_monitoring_metrics and get_monitoring_max_timestamp read the current snapshot. A missing Delta table yields no metrics and no max timestamp, while an existing empty snapshot yields zero-row metric summaries and a None max timestamp. - offline_write_batch raises NotImplementedError for DeltaFormat before invoking the Parquet writer, which cannot commit to the Delta transaction log. - Reads reject formats other than Parquet and Delta with NotImplementedError, mirroring the DuckDB offline store. Explicit and default Parquet sources keep their existing paths. - Document the Parquet/Delta read support, the write restriction, and the absolute-path requirement in the Dask offline store reference. Fixes feast-dev#7221 Signed-off-by: Benson LUO <luopengllpp@hotmail.com>
There was a problem hiding this comment.
Devin Review found 1 potential issue.
1 flag not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #7229 +/- ##
==========================================
+ Coverage 54.10% 54.26% +0.16%
==========================================
Files 467 467
Lines 58940 59041 +101
Branches 8688 8712 +24
==========================================
+ Hits 31890 32041 +151
+ Misses 24892 24837 -55
- Partials 2158 2163 +5
... and 1 file with indirect coverage changes Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
Signed-off-by: Benson LUO <luopengllpp@hotmail.com>
haoxu0
left a comment
There was a problem hiding this comment.
LGTM, is it possible to abstract this so that works with other offline store?
sure, no problem |
franciscojavierarceo
left a comment
There was a problem hiding this comment.
we need to address the existing saved-dataset format mismatch before merging. DaskRetrievalJob.persist still writes Parquet for SavedDatasetFileStorage(file_format=DeltaFormat()), while to_data_source preserves that Delta declaration and the new reader requires a transaction log. creation therefore succeeds but retrieval fails; the offline_write_batch guard does not cover this path. we should either persist the declared format or reject Delta storage before writing files, add a create/retrieve regression, and provide recovery guidance for existing Delta-labelled Parquet saved datasets while keeping actual Delta reads snapshot-correct.
DaskRetrievalJob.persist wrote plain Parquet files even when the saved dataset storage declared DeltaFormat, so creation succeeded while retrieval failed: the Dask Delta reader requires a transaction log. Reject DeltaFormat saved-dataset storage before writing anything, and raise a recovery-guidance error when a DeltaFormat source has no Delta transaction log, covering saved datasets that earlier Feast versions wrote as plain Parquet under a Delta declaration. Signed-off-by: Benson LUO <luopengllpp@hotmail.com>
|
Addressed in e61ae61 (saved-dataset format mismatch):
The cross-store read abstraction will follow in a separate proposal. |
What this PR does / why we need it:
The Dask offline store treated
FileSource(file_format=DeltaFormat())as a Parquet directory. After an overwrite or compaction, obsolete data files can remain on disk until vacuuming. Reading those files alongside the active files can return stale or duplicate rows.Noneand metrics for requested columns have zero rows. Retrieval and monitoring interpret timezone-naive Delta timestamps and time bounds as UTC when comparing times.FileSourceraiseNotImplementedErrorbefore invoking the Parquet writer, which cannot commit to a Delta transaction log.DaskRetrievalJob.persistrejectsSavedDatasetFileStorage(file_format=DeltaFormat())before writing anything, so creation can no longer succeed while retrieval later fails on a missing transaction log. Reading a DeltaFormat source without a_delta_lograises a recovery-guidance error that covers saved datasets written as plain Parquet under a Delta declaration by earlier Feast versions.NotImplementedError.Which issue(s) this PR fixes:
Fixes #7221
Checks
git commit -s)Testing Strategy
The seven local Dask unit suites passed (121 cases). The regression tests retain physical files from an overwritten snapshot and verify historical retrieval, latest and all-row pulls, and monitoring. They also cover typed and escaped partitions, nullable integers, empty and missing snapshots, UTC time bounds, unsupported formats and reader features, rejection of Delta writes and DeltaFormat saved-dataset storage, the Parquet saved-dataset round-trip, the recovery guidance for Delta-labelled Parquet directories, and unchanged Parquet reads and writes. S3 option forwarding is tested with mocks; integration tests were not run.
Ruff lint and format checks passed on both changed Python files. A focused mypy comparison on
dask.pyreported the same three diagnostics on the base and the candidate.Misc
/kind bug
Release note: Dask offline reads now honor the current Delta Lake snapshot when using
FileSourcewithDeltaFormatand thefeast[delta]extra. Dask batch writes to Delta tables are not supported, and DeltaFormat saved-dataset storage is rejected at creation.