Skip to main content

encode_rows

Function encode_rows 

Source
fn encode_rows(
    schema: &SchemaRef,
    shape: FrameShape,
    rows: &[FrameRow],
) -> Result<RecordBatch>
Expand description

Encodes buffered rows as one batch with direct N-row Arrow array construction.

Each histogram segment carries each distinct table row it references exactly once, and its local indices are remapped into that compact table, so the payload grows with the rows a segment actually names rather than with its positions. A single constituent child array is reused by clone (sharing its buffers); multiple constituents are concatenated, which copies.