Summary
The native-histogram trim operators parse-fail: h_test </ +Inf, h_test >/ 1.41 → invalid promql query. Prometheus documents them in promql/promqltest/testdata/native_histograms.test:
Test native histogram with trim operators (</: TRIM_UPPER, >/: TRIM_LOWER)
Current state (verified)
No token at all. grep -c TRIM is 0 in both src/parser/token.rs and src/parser/promql.y, on the asap branch and on GreptimeTeam upstream main. This is a from-scratch port of a recent Prometheus (Go) feature.
Work
- Lexer: recognize the two-character operators
</ (TRIM_UPPER) and >/ (TRIM_LOWER). Care needed: < / > / / are all existing single-char tokens, so the lexer must look ahead.
- Grammar: productions for
expr </ expr / expr >/ expr.
- AST + operator enum entries mirroring the Go
TRIM_UPPER / TRIM_LOWER.
Corpus impact
110 rejections — the single largest parser gap.
Constraint
All changes on the asap branch; no upstream operations.
Summary
The native-histogram trim operators parse-fail:
h_test </ +Inf,h_test >/ 1.41→invalid promql query. Prometheus documents them inpromql/promqltest/testdata/native_histograms.test:Current state (verified)
No token at all.
grep -c TRIMis 0 in bothsrc/parser/token.rsandsrc/parser/promql.y, on theasapbranch and on GreptimeTeam upstreammain. This is a from-scratch port of a recent Prometheus (Go) feature.Work
</(TRIM_UPPER) and>/(TRIM_LOWER). Care needed:</>//are all existing single-char tokens, so the lexer must look ahead.expr </ expr/expr >/ expr.TRIM_UPPER/TRIM_LOWER.Corpus impact
110 rejections — the single largest parser gap.
Constraint
All changes on the
asapbranch; no upstream operations.