Skip to content

Conversation

@majin1102
Copy link
Contributor

@majin1102 majin1102 commented Jan 29, 2026

Close #5852
The panic is because the underlying read transaction didn't handle CreateIndex operation

@majin1102 majin1102 requested a review from jackye1995 January 29, 2026 13:43
@github-actions github-actions bot added bug Something isn't working java labels Jan 29, 2026
@majin1102 majin1102 requested a review from yanghua January 29, 2026 13:44
@github-actions
Copy link
Contributor

Code Review

Summary: This PR adds support for reading CreateIndex transactions from the Java bindings, fixing a panic that occurred when attempting to read a transaction containing a CreateIndex operation.

Assessment: LGTM ✓

The implementation correctly:

  • Adds the CreateIndex match arm in convert_to_java_operation_inner to convert Rust IndexMetadata to Java Index objects via the existing export_vec and IntoJava trait implementations
  • Includes a comprehensive test that creates an index, reads the transaction, and validates the operation type and index contents

Minor note (non-blocking)

The PR title says "throw panic when read CreateIndex transaction" but the fix actually prevents the panic by handling the case properly. Consider updating the title to "fix: panic when reading CreateIndex transaction" for clarity.


Reviewed with Claude Code

@majin1102 majin1102 changed the title fix(java): throw panic when read CreateIndex transaction fix(java): panic when reading CreateIndex transaction Jan 29, 2026
Copy link
Collaborator

@yanghua yanghua left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@westonpace westonpace left a comment

Choose a reason for hiding this comment

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

Looks straightforward to me. Thanks for the addition!

@wjones127 wjones127 merged commit 497ca23 into lance-format:main Jan 30, 2026
13 checks passed
@majin1102 majin1102 deleted the fix-read-tx branch January 31, 2026 07:58
vivek-bharathan pushed a commit to vivek-bharathan/lance that referenced this pull request Feb 2, 2026
)

Close lance-format#5852 
The panic is because the underlying read transaction didn't handle
`CreateIndex` operation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working java

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Throw panic when calling dataset.readTransaction

4 participants