Closed
Conversation
Add a new method that accepts Arrow arrays (StringArray, UInt64Array) for setting virtual chunk references. This avoids creating millions of Python objects when called from the Python bindings. The method: - Takes chunk_grid_shape to compute N-dimensional indices from flat arrays - Validates array lengths match and product equals chunk count - Iterates Arrow arrays efficiently and delegates to existing set_virtual_refs This is gated behind the optional "arrow" feature which adds arrow-array as a dependency. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Tests the Arrow-based virtual refs method with a 2x2 chunk grid using local filesystem virtual chunks. Verifies that chunks can be written using Arrow arrays and read back correctly. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Adds PyO3 bindings for the Arrow-based virtual refs method: - Uses pyo3-arrow for zero-copy FFI from PyArrow arrays - Accepts StringArray for locations, UInt64Array for offsets/lengths - Calls core crate's set_virtual_refs_from_arrow method Python API: - IcechunkStore.set_virtual_refs_arr_async() accepts PyArrow arrays - Significantly faster for large numbers of references Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Adds synchronous counterpart to set_virtual_refs_arr_async for cases where async is not needed or desired. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add checksum parameter to apply a single checksum (datetime or ETag) to all chunks in the array - Add arr_offset parameter to offset computed chunk indices, enabling append operations where new chunks start at non-zero indices - Refactor flat_to_nd_indices to compute indices forward using strides rather than reverse iteration Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
7 tasks
- Add set_chunk_refs bulk method to ChangeSet that does one hash lookup for all chunks instead of one per chunk - Add set_node_chunk_refs bulk method to Session - Change set_node_chunk_ref to take &NodeSnapshot instead of owned - Update set_virtual_refs to use bulk method - Make set_node_chunk_ref public for external use This reduces the complexity from O(n) hash lookups to O(1) for setting n chunk refs to the same array. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
li-em
reviewed
Jan 27, 2026
| .collect::<Result<Vec<_>, StoreError>>()?; | ||
|
|
||
| // Delegate to existing method | ||
| self.set_virtual_refs(array_path, validate_container, refs_iter).await |
Contributor
There was a problem hiding this comment.
If we put all this validation in icechunk-python, we don't need to depend on arrow in the rust crate, do we? It would end up with just this call to .set_virtual_refs()
Member
Author
There was a problem hiding this comment.
I guess so... I don't actually need to pass arrow all the way down to the core IC rust crate, I just need to pass arrow to icechunk-python and have some way to pass refs in bulk from there to the core IC rust crate.
- icechunk/Cargo.toml: keep both arrow-array and backon deps, add arrow feature - icechunk-python/Cargo.toml: use main's bumped versions with arrow feature - icechunk/src/session.rs: use main's simpler set_chunk_ref (no splits), keep pub visibility - icechunk/tests/test_virtual_refs.rs: keep both arrow and vcc relative URL tests - Cargo.lock: regenerated Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- change_set.rs: remove ManifestSplits/ManifestExtents from set_chunk_refs (splits removed in main) - session.rs: fix borrow issues in set_node_chunk_ref, remove get_splits from set_node_chunk_refs - store.rs: use from_url instead of private from_absolute_path Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Member
Author
|
We decided to try passing numpy array buffers instead of arrow arrays, that way we can avoid the dependency on arrow entirely. |
Member
Author
|
Closed as this was implemented in #2049 |
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.
Attempt to close #1574. Doesn't seem to decrease memory usage, but allows zarr-developers/VirtualiZarr#861, which slashes write time by ~6x.