Skip to main content

Phase 8. Query DSL

FieldValue
MEPMEP-45 §Phases · Phase 8
StatusNOT STARTED
Started
Landed
Tracking issue
Tracking PR

Gate

Query fixture suite (~60 cases: filter, map, group-by, order-by, distinct, union, intersect, except, inner/left/cross join) compiles + runs byte-equal vs vm3 on host triple.

Goal-alignment audit

To be written before sub-phase 8.0 starts. Query DSL is the highest-value language feature for the dataset/AI workflows the docs target; without it even simple ETL fixtures fail. Aligns.

Sub-phases

#ScopeStatusCommitPR
8.0Query algebra lowering: transpiler3/c/lower/query.go fuses filter+map+take into a single loopNOT STARTED
8.1group by / order by / distinct / union / intersect / except operatorsNOT STARTED
8.2Joins: inner (hash-join via Swiss table), left (hash-join + right-side outer fill), cross (nested loop)NOT STARTED
8.3Arena allocation: intermediates live in mochi_arena released at query boundary; surviving result copied to GCNOT STARTED
8.4load/save adapters: JSON (yyjson), YAML (libfyaml), CSV (home-grown)NOT STARTED

Decisions made

Fill in along the way.

Deferred work

Cost-based join reordering: v2 (v1 honours source order).

Closeout notes

Fill in after gate green.