The symbolic grouping #
A grouping over a symbolic relation groups by the descriptor and by the
key cells, and counts through the value column of each cell: a cell's
value column is null exactly when the value it stands for is
(Sym.isNull_termV), and the counting aggregates of the minimal
signature read nothing but how many values are not null
(SeqAggFunc.ReadsCount). Under the descriptor of a parameter row the
groups are the encodings of the groups the query forms at that row, one
for one, the encoding being injective on good values; so the grouping of
the symbolic relation computes, under each such descriptor, the encodings
of the keys and the very counts of the grouping
(Sym.gammaRows_slice).
The plain grouping, as a function of its input #
The rows a grouping emits from its input.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The symbolic grouping's keys and terms #
The key columns of the symbolic grouping: the descriptor's, then the key cells'.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
A term of a grouping, read on a symbolic row: the value column of the cell it reads.
Equations
- Sym.termV (TermIn.const a) = TermIn.const a
- Sym.termV (TermIn.outer o) = Fin.addCases (fun (i : Fin k) => #(Sym.ci (Fin.castAdd m i) (Sym.iV k))) (fun (j : Fin c) => TermIn.outer j) o
- Sym.termV #i = #(Sym.ci (Fin.natAdd k i) (Sym.iV k))
- Sym.termV x✝ = TermIn.const 0
Instances For
Dependency graph
A term read on an encoded row is null exactly when the term is.
Dependency graph
The encoding of a key.
Equations
- Sym.encK C par g = Fin.append (Sym.descEnc C par) (Sym.ofCells fun (t : Fin n₁) => Sym.enc C k (Sym.vcode C par (g t)))
Instances For
Dependency graph
Dependency graph
The symbolic grouping, under the descriptor of a parameter row, emits the encodings of the keys the grouping forms at that row, each with the counts the grouping computes there.
Dependency graph
From the grouping's rows to symbolic rows #
The cells of a grouping's row: the descriptor and key cells as they are, each aggregate column as a concrete cell.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
Second-level aggregation #
The rows a second-level aggregation emits from its input.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The value column of a projection column's cell.
Equations
- Sym.projV p = ProjColIn.term (Sym.CS.sa 0 (Sym.projCS p) (Sym.iV k)).toG
Instances For
Dependency graph
Aggregation without grouping #
The scalar aggregation emits one row on every input, the empty one
included, so its symbolic counterpart emits one row under every
descriptor: it groups by the descriptor the union of the input's rows,
tagged ValueType.nonzero, and of one padding row per descriptor, tagged
0, and its aggregates read only the rows tagged ValueType.nonzero
through a FILTER clause.
The descriptor columns of a tagged symbolic row.
Equations
- Sym.sKeyIdx y = Fin.castAdd 1 (Sym.ci (Fin.castAdd m (finProdFinEquiv.symm y).1) (finProdFinEquiv.symm y).2)
Instances For
Dependency graph
Dependency graph
The cells of a scalar aggregation's row: the descriptor's cells, then each aggregate column as a concrete cell.
Equations
- One or more equations did not get rendered due to their size.