pub trait Spillable {
// Required methods
fn spill_to_disk(&mut self) -> Result<(), QueryError>;
fn spilled_size(&self) -> u64;
// Provided methods
fn spill_count(&self) -> u64 { ... }
fn spilled_rows(&self) -> u64 { ... }
fn has_spilled(&self) -> bool { ... }
fn try_spill(&mut self) -> Result<bool, QueryError> { ... }
}Expand description
Trait for operators that can spill intermediate data to disk.
Each blocking operator that may exceed the memory budget implements spill by partitioning buffered rows to managed spill files.
Required Methods§
Sourcefn spill_to_disk(&mut self) -> Result<(), QueryError>
fn spill_to_disk(&mut self) -> Result<(), QueryError>
Spill in-memory data to disk to free memory.
Sourcefn spilled_size(&self) -> u64
fn spilled_size(&self) -> u64
Number of bytes currently spilled to disk.
Provided Methods§
Sourcefn spill_count(&self) -> u64
fn spill_count(&self) -> u64
Number of discrete spill operations (runs/files) written to disk.
Sourcefn spilled_rows(&self) -> u64
fn spilled_rows(&self) -> u64
Number of logical rows written to spill runs.
Sourcefn has_spilled(&self) -> bool
fn has_spilled(&self) -> bool
Whether this operator has spilled data to disk.
Sourcefn try_spill(&mut self) -> Result<bool, QueryError>
fn try_spill(&mut self) -> Result<bool, QueryError>
Spill data if not already spilled, returning whether any data was spilled.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".