Skip to content

feat: add a fast dataset version ID API#6303

Merged
BubbleCal merged 1 commit intomainfrom
yang/oss657-add-version-read-api
Mar 27, 2026
Merged

feat: add a fast dataset version ID API#6303
BubbleCal merged 1 commit intomainfrom
yang/oss657-add-version-read-api

Conversation

@BubbleCal
Copy link
Copy Markdown
Contributor

Summary

  • add Dataset::version_id() in Rust to return the checked-out manifest version without building full version metadata
  • route Python dataset.version and default checkout refs through the new fast path
  • route Java Dataset.version() through a new JNI version-id accessor while keeping getVersion() unchanged
  • extend Rust, Python, and Java tests to cover current, updated, and historical version reads

Testing

  • cargo test -p lance test_version_id_fast_path
  • cargo check --manifest-path java/lance-jni/Cargo.toml
  • cargo check --manifest-path python/Cargo.toml
  • Python pytest target not run in this environment (pytest unavailable)
  • Java Maven test target not run in this environment (JRE unavailable)

@github-actions
Copy link
Copy Markdown
Contributor

ACTION NEEDED
Lance follows the Conventional Commits specification for release automation.

The PR title and description are used as the merge commit message. Please update your PR title and description to match the specification.

For details on the error please inspect the "PR Title Check" action.

@BubbleCal BubbleCal changed the title Add a fast dataset version ID API feat: add a fast dataset version ID API Mar 26, 2026
@github-actions github-actions Bot added the enhancement New feature or request label Mar 26, 2026
@github-actions
Copy link
Copy Markdown
Contributor

PR Review

Clean, well-scoped change. The fast path avoids constructing the full Version (which walks manifest fragments) for a simple ID read — good optimization.

No blocking issues found. Tests cover current, updated, and historical version reads across all three languages. JNI pattern is consistent with existing nativeGetLatestVersionId. Python bindings correctly route both version() and default checkout ref through the new path.

One minor note (non-blocking): version_id() returns u64 which is cast to jlong (i64) in JNI — this matches the existing convention throughout the file, so it's fine, but worth being aware of if version IDs ever approach i64::MAX.

LGTM.

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@BubbleCal BubbleCal marked this pull request as ready for review March 26, 2026 13:11
@BubbleCal BubbleCal merged commit 08ec995 into main Mar 27, 2026
31 of 32 checks passed
@BubbleCal BubbleCal deleted the yang/oss657-add-version-read-api branch March 27, 2026 05:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request java python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants