You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by hu...@apache.org on 2022/10/30 01:02:46 UTC
[iotdb] branch master updated: [IOTDB-4710] Update Keyword list (#7790)
This is an automated email from the ASF dual-hosted git repository.
hui pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/master by this push:
new 9e48049e54 [IOTDB-4710] Update Keyword list (#7790)
9e48049e54 is described below
commit 9e48049e54b8b94afc496bf949650fa426b457b8
Author: Liao Lanyu <14...@qq.com>
AuthorDate: Sun Oct 30 09:02:39 2022 +0800
[IOTDB-4710] Update Keyword list (#7790)
---
.../org/apache/iotdb/db/qp/sql/IdentifierParser.g4 | 21 +++++++--
.../antlr4/org/apache/iotdb/db/qp/sql/SqlLexer.g4 | 1 -
docs/UserGuide/Reference/Keywords.md | 52 ++++++++++++++++++----
docs/zh/UserGuide/Reference/Keywords.md | 50 +++++++++++++++++----
.../db/it/trigger/IoTDBTriggerExecutionIT.java | 10 +++--
.../db/it/trigger/IoTDBTriggerManagementIT.java | 7 +--
.../IoTDBSessionInsertWithTriggerExecutionIT.java | 10 +++--
.../config/executor/ClusterConfigTaskExecutor.java | 4 +-
8 files changed, 120 insertions(+), 35 deletions(-)
diff --git a/antlr/src/main/antlr4/org/apache/iotdb/db/qp/sql/IdentifierParser.g4 b/antlr/src/main/antlr4/org/apache/iotdb/db/qp/sql/IdentifierParser.g4
index 11c5ad6685..ae94d8a848 100644
--- a/antlr/src/main/antlr4/org/apache/iotdb/db/qp/sql/IdentifierParser.g4
+++ b/antlr/src/main/antlr4/org/apache/iotdb/db/qp/sql/IdentifierParser.g4
@@ -45,6 +45,7 @@ keyWords
| ATTRIBUTES
| BEFORE
| BEGIN
+ | BLOCKED
| BOUNDARY
| BY
| CACHE
@@ -62,6 +63,7 @@ keyWords
| CREATE
| DATA
| DATANODES
+ | DEACTIVATE
| DEBUG
| DELETE
| DESC
@@ -69,8 +71,10 @@ keyWords
| DEVICE
| DEVICES
| DISABLE
+ | DISCARD
| DROP
| END
+ | ENDTIME
| EVERY
| EXPLAIN
| FILL
@@ -105,12 +109,14 @@ keyWords
| MERGE
| METADATA
| NODES
+ | NONE
| NOW
| OF
| OFF
| OFFSET
| ON
| ORDER
+ | ONSUCCESS
| PARTITION
| PASSWORD
| PATHS
@@ -119,6 +125,7 @@ keyWords
| PIPESINK
| PIPESINKS
| PIPESINKTYPE
+ | POLICY
| PREVIOUS
| PREVIOUSUNTILLAST
| PRIVILEGES
@@ -127,9 +134,10 @@ keyWords
| PRUNE
| QUERIES
| QUERY
- | RUNNING
+ | RANGE
| READONLY
| REGEXP
+ | REGIONID
| REGIONS
| REMOVE
| RENAME
@@ -137,8 +145,10 @@ keyWords
| RESOURCE
| REVOKE
| ROLE
+ | RUNNING
| SCHEMA
| SELECT
+ | SERIESSLOTID
| SET
| SETTLE
| SGLEVEL
@@ -147,15 +157,17 @@ keyWords
| SOFFSET
| STORAGE
| START
- | STATEFUL
+ | STARTTIME
| STATELESS
+ | STATEFUL
| STOP
| SYSTEM
| TAGS
| TASK
| TEMPLATE
- | TEMPLATES
+ | TIMEOUT
| TIMESERIES
+ | TIMESLOTID
| TO
| TOLERANCE
| TOP
@@ -177,5 +189,6 @@ keyWords
| WHERE
| WITH
| WITHOUT
+ | WRITABLE
| PRIVILEGE_VALUE
- ;
+ ;
\ No newline at end of file
diff --git a/antlr/src/main/antlr4/org/apache/iotdb/db/qp/sql/SqlLexer.g4 b/antlr/src/main/antlr4/org/apache/iotdb/db/qp/sql/SqlLexer.g4
index badfb2a81f..225f1563e1 100644
--- a/antlr/src/main/antlr4/org/apache/iotdb/db/qp/sql/SqlLexer.g4
+++ b/antlr/src/main/antlr4/org/apache/iotdb/db/qp/sql/SqlLexer.g4
@@ -218,7 +218,6 @@ EVERY
: E V E R Y
;
-
EXPLAIN
: E X P L A I N
;
diff --git a/docs/UserGuide/Reference/Keywords.md b/docs/UserGuide/Reference/Keywords.md
index 0d1293bfbd..0129e24f93 100644
--- a/docs/UserGuide/Reference/Keywords.md
+++ b/docs/UserGuide/Reference/Keywords.md
@@ -21,7 +21,7 @@
# Keywords and Reserved Words
-The following list shows the keywords and reserved words in IoTDB 0.13. Reserved keywords are marked with **(R)**.
+The following list shows the keywords and reserved words in IoTDB. Reserved keywords are marked with **(R)**.
- Common Keywords
- ADD
@@ -32,19 +32,21 @@ The following list shows the keywords and reserved words in IoTDB 0.13. Reserved
- ALL
- ALTER
- ANY
+ - APPEND
- AS
- ASC
- ATTRIBUTES
- - AUTOREGISTER
- BEFORE
- BEGIN
+ - BLOCKED
+ - BOUNDARY
- BY
- CACHE
- CHILD
- CLEAR
- - COMPRESSION
- - COMPRESSOR
+ - CLUSTER
- CONCAT
+ - CONFIGNODES
- CONFIGURATION
- CONTINUOUS
- COUNT
@@ -52,7 +54,9 @@ The following list shows the keywords and reserved words in IoTDB 0.13. Reserved
- CQ
- CQS
- CREATE
- - DATATYPE
+ - DATA
+ - DATANODES
+ - DEACTIVATE
- DEBUG
- DELETE
- DESC
@@ -60,12 +64,14 @@ The following list shows the keywords and reserved words in IoTDB 0.13. Reserved
- DEVICE
- DEVICES
- DISABLE
+ - DISCARD
- DROP
- - ENCODING
- END
+ - ENDTIME
- EVERY
- EXPLAIN
- FILL
+ - FILE
- FLUSH
- FOR
- FROM
@@ -75,6 +81,7 @@ The following list shows the keywords and reserved words in IoTDB 0.13. Reserved
- GLOBAL
- GRANT
- GROUP
+ - HAVING
- INDEX
- INFO
- INSERT
@@ -90,52 +97,72 @@ The following list shows the keywords and reserved words in IoTDB 0.13. Reserved
- LINK
- LIST
- LOAD
+ - LOCAL
- LOCK
- MERGE
- METADATA
- NODES
+ - NONE
- NOW
- OF
- OFF
- OFFSET
- ON
- ORDER
+ - ONSUCCESS
- PARTITION
- PASSWORD
- PATHS
+ - PIPE
+ - PIPES
+ - PIPESINK
+ - PIPESINKS
+ - PIPESINKTYPE
+ - POLICY
- PREVIOUS
- PREVIOUSUNTILLAST
- PRIVILEGES
- PROCESSLIST
- PROPERTY
+ - PRUNE
- QUERIES
- QUERY
+ - RANGE
- READONLY
- REGEXP
+ - REGIONID
+ - REGIONS
- REMOVE
- RENAME
- RESAMPLE
+ - RESOURCE
- REVOKE
- ROLE
- ROOT **(R)**
+ - RUNNING
- SCHEMA
- SELECT
+ - SERIESSLOTID
- SET
- SETTLE
- SGLEVEL
- SHOW
- SLIMIT
- - SNAPSHOT
- SOFFSET
- STORAGE
- START
+ - STARTTIME
+ - STATELESS
+ - STATEFUL
- STOP
- SYSTEM
- TAGS
- TASK
- TEMPLATE
- TIME **(R)**
+ - TIMEOUT
- TIMESERIES
+ - TIMESLOTID
- TIMESTAMP **(R)**
- TO
- TOLERANCE
@@ -149,6 +176,7 @@ The following list shows the keywords and reserved words in IoTDB 0.13. Reserved
- UNSET
- UPDATE
- UPSERT
+ - URI
- USER
- USING
- VALUES
@@ -159,12 +187,14 @@ The following list shows the keywords and reserved words in IoTDB 0.13. Reserved
- WITH
- WITHOUT
- WRITABLE
-- Privileges Keywords
+- Privilege Keywords
- SET_STORAGE_GROUP
+ - DELETE_STORAGE_GROUP
- CREATE_TIMESERIES
- INSERT_TIMESERIES
- READ_TIMESERIES
- DELETE_TIMESERIES
+ - ALTER_TIMESERIES
- CREATE_USER
- DELETE_USER
- MODIFY_PASSWORD
@@ -185,4 +215,8 @@ The following list shows the keywords and reserved words in IoTDB 0.13. Reserved
- START_TRIGGER
- STOP_TRIGGER
- CREATE_CONTINUOUS_QUERY
- - DROP_CONTINUOUS_QUERY
\ No newline at end of file
+ - DROP_CONTINUOUS_QUERY
+ - APPLY_TEMPLATE
+ - UPDATE_TEMPLATE
+ - READ_TEMPLATE
+ - READ_TEMPLATE_APPLICATION
\ No newline at end of file
diff --git a/docs/zh/UserGuide/Reference/Keywords.md b/docs/zh/UserGuide/Reference/Keywords.md
index 92ec09bcc0..dca7e5edf4 100644
--- a/docs/zh/UserGuide/Reference/Keywords.md
+++ b/docs/zh/UserGuide/Reference/Keywords.md
@@ -21,7 +21,7 @@
# 关键字和保留字
-以下为 IoTDB 0.13 版本的关键字,其中保留字用 **(R)** 标志。
+以下为 IoTDB 的关键字,其中保留字用 **(R)** 标志。
- 一般关键字
- ADD
@@ -32,19 +32,21 @@
- ALL
- ALTER
- ANY
+ - APPEND
- AS
- ASC
- ATTRIBUTES
- - AUTOREGISTER
- BEFORE
- BEGIN
+ - BLOCKED
+ - BOUNDARY
- BY
- CACHE
- CHILD
- CLEAR
- - COMPRESSION
- - COMPRESSOR
+ - CLUSTER
- CONCAT
+ - CONFIGNODES
- CONFIGURATION
- CONTINUOUS
- COUNT
@@ -52,7 +54,9 @@
- CQ
- CQS
- CREATE
- - DATATYPE
+ - DATA
+ - DATANODES
+ - DEACTIVATE
- DEBUG
- DELETE
- DESC
@@ -60,12 +64,14 @@
- DEVICE
- DEVICES
- DISABLE
+ - DISCARD
- DROP
- - ENCODING
- END
+ - ENDTIME
- EVERY
- EXPLAIN
- FILL
+ - FILE
- FLUSH
- FOR
- FROM
@@ -75,6 +81,7 @@
- GLOBAL
- GRANT
- GROUP
+ - HAVING
- INDEX
- INFO
- INSERT
@@ -90,52 +97,72 @@
- LINK
- LIST
- LOAD
+ - LOCAL
- LOCK
- MERGE
- METADATA
- NODES
+ - NONE
- NOW
- OF
- OFF
- OFFSET
- ON
- ORDER
+ - ONSUCCESS
- PARTITION
- PASSWORD
- PATHS
+ - PIPE
+ - PIPES
+ - PIPESINK
+ - PIPESINKS
+ - PIPESINKTYPE
+ - POLICY
- PREVIOUS
- PREVIOUSUNTILLAST
- PRIVILEGES
- PROCESSLIST
- PROPERTY
+ - PRUNE
- QUERIES
- QUERY
+ - RANGE
- READONLY
- REGEXP
+ - REGIONID
+ - REGIONS
- REMOVE
- RENAME
- RESAMPLE
+ - RESOURCE
- REVOKE
- ROLE
- ROOT **(R)**
+ - RUNNING
- SCHEMA
- SELECT
+ - SERIESSLOTID
- SET
- SETTLE
- SGLEVEL
- SHOW
- SLIMIT
- - SNAPSHOT
- SOFFSET
- STORAGE
- START
+ - STARTTIME
+ - STATELESS
+ - STATEFUL
- STOP
- SYSTEM
- TAGS
- TASK
- TEMPLATE
- TIME **(R)**
+ - TIMEOUT
- TIMESERIES
+ - TIMESLOTID
- TIMESTAMP **(R)**
- TO
- TOLERANCE
@@ -149,6 +176,7 @@
- UNSET
- UPDATE
- UPSERT
+ - URI
- USER
- USING
- VALUES
@@ -161,10 +189,12 @@
- WRITABLE
- 权限类型
- SET_STORAGE_GROUP
+ - DELETE_STORAGE_GROUP
- CREATE_TIMESERIES
- INSERT_TIMESERIES
- READ_TIMESERIES
- DELETE_TIMESERIES
+ - ALTER_TIMESERIES
- CREATE_USER
- DELETE_USER
- MODIFY_PASSWORD
@@ -185,4 +215,8 @@
- START_TRIGGER
- STOP_TRIGGER
- CREATE_CONTINUOUS_QUERY
- - DROP_CONTINUOUS_QUERY
\ No newline at end of file
+ - DROP_CONTINUOUS_QUERY
+ - APPLY_TEMPLATE
+ - UPDATE_TEMPLATE
+ - READ_TEMPLATE
+ - READ_TEMPLATE_APPLICATION
\ No newline at end of file
diff --git a/integration-test/src/test/java/org/apache/iotdb/db/it/trigger/IoTDBTriggerExecutionIT.java b/integration-test/src/test/java/org/apache/iotdb/db/it/trigger/IoTDBTriggerExecutionIT.java
index 73f2a70596..c7a104f4dd 100644
--- a/integration-test/src/test/java/org/apache/iotdb/db/it/trigger/IoTDBTriggerExecutionIT.java
+++ b/integration-test/src/test/java/org/apache/iotdb/db/it/trigger/IoTDBTriggerExecutionIT.java
@@ -47,15 +47,17 @@ import static org.junit.Assert.fail;
@Category(ClusterIT.class)
public class IoTDBTriggerExecutionIT {
- private static final String TRIGGER_JAR_PREFIX =
- "file:"
- + System.getProperty("user.dir")
+ private static final String TRIGGER_COUNTER_PREFIX =
+ System.getProperty("user.dir")
+ File.separator
+ "target"
+ File.separator
+ "test-classes"
+ File.separator;
+ private static final String TRIGGER_JAR_PREFIX =
+ new File(TRIGGER_COUNTER_PREFIX).toURI().toString();
+
private static final String STATELESS_TRIGGER_BEFORE_INSERTION_PREFIX =
"statelessTriggerBeforeInsertion_";
@@ -248,7 +250,7 @@ public class IoTDBTriggerExecutionIT {
}
private int getCounter(String counterName) throws IOException {
- String counterFilePath = TRIGGER_JAR_PREFIX.substring(5) + counterName + ".txt";
+ String counterFilePath = TRIGGER_COUNTER_PREFIX + counterName + ".txt";
int counter = 0;
try (InputStreamReader Reader =
new InputStreamReader(
diff --git a/integration-test/src/test/java/org/apache/iotdb/db/it/trigger/IoTDBTriggerManagementIT.java b/integration-test/src/test/java/org/apache/iotdb/db/it/trigger/IoTDBTriggerManagementIT.java
index 0e610006b2..500f319d7e 100644
--- a/integration-test/src/test/java/org/apache/iotdb/db/it/trigger/IoTDBTriggerManagementIT.java
+++ b/integration-test/src/test/java/org/apache/iotdb/db/it/trigger/IoTDBTriggerManagementIT.java
@@ -46,15 +46,16 @@ import static org.junit.Assert.fail;
// todo: add StandaloneIT.class when supporting trigger on Standalone
@Category({ClusterIT.class})
public class IoTDBTriggerManagementIT {
- private static final String TRIGGER_JAR_PREFIX =
- "file:"
- + System.getProperty("user.dir")
+ private static final String TRIGGER_COUNTER_PREFIX =
+ System.getProperty("user.dir")
+ File.separator
+ "target"
+ File.separator
+ "test-classes"
+ File.separator;
+ private static final String TRIGGER_JAR_PREFIX =
+ new File(TRIGGER_COUNTER_PREFIX).toURI().toString();
private static final String TRIGGER_FILE_TIMES_COUNTER =
"org.apache.iotdb.db.trigger.example.TriggerFireTimesCounter";
diff --git a/integration-test/src/test/java/org/apache/iotdb/session/it/IoTDBSessionInsertWithTriggerExecutionIT.java b/integration-test/src/test/java/org/apache/iotdb/session/it/IoTDBSessionInsertWithTriggerExecutionIT.java
index 3bd5e665c0..823e5294cf 100644
--- a/integration-test/src/test/java/org/apache/iotdb/session/it/IoTDBSessionInsertWithTriggerExecutionIT.java
+++ b/integration-test/src/test/java/org/apache/iotdb/session/it/IoTDBSessionInsertWithTriggerExecutionIT.java
@@ -52,15 +52,17 @@ import static org.junit.Assert.fail;
@RunWith(IoTDBTestRunner.class)
@Category({ClusterIT.class})
public class IoTDBSessionInsertWithTriggerExecutionIT {
- private static final String TRIGGER_JAR_PREFIX =
- "file:"
- + System.getProperty("user.dir")
+ private static final String TRIGGER_COUNTER_PREFIX =
+ System.getProperty("user.dir")
+ File.separator
+ "target"
+ File.separator
+ "test-classes"
+ File.separator;
+ private static final String TRIGGER_JAR_PREFIX =
+ new File(TRIGGER_COUNTER_PREFIX).toURI().toString();
+
// row num of tablet
private final int rows = 10;
@@ -320,7 +322,7 @@ public class IoTDBSessionInsertWithTriggerExecutionIT {
}
private int getCounter(String counterName) throws IOException {
- String counterFilePath = TRIGGER_JAR_PREFIX.substring(5) + counterName + ".txt";
+ String counterFilePath = TRIGGER_COUNTER_PREFIX + counterName + ".txt";
int counter = 0;
try (InputStreamReader Reader =
new InputStreamReader(
diff --git a/server/src/main/java/org/apache/iotdb/db/mpp/plan/execution/config/executor/ClusterConfigTaskExecutor.java b/server/src/main/java/org/apache/iotdb/db/mpp/plan/execution/config/executor/ClusterConfigTaskExecutor.java
index bc83d4ffe4..ee4c4129fd 100644
--- a/server/src/main/java/org/apache/iotdb/db/mpp/plan/execution/config/executor/ClusterConfigTaskExecutor.java
+++ b/server/src/main/java/org/apache/iotdb/db/mpp/plan/execution/config/executor/ClusterConfigTaskExecutor.java
@@ -323,7 +323,7 @@ public class ClusterConfigTaskExecutor implements IConfigTaskExecutor {
}
} else {
// libRoot should be the path of the specified jar
- libRoot = new URI(uriString).getRawPath();
+ libRoot = new File(new URI(uriString)).getAbsolutePath();
// If jarPath is a file path on datanode, we transfer it to ByteBuffer and send it to
// ConfigNode.
jarFile = ExecutableManager.transferToBytebuffer(libRoot);
@@ -475,7 +475,7 @@ public class ClusterConfigTaskExecutor implements IConfigTaskExecutor {
}
} else {
// libRoot should be the path of the specified jar
- libRoot = new URI(uriString).getRawPath();
+ libRoot = new File(new URI(uriString)).getAbsolutePath();
// If jarPath is a file path on datanode, we transfer it to ByteBuffer and send it to
// ConfigNode.
jarFile = ExecutableManager.transferToBytebuffer(libRoot);