feat: add URI-based commit support to Java SDK#5978
Merged
eddyxu merged 8 commits intolance-format:mainfrom Feb 26, 2026
Merged
feat: add URI-based commit support to Java SDK#5978eddyxu merged 8 commits intolance-format:mainfrom
eddyxu merged 8 commits intolance-format:mainfrom
Conversation
Signed-off-by: Daniel Rammer <hamersaw@protonmail.com>
Signed-off-by: Daniel Rammer <hamersaw@protonmail.com>
Signed-off-by: Daniel Rammer <hamersaw@protonmail.com>
Signed-off-by: Daniel Rammer <hamersaw@protonmail.com>
Signed-off-by: Daniel Rammer <hamersaw@protonmail.com>
Signed-off-by: Daniel Rammer <hamersaw@protonmail.com>
Signed-off-by: Daniel Rammer <hamersaw@protonmail.com>
wjones127
approved these changes
Feb 25, 2026
Contributor
wjones127
left a comment
There was a problem hiding this comment.
Seems good. Have a few questions but nothing blocking.
…ction-api Signed-off-by: Daniel Rammer <hamersaw@protonmail.com>
jackye1995
pushed a commit
to wjones127/lance
that referenced
this pull request
Feb 26, 2026
- adds new `CommitBuilder` / `Transaction` classes to reflect the rust
SDK (works over both Dataset and URI)
- renames the current `Transaction` to `SourcedTransaction` to leave
current Dataset based SDK intact, but internally everything now uses
`CommitBuilder`
- updates tests to use `CommitBuilder` route rather than
`SourcedTransaction`
- fills out SDKs to ensure full compatiblity (all fields / etc)
To create a dataset with existing fragments at a new URI:
```
// 1. Write fragments to the dataset path
FragmentMetadata fragmentMeta = testDataset.createNewFragment(20);
// 2. Build a Transaction with Overwrite (provides schema for the new dataset)
try (Transaction txn =
new Transaction.Builder()
.operation(
Overwrite.builder()
.fragments(Collections.singletonList(fragmentMeta))
.schema(schema)
.build())
.build()) {
// 3. Commit to a URI where no dataset exists yet
try (Dataset dataset = new CommitBuilder(datasetPath, allocator).execute(txn)) {
assertEquals(1, dataset.version());
assertEquals(20, dataset.countRows());
}
}
```
Closes lance-format#5969
---------
Signed-off-by: Daniel Rammer <hamersaw@protonmail.com>
wjones127
pushed a commit
that referenced
this pull request
Feb 26, 2026
- adds new `CommitBuilder` / `Transaction` classes to reflect the rust
SDK (works over both Dataset and URI)
- renames the current `Transaction` to `SourcedTransaction` to leave
current Dataset based SDK intact, but internally everything now uses
`CommitBuilder`
- updates tests to use `CommitBuilder` route rather than
`SourcedTransaction`
- fills out SDKs to ensure full compatiblity (all fields / etc)
To create a dataset with existing fragments at a new URI:
```
// 1. Write fragments to the dataset path
FragmentMetadata fragmentMeta = testDataset.createNewFragment(20);
// 2. Build a Transaction with Overwrite (provides schema for the new dataset)
try (Transaction txn =
new Transaction.Builder()
.operation(
Overwrite.builder()
.fragments(Collections.singletonList(fragmentMeta))
.schema(schema)
.build())
.build()) {
// 3. Commit to a URI where no dataset exists yet
try (Dataset dataset = new CommitBuilder(datasetPath, allocator).execute(txn)) {
assertEquals(1, dataset.version());
assertEquals(20, dataset.countRows());
}
}
```
Closes #5969
---------
Signed-off-by: Daniel Rammer <hamersaw@protonmail.com>
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.
CommitBuilder/Transactionclasses to reflect the rust SDK (works over both Dataset and URI)TransactiontoSourcedTransactionto leave current Dataset based SDK intact, but internally everything now usesCommitBuilderCommitBuilderroute rather thanSourcedTransactionTo create a dataset with existing fragments at a new URI:
Closes #5969