Skip to main content

parallel_count

Function parallel_count 

Source
pub fn parallel_count<T, F>(input: &[T], chunk_count: usize, counter: F) -> u64
where T: Send + Sync + Clone + 'static, F: Fn(&[T]) -> u64 + Send + Sync + 'static,
Expand description

Count-only variant of parallel_scan that avoids materialising the intermediate Vec. The worker returns a usize (number of matching rows in its chunk), and the coordinator sums them.

Used by SELECT COUNT(*) FROM t WHERE filter where the full row payload is irrelevant.