pub trait Consolidate {
type Output;
// Required method
fn consolidate(self) -> Self::Output;
}Expand description
Trait for consolidating chunked types into contiguous storage.
§Output Type
The Output associated type defines what the consolidated result is:
SuperArray::Output = ArraySuperTable::Output = Table
§When to Use
- After parallel batch processing that returns chunked results
- Before operations requiring contiguous memory (e.g., FFI, certain operations)
- When you need to serialise to formats requiring single buffers
§Naming
The consolidated result uses the name from the source. Call .rename() or
equivalent if you need a different name.
Required Associated Types§
Required Methods§
Sourcefn consolidate(self) -> Self::Output
fn consolidate(self) -> Self::Output
Consolidates chunked data into contiguous storage.
Consumes self and returns a consolidated Output.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl Consolidate for Vec<Table>
Available on crate feature chunked only.
impl Consolidate for Vec<Table>
chunked only.Source§fn consolidate(self) -> Table
fn consolidate(self) -> Table
Consolidate a vector of tables with the same schema into a single table.
Returns an empty table if the input is empty. For a single table, returns it directly without copying.
When the arena feature is enabled, all column buffers are written
into a single allocation then sliced into typed views, reducing
allocation count from O(columns) to O(1). The resulting buffers
are SharedBuffer-backed; mutations trigger copy-on-write.
Without the arena feature, falls back to per-column concat.