• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

joaoh82 / rust_sqlite / 25040177500
69%

Build:
DEFAULT BRANCH: main
Ran 28 Apr 2026 07:41AM UTC
Jobs 1
Files 30
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

28 Apr 2026 07:37AM UTC coverage: 70.28% (+0.6%) from 69.705%
25040177500

push

github

web-flow
Phase 7d.2: SQL integration for HNSW (CREATE INDEX, KNN probe) (#50)

Wires the Phase 7d.1 HNSW algorithm into the SQL surface so users
can finally do KNN queries through the engine:

  CREATE TABLE docs (id INTEGER PRIMARY KEY, e VECTOR(384));
  INSERT INTO docs (e) VALUES ([0.1, 0.2, ...]);
  CREATE INDEX ix_e ON docs USING hnsw (e);
  SELECT id FROM docs
  ORDER BY vec_distance_l2(e, [0.5, 0.3, ...])
  LIMIT 10;

Five integration points:

  1. **Table::hnsw_indexes** — new Vec<HnswIndexEntry> field
     parallel to secondary_indexes. HnswIndexEntry holds
     {name, column_name, index} where index is the in-memory
     HnswIndex from 7d.1. Auto-cloned by deep_clone (Phase 4f
     transaction snapshot path).

  2. **CREATE INDEX … USING hnsw (col)** parser + executor
     branch. Routes through new IndexMethod::{Btree, Hnsw}
     dispatch in execute_create_index. Validates the column is
     VECTOR(N) and rejects UNIQUE on HNSW (no semantic meaning).
     Pre-populates the graph from existing rows. Distance metric
     is L2 by default; cosine and dot are 7d.x follow-ups
     (would need either WITH (metric=…) clause or hnsw_cosine
     / hnsw_dot named methods — not in 7d.2 scope).

  3. **INSERT incremental maintenance** in Table::insert_row.
     After writing a row, calls Table::maintain_hnsw_on_insert
     for any HNSW index whose column matches. Uses a snapshot
     of current row storage as the get_vec source so the
     algorithm's neighbor lookups don't fight with the
     &mut self.hnsw_indexes borrow.

  4. **DELETE / UPDATE refusal** in execute_delete /
     execute_update. HNSW lacks an in-place delete-node
     primitive and we don't yet have a graph-rebuild trigger
     (that's part of 7d.3 with persistence). Fail with a
     helpful message that points at the workaround
     (DROP the index, mutate, re-CREATE) and explicitly
     mentions Phase 7d.3 as the follow-up.

  5. **Query optimizer hook** in execute_select_rows. Before
     ... (continued)

218 of 251 new or added lines in 4 files covered. (86.85%)

3 existing lines in 1 file now uncovered.

4973 of 7076 relevant lines covered (70.28%)

1.45 hits per line

Uncovered Changes

Lines Coverage ∆ File
26
74.89
1.42% src/sql/executor.rs
4
92.8
0.04% src/sql/mod.rs
3
91.68
0.12% src/sql/pager/mod.rs

Coverage Regressions

Lines Coverage ∆ File
3
17.61
-0.33% src/lib.rs
Jobs
ID Job ID Ran Files Coverage
1 25040177500.1 28 Apr 2026 07:41AM UTC 30
70.28
GitHub Action Run
Source Files on build 25040177500
  • Tree
  • List 30
  • Changed 5
  • Source Changed 0
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 8922c36a on github
  • Prev Build on main (#25020392082)
  • Next Build on main (#25067108976)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc