You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ro...@apache.org on 2023/10/27 11:47:58 UTC
(iotdb) 02/06: antlr: add source sink
This is an automated email from the ASF dual-hosted git repository.
rong pushed a commit to branch pipe-rename
in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit 416a51a4e596f328c3264601551db9f89f301c04
Author: Steve Yurong Su <ro...@apache.org>
AuthorDate: Fri Oct 27 10:36:30 2023 +0800
antlr: add source sink
---
.../main/antlr4/org/apache/iotdb/db/qp/sql/IdentifierParser.g4 | 2 ++
.../src/main/antlr4/org/apache/iotdb/db/qp/sql/IoTDBSqlParser.g4 | 4 ++--
.../antlr/src/main/antlr4/org/apache/iotdb/db/qp/sql/SqlLexer.g4 | 8 ++++++++
3 files changed, 12 insertions(+), 2 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 af97d6e2047..e92b7b99dfa 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
@@ -198,8 +198,10 @@ keyWords
| SETTLE
| SGLEVEL
| SHOW
+ | SINK
| SLIMIT
| SOFFSET
+ | SOURCE
| SPACE
| STORAGE
| START
diff --git a/iotdb-core/antlr/src/main/antlr4/org/apache/iotdb/db/qp/sql/IoTDBSqlParser.g4 b/iotdb-core/antlr/src/main/antlr4/org/apache/iotdb/db/qp/sql/IoTDBSqlParser.g4
index dc4235e4013..fefed050b27 100644
--- a/iotdb-core/antlr/src/main/antlr4/org/apache/iotdb/db/qp/sql/IoTDBSqlParser.g4
+++ b/iotdb-core/antlr/src/main/antlr4/org/apache/iotdb/db/qp/sql/IoTDBSqlParser.g4
@@ -521,7 +521,7 @@ createPipe
;
extractorAttributesClause
- : WITH EXTRACTOR
+ : WITH (EXTRACTOR | SOURCE)
LR_BRACKET
(extractorAttributeClause COMMA)* extractorAttributeClause?
RR_BRACKET
@@ -543,7 +543,7 @@ processorAttributeClause
;
connectorAttributesClause
- : WITH CONNECTOR
+ : WITH (CONNECTOR | SINK)
LR_BRACKET
(connectorAttributeClause COMMA)* connectorAttributeClause?
RR_BRACKET
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 61770d77b9a..948f4e40c62 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
@@ -690,6 +690,10 @@ SHOW
: S H O W
;
+SINK
+ : S I N K
+ ;
+
SLIMIT
: S L I M I T
;
@@ -698,6 +702,10 @@ SOFFSET
: S O F F S E T
;
+SOURCE
+ : S O U R C E
+ ;
+
SPACE
: S P A C E
;