Problem
PromQL's offset modifier (metric offset 1h) and @ modifier (metric @ 1609746000) shift the evaluation/lookback time of a vector selector. Unlike without(...) (#39), which is blocked on missing catalog metadata, this is blocked on a missing IR node: there is no time-shift concept anywhere in relational::QueryExpr or canonical QueryExpr to carry the shift amount, so both modifiers are rejected unconditionally rather than partially/incorrectly lowered.
These are common in real dashboards and alerts (week-over-week comparisons, anomaly detection baselines), so this is a meaningful coverage gap distinct from the scalar-operand and without gaps.
Reproduction
crates/lower/src/promql.rs, vs_parts:
fn vs_parts(vs: &VectorSelector) -> Result<(String, Vec<L2Expr>)> {
// `offset` / `@` shift the evaluation/lookback time. The intent algebra has
// no representation for either, so silently lowering them (as if absent)
// would change the query's meaning. Reject rather than mislower.
if vs.offset.is_some() || vs.at.is_some() {
return Err(LoweringError::UnsupportedFeature(
"`offset` / `@` time-shift modifiers have no intent-algebra representation".into(),
));
}
...
Any query with offset or @ on a vector/matrix selector — e.g. rate(http_requests_total[5m] offset 1h) or http_requests_total @ 1609746000 — fails to lower with LoweringError::UnsupportedFeature. No test exercises a successful lowering of either modifier.
Problem
PromQL's
offsetmodifier (metric offset 1h) and@modifier (metric @ 1609746000) shift the evaluation/lookback time of a vector selector. Unlikewithout(...)(#39), which is blocked on missing catalog metadata, this is blocked on a missing IR node: there is no time-shift concept anywhere inrelational::QueryExpror canonicalQueryExprto carry the shift amount, so both modifiers are rejected unconditionally rather than partially/incorrectly lowered.These are common in real dashboards and alerts (week-over-week comparisons, anomaly detection baselines), so this is a meaningful coverage gap distinct from the scalar-operand and
withoutgaps.Reproduction
crates/lower/src/promql.rs,vs_parts:Any query with
offsetor@on a vector/matrix selector — e.g.rate(http_requests_total[5m] offset 1h)orhttp_requests_total @ 1609746000— fails to lower withLoweringError::UnsupportedFeature. No test exercises a successful lowering of either modifier.