Problem and business value
Large ingestion and column-enrichment pipelines need to check the fragments they touched and identify failures without repeatedly validating the entire table. Operators also need bounded concurrency and a report identifying the affected snapshot and fragment.
PyLance already provides dataset validation, and users can compose fragment validation with a custom Daft UDF. The missing feature is a supported, read-only daft-lance operation that distributes selected fragment checks and reports their results consistently.
Existing support and upstream primitive
At main 1b1fa3c, daft-lance exports no validation operation and contains no fragment .validate() calls. Its distributed compaction implementation and DatasetOpenContext already provide the planning, worker-reopen, and snapshot-pinning pattern needed here.
Lance v11 exposes LanceFragment.validate() in Python:
lance-format/lance#8428
This checks fragment-level file/metadata consistency, including deletion-vector consistency. It does not repair data, establish application-level correctness, or replace every dataset-wide validation check.
Proposed scope
- Accept a URI or namespace-addressed table and an optional set of fragment IDs. Resolve one dataset version on the driver.
- Enumerate fragment metadata, not a row scan, so empty/fully deleted fragments are not accidentally omitted.
- Reopen the pinned dataset on workers using the existing serializable context; call the native fragment validator with bounded concurrency.
- Produce one report row per selected fragment, including the resolved version, fragment ID, and validation outcome. Keep table-open/authentication failures distinguishable from detected corruption; never silently skip missing fragments.
- Remain read-only: no commits, automatic repairs, or unconditional validation on every write.
The public API name/report shape can be agreed during review. This should reuse Lance's validator, not implement a second one. Document the PyLance version requirement; the current dependency floor still permits v8.
Acceptance criteria
- Healthy multi-fragment datasets, fragments with multiple column files, and deletion-vector cases pass.
- A missing data file or inconsistent fixture is attributed to the correct fragment using fresh worker opens.
- Selecting a subset validates only that subset; empty selections and unknown IDs have explicit behavior.
- Local and distributed execution cover pinned snapshots, namespace reopening, bounded concurrency, and an unchanged dataset version after validation.
- A concurrent append after planning does not change the validation snapshot.
Problem and business value
Large ingestion and column-enrichment pipelines need to check the fragments they touched and identify failures without repeatedly validating the entire table. Operators also need bounded concurrency and a report identifying the affected snapshot and fragment.
PyLance already provides dataset validation, and users can compose fragment validation with a custom Daft UDF. The missing feature is a supported, read-only daft-lance operation that distributes selected fragment checks and reports their results consistently.
Existing support and upstream primitive
At main
1b1fa3c, daft-lance exports no validation operation and contains no fragment.validate()calls. Its distributed compaction implementation andDatasetOpenContextalready provide the planning, worker-reopen, and snapshot-pinning pattern needed here.Lance v11 exposes
LanceFragment.validate()in Python:lance-format/lance#8428
This checks fragment-level file/metadata consistency, including deletion-vector consistency. It does not repair data, establish application-level correctness, or replace every dataset-wide validation check.
Proposed scope
The public API name/report shape can be agreed during review. This should reuse Lance's validator, not implement a second one. Document the PyLance version requirement; the current dependency floor still permits v8.
Acceptance criteria