Skip to content

design: adopt gluesql-core as the SQL engine, drop bundled SQLite (DD-069, REQ-231)#585

Merged
avrabe merged 1 commit into
mainfrom
design/dd-069-gluesql-engine
Jun 25, 2026
Merged

design: adopt gluesql-core as the SQL engine, drop bundled SQLite (DD-069, REQ-231)#585
avrabe merged 1 commit into
mainfrom
design/dd-069-gluesql-engine

Conversation

@avrabe

@avrabe avrabe commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Records the verified outcome of the SQL-engine research + prototype (you chose "swap, verify-first").

Verdict: GO — migrate to gluesql-core

Prototype (proto/gluesql-verify, throwaway) confirmed:

  • Dialect ✓ — the V-closure JOIN with NOT IN (subquery) and UPDATE artifacts SET … WHERE … both execute in gluesql's dialect (the core risk, retired).
  • Weight ✓ — but only via gluesql-core. The umbrella gluesql crate pulls every storage backend (csv/parquet/sled/redb/mongo/redis/git) and compiles cc (~55s). gluesql-core + memory-storage compiles only sqlparser + core (pure Rust, no cc, ~19s). rusqlite bundled compiles the SQLite-C amalgamation per job — the CI weight that made feat(sql): rivet sql write slice — UPDATE via validate + safe YAML edit (REQ-230) #582 sit ~40 min queued (CI: self-hosted runner disk exhaustion fails all compile gates; post-job cleanup hook frees nothing #567).
  • AsyncGlue::execute is async; bridge into the sync sql::query/plan_write via a small block_on.
  • Architecture bonus — gluesql-core's Store/StoreMut traits let rivet's store be the DB (DD-068's virtual-tables vision): reads + writes go native, deleting the read-path copy and the write-path staging-diff.

What this PR is

Design artifacts only (DD-069 + REQ-231). The migration itself (REQ-231) is the focused follow-up: swap the engine behind the unchanged sql::query/plan_write API, remove rusqlite + libsqlite3-sys, keep all read/write/serve tests green.

🤖 Generated with Claude Code

…te (DD-069, REQ-231)

Prototype (proto/gluesql-verify) confirmed the swap is viable: the V-closure
JOIN/NOT-IN subquery and UPDATE both work in gluesql's dialect, and
`gluesql-core` + memory storage is pure Rust (sqlparser + core only, no `cc`,
~19s) vs the umbrella `gluesql` crate which pulls every storage backend + a C
compiler (~55s). rusqlite `bundled` compiles the SQLite C amalgamation per job —
the CI weight that made #582 sit ~40 min queued (#567). REQ-231 tracks the
migration (engine swap behind the stable sql::query/plan_write API; rusqlite +
libsqlite3-sys removed; all read/write/serve tests pass unchanged).

Refs: REQ-231, DD-069, REQ-229
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

📐 Rivet artifact delta

Change Count
Added 2
Removed 0
Modified 0
Downstream impacted (depth ≤ 5) 0

Graph

graph LR
  DD_069["DD-069"]:::added
  REQ_231["REQ-231"]:::added
  classDef added fill:#d4edda,stroke:#28a745,color:#155724
  classDef removed fill:#f8d7da,stroke:#dc3545,color:#721c24
  classDef modified fill:#fff3cd,stroke:#ffc107,color:#856404
  classDef overflow fill:#e2e3e5,stroke:#6c757d,color:#495057,stroke-dasharray: 3 3
Loading
Added
  • DD-069
  • REQ-231

📎 Full HTML dashboard attached as workflow artifact rivet-delta-pr-585download from the workflow run.

Posted by rivet-delta workflow. The graph shows only changed artifacts; open the HTML dashboard (above) for full context.

@codecov

codecov Bot commented Jun 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@avrabe avrabe merged commit 8290132 into main Jun 25, 2026
28 checks passed
@avrabe avrabe deleted the design/dd-069-gluesql-engine branch June 25, 2026 03:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant