Involved Source Files Expression and literal rendering for the plan tree (split from
render.go for the file-size norm). Package explain renders a plan as text for EXPLAIN/PROFILE (port of the
Rust explain.rs, trimmed of the recognizer-kernel operators and rank-mode
gating -- estimates always render). PROFILE per-operator counts arrive
via the Profile seam, populated by the executor in a later milestone.
StageProf profiles one stage: Match holds one count per op plus a
trailing one for the stage WHERE; Single is a one-output stage.Match[]uint64Single*uint64
Package-Level Functions (total 2)
Canonical renders a plan as a stable shape string for golden
plan-regression snapshots: operator order and indentation, scan sources,
hop patterns, the recognizers that fired (hash join, SP gate, mono
var-expand, decorrelation, distinct, aggregate) and the chosen anchor note
-- but NOT the wall-clock planning time, the "est" header, or the per-operator
numeric estimates, which drift with the fixture while the shape and the anchor
choice should not. est supplies the anchor notes only; its numbers are omitted.
The result is result-independent (it never executes) and deterministic across
plannings, so a diff is a review prompt that a planner change moved a plan.
Render renders the plan tree with estimates (always) and PROFILE counts
(when prof is non-nil), as one line per operator.
The pages are generated with Goldsv0.8.7. (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds.