Skip to content

native: drop_type() drops populated graph types; a held VectorIndex re-reads after a drop - #166

Merged
tae898 merged 1 commit into
mainfrom
fix/native-parity-drop
Nov 1, 2026
Merged

tae898 merged 1 commit into
mainfrom
fix/native-parity-drop

Conversation

@tae898

@tae898 tae898 commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator

Closes #164
Closes #165

Two native/JVM differences found by an audit of the native code paths after #162. Both fixes are Python-only.

Tests (shared, both builds):

  • tests/test_schema.py::TestTypeDeletion::test_drop_type_drops_a_populated_graph_type[vertex|edge]
  • tests/test_vector_index_introspection.py::TestWrapperAcrossRebuildAndDrop::test_dropped_index_raises_and_never_answers_empty: all four reads now checked on both builds (the native ones were inside an if __backend__ == "jvm" before).
  • ...::test_a_recreated_index_reports_its_own_configuration: drop, re-create with quantization="NONE", the held wrapper reports NONE.

Verification: against the pre-fix 26.11.1.dev0 wheels on Linux x86-64 the native wheel fails all four new tests (DROP TYPE "contains Vertices" / "contains Edges", DID NOT RAISE on the dropped index, 'INT8' == 'NONE' on the re-created one) and the JVM wheel passes all four. black, isort, bandit clean. The fixed native build is tested by this PR's test-native.yml run.

🤖 Generated with Claude Code

…e-reads after a drop (#164, #165)

Two native/JVM differences found by an audit of the native code paths
after #162:

- drop_type ran SQL DROP TYPE, which refuses a vertex or edge type that
  holds records; the JVM build calls LocalSchema.dropType, which drops
  it, as the docstring says. The native call now runs DROP TYPE ... UNSAFE.
- get_size(), get_metadata() and get_quantization() of a held native
  VectorIndex answered after DROP INDEX (a SQL row count, a memoized
  engine_info). They now re-read the metadata first, as get_stats() did:
  a dropped index raises with its name, a re-created one reports its own
  configuration.

Shared tests: drop of a populated vertex and edge type; every read of a
dropped index raises; a re-created index with quantization NONE is
reported as NONE. Against the pre-fix 26.11.1.dev0 wheels the native
wheel fails all four, the JVM wheel passes all four.

Closes #164
Closes #165

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tae898
tae898 merged commit 94813ce into main Nov 1, 2026
36 checks passed
@tae898
tae898 deleted the fix/native-parity-drop branch November 1, 2026 12:41
tae898 added a commit that referenced this pull request Nov 1, 2026
…after DROP INDEX (#186) (#187)

The query-vector list bullet said a float64 array crosses as one buffer on
the JVM build with no value change; since #176 a positional float64 array
is narrowed to float32 on both builds (the next bullet). The vectors page
now says what #166 made true on both builds: held index reads ask the
engine, raise with the index name after DROP INDEX, and report a
re-created index's own configuration.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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