Skip to main content

merge_for_retention

Function merge_for_retention 

Source
pub fn merge_for_retention(
    versions: &[TileEntry],
    reader: &SegmentReader<'_>,
    schema: &ArraySchema,
    horizon_ms: i64,
) -> ArrayResult<RetentionMergeResult>
Expand description

Merge tile-versions for one hilbert_prefix according to the retention policy, operating at cell granularity.

versions contains all TileEntry records for a single hilbert_prefix (the caller is responsible for grouping). They may arrive in any order; this function sorts internally.

horizon_ms is the retention boundary expressed as an absolute system_from_ms timestamp: versions with system_from_ms < horizon_ms are outside the retention window.