21 lines
989 B
Markdown
Raw Normal View History

2026-06-11 15:58:24 +02:00
## Query Plan Viewer
2026-06-11 15:58:24 +02:00
A static HTML viewer for `plan-runner` JSON files (the fixtures).
2026-06-11 16:00:58 +02:00
It evaluates a fixture in the browser and renders the plan DAG, the input facts, the relation computed at every plan node, and a per-row comparison against `expected_bindings`.
2026-06-11 16:00:58 +02:00
### Usage
Open [`index.html`](index.html) in a browser, then drop a fixture from `crates/plan-runner/fixtures/` onto the page or pick one with the file input.
2026-06-11 16:00:58 +02:00
When the repository is served over HTTP (`make viewer`), a fixture can also be loaded through a query parameter:
2026-06-11 16:00:58 +02:00
```text
http://localhost:8000/tools/plan-viewer/index.html?fixture=../../crates/plan-runner/fixtures/two_atom_join.json
```
2026-06-11 15:58:24 +02:00
### Scope
2026-06-11 16:00:58 +02:00
The viewer re-implements the operator semantics of `crates/query-ops` and `crates/plan-runner` in JavaScript, for display only.
The Rust crates and their tests remain the correctness oracle; if the two ever disagree, the Rust behavior wins and the viewer has a bug.
2026-06-11 16:00:58 +02:00
Only `scan` and `join` actions are supported.