The order of cells, and the symbolic window #
A window sorts its partition by an ORDER BY clause and reads frames off
that order. Over symbolic rows the clause reads, for each order column,
3 + k columns of its cell (Sym.keyIdx): the value column, the two
columns placing a code against its value, and the rank. Read
lexicographically with the column's own direction and null placement,
they sort the cells as the values they stand for (Sym.leOn_key).
The columns of a cell an order reads: its value, the two columns placing it against its value, and its rank.
Instances For
Dependency graph
Order columns on non-null values #
The key of a cell #
The key of a cell: the columns an order reads.
Equations
- Sym.keyOf e q = e (Sym.keyIdx k q)
Instances For
Dependency graph
Dependency graph
The key column placing a code first.
Equations
- Sym.q1 k = Fin.castAdd k 1
Instances For
Dependency graph
The key column placing a code second.
Equations
- Sym.q2 k = Fin.castAdd k 2
Instances For
Dependency graph
The ranks, read lexicographically #
The key read lexicographically #
The lexicographic reading of two keys with one column direction.
Equations
- Sym.leKey cl X Y = OrderSpec.leOn (fun (x : Fin (3 + k)) => cl) (List.finRange (3 + k)) X Y
Instances For
Dependency graph
The value facts the key rests on #
The order of keys is the order of values #
A clause over the keys of its columns' cells #
The clause read over the keys: each of its columns becomes the
3 + k columns of its cell's key, with the column's direction and null
placement.
Equations
- Sym.expandSpec o z = o (finProdFinEquiv.symm z).1
Instances For
Dependency graph
The keys of the cells a clause reads, flattened.
Equations
- Sym.flatKey X z = Sym.keyOf (X (finProdFinEquiv.symm z).1) (finProdFinEquiv.symm z).2
Instances For
Dependency graph
A frame condition read over the keys. An offset bound has no reading
there (it moves a value, not a key) and is sent to the whole partition; it is
outside the signature the pass works in (FrameCond.noOff).
Equations
- Sym.expandCond FrameCond.whole = FrameCond.whole
- Sym.expandCond (FrameCond.le o) = FrameCond.le (Sym.expandSpec o)
- Sym.expandCond (FrameCond.lt o) = FrameCond.lt (Sym.expandSpec o)
- Sym.expandCond (FrameCond.ge o) = FrameCond.ge (Sym.expandSpec o)
- Sym.expandCond (FrameCond.gt o) = FrameCond.gt (Sym.expandSpec o)
- Sym.expandCond (a.and b) = (Sym.expandCond a).and (Sym.expandCond b)
- Sym.expandCond (a.or b) = (Sym.expandCond a).or (Sym.expandCond b)
- Sym.expandCond (FrameCond.orAll cs) = FrameCond.orAll fun (j : Fin q) => Sym.expandCond (cs j)
- Sym.expandCond (FrameCond.geOff o k_1 pre a) = FrameCond.whole
- Sym.expandCond (FrameCond.leOff o k_1 pre a) = FrameCond.whole
Instances For
Dependency graph
The window over symbolic rows #
The order columns of a symbolic window: the key columns of the cells the clause reads.
Equations
- Sym.winOIdx O z = Sym.ci (Fin.natAdd k (O (finProdFinEquiv.symm z).1)) (Sym.keyIdx k (finProdFinEquiv.symm z).2)
Instances For
Dependency graph
The frame expanded over the keys.
Equations
- Sym.expandFrame w = if w.cond.noOff = true then { cond := Sym.expandCond w.cond, self := w.self } else ValueFrame.whole
Instances For
Dependency graph
Dependency graph
The cells of a window's row: the input row's cells, then the window's value as a concrete cell.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The rows a window over an all-regular input emits.
Equations
- Sym.winRows P O o w t f keep R γ = Multiset.map (fun (u : Fin n' → T) => Fin.snoc u (ValueFrame.windowValueOpt P O o w t f keep R u γ)) R
Instances For
Dependency graph
The symbolic window's slice: the encodings of the window's rows, its values being values of the cut.