pub struct PhysicalSelection { /* private fields */ }Expand description
A set of physical row ID ranges, sorted ascending and non-overlapping.
Each range is start..end (exclusive end) in physical row ID space.
Consumers convert this to their reader’s row selection type.
§Invariants
- Ranges are sorted by start.
- No two ranges overlap or are adjacent (they are merged).
- Each range is non-empty.
Implementations§
Source§impl PhysicalSelection
impl PhysicalSelection
Sourcepub fn from_ids(ids: impl IntoIterator<Item = u32>) -> Self
pub fn from_ids(ids: impl IntoIterator<Item = u32>) -> Self
Build from an unsorted iterator of physical row IDs.
Sorts the IDs, deduplicates, and merges into contiguous ranges.
Sourcepub fn iter_ids(&self) -> impl Iterator<Item = u32> + '_
pub fn iter_ids(&self) -> impl Iterator<Item = u32> + '_
Iterate over individual physical row IDs in ascending order.
Sourcepub fn virtual_order_map(&self, virtual_ids: &[u32]) -> Vec<usize>
pub fn virtual_order_map(&self, virtual_ids: &[u32]) -> Vec<usize>
Mapping from ascending physical order back to virtual (sorted) order.
Returns a Vec<usize> of length row_count() where result[i] is
the 0-based offset within the virtual range that physical row i
corresponds to. This is needed to reorder materialised rows back to
sort order after a Parquet read (which returns rows in physical order).
Trait Implementations§
Source§impl Clone for PhysicalSelection
impl Clone for PhysicalSelection
Source§fn clone(&self) -> PhysicalSelection
fn clone(&self) -> PhysicalSelection
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PhysicalSelection
impl Debug for PhysicalSelection
Source§impl PartialEq for PhysicalSelection
impl PartialEq for PhysicalSelection
impl Eq for PhysicalSelection
impl StructuralPartialEq for PhysicalSelection
Auto Trait Implementations§
impl Freeze for PhysicalSelection
impl RefUnwindSafe for PhysicalSelection
impl Send for PhysicalSelection
impl Sync for PhysicalSelection
impl Unpin for PhysicalSelection
impl UnsafeUnpin for PhysicalSelection
impl UnwindSafe for PhysicalSelection
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more