Skip to main content

select_instant_at

Function select_instant_at 

Source
pub fn select_instant_at(
    time: &RawTimestamps,
    fields: &SeriesFields,
    at_ms: i64,
    lookback_ms: i64,
    offset_ms: i64,
) -> Result<Option<u64>>
Expand description

Selects the one source row an anchored instant reads, with the lookback, offset and staleness rules of select_instants: the last sample at or before at_ms (shifted by offset_ms) and not more than the lookback before it, unless a stale marker is the latest sample there.

None means the anchor selects nothing, which is what an anchor outside the series’ data or one whose only candidate is too old or stale reports.