pub fn element_ids(
arena: &mut MorselArena,
table: u32,
rows: &ValueVector,
) -> Result<ValueVector>Expand description
The identifiers of a chunk’s nodes, which is n: and then the table
and the row each node sits at.
A level of a plan has one table for every row it will ever produce and carries the row itself as a column, so the identifier is a head written once for the whole chunk and a number written once a row. That is the reason this is a kernel rather than a call: the argument is a node and no chunk holds one, but the two numbers a node is made of are both here already.
The row is an integer and not a string, so nothing about the answer is read out of the argument the way a trim or a substring reads its answer out of the string it was handed. Every identifier is written, and nearly all of them are written into the view itself: a table under ten and a row under nine digits is twelve bytes, which is what fits inline, so a chunk of a normal graph fills no buffer at all.
A negative row cannot come out of storage and is written with its sign rather than being refused, since a kernel that answers for every input it can be handed is one fewer thing to get right.