Skip to main content

fold

Function fold 

Source
pub fn fold(
    arena: &mut MorselArena,
    op: StrFold,
    v: &ValueVector,
) -> Result<ValueVector>
Expand description

Evaluate op(v) into a new flat string vector.

The answers are flat views whatever the argument was, since a chunk of computed strings is read back by row and the encodings are the scan’s business rather than a kernel’s. What the encodings still decide is how much folding happens: a constant folds once, and codes over a table fold the table rather than the rows, so the bytes of an entry are written into the answer once however many rows point at it and the rest of the work is a gather over views. Only a flat argument folds a string a row.