You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ja...@apache.org on 2022/01/15 09:22:24 UTC

[iotdb] branch master updated: [IOTDB-2383] Make simplified SQL of creating timeseries and schema template more flexible (#4832)

This is an automated email from the ASF dual-hosted git repository.

jackietien 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 3c94818  [IOTDB-2383] Make simplified SQL of creating timeseries and schema template more flexible (#4832)
3c94818 is described below

commit 3c94818fed7e93d6a201e372df9d220bf442be73
Author: liuminghui233 <36...@users.noreply.github.com>
AuthorDate: Sat Jan 15 17:21:50 2022 +0800

    [IOTDB-2383] Make simplified SQL of creating timeseries and schema template more flexible (#4832)
---
 antlr/src/main/antlr4/org/apache/iotdb/db/qp/sql/IoTDBSqlParser.g4 | 2 +-
 docs/UserGuide/Appendix/SQL-Reference.md                           | 2 +-
 docs/zh/UserGuide/Appendix/SQL-Reference.md                        | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/antlr/src/main/antlr4/org/apache/iotdb/db/qp/sql/IoTDBSqlParser.g4 b/antlr/src/main/antlr4/org/apache/iotdb/db/qp/sql/IoTDBSqlParser.g4
index 6d5d50e..6b25690 100644
--- a/antlr/src/main/antlr4/org/apache/iotdb/db/qp/sql/IoTDBSqlParser.g4
+++ b/antlr/src/main/antlr4/org/apache/iotdb/db/qp/sql/IoTDBSqlParser.g4
@@ -824,7 +824,7 @@ attributeClauses
     tagClause?
     attributeClause?
     // Simplified version (supported since v0.13)
-    | alias? dataType=DATATYPE_VALUE
+    | alias? WITH? (DATATYPE OPERATOR_EQ)? dataType=DATATYPE_VALUE
     (ENCODING OPERATOR_EQ encoding=ENCODING_VALUE)?
     ((COMPRESSOR | COMPRESSION) OPERATOR_EQ compressor=COMPRESSOR_VALUE)?
     propertyClause*
diff --git a/docs/UserGuide/Appendix/SQL-Reference.md b/docs/UserGuide/Appendix/SQL-Reference.md
index 0cf4657..8c4e3dc 100644
--- a/docs/UserGuide/Appendix/SQL-Reference.md
+++ b/docs/UserGuide/Appendix/SQL-Reference.md
@@ -112,7 +112,7 @@ Note: For SDT, it is optional to set compression maximum COMPMAXTIME, which is t
 ```
 CREATE TIMESERIES <FullPath> <SimplifiedAttributeClauses>
 SimplifiedAttributeClauses
-    : <DataTypeValue> 
+    : WITH? (DATATYPE OPERATOR_EQ)? <DataTypeValue> 
     ENCODING OPERATOR_EQ <EncodingValue>
     ((COMPRESSOR | COMPRESSION) OPERATOR_EQ <CompressorValue>)?
     (COMMA property)*
diff --git a/docs/zh/UserGuide/Appendix/SQL-Reference.md b/docs/zh/UserGuide/Appendix/SQL-Reference.md
index f593902..43fc6ed 100644
--- a/docs/zh/UserGuide/Appendix/SQL-Reference.md
+++ b/docs/zh/UserGuide/Appendix/SQL-Reference.md
@@ -101,7 +101,7 @@ Note: For SDT, it is optional to set compression maximum COMPMAXTIME, which is t
 ```
 CREATE TIMESERIES <FullPath> <SimplifiedAttributeClauses>
 SimplifiedAttributeClauses
-    : <DataTypeValue> 
+    : WITH? (DATATYPE OPERATOR_EQ)? <DataTypeValue> 
     ENCODING OPERATOR_EQ <EncodingValue>
     ((COMPRESSOR | COMPRESSION) OPERATOR_EQ <CompressorValue>)?
     (COMMA property)*