Expand description
Logical plan IR.
Relational-style representation of a query: Scan, Filter, Project,
Aggregate, Sort, Limit, Join. Built from a compiled Program
by walking method calls on arrays; unrecognised opcode sequences fall
through as an opaque Raw node.
The logical plan enables rewrites that are hard to express at the
opcode level: e.g. predicate pushdown, filter-then-project reorder,
join detection across let bindings.
This is a scaffold — the rewrite rules library is intentionally small.
Structs§
Enums§
Functions§
- detect_
join_ candidates - Walk a
LogicalPlanlooking for filter predicates that compare two distinct identifiers — a candidate equi-join between correlated scans. Returns a vector of (left-path, right-path) fragment pairs per detected candidate. Wiring actualJoinrewrite is future work. - lower
- Compile a
LogicalPlanback to a flatProgram. Inverse oflift. Lifting then lowering should produce a semantically-equivalent program (not necessarily byte-identical — the lowered form is canonicalised). - pushdown_
filter - Push a filter down through a project when the project’s map is a pure field-access (equi-projection). Enables evaluating predicate on the larger pre-project rowset, which is often cheaper.