Skip to main content

merge_slices

Function merge_slices 

Source
pub(crate) fn merge_slices(
    group: &[FileSpan],
    start_ns: i64,
    end_ns: i64,
) -> Vec<(i64, i64)>
Expand description

Splits the export range covered by one file group into merge slices.

A group of one file is read in a single pass, as before, since it holds no copies of another file’s rows. A group of overlapping files is read in slices aligned to MERGE_SLICE_NS, so memory is bounded by one slice of each file instead of the whole group.

§Arguments

  • group - Files from overlapping_file_groups.
  • start_ns - Inclusive range start, Unix nanoseconds.
  • end_ns - Inclusive range end, Unix nanoseconds.

§Returns

Inclusive (from_ns, to_ns) slices in time order, together covering the part of [start_ns, end_ns] that the group spans.