Skip to main content

Spillable

Trait Spillable 

Source
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§

Source

fn spill_to_disk(&mut self) -> Result<(), QueryError>

Spill in-memory data to disk to free memory.

Source

fn spilled_size(&self) -> u64

Number of bytes currently spilled to disk.

Provided Methods§

Source

fn spill_count(&self) -> u64

Number of discrete spill operations (runs/files) written to disk.

Source

fn spilled_rows(&self) -> u64

Number of logical rows written to spill runs.

Source

fn has_spilled(&self) -> bool

Whether this operator has spilled data to disk.

Source

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".

Implementors§