mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-05-28 02:40:38 +00:00
fix: promql regex escape behavior (#6094)
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
This commit is contained in:
4
Cargo.lock
generated
4
Cargo.lock
generated
@@ -8971,8 +8971,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "promql-parser"
|
||||
version = "0.5.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "60d851f6523a8215e2fbf86b6cef4548433f8b76092e9ffb607105de52ae63fd"
|
||||
source = "git+https://github.com/GreptimeTeam/promql-parser.git?rev=711d484d9e19b19e073f0cbfd2dd16ad031972b6#711d484d9e19b19e073f0cbfd2dd16ad031972b6"
|
||||
dependencies = [
|
||||
"cfgrammar",
|
||||
"chrono",
|
||||
@@ -8982,6 +8981,7 @@ dependencies = [
|
||||
"regex",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"unescaper",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
||||
@@ -163,7 +163,9 @@ parquet = { version = "54.2", default-features = false, features = ["arrow", "as
|
||||
paste = "1.0"
|
||||
pin-project = "1.0"
|
||||
prometheus = { version = "0.13.3", features = ["process"] }
|
||||
promql-parser = { version = "0.5.1", features = ["ser"] }
|
||||
promql-parser = { git = "https://github.com/GreptimeTeam/promql-parser.git", rev = "711d484d9e19b19e073f0cbfd2dd16ad031972b6", features = [
|
||||
"ser",
|
||||
] }
|
||||
prost = { version = "0.13", features = ["no-recursion-limit"] }
|
||||
raft-engine = { version = "0.4.1", default-features = false }
|
||||
rand = "0.9"
|
||||
|
||||
@@ -36,6 +36,20 @@ TQL EVAL (0, 100, '15s') test{host=~"(10.0.160.237:8080|10.0.160.237:9090)"};
|
||||
| 1970-01-01T00:01:30 | 10.0.160.237:8080 | 1 |
|
||||
+---------------------+-------------------+-----+
|
||||
|
||||
TQL EVAL (0, 100, '15s') test{host=~"(10\\.0\\.160\\.237:8080|10\\.0\\.160\\.237:9090)"};
|
||||
|
||||
+---------------------+-------------------+-----+
|
||||
| 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 |
|
||||
+---------------------+-------------------+-----+
|
||||
|
||||
DROP TABLE test;
|
||||
|
||||
Affected Rows: 0
|
||||
|
||||
@@ -13,4 +13,6 @@ SELECT * FROM test;
|
||||
|
||||
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:8080|10\\.0\\.160\\.237:9090)"};
|
||||
|
||||
DROP TABLE test;
|
||||
|
||||
Reference in New Issue
Block a user