You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unary negation rejected in PromQL lowering (no scalar/negate node) #36
PromQL unary negation (-expr) flips the sign of every sample — -rate(http_errors_total[5m]), -some_metric, and negation nested inside a larger expression (http_requests_total - -http_errors_total, sum(-node_cpu_seconds_total)) are all rejected. Root cause: the L2 PromQL path has no negate/scalar node to express "multiply this vector by -1", so Expr::Unary is rejected outright rather than silently computing the wrong (unnegated) result.
This is the same underlying gap as #35 (no scalar operand in the relational-level binary-op shape) — negation is effectively x * -1, which needs a scalar operand to express.
Reproduction
crates/lower/tests/promql_conformance.rs, test unary_negation_is_rejected__GAP:
Activity
fix(l2): drop provably-absent outer group keys (#53); pin + document …
feat(promql): lower unary negation as multiply-by-minus-one (#36) (#102)