Skip to content

feat(java): expose referenced file metadata - #8962

Open
everySympathy wants to merge 2 commits into
lance-format:mainfrom
everySympathy:codex/java-referenced-files
Open

feat(java): expose referenced file metadata#8962
everySympathy wants to merge 2 commits into
lance-format:mainfrom
everySympathy:codex/java-referenced-files

Conversation

@everySympathy

Copy link
Copy Markdown
Contributor

Summary

  • expose every Lance data file referenced by a fragment, including data-overlay files
  • expose manifest base paths so Java callers can resolve base-relative physical URIs
  • expose the canonical deletion-file relative path for exact metadata/accounting lookups

Motivation

Java storage-accounting and maintenance clients currently see only FragmentMetadata.getFiles(), which omits data-overlay files. They also cannot resolve non-default base IDs or construct deletion-file paths without duplicating Lance naming rules. Together, these gaps prevent complete physical-file enumeration without falling back to object-store prefix listing.

This PR exposes the existing Rust manifest metadata through Java/JNI. Existing FragmentMetadata constructors remain source compatible.

Validation

  • cargo fmt --all -- --check
  • cargo clippy --all --tests --benches -- -D warnings
  • cd java && ./mvnw test -Dtest=FragmentTest#testFragmentCreate+testDeletionFileRelativePath,MultiBaseTest#testCreateMode
  • Java: 3 passed; JNI: 18 passed

@github-actions github-actions Bot added A-java Java bindings + JNI enhancement New feature or request labels Sep 3, 2026
lance-gatekeeper[bot]

This comment was marked as outdated.

@lance-gatekeeper lance-gatekeeper Bot added the K-changes Latest Gatekeeper recommendation requests changes. label Sep 3, 2026
@lance-gatekeeper lance-gatekeeper Bot removed the K-changes Latest Gatekeeper recommendation requests changes. label Sep 3, 2026

@lance-gatekeeper lance-gatekeeper Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gate recommendation: approve.

The revision now preserves Rust’s physical-file naming contract and exercises canonical base-plus-overlay enumeration through JNI. Both earlier findings are fixed.

@lance-gatekeeper lance-gatekeeper Bot added the K-approved Latest Gatekeeper recommendation permits acceptance. label Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-java Java bindings + JNI enhancement New feature or request K-approved Latest Gatekeeper recommendation permits acceptance.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant