struct RunEncodedEncoder<'a, R: RunEndIndexType> {
ends_slice: &'a [<R as ArrowPrimitiveType>::Native],
base: usize,
len: usize,
values: FieldEncoder<'a>,
cur_run: usize,
cur_end: usize,
}Expand description
Generic encoder for Arrow RunArray<R>-based sites (run-end encoded).
Follows the pattern used by other generic encoders (i.e., ListEncoder<O>),
avoiding runtime branching on run-end width.
Fields§
§ends_slice: &'a [<R as ArrowPrimitiveType>::Native]§base: usize§len: usize§values: FieldEncoder<'a>§cur_run: usize§cur_end: usizeImplementations§
Source§impl<'a, R: RunEndIndexType> RunEncodedEncoder<'a, R>
impl<'a, R: RunEndIndexType> RunEncodedEncoder<'a, R>
fn new(arr: &'a RunArray<R>, values: FieldEncoder<'a>) -> Self
Sourcefn advance_to_row(&mut self, idx: usize) -> Result<(), ArrowError>
fn advance_to_row(&mut self, idx: usize) -> Result<(), ArrowError>
Advance cur_run so that idx is within the run ending at cur_end.
Uses the REE invariant: run ends are strictly increasing, positive, and 1-based.
fn encode<W: Write + ?Sized>( &mut self, out: &mut W, idx: usize, ) -> Result<(), ArrowError>
Auto Trait Implementations§
impl<'a, R> Freeze for RunEncodedEncoder<'a, R>
impl<'a, R> !RefUnwindSafe for RunEncodedEncoder<'a, R>
impl<'a, R> Send for RunEncodedEncoder<'a, R>
impl<'a, R> Sync for RunEncodedEncoder<'a, R>
impl<'a, R> Unpin for RunEncodedEncoder<'a, R>
impl<'a, R> !UnwindSafe for RunEncodedEncoder<'a, R>
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