package explain

Import Path
	github.com/freeeve/gochickpeas/gql/internal/explain (on go.dev)

Dependency Relation
	imports 6 packages, and imported by 2 packages

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.
Package-Level Type Names (total 3)
/* sort by: | */
Profile carries PROFILE's actual per-operator row counts, in the same branch-major segment order the renderer walks. Segs []SegProf func github.com/freeeve/gochickpeas/gql/internal/exec.ExecuteProfiled(ctx *eval.Ctx, p *plan.Plan) *Profile func Render(p *plan.Plan, prof *Profile, planTime time.Duration, est *plan.Estimates) []string
SegProf profiles one segment. PostWhereRows *uint64 ProjRows uint64 Stages []StageProf
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 []uint64 Single *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.