Skip to content

Commit f97bdc9

Browse files
author
Hoang Phan
committed
deps: bump promql-parser to 0.9 for limitk grammar
v0.9.0 adds grammar rules for limitk and limit_ratio in the aggregate_op production. v0.8.0 declared these as `%expect-unused` tokens but never bound them in the grammar, so `limitk(...)` queries failed at parse time before this bump. The bump also widens the token id type from u8 to u16. Updated two local helper signatures (aggregate_op_name, binary_op_kind) to match. No behavior change.
1 parent 24a5367 commit f97bdc9

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

timeseries/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ blake3 = "1.8.2"
6565
metrics.workspace = true
6666
metrics-exporter-prometheus = { workspace = true, optional = true }
6767
mime_guess = "2"
68-
promql-parser = "0.8"
68+
promql-parser = "0.9"
6969
regex = "1.0"
7070
ryu = "1"
7171
regex-syntax = "0.8"

timeseries/src/promql/plan/lowering.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -770,7 +770,7 @@ fn aggregate_streaming(
770770
}
771771
}
772772

773-
fn aggregate_op_name(op_id: u8) -> &'static str {
773+
fn aggregate_op_name(op_id: u16) -> &'static str {
774774
match op_id {
775775
T_SUM => "sum",
776776
T_AVG => "avg",
@@ -832,7 +832,7 @@ fn lower_binary(bin: &parser::BinaryExpr, ctx: &LoweringContext) -> Result<Logic
832832
})
833833
}
834834

835-
fn binary_op_kind(op_id: u8, return_bool: bool) -> Option<BinaryOpKind> {
835+
fn binary_op_kind(op_id: u16, return_bool: bool) -> Option<BinaryOpKind> {
836836
Some(match op_id {
837837
T_ADD => BinaryOpKind::Add,
838838
T_SUB => BinaryOpKind::Sub,

0 commit comments

Comments
 (0)