Skip to main content

estimate_batch_size

Function estimate_batch_size 

Source
pub fn estimate_batch_size(
    sources: impl IntoIterator<Item = (u64, u64)>,
) -> usize
Expand description

Estimates a batch size from (num_rows, estimated_bytes) pairs.

Uses the widest source with valid statistics and targets approximately 64 MiB of decoded data. The result is clamped to 1..=DEFAULT_READ_BATCH_SIZE. Returns the default read batch size if no source contains usable statistics.