Files
greptimedb/src
discord9 875efc91cb feat(promql): compile a parameterised range function
`quantile_over_time(q, x[r])` now compiles: the quantile is bound as a
number literal and the range selector is bound by the same path a function
without parameters takes. The two shapes share one binder, so the range,
the offset, the anchor and the grid cannot drift between them.

The quantile is not range-checked. Prometheus binds any value and the
kernel answers `-Infinity` below zero and `+Infinity` above one, so
refusing it here would be this compiler inventing a rule the engine does
not have.

A parameter in parentheses binds the same quantile: the planner already
looks through the parentheses when it reads a literal, so a query written
`quantile_over_time((0.9), x[5m])` keeps working on this path too.

Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com>
2026-10-20 16:30:22 +08:00
..