Description
Found while fixing #9883 (review of PR #9923).
PromQLEvaluator.evaluateScalarFunction accepts a scalar argument for abs, ceil, floor and round (abs(-1) answers the scalar 1). Prometheus refuses it: expected type instant vector in call to function "abs", got scalar.
#9883 kept this leniency on purpose: existing tests (Issue9723PromQLScalarComparisonWithoutBoolTest, Issue9743PromQLSetOperatorWithScalarTest) use abs(-1) / round(1.4) / ceil(0.2) as scalar operands, and queries in the field may rely on it too.
Decision needed: either refuse a scalar argument like Prometheus (a visible behavior change, with release notes, and those tests rewritten with vector(...) once it exists or with plain literals), or keep the extension and document it as an ArcadeDB deviation.
Activity
fix(#9924): PromQL abs/ceil/floor/round refuse a scalar argument, lik…
robfrank commentedon Oct 14, 2026
Fixed in #9947, which matches Prometheus.
abs,ceil,floorandroundnow accept only an instant vector. A scalar argument such asabs(-1)orround(1 + 1)fails with Prometheus' message,expected type instant vector in call to function "abs", got scalar, instead of returning a scalar. This applies to instant queries, range queries, the HTTP API (400bad_data) and the SQLpromql()function.This is a behavior change: a query that used these functions on a scalar now returns an error. It will be called out in the release notes. Nothing else is left open.
❤️ Thanks for helping make ArcadeDB better! ArcadeDB is free and open source, sustained by its community. If it's useful to you or your company, please consider becoming a sponsor to keep development going.
fix(#9924): PromQL abs/ceil/floor/round refuse a scalar argument, lik…