Skip to main content

recycle_chunk

Function recycle_chunk 

Source
fn recycle_chunk<C: Columnar>(chunk: Column<C>, stash: &mut Vec<Column<C>>)
Expand description

Reset chunk to an empty Typed and push it to stash for reuse.

Chunks recycled here come from the merger and chunker, both of which produce Typed; only the typed allocations are worth caching for reuse. Bytes / Align chunks have no typed-side allocation to preserve, so we simply drop them — empty_chunk will produce a fresh default just as cheaply, and pushing them onto stash would only displace useful recycled allocations.