Expand description
The rewrite passes, cardinality estimation, join ordering, predicate transfer and layout adaptation.
Rank 11 in the layer rule. See xtask/layers.toml and spec/18-package-layout.md.
Five passes so far. spec/09-optimizer.md section 9.1 describes a sequence and PASSES is
the start of it. Column pruning came first, because it is the pass whose absence is measured in
gigabytes: a scan that reads 105 columns to answer a question about three is the whole of the
difference on ClickBench, and the Parquet reader has been able to read a subset since M1 with
nothing able to tell it which subset.
Modules§
- columns
- Column pruning, which is the scan half of projection pushdown.
- empty
- Replacing a subtree that cannot produce a row with a relation that produces none.
- filter
- Filter pushdown.
- fold
- Constant folding and the simplifications that fall out of it.
- nulls
- What a predicate says about a row that a join padded with nulls.
- pass
- What a rewrite is, and what it is given besides the plan.
- tables
- Which tables an expression reads, and which ones an operator produces.
- topn
- Turning a limit over a sort into a top N.
Constants§
- RANK
- The crate this rank belongs to, so that the layer check has something to read.
Statics§
- PASSES
- The passes, in the order they run.
Functions§
- optimize
- Rewrites a bound plan into the plan that runs, with every pass on.
- optimize_
with - Rewrites a bound plan into the plan that runs, skipping the passes the context turned off.