Repository navigation
native: drop_index(force=True) and unique index types match the JVM build; get_identity() keeps an RID - #171
Merged
Merged
Conversation
…EXT/SPARSE_VECTOR/GEOSPATIAL index is refused Found by the native/JVM parity probe (P6, P9). P6: JVM drop_index(force=True) skips the existence check, so a missing index is a no-op; native always ran DROP INDEX and raised "Index not found". Native now appends IF EXISTS when force is set (DropIndexStatement.ifExists). An existing index drops through the same engine path either way. P9: the engine's index factories for FULL_TEXT, LSM_SPARSE_VECTOR and GEOSPATIAL throw "... cannot be unique"; native dropped the unique flag for those types and silently built a non-unique index. Native now raises ArcadeDBError before any statement, naming the type and the uniqueness. Shared tests in tests/test_schema.py (both builds). Against the pre-fix 26.11.1.dev0 wheels: native fails both new tests (Index not found: Nope; DID NOT RAISE), JVM passes them; the force control passes on both. Closes #169 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A row can carry @Rid as an RID object (vector-search rows of engine e353330c5c); get_identity() wrapped it again, so str() of the identity raised "__str__ returned non-string". It now returns an RID as is. Native-only unit test with an RID-typed and a text RID; against the pre-fix native wheel it fails with that TypeError. Closes #170 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 #169
Closes #170
Three small native/JVM differences, found by probes that run the same scenarios on both builds (after #162). Python-only.
drop_index(force=True)(native: drop_index(force=True) raises on a missing index; unique FULL_TEXT index is created non-unique #169): native now runsDROP INDEX `name` IF EXISTS, so a missing index is a no-op as on the JVM build (DropIndexStatementhonoursIF EXISTS; an existing index takes the samedropIndexpath on both builds).create_index(unique=True, ...)(native: drop_index(force=True) raises on a missing index; unique FULL_TEXT index is created non-unique #169): native refusesunique=TrueforFULL_TEXT,LSM_SPARSE_VECTORandGEOSPATIALbefore running any statement, the three types whose engine factories refuse uniqueness (LSMTreeFullTextIndex,LSMSparseVectorIndex,LSMTreeGeoIndex); it used to create a non-unique index silently.get_identity()(native: str(record.get_identity()) fails when the row's @rid is already an RID #170): returns anRIDas is when the row already carried one, instead of wrapping it twice (which madestr()of the identity fail).Tests:
tests/test_schema.py::TestIndexDeletion::test_drop_missing_index_force_is_a_no_op,::TestIndexDeletion::test_drop_existing_index_force(control),::TestIndexCreation::test_create_unique_full_text_index_is_refused(shared), andtests/test_native_point_read.py::test_identity_of_a_record_whose_rid_came_as_an_rid_object(native only).Verification: against the pre-fix 26.11.1.dev0 wheels on Linux x86-64 the native wheel fails the three new tests (
Index not found: Nope,DID NOT RAISE,__str__ returned non-string) and passes the control; the JVM wheel passes the three schema tests. black, isort clean. The fixed native build is tested by this PR'stest-native.ymlrun.🤖 Generated with Claude Code