fix: allow .(dot) literal in table name (#2483)

* fix: allow `.`(dot) literal in table name

* fix: resolve PR comments
This commit is contained in:
LFC
2023-09-27 19:50:07 +08:00
committed by GitHub
parent ee8d472aae
commit ccd6de8d6b
5 changed files with 22 additions and 36 deletions

View File

@@ -80,7 +80,7 @@ use crate::DatanodeId;
pub const REMOVED_PREFIX: &str = "__removed";
const NAME_PATTERN: &str = "[a-zA-Z_:-][a-zA-Z0-9_:-]*";
const NAME_PATTERN: &str = r"[a-zA-Z_:-][a-zA-Z0-9_:\-\.]*";
const DATANODE_TABLE_KEY_PREFIX: &str = "__dn_table";
const TABLE_INFO_KEY_PREFIX: &str = "__table_info";

View File

@@ -268,6 +268,8 @@ mod tests {
test_ok("my_table");
test_ok("cpu:metrics");
test_ok(":cpu:metrics");
test_ok("sys.cpu.system");
test_ok("foo-bar");
}
#[test]