Repository navigation
[Data] [3/4] Skip checkpointed files, row groups and rows on the V2 read path - #65887
Closed
abhishekverma-ray wants to merge 3 commits into
Closed
abhishekverma-ray wants to merge 3 commits into
abhishekverma-ray wants to merge 3 commits into
Conversation
abhishekverma-ray
requested review from
goutamvenkat-anyscale,
owenowenisme and
xinyuangui2
September 3, 2026 08:30
abhishekverma-ray
force-pushed
the
rg-chkpt-3-list-read-skip
branch
2 times, most recently
from
September 4, 2026 04:48
a1527a7 to
6943537
Compare
abhishekverma-ray
force-pushed
the
rg-chkpt-3-list-read-skip
branch
from
September 11, 2026 02:52
6943537 to
54bb094
Compare
…heckpoint load Ports the generated-ID checkpoint load path from RayTurbo: - generated_id.py gains the compact checkpoint table schema (checkpointed_file, checkpointed_file_fragments struct) and its consumers: parse_checkpointed_fragment_info / exclude_checkpointed_rows (read-time row filtering) and index/lookup helpers (list-time file skipping). Semantics: never-seen file has no row (null struct); a fully committed row group stores an empty mask list; a partial row group stores a dense boolean mask. Struct fields are always resolved by name because Parquet round-trips don't preserve struct field order. - CheckpointManager.load_checkpoint is refactored around a shared _load_checkpoint_block (clean pending 2PC leftovers first, read committed IDs, preprocess, repartition to one block). GeneratedIdColumnCheckpointManager overrides the preprocess hook to compact raw struct IDs (hash-shuffle groupby file -> one row per file, sorted by path) and exposes load_checkpoint_as_block, since the numpy-based actor-pool filter can't consume struct IDs. - LoadCheckpointCallback loads the compact block before execution for generated-ID configs and exposes load_checkpoint() for the upcoming ListFiles kwarg injection; delete-on-success is unchanged for both paths and failures still leave pending files as the recovery record. Signed-off-by: Abhishek Verma <[email protected]>
…eckpointing Threads the compact generated-ID checkpoint block through the V2 listing stack: - FileManifest gains an optional __file_fragments_checkpoint column (the per-file compact checkpoint struct; null = file never checkpointed), kept as an Arrow column so struct scalars survive. concat/shuffle are whole-block operations and preserve it for free. - Both indexers accept checkpoint_ids: fully-checkpointed files are dropped before chunking (and, on the footer path, before footer reads, so their footers are never fetched on resume); surviving rows are stamped with their file's checkpoint struct. - The partitioners (RoundRobinPartitioner, OnlineBinPacker) carry the column through manifest reconstruction so bin-packing can't drop it. - ListFiles tasks read the block from ctx.kwargs; plan_list_files_op_with_checkpoint_filter attaches it lazily via MapOperator.add_map_task_kwargs_fn since the block is only loaded by LoadCheckpointCallback at execution start. (Planner routing to this plan fn lands in the follow-up commit.) Signed-off-by: Abhishek Verma <[email protected]>
With generated-ID checkpointing, _get_fragments_to_read resolves each row-group sub-fragment against the manifest's compact checkpoint struct: fully-checkpointed row groups are dropped before any scan, and partially checkpointed ones carry their CheckpointedFragmentInfo in a widened (fragment, offset, info) tuple consumed by the _read_fragments_sequential override. Committed rows are excluded AFTER the ID column is attached (offsets counted on pre-filter batch sizes), so row_id assignment is identical whether or not a resume is filtering — the invariant that makes checkpoints written by one run addressable by the next. Signed-off-by: Abhishek Verma <[email protected]>
abhishekverma-ray
force-pushed
the
rg-chkpt-3-list-read-skip
branch
from
September 11, 2026 17:08
54bb094 to
b7bea64
Compare
goutamvenkat-anyscale
pushed a commit
that referenced
this pull request
Sep 19, 2026
…arquet datasources (#66066) ## Description Second PR of the DSv2 Reorg series (`[0/6]` … `[6/6]`), stacked on #66244 (`[0/6]`); the diff shows both until that one merges. `_read_datasource_v2` in `read_api.py` reads four attributes and calls one method that `DataSourceV2` never declared. Parquet defines them all, so it worked; any other datasource that implemented only the abstract methods failed with `AttributeError` inside the read code. After this PR, implementing the abstract members of `DataSourceV2` is enough for a new datasource to work end to end, and a missing one is reported at construction. No behavior change for Parquet. ```mermaid flowchart LR R[read_api._read_datasource_v2] -->|reads paths, filesystem, file_extensions, shuffle; calls _get_file_indexer| D[DataSourceV2 base class] D -->|abstract: paths, filesystem, _get_file_indexer| S[new datasource subclass] D -->|default None: file_extensions, shuffle| S ``` ### Changes 1. Declare everything the read code uses on `DataSourceV2`: `paths`, `filesystem`, `_get_file_indexer` abstract; `file_extensions`, `shuffle` default `None`. 2. `filesystem` may be `None`, for sources that read through their own library (PyIceberg, Lance, hudi-rs). 3. `FileScanner.prune_manifest` → `Scanner.prune_input_split`, so partition pruning runs for every scanner, not only `FileScanner` subclasses. 4. `FileIndexer` docstring updated for the per-file listing contract left after #66244. ## Additional information Not a duplicate: no open PR changes the `DataSourceV2` base class. #65887 and #65888 also touch `file_indexer.py` / `listing_utils.py`, so expect small merge conflicts there. Tests run locally from this branch (macOS, `~/ray/.venv`), from `python/ray/data`: ``` pytest -q tests/unit/datasource_v2 # 119 passed pytest -q tests/datasource/test_read_parquet_v2.py # 37 passed pytest -q tests/datasource/test_parquet.py # 246 passed, 13 skipped, 34 errors ``` The 34 errors are moto `s3_fs` fixture setup errors (`moto_server` not on PATH), identical on master. `ruff`, `black` and `pydoclint` at the pre-commit pins are clean; `pyrefly` reports the same pre-existing errors as the base commit. Written with Claude Code; I reviewed every changed line and ran the tests above. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: Aarrya <[email protected]> Co-authored-by: Claude Fable 5.1 <[email protected]>
goutamvenkat-anyscale
pushed a commit
that referenced
this pull request
Sep 23, 2026
…sh flags with SynthesizedColumn objects (#66390) ## Description `include_paths=True` adds a `path` column to every row and `include_row_hash=True` adds `row_hash`. Each is a boolean threaded through `ParquetDatasourceV2` → `ParquetScanner` → `ParquetFileReader` → `FileReader`, and each boolean drives the same steps written out by hand: advertise the column in the schema, keep pyarrow from looking for it in the file, skip it when a projection dropped it, build it per batch, and (for `row_hash`) scan one row group at a time so the value can depend on the row's position. The checkpointing work (#65885, reverted; #65887) needs a third such column and added a third boolean plus a 130-line copy of the read loop. This PR replaces the booleans with `SynthesizedColumn` objects. The reader does the steps once for whatever columns it is given; a new column is a small class and touches no reader code. ### What changes 1. **`readers/synthesized_columns.py` (new).** `SynthesizedColumn` with `name`, `type`, `requires_read_unit_boundaries` and `compute(position, num_rows)`; `ReadUnitPosition` (the read unit a table of rows came from plus its row offsets); `PathColumn` and `RowHashColumn`. `_compute_row_hashes` and the two column-name constants move here from `file_reader.py`, which re-exports them for the legacy datasource. 2. **`read_units.py` (new).** `ReadUnit`: the piece of a file a reader scans on its own, a row group or a whole file, with a stable id (`<path>#rg<i>`), its index, the file's group count and its row count. This is what a checkpoint ID column needs to name a row. 3. **`parquet_datasource_v2.py`.** The two flags become a tuple of column objects; `infer_schema` appends each column's name and type in one loop. The unused `include_paths` property is gone. 4. **`scanners/parquet_scanner.py`.** One `synthesized_columns` field replaces the two booleans; `read_schema` loops over it with the same skip rules. 5. **`readers/file_reader.py`.** Constructor takes the tuple. The pyarrow schema strips the configured column names. `_get_fragments_to_read` returns `(fragment, ReadUnit, file_row_offset)` and the read loop yields `(table, ReadUnitPosition)`. The `row_hash` block becomes a loop over the columns; the `path` line leaves the partition block because `PathColumn` goes through the same loop. 6. **`readers/parquet_file_reader.py`** and **`chunkers/parquet_file_chunking_utils.py`.** Per-row-group fan-out is keyed on "any column requires boundaries" instead of `include_row_hash`, and each sub-fragment comes back with its `ReadUnit`. Same footer read, same condition. 7. **Tests.** `tests/unit/datasource_v2/test_synthesized_columns.py` (new): fan-out is one unit per file unless a column needs boundaries, a whole-file manifest row stays one unit, `row_hash` is identical whole-file vs per-row-group, a same-named file column is replaced, `read_schema` respects projection. Three asserts in `test_parquet_datasource_v2.py` updated. ### Before / after: adding a column Before, #65885 added `generated_id_column` as a third boolean: +160 lines across four `datasource_v2` files, 129 of them a `ParquetFileReader` override duplicating `_read_fragments_sequential`. After, the same column is one class next to `RowHashColumn` and no reader change: ```python class CheckpointIdColumn(SynthesizedColumn): name = ...; type = GENERATED_ID_COLUMN_TYPE requires_read_unit_boundaries = True def compute(self, position, num_rows): u = position.unit return get_generated_id_column(u.source, u.index, u.count, u.num_rows, position.unit_row_offset, num_rows) ``` ### Behavior Row order, appended-column order (partitions, `path`, `row_hash`), the row-hash arithmetic, retry scoping and the fan-out condition are unchanged. One intended fix: for a file that already has a non-string column named `path`, read with `include_paths=True`, `ds.schema()` now says `path: string`, which is what the blocks always carried. Related to that, the schema handed to pyarrow strips `path` only when `PathColumn` is configured, where it used to strip it unconditionally. ## Additional information Not a duplicate: no open PR introduces column objects or read units. #65887 (checkpoint skipping) edits the same reader files with its own booleans; this PR is the seam that work can move onto. #65989 (mine) is about predicates naming a synthesized column and is independent. Checks run locally from this branch (macOS, `~/ray/.venv`): ``` pytest -q tests/unit/datasource_v2 # 133 passed ``` `ruff`, `black` and `pydoclint` at the pre-commit pins are clean; `pyrefly` via `ci/lint/pyrefly-check.sh` reports 59 errors against 61 on the base, none new. Written with Claude Code; I reviewed every changed line and ran the tests above. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: Aarrya <[email protected]> Co-authored-by: Claude Fable 5.1 <[email protected]>
goutamvenkat-anyscale
pushed a commit
that referenced
this pull request
Sep 24, 2026
…checkpoint already finished (#66398) ## Description A resumed job knows which read units it already finished: the reader stamps every row with its `ReadUnit.id` (#66390), so a checkpoint of the committed rows names them. Today the only place that knowledge could be applied is the read task, after `ListFiles` has read every footer and the partitioner has packed every row group into tasks. That re-reads footers of finished files and leaves a resumed job with one near-empty task per touched file. This PR gives `ListFiles` a single input, the set of finished read unit ids, and drops those units at the earliest point that knows about them. Nothing in this PR performs checkpointing; it is the hook the checkpoint stack (#65887) plugs into. ### What changes 1. **`read_units.py`.** `EXCLUDED_READ_UNIT_IDS_KWARG_NAME`, the `TaskContext.kwargs` key a resumed job sets on the `ListFiles` operator (`MapOperator.create(map_task_kwargs=...)`). Module docstring says how the ids flow. 2. **`listing/listing_utils.py`.** `list_files_for_each_block` reads the set from `ctx.kwargs` and passes it to `FileIndexer.list_files`. 3. **`listing/file_indexer.py`.** `list_files` and `_iter_file_infos_for_list` take `excluded_read_unit_ids`. A file whose path is in the set is dropped right after path discovery, before any metadata fetch, so a footer-based indexer never opens it. Ids that name nothing are ignored. 4. **`listing/footer_file_indexer.py`.** Forwards the set to the `FooterReader` actors after the whole-file drop. 5. **`listing/footer_reader.py`.** `_read_and_chunk` removes row groups named `<path>#rg<N>` before the predicate split and before rows are counted toward a pushed-down limit, so a resumed job neither re-reads them nor stops listing early on their account. 6. **`chunkers/parquet_file_chunking_utils.py`.** `_row_group_unit_id(path, rg)` is the one place that spells the row-group id; the chunker and the footer reader both call it. 7. **Tests.** `tests/unit/datasource_v2/test_read_units.py` (new): ids the reader reports round-trip through the footer reader; unknown ids are ignored and a finished file drops; exclusion happens before predicate and limit accounting; the plain indexer skips whole files by path; the footer indexer skips whole files before any footer read and forwards row-group ids; the listing task forwards the set from `ctx.kwargs`; excluding at listing time packs only the remaining work. One mock in `test_parquet_datasource_v2.py` accepts the new keyword. ### Before / after: resuming at 90% done 20 files of 4 row groups each, bins sized to one file. A resume with every row group finished except the last of the first 8 files (from `test_excluding_units_at_listing_time_packs_only_remaining_work`): | | footers read | read tasks | | --- | --- | --- | | Exclusion in the read task (today's only option) | 20 | 20, of which 12 empty and 8 at a quarter of a file | | Exclusion in listing (this PR) | 8 | 2 full bins | ### Behavior With no excluded ids nothing changes: `excluded_read_unit_ids` defaults to `None` at every layer and the footer reader's row-group range is the same `range(metadata.num_row_groups)` as before. ## Additional information Not a duplicate: #65887 (checkpoint stack, `[3/4]`) drops finished files and row groups with its own per-file compact block threaded through the same indexer and reader; this PR is the general hook, keyed on `ReadUnit.id`, that work can call instead. No other open PR touches listing-time exclusion. Checks run locally from this branch (macOS, `~/ray/.venv`): ``` pytest -q tests/unit/datasource_v2 # 140 passed ``` `ruff`, `black` and `pydoclint` at the pre-commit pins are clean; `pyrefly` via `ci/lint/pyrefly-check.sh` reports 59 errors, identical to the `[3/6]` head, none new. Written with Claude Code; I reviewed every changed line and ran the tests above. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: Aarrya <[email protected]> Co-authored-by: Claude Fable 5.1 <[email protected]>
|
This pull request has been automatically marked as stale because it has not had You can always ask for help on our discussion forum or Ray's public slack channel. If you'd like to keep this open, just leave any comment, and the stale label will be removed. |
goutamvenkat-anyscale
pushed a commit
that referenced
this pull request
Oct 1, 2026
…mat with one `FileChunk` type for run metadata (#66577) ## Description Last PR of the DSv2 Reorg series. Three changes, two types: 1. **`OnlineBinPacker` packs any file, not just Parquet.** It read and wrote `ParquetRowGroupChunkMetadata`, so only the Parquet footer indexer could feed it. It now works on a format-neutral row: "this file's units 3-5, N rows, S bytes", where a unit is whatever a format's reader can scan on its own (a Parquet row group today, a CSV byte range or a Lance fragment tomorrow). The packer only sums `size_bytes` against its budget and never asks what the number measures; the indexer that writes the row decides. The packing arithmetic is unchanged. 2. **One dataclass for "a run of units" instead of four look-alikes.** `RowGroupInfo` (footer reader and coalescer), `ParquetRowGroupChunkMetadata` (manifest row), the copied fields on the packer's `BinItem`, and the `create_chunk_metadata` helper that built the row all carried the same ids / rows / bytes / per-unit tuples under different names. They collapse into one frozen `FileChunk` in `interfaces/file_manifest.py`, with `to_metadata()` / `from_metadata()` for the manifest's `__file_chunk_metadata` column. (Named `UnitRun` in the first draft; renamed per review because it read too close to `ReadUnit`.) 3. **One shape for "a file and its size" from listing to packer.** `FileInfo(path, size)` already existed in `interfaces/file_indexer.py`, but the listing helpers passed `(path, size)` tuples, `OrderedFileResult` carried the path twice, the footer actor took `list[tuple[str, int]]`, its result `FileChunks` had its own `path`/`size`, and the packer's `BinItem` had its own `path`/`size_bytes`. All of them now carry a `FileInfo`. An indexer author emits one type; a reviewer checks no conversions. **Cost of the unified types.** Measured with `pympler.asizeof` on Python 3.12, same 45-character path for old and new. A single-row-group run is 888 bytes as a `FileChunk` versus 920 as a `RowGroupInfo`; a three-group coalesced run is 1120 versus 1072. A `BinItem` is 1888 bytes versus 1416 for the old flat `BinItem(path, size_bytes, run)`: the extra ~470 bytes is the `FileInfo` instance it now points at instead of copying its two fields. `BinItem`s are transient packing state, bounded by the open bins, so this is a few hundred bytes per in-flight item. The manifest's Arrow column is unchanged at 36 bytes per row, because the struct has the same fields under new names. ### What changes 1. **`interfaces/file_manifest.py`.** New `FileChunk(unit_ids, num_rows, size_bytes, fully_matched=True, unit_sizes=(), unit_rows=())` with `to_metadata()` / `from_metadata()`; `__post_init__` asserts a per-unit breakdown is empty or one entry per unit. `create_chunk_metadata` and its `TypeVar` are removed; the empty `ChunkMetadata` `TypedDict` becomes a `Dict[str, Any]` alias, since a row's chunk metadata is now always `None` or `FileChunk.to_metadata()`. 2. **`formats/parquet/`.** `parquet_footer_types.py` is deleted: `RowGroupInfo` and `ParquetRowGroupChunkMetadata` are gone, and the one survivor, `FileChunks` → `ChunkedFile(file: FileInfo, row_groups: Tuple[FileChunk, ...])`, moves next to the `FooterReader` that builds it. `footer_reader.py` builds one `FileChunk` per row group and `_read_and_chunk` / `read_footers` take `FileInfo`; `parquet_row_group_coalescing.py` merges with `dataclasses.replace`; `footer_file_indexer.py` emits `run.to_metadata()` via `_chunked_file_to_manifest` with `size_bytes` = the run's projection-scoped uncompressed size, as before. `parquet_file_reader.py` reads `unit_ids` and `size_bytes`, and drops the `"uncompressed_size" in chunk` key check, since a non-`None` row always has the keys now. Docstrings in `parquet_file_chunking_utils.py` follow. 3. **`common/indexing_utils.py`, `common/non_sampling_file_indexer.py`.** `PathContents.files` and `_get_file_infos` produce `FileInfo`; `OrderedFileResult` loses its duplicate `file_path`. 4. **`common/online_bin_packer.py`.** `BinItem(file: FileInfo, run: Optional[FileChunk])`, with `size_bytes` a property (the run's bytes, else the file size); `run is None` is a whole-file row. Splitting a run slices the `FileChunk`; a sealed bin merges a file's runs back into one `FileChunk` row. `Bin.total_uncompressed_size` → `total_bytes`. Two behaviour details: a whole-file row now comes out of the packer as a whole-file row again (it used to come out claiming `row_group_ids=(0,)`), and every packed row keeps the on-disk `__file_size` the listing gave it (a chunk row used to carry the run's bytes there; nothing reads `__file_size` after the packer). 5. **README.** One paragraph under "Adding a format": an indexer that lists `FileChunk` rows can hand them to `OnlineBinPacker` as they are. 6. **Tests.** `test_online_bin_packer.py` builds rows directly and imports nothing from `formats/`; its `coalesce_row_groups` cases move verbatim to a new `test_parquet_row_group_coalescing.py`, since they are Parquet's; two tests added (whole-file rows, on-disk size kept). `test_chunk_metadata.py` becomes a `FileChunk` round-trip and invariant test. `FileInfo` / renamed fields in `test_footer_reader.py`, `test_read_units.py`, `test_synthesized_columns.py`, `test_parquet_datasource_v2.py`, `test_file_indexer.py` and `tests/datasource/test_read_parquet_v2.py`. ## Additional information Not a duplicate: no open PR generalises the packer's row or unifies the listing types. #66121 and #65887 both touch these files under the pre-#66497 paths and will need a rebase either way; #66121 adds a second size field to the old Parquet row; on this PR it needs no new field, since `size_bytes` is whatever the indexer records and the decoded-or-fallback choice belongs in the footer indexer's `_chunked_file_to_manifest`. Its footer-indexer changes will see `ChunkedFile.file.path` and `read_footers(list[FileInfo])` rather than tuples. Checks run locally from this branch (macOS, `~/ray/.venv`): ``` pytest -q python/ray/data/tests/unit/datasource_v2 \ python/ray/data/tests/datasource_v2/test_footer_reader.py # 193 passed pytest -q python/ray/data/tests/datasource/test_read_parquet_v2.py # 37 passed ``` `ruff`, `black` and `pydoclint` at the pre-commit pins are clean on every changed file; `pyrefly` 0.51.0 with `pyarrow==24.0.0` reports no errors in the changed files. `grep -r datasource_v2.formats interfaces/ common/` is empty. Written with Claude Code; I reviewed every changed line and ran the tests above. Signed-off-by: Aarrya <[email protected]> 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: Aarrya <[email protected]> Co-authored-by: Claude Fable 5.1 <[email protected]>
3 tasks done
Contributor
Author
nadongjun
pushed a commit
to nadongjun/ray
that referenced
this pull request
Oct 6, 2026
…arquet datasources (ray-project#66066) ## Description Second PR of the DSv2 Reorg series (`[0/6]` … `[6/6]`), stacked on ray-project#66244 (`[0/6]`); the diff shows both until that one merges. `_read_datasource_v2` in `read_api.py` reads four attributes and calls one method that `DataSourceV2` never declared. Parquet defines them all, so it worked; any other datasource that implemented only the abstract methods failed with `AttributeError` inside the read code. After this PR, implementing the abstract members of `DataSourceV2` is enough for a new datasource to work end to end, and a missing one is reported at construction. No behavior change for Parquet. ```mermaid flowchart LR R[read_api._read_datasource_v2] -->|reads paths, filesystem, file_extensions, shuffle; calls _get_file_indexer| D[DataSourceV2 base class] D -->|abstract: paths, filesystem, _get_file_indexer| S[new datasource subclass] D -->|default None: file_extensions, shuffle| S ``` ### Changes 1. Declare everything the read code uses on `DataSourceV2`: `paths`, `filesystem`, `_get_file_indexer` abstract; `file_extensions`, `shuffle` default `None`. 2. `filesystem` may be `None`, for sources that read through their own library (PyIceberg, Lance, hudi-rs). 3. `FileScanner.prune_manifest` → `Scanner.prune_input_split`, so partition pruning runs for every scanner, not only `FileScanner` subclasses. 4. `FileIndexer` docstring updated for the per-file listing contract left after ray-project#66244. ## Additional information Not a duplicate: no open PR changes the `DataSourceV2` base class. ray-project#65887 and ray-project#65888 also touch `file_indexer.py` / `listing_utils.py`, so expect small merge conflicts there. Tests run locally from this branch (macOS, `~/ray/.venv`), from `python/ray/data`: ``` pytest -q tests/unit/datasource_v2 # 119 passed pytest -q tests/datasource/test_read_parquet_v2.py # 37 passed pytest -q tests/datasource/test_parquet.py # 246 passed, 13 skipped, 34 errors ``` The 34 errors are moto `s3_fs` fixture setup errors (`moto_server` not on PATH), identical on master. `ruff`, `black` and `pydoclint` at the pre-commit pins are clean; `pyrefly` reports the same pre-existing errors as the base commit. Written with Claude Code; I reviewed every changed line and ran the tests above. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: Aarrya <[email protected]> Co-authored-by: Claude Fable 5.1 <[email protected]>
nadongjun
pushed a commit
to nadongjun/ray
that referenced
this pull request
Oct 6, 2026
…sh flags with SynthesizedColumn objects (ray-project#66390) ## Description `include_paths=True` adds a `path` column to every row and `include_row_hash=True` adds `row_hash`. Each is a boolean threaded through `ParquetDatasourceV2` → `ParquetScanner` → `ParquetFileReader` → `FileReader`, and each boolean drives the same steps written out by hand: advertise the column in the schema, keep pyarrow from looking for it in the file, skip it when a projection dropped it, build it per batch, and (for `row_hash`) scan one row group at a time so the value can depend on the row's position. The checkpointing work (ray-project#65885, reverted; ray-project#65887) needs a third such column and added a third boolean plus a 130-line copy of the read loop. This PR replaces the booleans with `SynthesizedColumn` objects. The reader does the steps once for whatever columns it is given; a new column is a small class and touches no reader code. ### What changes 1. **`readers/synthesized_columns.py` (new).** `SynthesizedColumn` with `name`, `type`, `requires_read_unit_boundaries` and `compute(position, num_rows)`; `ReadUnitPosition` (the read unit a table of rows came from plus its row offsets); `PathColumn` and `RowHashColumn`. `_compute_row_hashes` and the two column-name constants move here from `file_reader.py`, which re-exports them for the legacy datasource. 2. **`read_units.py` (new).** `ReadUnit`: the piece of a file a reader scans on its own, a row group or a whole file, with a stable id (`<path>#rg<i>`), its index, the file's group count and its row count. This is what a checkpoint ID column needs to name a row. 3. **`parquet_datasource_v2.py`.** The two flags become a tuple of column objects; `infer_schema` appends each column's name and type in one loop. The unused `include_paths` property is gone. 4. **`scanners/parquet_scanner.py`.** One `synthesized_columns` field replaces the two booleans; `read_schema` loops over it with the same skip rules. 5. **`readers/file_reader.py`.** Constructor takes the tuple. The pyarrow schema strips the configured column names. `_get_fragments_to_read` returns `(fragment, ReadUnit, file_row_offset)` and the read loop yields `(table, ReadUnitPosition)`. The `row_hash` block becomes a loop over the columns; the `path` line leaves the partition block because `PathColumn` goes through the same loop. 6. **`readers/parquet_file_reader.py`** and **`chunkers/parquet_file_chunking_utils.py`.** Per-row-group fan-out is keyed on "any column requires boundaries" instead of `include_row_hash`, and each sub-fragment comes back with its `ReadUnit`. Same footer read, same condition. 7. **Tests.** `tests/unit/datasource_v2/test_synthesized_columns.py` (new): fan-out is one unit per file unless a column needs boundaries, a whole-file manifest row stays one unit, `row_hash` is identical whole-file vs per-row-group, a same-named file column is replaced, `read_schema` respects projection. Three asserts in `test_parquet_datasource_v2.py` updated. ### Before / after: adding a column Before, ray-project#65885 added `generated_id_column` as a third boolean: +160 lines across four `datasource_v2` files, 129 of them a `ParquetFileReader` override duplicating `_read_fragments_sequential`. After, the same column is one class next to `RowHashColumn` and no reader change: ```python class CheckpointIdColumn(SynthesizedColumn): name = ...; type = GENERATED_ID_COLUMN_TYPE requires_read_unit_boundaries = True def compute(self, position, num_rows): u = position.unit return get_generated_id_column(u.source, u.index, u.count, u.num_rows, position.unit_row_offset, num_rows) ``` ### Behavior Row order, appended-column order (partitions, `path`, `row_hash`), the row-hash arithmetic, retry scoping and the fan-out condition are unchanged. One intended fix: for a file that already has a non-string column named `path`, read with `include_paths=True`, `ds.schema()` now says `path: string`, which is what the blocks always carried. Related to that, the schema handed to pyarrow strips `path` only when `PathColumn` is configured, where it used to strip it unconditionally. ## Additional information Not a duplicate: no open PR introduces column objects or read units. ray-project#65887 (checkpoint skipping) edits the same reader files with its own booleans; this PR is the seam that work can move onto. ray-project#65989 (mine) is about predicates naming a synthesized column and is independent. Checks run locally from this branch (macOS, `~/ray/.venv`): ``` pytest -q tests/unit/datasource_v2 # 133 passed ``` `ruff`, `black` and `pydoclint` at the pre-commit pins are clean; `pyrefly` via `ci/lint/pyrefly-check.sh` reports 59 errors against 61 on the base, none new. Written with Claude Code; I reviewed every changed line and ran the tests above. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: Aarrya <[email protected]> Co-authored-by: Claude Fable 5.1 <[email protected]>
nadongjun
pushed a commit
to nadongjun/ray
that referenced
this pull request
Oct 6, 2026
…checkpoint already finished (ray-project#66398) ## Description A resumed job knows which read units it already finished: the reader stamps every row with its `ReadUnit.id` (ray-project#66390), so a checkpoint of the committed rows names them. Today the only place that knowledge could be applied is the read task, after `ListFiles` has read every footer and the partitioner has packed every row group into tasks. That re-reads footers of finished files and leaves a resumed job with one near-empty task per touched file. This PR gives `ListFiles` a single input, the set of finished read unit ids, and drops those units at the earliest point that knows about them. Nothing in this PR performs checkpointing; it is the hook the checkpoint stack (ray-project#65887) plugs into. ### What changes 1. **`read_units.py`.** `EXCLUDED_READ_UNIT_IDS_KWARG_NAME`, the `TaskContext.kwargs` key a resumed job sets on the `ListFiles` operator (`MapOperator.create(map_task_kwargs=...)`). Module docstring says how the ids flow. 2. **`listing/listing_utils.py`.** `list_files_for_each_block` reads the set from `ctx.kwargs` and passes it to `FileIndexer.list_files`. 3. **`listing/file_indexer.py`.** `list_files` and `_iter_file_infos_for_list` take `excluded_read_unit_ids`. A file whose path is in the set is dropped right after path discovery, before any metadata fetch, so a footer-based indexer never opens it. Ids that name nothing are ignored. 4. **`listing/footer_file_indexer.py`.** Forwards the set to the `FooterReader` actors after the whole-file drop. 5. **`listing/footer_reader.py`.** `_read_and_chunk` removes row groups named `<path>#rg<N>` before the predicate split and before rows are counted toward a pushed-down limit, so a resumed job neither re-reads them nor stops listing early on their account. 6. **`chunkers/parquet_file_chunking_utils.py`.** `_row_group_unit_id(path, rg)` is the one place that spells the row-group id; the chunker and the footer reader both call it. 7. **Tests.** `tests/unit/datasource_v2/test_read_units.py` (new): ids the reader reports round-trip through the footer reader; unknown ids are ignored and a finished file drops; exclusion happens before predicate and limit accounting; the plain indexer skips whole files by path; the footer indexer skips whole files before any footer read and forwards row-group ids; the listing task forwards the set from `ctx.kwargs`; excluding at listing time packs only the remaining work. One mock in `test_parquet_datasource_v2.py` accepts the new keyword. ### Before / after: resuming at 90% done 20 files of 4 row groups each, bins sized to one file. A resume with every row group finished except the last of the first 8 files (from `test_excluding_units_at_listing_time_packs_only_remaining_work`): | | footers read | read tasks | | --- | --- | --- | | Exclusion in the read task (today's only option) | 20 | 20, of which 12 empty and 8 at a quarter of a file | | Exclusion in listing (this PR) | 8 | 2 full bins | ### Behavior With no excluded ids nothing changes: `excluded_read_unit_ids` defaults to `None` at every layer and the footer reader's row-group range is the same `range(metadata.num_row_groups)` as before. ## Additional information Not a duplicate: ray-project#65887 (checkpoint stack, `[3/4]`) drops finished files and row groups with its own per-file compact block threaded through the same indexer and reader; this PR is the general hook, keyed on `ReadUnit.id`, that work can call instead. No other open PR touches listing-time exclusion. Checks run locally from this branch (macOS, `~/ray/.venv`): ``` pytest -q tests/unit/datasource_v2 # 140 passed ``` `ruff`, `black` and `pydoclint` at the pre-commit pins are clean; `pyrefly` via `ci/lint/pyrefly-check.sh` reports 59 errors, identical to the `[3/6]` head, none new. Written with Claude Code; I reviewed every changed line and ran the tests above. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: Aarrya <[email protected]> Co-authored-by: Claude Fable 5.1 <[email protected]>
nadongjun
pushed a commit
to nadongjun/ray
that referenced
this pull request
Oct 6, 2026
…mat with one `FileChunk` type for run metadata (ray-project#66577) ## Description Last PR of the DSv2 Reorg series. Three changes, two types: 1. **`OnlineBinPacker` packs any file, not just Parquet.** It read and wrote `ParquetRowGroupChunkMetadata`, so only the Parquet footer indexer could feed it. It now works on a format-neutral row: "this file's units 3-5, N rows, S bytes", where a unit is whatever a format's reader can scan on its own (a Parquet row group today, a CSV byte range or a Lance fragment tomorrow). The packer only sums `size_bytes` against its budget and never asks what the number measures; the indexer that writes the row decides. The packing arithmetic is unchanged. 2. **One dataclass for "a run of units" instead of four look-alikes.** `RowGroupInfo` (footer reader and coalescer), `ParquetRowGroupChunkMetadata` (manifest row), the copied fields on the packer's `BinItem`, and the `create_chunk_metadata` helper that built the row all carried the same ids / rows / bytes / per-unit tuples under different names. They collapse into one frozen `FileChunk` in `interfaces/file_manifest.py`, with `to_metadata()` / `from_metadata()` for the manifest's `__file_chunk_metadata` column. (Named `UnitRun` in the first draft; renamed per review because it read too close to `ReadUnit`.) 3. **One shape for "a file and its size" from listing to packer.** `FileInfo(path, size)` already existed in `interfaces/file_indexer.py`, but the listing helpers passed `(path, size)` tuples, `OrderedFileResult` carried the path twice, the footer actor took `list[tuple[str, int]]`, its result `FileChunks` had its own `path`/`size`, and the packer's `BinItem` had its own `path`/`size_bytes`. All of them now carry a `FileInfo`. An indexer author emits one type; a reviewer checks no conversions. **Cost of the unified types.** Measured with `pympler.asizeof` on Python 3.12, same 45-character path for old and new. A single-row-group run is 888 bytes as a `FileChunk` versus 920 as a `RowGroupInfo`; a three-group coalesced run is 1120 versus 1072. A `BinItem` is 1888 bytes versus 1416 for the old flat `BinItem(path, size_bytes, run)`: the extra ~470 bytes is the `FileInfo` instance it now points at instead of copying its two fields. `BinItem`s are transient packing state, bounded by the open bins, so this is a few hundred bytes per in-flight item. The manifest's Arrow column is unchanged at 36 bytes per row, because the struct has the same fields under new names. ### What changes 1. **`interfaces/file_manifest.py`.** New `FileChunk(unit_ids, num_rows, size_bytes, fully_matched=True, unit_sizes=(), unit_rows=())` with `to_metadata()` / `from_metadata()`; `__post_init__` asserts a per-unit breakdown is empty or one entry per unit. `create_chunk_metadata` and its `TypeVar` are removed; the empty `ChunkMetadata` `TypedDict` becomes a `Dict[str, Any]` alias, since a row's chunk metadata is now always `None` or `FileChunk.to_metadata()`. 2. **`formats/parquet/`.** `parquet_footer_types.py` is deleted: `RowGroupInfo` and `ParquetRowGroupChunkMetadata` are gone, and the one survivor, `FileChunks` → `ChunkedFile(file: FileInfo, row_groups: Tuple[FileChunk, ...])`, moves next to the `FooterReader` that builds it. `footer_reader.py` builds one `FileChunk` per row group and `_read_and_chunk` / `read_footers` take `FileInfo`; `parquet_row_group_coalescing.py` merges with `dataclasses.replace`; `footer_file_indexer.py` emits `run.to_metadata()` via `_chunked_file_to_manifest` with `size_bytes` = the run's projection-scoped uncompressed size, as before. `parquet_file_reader.py` reads `unit_ids` and `size_bytes`, and drops the `"uncompressed_size" in chunk` key check, since a non-`None` row always has the keys now. Docstrings in `parquet_file_chunking_utils.py` follow. 3. **`common/indexing_utils.py`, `common/non_sampling_file_indexer.py`.** `PathContents.files` and `_get_file_infos` produce `FileInfo`; `OrderedFileResult` loses its duplicate `file_path`. 4. **`common/online_bin_packer.py`.** `BinItem(file: FileInfo, run: Optional[FileChunk])`, with `size_bytes` a property (the run's bytes, else the file size); `run is None` is a whole-file row. Splitting a run slices the `FileChunk`; a sealed bin merges a file's runs back into one `FileChunk` row. `Bin.total_uncompressed_size` → `total_bytes`. Two behaviour details: a whole-file row now comes out of the packer as a whole-file row again (it used to come out claiming `row_group_ids=(0,)`), and every packed row keeps the on-disk `__file_size` the listing gave it (a chunk row used to carry the run's bytes there; nothing reads `__file_size` after the packer). 5. **README.** One paragraph under "Adding a format": an indexer that lists `FileChunk` rows can hand them to `OnlineBinPacker` as they are. 6. **Tests.** `test_online_bin_packer.py` builds rows directly and imports nothing from `formats/`; its `coalesce_row_groups` cases move verbatim to a new `test_parquet_row_group_coalescing.py`, since they are Parquet's; two tests added (whole-file rows, on-disk size kept). `test_chunk_metadata.py` becomes a `FileChunk` round-trip and invariant test. `FileInfo` / renamed fields in `test_footer_reader.py`, `test_read_units.py`, `test_synthesized_columns.py`, `test_parquet_datasource_v2.py`, `test_file_indexer.py` and `tests/datasource/test_read_parquet_v2.py`. ## Additional information Not a duplicate: no open PR generalises the packer's row or unifies the listing types. ray-project#66121 and ray-project#65887 both touch these files under the pre-ray-project#66497 paths and will need a rebase either way; ray-project#66121 adds a second size field to the old Parquet row; on this PR it needs no new field, since `size_bytes` is whatever the indexer records and the decoded-or-fallback choice belongs in the footer indexer's `_chunked_file_to_manifest`. Its footer-indexer changes will see `ChunkedFile.file.path` and `read_footers(list[FileInfo])` rather than tuples. Checks run locally from this branch (macOS, `~/ray/.venv`): ``` pytest -q python/ray/data/tests/unit/datasource_v2 \ python/ray/data/tests/datasource_v2/test_footer_reader.py # 193 passed pytest -q python/ray/data/tests/datasource/test_read_parquet_v2.py # 37 passed ``` `ruff`, `black` and `pydoclint` at the pre-commit pins are clean on every changed file; `pyrefly` 0.51.0 with `pyarrow==24.0.0` reports no errors in the changed files. `grep -r datasource_v2.formats interfaces/ common/` is empty. Written with Claude Code; I reviewed every changed line and ran the tests above. Signed-off-by: Aarrya <[email protected]> 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: Aarrya <[email protected]> Co-authored-by: Claude Fable 5.1 <[email protected]>
goutamvenkat-anyscale
pushed a commit
that referenced
this pull request
Oct 16, 2026
…ng committed work at the source (#66736) Follow-up to 1/4 (#66732) and 2/4 (#66733), both merged. 4/4 (#66734) is an independent speed-up that lands last; this PR doesn't need it. ## Why are these changes needed? This switches the feature on. A resumed `generated_id_column` job now skips work it already committed, as early as possible. It doesn't run the actor-pool `CheckpointFilter` that the `id_column` path applies to every row. ## What changes - **Planner routing** (`planner.py`). Generated-ID jobs get: - `ListFiles` → `plan_list_files_op_with_done_read_units`: passes the checkpoint's done unit ids as `EXCLUDED_READ_UNIT_IDS_KWARG_NAME` (the hook from #66398). Fully committed files are never listed, and fully committed row groups are never read. - `ReadFiles` → `plan_read_files_op_with_done_rows`: the normal read followed by a `DropCommittedRows` step for row groups that were only partly committed. - Each row's generated ID names its file, row group and `row_id`, so the step looks up the row group's mask and drops rows where `mask[row_id]` is set. - The step fuses into the read task (`ReadFilesParquetV2->DropCommittedRows->...`), so no extra stage runs. - Thanks @AarryaSaraf for suggesting this over a new reader hook (the former 4/5, #66735, now closed). - The checkpoint's masks arrive as an Arrow table; each task indexes them once (`_partial_mask_lookup`) and reuses the lookup for every block. Masks stay numpy. - `Write` → the existing checkpoint two-phase commit. - The `id_column` path is unchanged. 1/4's interim write-only gate is removed. - **Listing accepts Arrow ids** (`listing_utils.py`): the checkpoint passes done unit ids as an Arrow array. Listing converts them to Python strings before building its lookup set; a set built straight from an Arrow array would hold Arrow values and never match. - **Loading:** `LoadCheckpointCallback` loads the checkpoint once when execution starts (`load_generated_id_checkpoint`, from 2/4). Both plan functions read it through task kwargs set lazily (`add_map_task_kwargs_fn`), because it isn't loaded at planning time. A crashed run's pending checkpoints are still cleaned up while planning, before the load. - **Runs that don't restore** (`CheckpointConfig._should_restore`, from #66563): after a successful run sets it to `False` (e.g. later training epochs), the planner plans only the checkpoint write, as for `id_column`, and `LoadCheckpointCallback` skips loading the generated-ID checkpoint, since no operator reads it. - **Validation:** plans whose sources aren't V2 Parquet reads (`ReadFiles` over a `ParquetScanner`) raise `InvalidCheckpointingConfig` with a pointer to `id_column`. This covers the V1 `Read` path and non-Parquet V2 scanners. - **Docs:** a "Checkpoint without an ID column" section in `doc/source/data/execution-configurations.md`. Note: like the `id_column` path's filter, `DropCommittedRows` runs after the read, so a `limit` pushed into the read counts rows before they're dropped. ## Related issue number N/A. Not a duplicate (see 1/4). Replaces my pre-reorg drafts #65886, #65887 and #65888. ## Checks - [x] I've signed off every commit (DCO). - [x] I've run pre-commit on all changed files: clean. `vale` (v3.17.1, as in CI) on the docs page: 0 errors, 0 warnings, 0 suggestions. - [x] AI assistance (Claude Code) was used for the development of this PR. I, Abhishek Verma, am the human submitter signing off on it: I have reviewed every changed line, run the tests below locally, and can defend the change end-to-end. - Testing: - `pytest python/ray/data/tests/unit/test_generated_id_checkpoint.py`: 15 passed. New: masked rows dropped per row group in a block mixing row groups and files; rows past a short mask kept; no matching mask means no change; mask lookup across table chunks. - `test_read_units.py`: listing skips done units whether the ids arrive as a set, an Arrow array, or a chunked array. The Arrow cases fail without the conversion. - With `_should_restore=False`, a run ignores the kept checkpoint, reads every row, never loads the checkpoint, and still writes checkpoints. I checked that this test fails without the callback fix. - On current master, `pytest python/ray/data/tests/test_checkpoint.py python/ray/data/tests/test_data_iterator_checkpointer.py python/ray/data/tests/unit/test_generated_id_checkpoint.py python/ray/data/tests/unit/datasource_v2`: 299 passed, 1 failed. The failure, `test_skip_checkpoint_flag[s3]`, is a pre-existing local moto-S3 flake that also fails on unmodified master. - New end-to-end tests in `python/ray/data/tests/test_checkpoint.py`: - Crash partway, then rerun: no missing rows, and the checkpoint is deleted on success. - Resume skips a fully committed file, a committed row group, and the committed rows of a partly committed row group, and reads a never-seen file in full. The output is exactly the uncommitted rows. I checked that this test fails with `DropCommittedRows` disabled. - A rerun after a full success writes nothing. - The plan has no `CheckpointFilter` op, and `DropCommittedRows` is fused into the read. - Non-Parquet and V1 inputs are rejected. - `pytest python/ray/data/tests/unit/test_generated_id_checkpoint.py`: 15 passed. New: masked rows dropped per row group in a block mixing row groups and files; rows past a short mask kept; no matching mask means no change; mask lookup across table chunks. - Block sizing: a `generated_id_column` read produces the same number of blocks per task as a plain read (`DropCommittedRows` keeps `target_max_block_size`). - `test_read_units.py`: listing skips done units whether the ids arrive as a set, an Arrow array, or a chunked array. The Arrow cases fail without the conversion. - With `_should_restore=False`, a run ignores the kept checkpoint, reads every row, never loads the checkpoint, and still writes checkpoints. I checked that this test fails without the callback fix. - On current master, `pytest python/ray/data/tests/test_checkpoint.py python/ray/data/tests/test_data_iterator_checkpointer.py python/ray/data/tests/unit/test_generated_id_checkpoint.py python/ray/data/tests/unit/datasource_v2`: 299 passed, 1 failed. The failure, `test_skip_checkpoint_flag[s3]`, is a pre-existing local moto-S3 flake that also fails on unmodified master. - `pytest python/ray/data/tests/unit python/ray/data/tests/datasource_v2`: 1500 passed. - Five modules didn't collect locally for missing optional dependencies (torch, pyiceberg, freezegun). - Two failures in `test_dynamic_work_queue.py`, which also fail on unmodified master. - **Together with 4/4** (local combined branch): 237 DSv2/unit and 38 checkpoint tests passed. In a manual resume run (4 files × 4 row groups, 16 write tasks), I deleted 6 committed checkpoint files and the rerun wrote **exactly those 6,000 rows**. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Signed-off-by: Abhishek Verma <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stack: PR 3 of 4 — stacked on #65886 (compact checkpoint load). Review scope: the last two commits ("Skip fully checkpointed files at list time..." and "Skip checkpointed row groups and rows in the V2 Parquet reader"). Follow-up: [4/4] planner routing + docs.
Why are these changes needed?
This PR adds the skip mechanics that make generated-ID resume cheap, at every level of granularity. All of it is inert until the planner routes to it in PR 4 — no behavior change for existing workloads (verified by the without-checkpoint tests and regression suites).
List-time (file granularity):
FileManifestgains an optional__file_fragments_checkpointcolumn: the file's compact checkpoint struct (null = never seen), present only when generated-ID checkpointing is active. Kept as an Arrow column so struct scalars survive;concat/shuffleare whole-block operations and preserve it for free.NonSamplingFileIndexer,FooterFileIndexer) accept acheckpoint_idsblock: fully-checkpointed files are dropped before chunking — on the footer path before footer reads, so resumed jobs don't even fetch footers of finished files — and surviving rows are stamped with their file's struct.RoundRobinPartitioner,OnlineBinPacker) carry the column through manifest reconstruction — they rebuild manifests viaconstruct_manifest, which would otherwise silently drop it (the bin packer keys a per-path map, since a file's rows all share one struct and bins may split/re-union runs).list_files_for_each_blockreads the block fromTaskContext.kwargs;plan_list_files_op_with_checkpoint_filterattaches it lazily viaMapOperator.add_map_task_kwargs_fnbecause the block is only loaded at execution start (registered with the planner in PR 4).Read-time (row-group and row granularity):
ParquetFileReader._get_fragments_to_readresolves each row-group sub-fragment against the manifest's struct: fully-checkpointed row groups are dropped before any scan; partially checkpointed ones carry theirCheckpointedFragmentInfoin a widened(fragment, offset, info)tuple consumed only by this class's own_read_fragments_sequentialoverride.row_idassignment is identical whether or not a resume is filtering — the invariant that makes checkpoints written by one run addressable by the next.Related issue number
N/A. Not a duplicate: searched open PRs/issues in ray-project/ray for
generated_id_column, "row group checkpoint" — no overlapping work.Checks
_internal/datasource_v2/tests/test_generated_id_listing.py(manifest column optional/mixed-values/concat/shuffle; both indexers drop fully-done files and stamp partial/null structs; both indexers unchanged without a checkpoint block; both partitioners preserve the column and stay unchanged without it) — 11 passed; reader-skip additions intest_generated_id_reads.py(fully-skip → zero tables, partial masks across batches keep original in-group positions, unmatched checkpoint reads in full, manifest without the column unaffected) — 12 passed._internal/datasource_v2/tests/(99 passed),tests/unit/datasource_v2/(100 passed),tests/test_parquet.py(passed), fulltest_checkpoint.py(97/98; known pre-existing local moto-S3 flake).