Skip to content

native: drop_index(force=True) and unique index types match the JVM build; get_identity() keeps an RID - #171

Merged
tae898 merged 2 commits into
mainfrom
fix/native-index-parity
Nov 1, 2026
Merged

tae898 merged 2 commits into
mainfrom
fix/native-index-parity

Conversation

@tae898

@tae898 tae898 commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator

Closes #169
Closes #170

Three small native/JVM differences, found by probes that run the same scenarios on both builds (after #162). Python-only.

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), and tests/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's test-native.yml run.

🤖 Generated with Claude Code

tae898 and others added 2 commits November 1, 2026 20:55
…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>
@tae898
tae898 merged commit 1107999 into main Nov 1, 2026
36 checks passed
@tae898
tae898 deleted the fix/native-index-parity branch November 1, 2026 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant