Skip to main content

grafeo_core/execution/spill/
mod.rs

1//! Transparent spilling for out-of-core query processing.
2//!
3//! This module provides infrastructure for spilling operator state to disk
4//! when memory pressure is high, enabling queries to complete even when
5//! intermediate results exceed available memory.
6//!
7//! # Architecture
8//!
9//! - [`SpillManager`] - Manages spill file lifecycle with automatic cleanup (sync)
10//! - [`AsyncSpillManager`] - Async version using tokio for non-blocking I/O
11//! - [`SpillFile`] - Read/write abstraction for individual spill files (sync)
12//! - [`AsyncSpillFile`] - Async version using tokio
13//! - Serializer functions for binary Value encoding (no serde overhead)
14//! - [`ExternalSort`] - External merge sort for out-of-core sorting
15//! - [`PartitionedState`] - Hash partitioning for spillable aggregation
16
17mod async_file;
18mod async_manager;
19mod external_sort;
20mod file;
21mod manager;
22mod partition;
23mod serializer;
24
25pub use async_file::{AsyncSpillFile, AsyncSpillFileReader};
26pub use async_manager::AsyncSpillManager;
27pub use external_sort::{ExternalSort, NullOrder, SortDirection, SortKey};
28pub use file::{SpillFile, SpillFileReader};
29pub use manager::SpillManager;
30pub use partition::{DEFAULT_NUM_PARTITIONS, PartitionedState};
31pub use serializer::{deserialize_row, deserialize_value, serialize_row, serialize_value};