You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ge...@apache.org on 2020/11/06 02:43:59 UTC
[iotdb] 01/01: add keyword
This is an automated email from the ASF dual-hosted git repository.
geniuspig pushed a commit to branch add_keyword
in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit 56903606b3fb97392ba7d6c99a1bb09939a82490
Author: Boris <96...@qq.com>
AuthorDate: Fri Nov 6 10:43:41 2020 +0800
add keyword
---
antlr/src/main/antlr4/org/apache/iotdb/db/qp/strategy/SqlBase.g4 | 8 ++++++++
docs/UserGuide/Operation Manual/SQL Reference.md | 2 +-
.../test/java/org/apache/iotdb/db/qp/plan/PhysicalPlanTest.java | 2 +-
3 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/antlr/src/main/antlr4/org/apache/iotdb/db/qp/strategy/SqlBase.g4 b/antlr/src/main/antlr4/org/apache/iotdb/db/qp/strategy/SqlBase.g4
index ec29bb5..27bca32 100644
--- a/antlr/src/main/antlr4/org/apache/iotdb/db/qp/strategy/SqlBase.g4
+++ b/antlr/src/main/antlr4/org/apache/iotdb/db/qp/strategy/SqlBase.g4
@@ -507,6 +507,10 @@ nodeName
| OFF
| (ID | OPERATOR_IN)? LS_BRACKET ID? RS_BRACKET ID?
| compressor
+ | GLOBAL
+ | PARTITION
+ | DESC
+ | ASC
;
nodeNameWithoutStar
@@ -615,6 +619,10 @@ nodeNameWithoutStar
| OFF
| (ID | OPERATOR_IN)? LS_BRACKET ID? RS_BRACKET ID?
| compressor
+ | GLOBAL
+ | PARTITION
+ | DESC
+ | ASC
;
dataType
diff --git a/docs/UserGuide/Operation Manual/SQL Reference.md b/docs/UserGuide/Operation Manual/SQL Reference.md
index cb143ba..ca3c9b4 100644
--- a/docs/UserGuide/Operation Manual/SQL Reference.md
+++ b/docs/UserGuide/Operation Manual/SQL Reference.md
@@ -1017,7 +1017,7 @@ TRACING OFF // Close performance tracing
```
Keywords for IoTDB (case insensitive):
-ADD, BY, COMPRESSOR, CREATE, DATATYPE, DELETE, DESCRIBE, DROP, ENCODING, EXIT, FOR, FROM, GRANT, GROUP, LABLE, LINK, INDEX, INSERT, INTO, LOAD, MAX_POINT_NUMBER, MERGE, METADATA, ON, ORDER, PASSWORD, PRIVILEGES, PROPERTY, QUIT, REVOKE, ROLE, ROOT, SCHEMA, SELECT, SET, SHOW, SNAPSHOT, STORAGE, TIME, TIMESERIES, TIMESTAMP, TO, UNLINK, USER, USING, VALUE, VALUES, WHERE, WITH
+ADD, BY, COMPRESSOR, CREATE, DATATYPE, DELETE, DESCRIBE, DROP, ENCODING, EXIT, FOR, FROM, GRANT, GROUP, LABLE, LINK, INDEX, INSERT, INTO, LOAD, MAX_POINT_NUMBER, MERGE, METADATA, ON, ORDER, PASSWORD, PRIVILEGES, PROPERTY, QUIT, REVOKE, ROLE, ROOT, SCHEMA, SELECT, SET, SHOW, SNAPSHOT, STORAGE, TIME, TIMESERIES, TIMESTAMP, TO, UNLINK, USER, USING, VALUE, VALUES, WHERE, WITH, GLOBAL, PARTITION, DESC, ASC
Keywords with special meanings (case insensitive):
* Data Types: BOOLEAN, DOUBLE, FLOAT, INT32, INT64, TEXT
diff --git a/server/src/test/java/org/apache/iotdb/db/qp/plan/PhysicalPlanTest.java b/server/src/test/java/org/apache/iotdb/db/qp/plan/PhysicalPlanTest.java
index 0194a92..e8a5a0e 100644
--- a/server/src/test/java/org/apache/iotdb/db/qp/plan/PhysicalPlanTest.java
+++ b/server/src/test/java/org/apache/iotdb/db/qp/plan/PhysicalPlanTest.java
@@ -856,7 +856,7 @@ public class PhysicalPlanTest {
@Test
public void testSpecialCharacters() throws QueryProcessException {
- String sqlStr1 = "create timeseries root.3e-3.-1.1/2.SNAPPY.RLE.81+12.+2.s/io.in[jack] with "
+ String sqlStr1 = "create timeseries root.3e-3.-1.1/2.SNAPPY.RLE.81+12.+2.s/io.in[jack].desc with "
+ "datatype=FLOAT, encoding=RLE, compression=SNAPPY tags(tag1=v1, tag2=v2)"
+ " attributes(attr1=v1, attr2=v2)";
PhysicalPlan plan1 = processor.parseSQLToPhysicalPlan(sqlStr1);