From a9c615db50d4062c0065a04dd3a123de1a632213 Mon Sep 17 00:00:00 2001 From: ZhangHongYin <46039728+SpriCoder@users.noreply.github.com> Date: Thu, 13 Jul 2023 14:57:56 +0800 Subject: [PATCH] [IOTDB-5134] Fix auth antlr (#10538) * Fix auth anltr * Fix antlr --- .../antlr4/org/apache/iotdb/db/qp/sql/IdentifierParser.g4 | 5 +++++ .../src/main/antlr4/org/apache/iotdb/db/qp/sql/SqlLexer.g4 | 4 ---- .../java/org/apache/iotdb/commons/path/PartialPathTest.java | 5 +++++ 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/iotdb-core/antlr/src/main/antlr4/org/apache/iotdb/db/qp/sql/IdentifierParser.g4 b/iotdb-core/antlr/src/main/antlr4/org/apache/iotdb/db/qp/sql/IdentifierParser.g4 index 896165c40b..5a0d9b6f25 100644 --- a/iotdb-core/antlr/src/main/antlr4/org/apache/iotdb/db/qp/sql/IdentifierParser.g4 +++ b/iotdb-core/antlr/src/main/antlr4/org/apache/iotdb/db/qp/sql/IdentifierParser.g4 @@ -71,6 +71,8 @@ keyWords | CQS | CREATE | DATA + | DATA_REPLICATION_FACTOR + | DATA_REGION_GROUP_NUM | DATABASE | DATABASES | DATANODEID @@ -185,6 +187,8 @@ keyWords | ROUND | RUNNING | SCHEMA + | SCHEMA_REPLICATION_FACTOR + | SCHEMA_REGION_GROUP_NUM | SELECT | SERIESSLOTID | SESSION @@ -210,6 +214,7 @@ keyWords | TEMPLATES | THEN | THROTTLE + | TIME_PARTITION_INTERVAL | TIMEOUT | TIMESERIES | TIMEPARTITION diff --git a/iotdb-core/antlr/src/main/antlr4/org/apache/iotdb/db/qp/sql/SqlLexer.g4 b/iotdb-core/antlr/src/main/antlr4/org/apache/iotdb/db/qp/sql/SqlLexer.g4 index 0d66cbc803..d1cac40b30 100644 --- a/iotdb-core/antlr/src/main/antlr4/org/apache/iotdb/db/qp/sql/SqlLexer.g4 +++ b/iotdb-core/antlr/src/main/antlr4/org/apache/iotdb/db/qp/sql/SqlLexer.g4 @@ -967,10 +967,6 @@ MANAGE_DATABASE : M A N A G E '_' D A T A B A S E ; -SET_STORAGE_GROUP - : S E T '_' S T O R A G E '_' G R O U P - ; - SCHEMA_REPLICATION_FACTOR : S C H E M A '_' R E P L I C A T I O N '_' F A C T O R ; diff --git a/iotdb-core/node-commons/src/test/java/org/apache/iotdb/commons/path/PartialPathTest.java b/iotdb-core/node-commons/src/test/java/org/apache/iotdb/commons/path/PartialPathTest.java index 8874c34fd4..232c4b8755 100644 --- a/iotdb-core/node-commons/src/test/java/org/apache/iotdb/commons/path/PartialPathTest.java +++ b/iotdb-core/node-commons/src/test/java/org/apache/iotdb/commons/path/PartialPathTest.java @@ -128,6 +128,11 @@ public class PartialPathTest { Assert.assertEquals("root.sg.abc", t.getFullPath()); nodes = new String[] {"root", "sg", "abc"}; checkNodes(nodes, t.getNodes()); + + PartialPath u = new PartialPath("root.sg.set_storage_group"); + Assert.assertEquals("root.sg.set_storage_group", u.getFullPath()); + nodes = new String[] {"root", "sg", "set_storage_group"}; + checkNodes(nodes, u.getNodes()); } @Test -- GitLab