pub struct CompositeRepDefUnraveler { /* private fields */ }
Expand description
As we decode we may extract rep/def information from multiple pages (or multiple chunks within a page).
For each chunk we create an unraveler. Each unraveler can have a completely different interpretation (e.g. one page might contain null items but no null structs and the next page might have null structs but no null items).
Concatenating these unravelers would be tricky and expensive so instead we have a composite unraveler which unravels across multiple unravelers.
Note: this class should be used even if there is only one page / unraveler. This is
because the RepDefUnraveler
’s API is more complex (it’s meant to be called by this
class)
Implementations§
Source§impl CompositeRepDefUnraveler
impl CompositeRepDefUnraveler
pub fn new(unravelers: Vec<RepDefUnraveler>) -> Self
Sourcepub fn unravel_validity(&mut self, num_values: usize) -> Option<NullBuffer>
pub fn unravel_validity(&mut self, num_values: usize) -> Option<NullBuffer>
Unravels a layer of validity
Returns None if there are no null items in this layer
Sourcepub fn unravel_offsets<T: ArrowNativeType>(
&mut self,
) -> Result<(OffsetBuffer<T>, Option<NullBuffer>)>
pub fn unravel_offsets<T: ArrowNativeType>( &mut self, ) -> Result<(OffsetBuffer<T>, Option<NullBuffer>)>
Unravels a layer of offsets (and the validity for that layer)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CompositeRepDefUnraveler
impl RefUnwindSafe for CompositeRepDefUnraveler
impl Send for CompositeRepDefUnraveler
impl Sync for CompositeRepDefUnraveler
impl Unpin for CompositeRepDefUnraveler
impl UnwindSafe for CompositeRepDefUnraveler
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
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>
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>
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