Struct parquet::arrow::arrow_reader::RowSelection
source · pub struct RowSelection { /* private fields */ }
Expand description
RowSelection
allows selecting or skipping a provided number of rows
when scanning the parquet file.
This is applied prior to reading column data, and can therefore be used to skip IO to fetch data into memory
A typical use-case would be using the PageIndex
to filter out rows
that don’t satisfy a predicate
Implementations
sourceimpl RowSelection
impl RowSelection
sourcepub fn from_filters(filters: &[BooleanArray]) -> Self
pub fn from_filters(filters: &[BooleanArray]) -> Self
Creates a RowSelection
from a slice of BooleanArray
Panic
Panics if any of the BooleanArray
contain nulls
sourcepub fn split_off(&mut self, row_count: usize) -> Self
pub fn split_off(&mut self, row_count: usize) -> Self
Splits off the first row_count
from this RowSelection
sourcepub fn and_then(&self, other: &Self) -> Self
pub fn and_then(&self, other: &Self) -> Self
Given a RowSelection
computed under self
, returns the RowSelection
representing their conjunction
For example:
self: NNNNNNNNNNNNYYYYYYYYYYYYYYYYYYYYYYNNNYYYYY other: YYYYYNNNNYYYYYYYYYYYYY YYNNN
returned: NNNNNNNNNNNNYYYYYNNNNYYYYYYYYYYYYYNNNYYNNN
Panics
Panics if other
does not have a length equal to the number of rows selected
by this RowSelection
sourcepub fn intersection(&self, other: &Self) -> Self
pub fn intersection(&self, other: &Self) -> Self
Compute the intersection of two RowSelection
For example:
self: NNYYYYNNYYNYN
other: NYNNNNNNY
returned: NNNNNNNNYYNYN
sourcepub fn selects_any(&self) -> bool
pub fn selects_any(&self) -> bool
Returns true
if this RowSelection
selects any rows
Trait Implementations
sourceimpl Clone for RowSelection
impl Clone for RowSelection
sourcefn clone(&self) -> RowSelection
fn clone(&self) -> RowSelection
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more