Repository navigation
feat(dataset): add pagination support for version listing - #11007
Merged
Xuanwo merged 3 commits intoNov 13, 2026
Merged
Conversation
…ns-pagination Resolve Dataset::versions overlap with lance-format#10966: versions() now delegates to versions_with_options(0, None, false), which keeps the ordered buffered manifest reads that lance-format#10966 introduced.
- versions() stays versions_with_options(0, None, false): ascending, same versions, metadata and manifest sizes, branch scoped, detached excluded. - Document ordering, offset/limit/None/zero, selected-page reads and the exact early-listing limits in the Rust, Python and Java surfaces. - Cover listing consumption with the existing forwarding probe: a descending V2 page on a lexically ordered store stops after offset + limit manifest entries, so a 2-version page at offset 1 consumes 3 of 5 entries. V1 names and non-lexically-ordered stores still enumerate every location, and a zero limit lists nothing. - Preserve the lance-format#10966 concurrency test and its effective-window bounds. Verified by an eager-listing negative control that fails only on the consumption assertion (5 consumed instead of 3) with the page still correct, then restored the production source exactly.
Xuanwo
approved these changes
Nov 13, 2026
Xuanwo
left a comment
Member
There was a problem hiding this comment.
Re-verified against current main: the squash result adds exactly the nine accepted files, and the versioning suite plus the manifest-read concurrency probe in both default and single-thread configurations pass on that merged tree. No blocking issues.
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.
Summary
Closes #11006
Dataset::versions_with_options(offset, limit, descending)so callers can read one page ofVersionentries instead of every historical manifest.Dataset::versions()delegates to it and still returns the whole history in ascending order, with the same versions, metadata and manifest sizes, scoped to the current branch and excluding detached versions.offset + limitentries; ascending pages, V1 manifest paths, and stores without lexically ordered listings enumerate every location before selecting the page.Nonemeans no limit,0returns an empty page without listing or reading, and an out-of-range offset returns an empty page.LanceDataset.versions(*, offset=0, limit=None, descending=False)andLanceDataset.count_versions(), and in Java viaDataset.listVersions(long offset, Optional<Long> limit, boolean descending).Test Plan
dataset_versioningsuite (203 tests) andtest_read_version_transaction_on_branch; a new listing-consumption test (memory V2 descending page of 2 at offset 1 consumes 3 of 5 manifest entries, V1 and local stores consume all 5, zero limit lists nothing) plus the perf(dataset): read manifests concurrently in Dataset::versions #10966 concurrency test in default andLANCE_IO_THREADS=1configurations.test_versions_paginationonmemory://and local against the extension built from this tree;uv run make lint.DatasetTest(72 tests) against the JNI built from this tree;./mvnw spotless:checkandcargo clippy --tests --manifest-path ./lance-jni/Cargo.toml.cargo clippy --workspace --all-targets --profile ci --locked -- -D warningsandcargo fmt --all --check.