pub struct SpillSender { /* private fields */ }Expand description
The sender side of the spill. This is used to write batches to the spill.
Note: this must be kept alive until after the readers are done reading the spill. Otherwise, they will return an error.
Implementations§
Source§impl SpillSender
impl SpillSender
Sourcepub async fn write(&mut self, batch: RecordBatch) -> Result<(), DataFusionError>
pub async fn write(&mut self, batch: RecordBatch) -> Result<(), DataFusionError>
Write a batch to the spill.
If there is room in the memory_limit then the batch is queued.
If memory_limit is first encountered then all queued batches, and this one,
will be written to disk as part of this call.
If we are already spilling then the batch will be written to disk as part of this
call.
Sourcepub fn send_error(&mut self, err: DataFusionError)
pub fn send_error(&mut self, err: DataFusionError)
Send an error to the spill. This will be sent to all readers of the spill.
Sourcepub async fn finish(&mut self) -> Result<(), DataFusionError>
pub async fn finish(&mut self) -> Result<(), DataFusionError>
Complete the spill write. This will finalize the Arrow IPC stream file.
The file will remain available for reading until [Self::shutdown()]
or until the spill is dropped.
Auto Trait Implementations§
impl Freeze for SpillSender
impl !RefUnwindSafe for SpillSender
impl Send for SpillSender
impl Sync for SpillSender
impl Unpin for SpillSender
impl !UnwindSafe for SpillSender
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§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> 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