pub struct IndexedSpill { /* private fields */ }Expand description
Disk-only physical-row store with constant-memory positional lookup.
Each row retains the exact physical layout described by schema and is
encoded with the same positional tagged representation as SpillBuffer.
Record offsets live in a second temporary file, so even a partition with
billions of rows does not create an in-memory offset table. A single decoded
physical row is the only input-sized allocation retained by Self::get.
Both files are unlinked by NamedTempFile on drop.
Implementations§
Source§impl IndexedSpill
impl IndexedSpill
pub fn new(input_schema: RowSchema) -> ExecResult<Self>
pub fn len(&self) -> u64
pub fn is_empty(&self) -> bool
pub fn encoded_bytes(&self) -> u64
pub fn row_schema(&self) -> &RowSchema
Sourcepub fn push(&mut self, row: &PhysicalRow) -> ExecResult<()>
pub fn push(&mut self, row: &PhysicalRow) -> ExecResult<()>
Append one indivisible row. Failed writes roll both files back to their original lengths, so callers never observe a partial index entry.
Sourcepub fn get(&mut self, index: u64) -> ExecResult<PhysicalRow>
pub fn get(&mut self, index: u64) -> ExecResult<PhysicalRow>
Decode the row at index without loading any other row or index entry.
Auto Trait Implementations§
impl Freeze for IndexedSpill
impl RefUnwindSafe for IndexedSpill
impl Send for IndexedSpill
impl Sync for IndexedSpill
impl Unpin for IndexedSpill
impl UnsafeUnpin for IndexedSpill
impl UnwindSafe for IndexedSpill
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
impl<T> ErasedDestructor for Twhere
T: 'static,
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