Skip to content

feat(indexing): execute partitions with their reader context - #4349

Draft
d-v-b wants to merge 14 commits into
zarr-developers:mainfrom
d-v-b:codex/indexing-partition-execution
Draft

feat(indexing): execute partitions with their reader context#4349
d-v-b wants to merge 14 commits into
zarr-developers:mainfrom
d-v-b:codex/indexing-partition-execution

Conversation

@d-v-b

@d-v-b d-v-b commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

🤖 AI text below 🤖

Depends on #4345. This draft targets upstream main, so its diff includes the prerequisite audit commits until that PR merges. Follow-up-only diff.

Add Partition.result() so independently scheduled partition reads receive the same ReadContext as parent assembly: the part's global transform and its existing chunk projection. Previously, the documented part.view.result() pattern supplied no projection and failed for readers that require one.

The new method allocates through the view's existing output-buffer helper, invokes its reader without replanning, and preserves reader return validation and exception propagation. General part.view.result() behavior is unchanged. Documentation and executable NumPy/Dask examples now use part.result() for partition execution.

Extend the existing reader contract matrix with a reader that evaluates chunk-local coordinates and requires the projection. Check parent assembly against independently executed parts in reverse order for scalars, positive/negative strides, repeated indices, orthogonal/vectorized gathers, and empty selections. Also exercise invalid reader returns and unchanged backend exceptions through both APIs. Six matrix cases failed before implementation.

Validation: 1,523 package tests/doctests passed, including optional Dask/TensorStore checks; strict docs build passed; applicable repository checks passed; Pyright reports 0 errors and 90 warnings. Independent review found no actionable issues.

Concurrent execution still requires a source and reader that support concurrent calls.

Corresponding fork review: d-v-b#337.

All four final follow-up heads were also combined and verified together: 1,633 package tests/doctests passed, no skips, and the strict documentation build passed.

Correct mathematical API documentation to match supported coordinate, grid, and chunk projection contracts.

Assisted-by: Codex:GPT-6
Retain the existing unsigned selector fix and update the unsupported mixed-dependency error assertion for general intersection routing.

Assisted-by: Codex:GPT-6
Use lexicographic tuple grouping when chunk indices contain negative values. Cover shared one-axis and two-axis array dependencies, repeated points, and extreme signed coordinates.

Assisted-by: Codex:GPT-6
@github-actions github-actions Bot added the needs release notes Automatically applied to PRs which haven't added release notes label Sep 13, 2026
@read-the-docs-community

read-the-docs-community Bot commented Sep 13, 2026

Copy link
Copy Markdown

Remove implementation history and unsupported historical claims from source and test docstrings. Distinguish immutable coordinate mappings from mutable source values.

Assisted-by: Codex:GPT-6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs release notes Automatically applied to PRs which haven't added release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant