Repository navigation
fix(#421): JVM new_edges takes a vertex or document as new_edge does - #424
Merged
tae898 merged 1 commit intoNov 22, 2026
Merged
Conversation
…edge does new_edges wrote each source and destination with str(), so a Vertex became its repr and the engine refused it as an RID. It now reads the RID of a record wrapper with get_rid(), as the native wheel does, and keeps str() for a string or a Java RID.
Collaborator
|
Thank you, merged for 26.12.1. |
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.
What does this PR do?
GraphBatch.new_edgeson the JVM wheel wrote each source and destination withstr(). AVertexorDocumenthas only a__repr__, so it became"<Vertex rid=#1:0 type=V>"and the engine refused it as an invalid RID, whilenew_edgeand the native wheel'snew_edgesaccept the object.new_edgesnow reads the RID of a record wrapper withget_rid()(as_native/extras.pydoes) and keepsstr()for a string or a JavaRID. The text is made before anything is buffered, and the per-edge fallbacks still receive the original objects. The docstring now says what is accepted.Related issues
Closes #421
Performance changes
None claimed. The check is one
getattrper RID on a path that already builds one string per RID.Docs
The
new_edgesdocstring. No page underdocs/describes the accepted RID forms.Checklist
test_new_edges_takes_vertex_objects_as_new_edge_does, with and without properties, mixing vertices, RID strings and a JavaRID; it also passes on the published native wheel 26.11.1.post4)tests/file that usesnew_edgesorgraph_batch, 942 tests on the JVM wheel, thetest_native_*files excluded asconftest.pydoes)uvx pre-commit run --files <changed files>passes