Skip to main content

check_modifier

Function check_modifier 

Source
pub(crate) fn check_modifier(
    input: &SeriesSchema,
    modifier: RangeModifier,
    function: RangeFunction,
) -> Result<()>
Expand description

Rejects a modifier on a function Prometheus does not allow it with, as Prometheus rejects the query (AnchoredSafeFunctions, SmoothedSafeFunctions), and on evaluated input, which reads no raw samples around its windows.

pub(crate) because it is a rule about the input’s schema and the window alone, so the native route’s admission predicate (native_tree_supported) asks it rather than a second copy of it, the way it asks fold_offset.