[IOTDB-5134] Fix auth antlr (#10538)
* Fix auth anltr
* Fix antlr
(cherry picked from commit a9c615db50d4062c0065a04dd3a123de1a632213)
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 896165c..5a0d9b6 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 @@
| CQS
| CREATE
| DATA
+ | DATA_REPLICATION_FACTOR
+ | DATA_REGION_GROUP_NUM
| DATABASE
| DATABASES
| DATANODEID
@@ -185,6 +187,8 @@
| ROUND
| RUNNING
| SCHEMA
+ | SCHEMA_REPLICATION_FACTOR
+ | SCHEMA_REGION_GROUP_NUM
| SELECT
| SERIESSLOTID
| SESSION
@@ -210,6 +214,7 @@
| 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 0d66cbc..d1cac40 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 @@
: 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 8874c34..232c4b8 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 @@
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