This is an automated email from the ASF dual-hosted git repository.
hxd 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 adb5ea8 Support brackets with number in timeseries path (#2503)
adb5ea8 is described below
commit adb5ea8f2bb2388c1ac32c42f0542df16a1c7e00
Author: Haonan <[email protected]>
AuthorDate: Thu Jan 21 21:07:08 2021 +0800
Support brackets with number in timeseries path (#2503)
---
antlr/src/main/antlr4/org/apache/iotdb/db/qp/sql/SqlBase.g4 | 4 ++--
.../test/java/org/apache/iotdb/db/qp/physical/PhysicalPlanTest.java | 3 +--
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/antlr/src/main/antlr4/org/apache/iotdb/db/qp/sql/SqlBase.g4
b/antlr/src/main/antlr4/org/apache/iotdb/db/qp/sql/SqlBase.g4
index c902a67..cf786bf 100644
--- a/antlr/src/main/antlr4/org/apache/iotdb/db/qp/sql/SqlBase.g4
+++ b/antlr/src/main/antlr4/org/apache/iotdb/db/qp/sql/SqlBase.g4
@@ -521,7 +521,7 @@ nodeName
| SCHEMA
| TRACING
| OFF
- | (ID | OPERATOR_IN)? LS_BRACKET ID? RS_BRACKET? ID?
+ | (ID | OPERATOR_IN)? LS_BRACKET INT? ID? RS_BRACKET? ID?
| compressor
| GLOBAL
| PARTITION
@@ -632,7 +632,7 @@ nodeNameWithoutStar
| SCHEMA
| TRACING
| OFF
- | (ID | OPERATOR_IN)? LS_BRACKET ID? RS_BRACKET? ID?
+ | (ID | OPERATOR_IN)? LS_BRACKET INT? ID? RS_BRACKET? ID?
| compressor
| GLOBAL
| PARTITION
diff --git
a/server/src/test/java/org/apache/iotdb/db/qp/physical/PhysicalPlanTest.java
b/server/src/test/java/org/apache/iotdb/db/qp/physical/PhysicalPlanTest.java
index 3e17d00..61151af 100644
--- a/server/src/test/java/org/apache/iotdb/db/qp/physical/PhysicalPlanTest.java
+++ b/server/src/test/java/org/apache/iotdb/db/qp/physical/PhysicalPlanTest.java
@@ -35,7 +35,6 @@ import java.util.Set;
import org.antlr.v4.runtime.misc.ParseCancellationException;
import org.apache.iotdb.db.conf.IoTDBDescriptor;
import org.apache.iotdb.db.exception.StorageEngineException;
-import org.apache.iotdb.db.exception.UDFRegistrationException;
import org.apache.iotdb.db.exception.metadata.IllegalPathException;
import org.apache.iotdb.db.exception.metadata.MetadataException;
import org.apache.iotdb.db.exception.query.QueryProcessException;
@@ -1041,7 +1040,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].hel[jjj.desc with "
+ String sqlStr1 = "create timeseries
root.3e-3.-1.1/2.SNAPPY.RLE.81+12.+2.s/io.in[jack].hel[jjj.s[1].desc with "
+ "datatype=FLOAT, encoding=RLE, compression=SNAPPY tags(tag1=v1,
tag2=v2)"
+ " attributes(attr1=v1, attr2=v2)";
PhysicalPlan plan1 = processor.parseSQLToPhysicalPlan(sqlStr1);