Summary
smoothed / anchored range-selector modifiers parse-fail, e.g. increase(metric[1m] smoothed) → invalid promql query. Both are recent Prometheus range-vector modifiers.
Current state (verified on asap @ c51beaf)
The tokens exist but are wired to nothing:
src/parser/token.rs: ("smoothed", T_SMOOTHED), T_SMOOTHED => "smoothed" — the lexer recognizes them.
src/parser/promql.y:124: %expect-unused 'SMOOTHED' 'ANCHORED' — declared as tokens no production consumes.
This is inherited verbatim from GreptimeTeam upstream main, which also stubs them with the same %expect-unused line. So this is not a mirror/rebase away — upstream has not wired them either.
Work
- Add a grammar production consuming
SMOOTHED / ANCHORED on matrix_selector (and subquery_expr), removing them from %expect-unused.
- Add an AST field on the matrix/subquery selector to carry the modifier.
- The lexer/token half is already done.
Corpus impact
61 rejections in the ASAPController PromQL corpus. Closest-to-done of the grammar gaps, since the token layer exists.
Constraint
All changes land on the asap branch. Do not sync or PR against GreptimeTeam upstream.
Summary
smoothed/anchoredrange-selector modifiers parse-fail, e.g.increase(metric[1m] smoothed)→invalid promql query. Both are recent Prometheus range-vector modifiers.Current state (verified on
asap@ c51beaf)The tokens exist but are wired to nothing:
src/parser/token.rs:("smoothed", T_SMOOTHED),T_SMOOTHED => "smoothed"— the lexer recognizes them.src/parser/promql.y:124:%expect-unused 'SMOOTHED' 'ANCHORED'— declared as tokens no production consumes.This is inherited verbatim from GreptimeTeam upstream
main, which also stubs them with the same%expect-unusedline. So this is not a mirror/rebase away — upstream has not wired them either.Work
SMOOTHED/ANCHOREDonmatrix_selector(andsubquery_expr), removing them from%expect-unused.Corpus impact
61 rejections in the ASAPController PromQL corpus. Closest-to-done of the grammar gaps, since the token layer exists.
Constraint
All changes land on the
asapbranch. Do not sync or PR against GreptimeTeam upstream.