Skip to main content

compact_segments

Function compact_segments 

Source
pub fn compact_segments(
    segments: &[(&[u8], &DeleteBitmap)],
    schema: &ColumnarSchema,
    profile_tag: u8,
) -> Result<CompactionResult, ColumnarError>
Expand description

Compact multiple segments into a single merged segment.

Reads all source segments, skips deleted rows from each, and writes a single merged output segment. This reduces segment count and reclaims space from deleted rows across all sources.