You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2022/01/14 12:26:57 UTC
[GitHub] [iotdb] liuminghui233 opened a new pull request #4827: [IOTDB-2396] Compatible with 0.12 on language structure
liuminghui233 opened a new pull request #4827:
URL: https://github.com/apache/iotdb/pull/4827
Compatible with 0.12 on language structure:
- Support . in the node name of the path
- Usage of the single and double quotes
For more details, please refer to `Syntax Conventions.md`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [iotdb] liuminghui233 commented on a change in pull request #4827: [IOTDB-2396] Compatible with 0.12 on language structure
Posted by GitBox <gi...@apache.org>.
liuminghui233 commented on a change in pull request #4827:
URL: https://github.com/apache/iotdb/pull/4827#discussion_r786019166
##########
File path: server/src/main/java/org/apache/iotdb/db/qp/strategy/LogicalGenerator.java
##########
@@ -166,5 +171,50 @@ public static Operator generate(TSLastDataQueryReq req, ZoneId zoneId)
return queryOp;
}
+ @TestOnly
+ public static Operator generate(String sql, ZoneId zoneId) throws ParseCancellationException {
Review comment:
fixed!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [iotdb] coveralls edited a comment on pull request #4827: [IOTDB-2396] Compatible with 0.12 on language structure
Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #4827:
URL: https://github.com/apache/iotdb/pull/4827#issuecomment-1013652859
[](https://coveralls.io/builds/45654606)
Coverage decreased (-0.001%) to 68.045% when pulling **1fc7e8c27191b6fe12f6775904b2ff5698cf1906 on liuminghui233:refactor_language_structure** into **2bf83a50f1623042a3cc266396c239f1a570f0b4 on apache:master**.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [iotdb] coveralls edited a comment on pull request #4827: [IOTDB-2396] Compatible with 0.12 on language structure
Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #4827:
URL: https://github.com/apache/iotdb/pull/4827#issuecomment-1013652859
[](https://coveralls.io/builds/45654935)
Coverage increased (+0.02%) to 68.07% when pulling **7190aff8561cde723f88d76ba83431e3bf9c74ee on liuminghui233:refactor_language_structure** into **2bf83a50f1623042a3cc266396c239f1a570f0b4 on apache:master**.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [iotdb] coveralls edited a comment on pull request #4827: [IOTDB-2396] Compatible with 0.12 on language structure
Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #4827:
URL: https://github.com/apache/iotdb/pull/4827#issuecomment-1013652859
[](https://coveralls.io/builds/45654964)
Coverage decreased (-0.01%) to 68.034% when pulling **7190aff8561cde723f88d76ba83431e3bf9c74ee on liuminghui233:refactor_language_structure** into **2bf83a50f1623042a3cc266396c239f1a570f0b4 on apache:master**.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [iotdb] coveralls edited a comment on pull request #4827: [IOTDB-2396] Compatible with 0.12 on language structure
Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #4827:
URL: https://github.com/apache/iotdb/pull/4827#issuecomment-1013652859
[](https://coveralls.io/builds/45666523)
Coverage decreased (-0.1%) to 67.908% when pulling **d63079d68cac6a6cb486a3441d0fe53048a49b29 on liuminghui233:refactor_language_structure** into **2bf83a50f1623042a3cc266396c239f1a570f0b4 on apache:master**.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [iotdb] liuminghui233 commented on a change in pull request #4827: [IOTDB-2396] Compatible with 0.12 on language structure
Posted by GitBox <gi...@apache.org>.
liuminghui233 commented on a change in pull request #4827:
URL: https://github.com/apache/iotdb/pull/4827#discussion_r786018397
##########
File path: docs/zh/UserGuide/Appendix/Keywords.md
##########
@@ -0,0 +1,212 @@
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+
+# 关键字和保留字
+
+以下为 IoTDB 0.13 版本的关键字,其中保留字用 **(R)** 标志。
Review comment:
fixed!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [iotdb] qiaojialin commented on a change in pull request #4827: [IOTDB-2396] Compatible with 0.12 on language structure
Posted by GitBox <gi...@apache.org>.
qiaojialin commented on a change in pull request #4827:
URL: https://github.com/apache/iotdb/pull/4827#discussion_r785401727
##########
File path: docs/zh/UserGuide/Appendix/Keywords.md
##########
@@ -0,0 +1,212 @@
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+
+# 关键字和保留字
+
+以下为 IoTDB 0.13 版本的关键字,其中保留字用 **(R)** 标志。
+
+- 一般关键字
+ - ADD
+ - A F T E R
Review comment:
```suggestion
- AFTER
```
?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [iotdb] liuminghui233 commented on a change in pull request #4827: [IOTDB-2396] Compatible with 0.12 on language structure
Posted by GitBox <gi...@apache.org>.
liuminghui233 commented on a change in pull request #4827:
URL: https://github.com/apache/iotdb/pull/4827#discussion_r786033981
##########
File path: integration/src/test/java/org/apache/iotdb/db/integration/IoTDBUDTFBuiltinFunctionIT.java
##########
@@ -201,7 +201,7 @@ public void testStringProcessingFunctions() {
Statement statement = connection.createStatement()) {
ResultSet resultSet =
statement.executeQuery(
- "select STRING_CONTAINS(s6, 's'='0'), STRING_MATCHES(s6, 'regex'='\\d') from root.sg.d1");
Review comment:
fixed!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [iotdb] coveralls edited a comment on pull request #4827: [IOTDB-2396] Compatible with 0.12 on language structure
Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #4827:
URL: https://github.com/apache/iotdb/pull/4827#issuecomment-1013652859
[](https://coveralls.io/builds/45672847)
Coverage increased (+0.007%) to 67.895% when pulling **38fdfb4a44e11e678269f3f9b8403fbcdab46ba2 on liuminghui233:refactor_language_structure** into **8a332801ca8be040e69f74d7ded35d1a7dba14f1 on apache:master**.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [iotdb] coveralls commented on pull request #4827: [IOTDB-2396] Compatible with 0.12 on language structure
Posted by GitBox <gi...@apache.org>.
coveralls commented on pull request #4827:
URL: https://github.com/apache/iotdb/pull/4827#issuecomment-1013652859
[](https://coveralls.io/builds/45653473)
Coverage increased (+0.03%) to 68.053% when pulling **f9d5d78d51944bcc9c676047f62387bb400c1d77 on liuminghui233:refactor_language_structure** into **23c35f33c19eace1a6aebad4bdf2489bc195c5d8 on apache:master**.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [iotdb] coveralls edited a comment on pull request #4827: [IOTDB-2396] Compatible with 0.12 on language structure
Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #4827:
URL: https://github.com/apache/iotdb/pull/4827#issuecomment-1013652859
[](https://coveralls.io/builds/45654833)
Coverage decreased (-0.02%) to 68.026% when pulling **7190aff8561cde723f88d76ba83431e3bf9c74ee on liuminghui233:refactor_language_structure** into **2bf83a50f1623042a3cc266396c239f1a570f0b4 on apache:master**.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [iotdb] SteveYurongSu commented on a change in pull request #4827: [IOTDB-2396] Compatible with 0.12 on language structure
Posted by GitBox <gi...@apache.org>.
SteveYurongSu commented on a change in pull request #4827:
URL: https://github.com/apache/iotdb/pull/4827#discussion_r785985343
##########
File path: docs/UserGuide/Appendix/Keywords.md
##########
@@ -0,0 +1,212 @@
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+
+# Keywords and Reserved Words
Review comment:
Add it to config.js
##########
File path: integration/src/test/java/org/apache/iotdb/db/integration/IoTDBUDTFBuiltinFunctionIT.java
##########
@@ -201,7 +201,7 @@ public void testStringProcessingFunctions() {
Statement statement = connection.createStatement()) {
ResultSet resultSet =
statement.executeQuery(
- "select STRING_CONTAINS(s6, 's'='0'), STRING_MATCHES(s6, 'regex'='\\d') from root.sg.d1");
Review comment:
This is kind of wired...
##########
File path: docs/zh/UserGuide/IoTDB-SQL-Language/Syntax-Conventions.md
##########
@@ -21,103 +21,162 @@
# 语法约定
-## 双引号(\")、反引号(\`)
+## 字面值常量
-双引号和反引号内引用的字符串被解释为标识符(ID),被引用的字符串一般包含特殊字符。需要注意的是,被引用的字符串不可带有 `.` 字符。
+该部分对 IoTDB 中支持的字面值常量进行说明,包括字符串常量、数值型常量、时间戳常量、布尔型常量和空值。
-标识符(ID)的定义为:
+### 字符串常量
-```sql
-ID
- : FIRST_NAME_CHAR NAME_CHAR*
- | '"' (~('"' | '.') | '""')+ '"'
- | '`' (~('`' | '.') | '``')+ '`'
- ;
-
-fragment NAME_CHAR
- : 'A'..'Z'
- | 'a'..'z'
- | '0'..'9'
- | '_'
- | ':'
- | '@'
- | '#'
- | '$'
- | '{'
- | '}'
- | CN_CHAR
- ;
-
-fragment FIRST_NAME_CHAR
- : 'A'..'Z'
- | 'a'..'z'
- | '_'
- | ':'
- | '@'
- | '#'
- | '$'
- | '{'
- | '}'
- | CN_CHAR
- ;
-
-fragment CN_CHAR
- : '\u2E80'..'\u9FFF'
- ;
+字符串是由单引号(`'`)或双引号(`"`)字符括起来的字符序列。示例如下:
+```js
+'a string'
+"another string"
```
-标志符的使用场景:
-* `TRIGGER`,`FUNCTION`(UDF),`CONTINUOUS QUERY`,`USER`,`ROLE` 等的名字。
-* 时间序列路径的表达:除了时间序列的开头的层级(`root`)和存储组层级外,层级还支持使用被 \` 或者 ` " ` 符号引用的特殊字符串作为其名称。
+字符串字面值的使用场景:
-例子:
+- `INSERT` 或者 `SELECT` 中用于表达 `TEXT` 类型数据的场景
+- SQL 中 UDF 和 Trigger 的 Java 类全类名
+- `CREATE TRIGGER` 语句中描述触发器属性的键值对
+- UDF 函数输入参数中的属性
+- `LOAD` / `REMOVE` / `SETTLE` 指令中的文件路径
+- 用户密码
+
+通过以下几种方式可以在字符串内使用引号:
+
+- 使用两个连续单引号转义单引号,即 `''` 转义为 `'`。
+- 使用两个连续双引号转义双引号,即 `""` 转义为 `"`。
+- 在引号前使用转义符 (\\)。
Review comment:
双引号里面\转义单引号
单引号里面\转义双引号
##########
File path: server/src/main/java/org/apache/iotdb/db/qp/strategy/LogicalGenerator.java
##########
@@ -166,5 +171,50 @@ public static Operator generate(TSLastDataQueryReq req, ZoneId zoneId)
return queryOp;
}
+ @TestOnly
+ public static Operator generate(String sql, ZoneId zoneId) throws ParseCancellationException {
Review comment:
简化一下哈 = =
##########
File path: docs/zh/UserGuide/Appendix/Keywords.md
##########
@@ -0,0 +1,212 @@
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+
+# 关键字和保留字
+
+以下为 IoTDB 0.13 版本的关键字,其中保留字用 **(R)** 标志。
Review comment:
目前不区分。
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [iotdb] liuminghui233 commented on a change in pull request #4827: [IOTDB-2396] Compatible with 0.12 on language structure
Posted by GitBox <gi...@apache.org>.
liuminghui233 commented on a change in pull request #4827:
URL: https://github.com/apache/iotdb/pull/4827#discussion_r786018125
##########
File path: docs/UserGuide/Appendix/Keywords.md
##########
@@ -0,0 +1,212 @@
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+
+# Keywords and Reserved Words
Review comment:
fixed!
##########
File path: docs/zh/UserGuide/IoTDB-SQL-Language/Syntax-Conventions.md
##########
@@ -21,103 +21,162 @@
# 语法约定
-## 双引号(\")、反引号(\`)
+## 字面值常量
-双引号和反引号内引用的字符串被解释为标识符(ID),被引用的字符串一般包含特殊字符。需要注意的是,被引用的字符串不可带有 `.` 字符。
+该部分对 IoTDB 中支持的字面值常量进行说明,包括字符串常量、数值型常量、时间戳常量、布尔型常量和空值。
-标识符(ID)的定义为:
+### 字符串常量
-```sql
-ID
- : FIRST_NAME_CHAR NAME_CHAR*
- | '"' (~('"' | '.') | '""')+ '"'
- | '`' (~('`' | '.') | '``')+ '`'
- ;
-
-fragment NAME_CHAR
- : 'A'..'Z'
- | 'a'..'z'
- | '0'..'9'
- | '_'
- | ':'
- | '@'
- | '#'
- | '$'
- | '{'
- | '}'
- | CN_CHAR
- ;
-
-fragment FIRST_NAME_CHAR
- : 'A'..'Z'
- | 'a'..'z'
- | '_'
- | ':'
- | '@'
- | '#'
- | '$'
- | '{'
- | '}'
- | CN_CHAR
- ;
-
-fragment CN_CHAR
- : '\u2E80'..'\u9FFF'
- ;
+字符串是由单引号(`'`)或双引号(`"`)字符括起来的字符序列。示例如下:
+```js
+'a string'
+"another string"
```
-标志符的使用场景:
-* `TRIGGER`,`FUNCTION`(UDF),`CONTINUOUS QUERY`,`USER`,`ROLE` 等的名字。
-* 时间序列路径的表达:除了时间序列的开头的层级(`root`)和存储组层级外,层级还支持使用被 \` 或者 ` " ` 符号引用的特殊字符串作为其名称。
+字符串字面值的使用场景:
-例子:
+- `INSERT` 或者 `SELECT` 中用于表达 `TEXT` 类型数据的场景
+- SQL 中 UDF 和 Trigger 的 Java 类全类名
+- `CREATE TRIGGER` 语句中描述触发器属性的键值对
+- UDF 函数输入参数中的属性
+- `LOAD` / `REMOVE` / `SETTLE` 指令中的文件路径
+- 用户密码
+
+通过以下几种方式可以在字符串内使用引号:
+
+- 使用两个连续单引号转义单引号,即 `''` 转义为 `'`。
+- 使用两个连续双引号转义双引号,即 `""` 转义为 `"`。
+- 在引号前使用转义符 (\\)。
Review comment:
fixed!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [iotdb] SteveYurongSu merged pull request #4827: [IOTDB-2396] Compatible with 0.12 on language structure
Posted by GitBox <gi...@apache.org>.
SteveYurongSu merged pull request #4827:
URL: https://github.com/apache/iotdb/pull/4827
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org