pub struct RepDefUnraveler { /* private fields */ }
Expand description
Starts with serialized repetition and definition levels and unravels them into validity buffers and offsets buffers
This is used during decoding to create the necessary arrow structures
Implementations§
Source§impl RepDefUnraveler
impl RepDefUnraveler
Sourcepub fn new(
rep_levels: Option<LevelBuffer>,
def_levels: Option<LevelBuffer>,
def_meaning: Arc<[DefinitionInterpretation]>,
) -> Self
pub fn new( rep_levels: Option<LevelBuffer>, def_levels: Option<LevelBuffer>, def_meaning: Arc<[DefinitionInterpretation]>, ) -> Self
Creates a new unraveler from serialized repetition and definition information
pub fn is_all_valid(&self) -> bool
Sourcepub fn max_lists(&self) -> usize
pub fn max_lists(&self) -> usize
If the current level is a repetition layer then this returns the number of lists at this level.
This is not valid to call when the current level is a struct/primitive layer because in some cases there may be no rep or def information to know this.
Sourcepub fn unravel_offsets<T: ArrowNativeType>(
&mut self,
offsets: &mut Vec<T>,
validity: Option<&mut BooleanBufferBuilder>,
) -> Result<()>
pub fn unravel_offsets<T: ArrowNativeType>( &mut self, offsets: &mut Vec<T>, validity: Option<&mut BooleanBufferBuilder>, ) -> Result<()>
Unravels a layer of offsets from the unraveler into the given offset width
When decoding a list the caller should first unravel the offsets and then unravel the validity (this is the opposite order used during encoding)
pub fn skip_validity(&mut self)
Sourcepub fn unravel_validity(&mut self, validity: &mut BooleanBufferBuilder)
pub fn unravel_validity(&mut self, validity: &mut BooleanBufferBuilder)
Unravels a layer of validity from the definition levels
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RepDefUnraveler
impl RefUnwindSafe for RepDefUnraveler
impl Send for RepDefUnraveler
impl Sync for RepDefUnraveler
impl Unpin for RepDefUnraveler
impl UnwindSafe for RepDefUnraveler
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