Repository navigation
Conversation
…rojected @Rid (P-02) A record id inside a row is an RID object on both wheels (docs/api/results.md, "Record ids in rows"). The native RID now sorts by bucket and position and has getBucketId, getPosition, toString, isValid, equals and compareTo, so code written against the JVM wheel's RID runs unchanged; it still equals its own text, which the JVM RID does not (documented as not to rely on). Result.get_rid() returns the identity of a row that projects @Rid without an alias, as the JVM wheel does. Python only, no image rebuild; tests/test_record_id_values.py runs on both wheels. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…to the statement Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This was referenced Oct 25, 2026
Author
|
Closing here: the bindings moved to ArcadeData/arcadedb-python, and this change is merged there with the native port, ArcadeData/arcadedb-python#66 (commit 9ae92b3: the Java RID surface on the native RID, and Result.get_rid() for a projected |
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.
The native wheel returns a record id inside a row as its own
RIDclass; the JVM wheel returns the engine'sRID. This PR makes the native class substitutable for the Java one in the places user code touches it, so a record id behaves the same on both wheels. The contract is written indocs/api/results.mdunder "Record ids in rows" (same text as the JVM PR, which carries the tests and docs formain): a record id in a row is an RID object,str(rid)is the text, equal RIDs hash alike, RIDs sort by bucket and position,getBucketId(),getPosition(),toString()andisValid()work, and it goes back in as a parameter and tolookup_by_rid().What changes in
_native/codec.py:RIDgets ordering (<,<=,>,>=, by bucket then position, only against another RID) and the Java methodsgetBucketId,getPosition,toString,isValid,equals,compareTo. It still equals its own text and hashes like it, which the Java RID does not; the docs say to comparestr(rid)and not to rely on either. What changes in_native/database.py:Result.get_rid()returns the identity of a row that projects@ridwithout an alias (SELECT @rid, name FROM T), as the JVM wheel does; it wasNone. Python only, no image rebuild.Stacking and overlap with the open native PRs: none needs to merge first. The branch is on
native-preview(91a6ad7). Files shared with open PRs are_native/database.py(#514, #521, #522, #525, #526) and_native/codec.py(#525); I merged each of those heads into this branch withgit merge-treeand none conflicts. #520 and #523 do not touch my files.Local checks:
tests/test_record_id_values.py12 passed on the native wheel (3 of them failed before this change: sorting,getBucketId,get_rid()of a projected@rid), run withARCADEDB_BACKEND=nativeagainst an existing image (the #521nnextimage, no rebuild); withtest_core.py,test_resultset.py,test_graph_api.py,test_vector.py,test_docs_examples.pythe total is 127 passed, 24 skipped (the usual not-yet-native skips, no failures); pre-commit hooks passed. Not run: the full suite, the JVM wheel against this branch, CI.🤖 Generated with Claude Code