fix(jni): align CommitBuilder.storageFormat() parsing with LanceFileVersion::from_str - #8063
Open
ivscheianu wants to merge 2 commits into
Open
fix(jni): align CommitBuilder.storageFormat() parsing with LanceFileVersion::from_str#8063ivscheianu wants to merge 2 commits into
ivscheianu wants to merge 2 commits into
Conversation
ivscheianu
force-pushed
the
fix/jni-parse-storage-format
branch
2 times, most recently
from
July 29, 2026 06:30
0ecde63 to
d66de1c
Compare
…ersion::from_str
The JNI `parse_storage_format` function (used by `CommitBuilder.storageFormat()`)
had a hand-rolled match that accepted only a subset of format strings ("v2.1",
"v2_1", etc.) while the fragment creation path (`extract_write_params`) uses
`LanceFileVersion::from_str` which also accepts the canonical numeric forms
("2.1", "2.2").
This inconsistency causes `CommitBuilder.storageFormat("2.1")` to fail with
"Unknown storage format: 2.1" even though the same string works correctly
in `WriteParams.dataStorageVersion`.
Replace the custom match with `name.parse::<LanceFileVersion>()` and extend
`FromStr` to also accept the prefixed aliases ("v2_0", "v2.0", etc.) so no
previously accepted values are rejected.
ivscheianu
force-pushed
the
fix/jni-parse-storage-format
branch
from
July 29, 2026 06:35
2ff1fd3 to
a1ba7f8
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
Fixes #8066
The JNI
parse_storage_format(used byCommitBuilder.storageFormat()) had a hand-rolled match that only accepted prefixed aliases ("v2_1","v2.1") whileextract_write_paramsusesLanceFileVersion::from_strwhich accepts the canonical numeric forms ("2.1","2.2"). This surfaced when lance-spark#730 started propagatingfile_format_versiontoCommitBuilder.storageFormat(), breaking some tests.Fix:
name.parse::<LanceFileVersion>().FromStrto also accept the prefixed aliases so no previously valid input is rejected.CommitBuilder.storageFormat()Javadoc.