pub fn compute_rows(
    selected: &[bool],
    locations: &[PageLocation],
    num_rows: usize,
) -> Result<Vec<Interval>, Error> {
    let page_intervals = compute_page_row_intervals(locations, num_rows)?;

    Ok(selected
        .iter()
        .zip(page_intervals.iter().copied())
        .filter_map(
            |(&is_selected, page)| {
                if is_selected {
                    Some(page)
                } else {
                    None
                }
            },
        )
        .collect())
}
/// Returns the set of intervals `(start, len)` containing all the
/// selected rows (for a given column)
Returns the set of intervals `(start, len)` containing all the
selected rows (for a given column)
Returns the set of intervals ` ( start len ) ` containing all the selected rows ( for a given column )
pub fn compute_rows(
    selected: &[bool],
    locations: &[PageLocation],
    num_rows: usize,
) -> Result<Vec<Interval>, Error> {
    let page_intervals = compute_page_row_intervals(locations, num_rows)?;
    Ok(selected
        .iter()
        .zip(page_intervals.iter().copied())
        .filter_map(
            |(&is_selected, page)| {
                if is_selected {
                    Some(page)
                } else {
                    None
                }
            },
        )
        .collect())
}
pub fn compute_rows ( selected : & [ bool ] , locations : & [ PageLocation ] , num_rows : usize , ) -> Result < Vec < Interval > , Error > { let page_intervals = compute_page_row_intervals ( locations , num_rows ) ? ; Ok ( selected . iter ( ) . zip ( page_intervals . iter ( ) . copied ( ) ) . filter_map ( | ( & is_selected , page ) | { if is_selected { Some ( page ) } else { None } } , ) . collect ( ) ) }
Returns the set of intervals `(start, len)` containing all the
selected rows (for a given column)
Returns the set of intervals ` ( start len ) ` containing all the selected rows ( for a given column )
selected
&[bool]
locations
&[PageLocation]
num_rows
usize