rechunk_sequences

Function rechunk_sequences 

Source
pub fn rechunk_sequences(
    sequences: impl IntoIterator<Item = RowIdSequence>,
    chunk_sizes: impl IntoIterator<Item = u64>,
    allow_incomplete: bool,
) -> Result<Vec<RowIdSequence>>
Expand description

Re-chunk a sequences of row ids into chunks of a given size.

The sequences may less than chunk sizes, because the sequences only contains the row ids that we want to keep, they come from the updates records. But the chunk sizes are based on the fragment physical rows(may contain inserted records). So if the sequences are smaller than the chunk sizes, we need to assign the incremental row ids in the further step. This behavior is controlled by the allow_incomplete parameter.

ยงErrors

If allow_incomplete is false, will return an error if the sum of the chunk sizes is not equal to the total number of row ids in the sequences.