From fbb6666942e2a2ea60ee83ff121de9850efcf27d Mon Sep 17 00:00:00 2001 From: Ruihang Xia Date: Wed, 7 Jan 2026 11:58:08 +0800 Subject: [PATCH] update to v0.7.1 Signed-off-by: Ruihang Xia --- Cargo.lock | 5 ++--- Cargo.toml | 2 +- tests/cases/standalone/common/promql/regex.result | 15 +++++++++++++-- .../standalone/common/tql/case_sensitive.sql | 1 - 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c6197917ce..59b3f4617e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9951,9 +9951,9 @@ dependencies = [ [[package]] name = "promql-parser" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff7ca778c0558f186f6bc248d1f0a60c8b375de75f7121febae8ab2721cca596" +checksum = "6c3c2199b84e1253aade469e92ae16cd8dbe1de031c66a00f4f5cdd650290a86" dependencies = [ "cfgrammar", "chrono", @@ -9963,7 +9963,6 @@ dependencies = [ "regex", "serde", "serde_json", - "unescaper", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 66b864779b..ac340620ae 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -189,7 +189,7 @@ paste = "1.0" pin-project = "1.0" pretty_assertions = "1.4.0" prometheus = { version = "0.13.3", features = ["process"] } -promql-parser = { version = "0.7.0", features = ["ser"] } +promql-parser = { version = "0.7.1", features = ["ser"] } prost = { version = "0.13", features = ["no-recursion-limit"] } prost-types = "0.13" raft-engine = { version = "0.4.1", default-features = false } diff --git a/tests/cases/standalone/common/promql/regex.result b/tests/cases/standalone/common/promql/regex.result index 8a891fe0fa..ab71cf8e7a 100644 --- a/tests/cases/standalone/common/promql/regex.result +++ b/tests/cases/standalone/common/promql/regex.result @@ -38,11 +38,22 @@ TQL EVAL (0, 100, '15s') test{host=~"(10.0.160.237:8080|10.0.160.237:9090)"}; TQL EVAL (0, 100, '15s') test{host=~"10\\.0\\.160\\.237:808|nonexistence"}; -Error: 2000(InvalidSyntax), Invalid regex pattern, invalid char, '.' break at 3 +++ +++ TQL EVAL (0, 100, '15s') test{host=~"(10\\.0\\.160\\.237:8080|10\\.0\\.160\\.237:9090)"}; -Error: 2000(InvalidSyntax), Invalid regex pattern, invalid char, '.' break at 4 ++---------------------+-------------------+-----+ +| ts | host | val | ++---------------------+-------------------+-----+ +| 1970-01-01T00:00:00 | 10.0.160.237:8080 | 1 | +| 1970-01-01T00:00:15 | 10.0.160.237:8080 | 1 | +| 1970-01-01T00:00:30 | 10.0.160.237:8080 | 1 | +| 1970-01-01T00:00:45 | 10.0.160.237:8080 | 1 | +| 1970-01-01T00:01:00 | 10.0.160.237:8080 | 1 | +| 1970-01-01T00:01:15 | 10.0.160.237:8080 | 1 | +| 1970-01-01T00:01:30 | 10.0.160.237:8080 | 1 | ++---------------------+-------------------+-----+ -- Some radical regex optimization -- SQLNESS REPLACE (metrics.*) REDACTED diff --git a/tests/cases/standalone/common/tql/case_sensitive.sql b/tests/cases/standalone/common/tql/case_sensitive.sql index f1c8e3b3d0..a250e6b270 100644 --- a/tests/cases/standalone/common/tql/case_sensitive.sql +++ b/tests/cases/standalone/common/tql/case_sensitive.sql @@ -55,7 +55,6 @@ tql eval (0,10,'5s') sum by (abcde) (metric); tql eval (0,10,'5s') sum by (AbCdE) (metric); --- not allowed by the parser tql eval (0,10,'5s') sum by (`AbCdE`) (metric); drop table metric;