Skip to main content

plan_offset_chunks

Function plan_offset_chunks 

Source
pub fn plan_offset_chunks(
    total: u64,
    chunk_size: u64,
) -> CliResult<Vec<OffsetChunk>>
Expand description

Split a result set of total rows into offset/limit chunks.

This is the parallel form of what a source’s serial offset pagination already does; it takes a count, never a maximum key. Chunking an id range from a count is wrong the moment ids are sparse — see the partition reference.