Repository navigation
Native: an RID built from an RID keeps the text, so a find_nearest hit can be saved - #266
Merged
Merged
Conversation
…t can be saved A hit of find_nearest(include_vector=True) carries the row's RID as its rid, and the native record wrappers wrap their rid again (RID(self._rid) in save, the update, delete, new_edge and the edge reads). RID.__init__ kept its argument as is, so .text was an RID and the fast named-parameter path of codec.encode_params raised 'Object of type RID is not JSON serializable' (test_vector_hit_records::test_a_hit_can_be_modified_and_saved[True], found on #264's parity leg); the slower paths sent a nested tag. RID now unwraps an RID argument. test_native_rid_params.py (native only) checks the constructor and that a wrapped RID encodes byte for byte like the RID on the fast and the hook paths; both tests fail on the previous codec.py and pass on this one (checked engine-free). Closes #265 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tae898
added a commit
that referenced
this pull request
Nov 5, 2026
…uage Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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.
Closes #265
A hit of
find_nearest(include_vector=True)carries the row'sRIDas its rid, and the native record wrappers wrap their rid again (RID(self._rid)in save, the update, delete,new_edgeand the edge reads).RID.__init__kept its argument as is, so.textwas anRID, and the fast named-parameter path ofcodec.encode_paramsraisedTypeError: Object of type RID is not JSON serializableon save.RIDnow unwraps anRIDargument, which covers every call site at once.src/arcadedb/_native/codec.pyRID.__init__:self.text = text.text if isinstance(text, RID) else texttests/test_native_rid_params.pynew_edge) and on the hook paths (the update's rid and row, a positional RID), binary and texttests/conftest.pyChecks: both new tests fail on the
codec.pyofmain(a53f9cd6cc:AssertionErroron the constructor,TypeErroron the encoder) and pass with this change, run engine-free against the two module files;test_vector_hit_records.py::test_a_hit_can_be_modified_and_saved[True]is the integration test that found it (red on #264's linux-x86_64 py3.12 parity leg) and should go green here.compile(), pyflakes and pre-commit pass. JVM build untouched. This blocks the 26.11.1 tag (#18).🤖 Generated with Claude Code