feat(java): complete transaction operation mappings - #8925
Merged
majin1102 merged 6 commits intoSep 4, 2026
Conversation
added 6 commits
September 1, 2026 18:00
Contributor
There was a problem hiding this comment.
✅ Gate recommendation: approve.
The typed Java/JNI mappings now cover every current transaction operation in both directions, while boundary validation prevents silent truncation or field loss. Keeping the typed mapping is reasonable here because the existing protobuf conversion is not itself a lossless opaque transport.
This was referenced Sep 4, 2026
Xuanwo
pushed a commit
that referenced
this pull request
Sep 4, 2026
## Summary The Java JNI build on `main` is broken since #8925 ([failing run](https://github.com/lance-format/lance/actions/runs/33884542905/job/101061005145)): ``` error[E0119]: conflicting implementations of trait `IntoJava` for type `&lance_table::format::BasePath` --> src/transaction.rs:125:1 | 125 | impl IntoJava for &BasePath { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `&lance_table::format::BasePath` | ::: src/blocking_dataset.rs:89:1 89 | impl IntoJava for &BasePath { | --------------------------- first implementation here ``` #8925 added an `impl IntoJava for &BasePath` in `transaction.rs` that duplicates the pre-existing, behaviorally identical impl in `blocking_dataset.rs`. This removes the duplicate; the `Overwrite.initial_bases` export in `transaction.rs` resolves to the impl in `blocking_dataset.rs`, and the now-unused `BasePath` import is dropped. ## Test Plan - `cargo check --manifest-path java/lance-jni/Cargo.toml` — passes (previously E0119) - `cargo clippy --tests --manifest-path java/lance-jni/Cargo.toml` — clean - `cargo test --manifest-path java/lance-jni/Cargo.toml --lib` — 22 passed (incl. `transaction::tests::test_checked_transaction_integer_conversions`, which covers the `basePath.id` overflow conversion) - Reintroducing a duplicate impl is caught by the compiler itself (E0119), so no new test is needed for the removal
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
Complete the Java SDK and JNI transaction mapping against the Rust
Transaction/Operationdefinitions.DataOverlay,UpdateMemWalState,Clone, andUpdateBasesOverwrite.initial_basesUpdate.compacted_sstables,inserted_rows_filter, update mode, field ids, and fragment offsetsRewrittenIndex.new_index_filesOverwriteconstructorTesting
cargo fmt --all -- --checkcargo clippy --all --tests --benches -- -D warningscargo clippy --tests --manifest-path java/lance-jni/Cargo.toml -- -D warningscd java && ./mvnw -Dtest=TransactionTest,FragmentTest,UpdateTest testcd java && ./mvnw testRestNamespaceTestandDynamicContextProviderTest); all other tests passedThe transaction tests cover
Dataset.readTransaction(), every newly added operation, repaired fields, bidirectional round trips, null/empty Optional behavior, and diagnostic rejection of values that cannot be represented losslessly.