This is an automated email from the ASF dual-hosted git repository. geniuspig pushed a commit to branch fix_path_bracket in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit ef0ad3b46de85e2f5289caf68dfc90e4e360144e Author: Boris <[email protected]> AuthorDate: Wed Jan 13 21:37:47 2021 +0800 support only left bracket --- antlr/src/main/antlr4/org/apache/iotdb/db/qp/sql/SqlBase.g4 | 13 +++++-------- .../org/apache/iotdb/db/qp/physical/PhysicalPlanTest.java | 2 +- 2 files changed, 6 insertions(+), 9 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 aa5e874..c902a67 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 @@ -418,16 +418,14 @@ suffixPath ; nodeName - : ID + : ID STAR? | STAR | DOUBLE_QUOTE_STRING_LITERAL - | ID STAR | DURATION | encoding | dataType | dateExpression - | MINUS? EXPONENT - | MINUS? INT + | MINUS? (EXPONENT | INT) | booleanClause | CREATE | INSERT @@ -523,7 +521,7 @@ nodeName | SCHEMA | TRACING | OFF - | (ID | OPERATOR_IN)? LS_BRACKET ID? RS_BRACKET ID? + | (ID | OPERATOR_IN)? LS_BRACKET ID? RS_BRACKET? ID? | compressor | GLOBAL | PARTITION @@ -538,8 +536,7 @@ nodeNameWithoutStar | encoding | dataType | dateExpression - | MINUS? EXPONENT - | MINUS? INT + | MINUS? ( EXPONENT | INT) | booleanClause | CREATE | INSERT @@ -635,7 +632,7 @@ nodeNameWithoutStar | SCHEMA | TRACING | OFF - | (ID | OPERATOR_IN)? LS_BRACKET ID? RS_BRACKET ID? + | (ID | OPERATOR_IN)? LS_BRACKET 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 4dd9297..3e17d00 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 @@ -1041,7 +1041,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].desc with " + String sqlStr1 = "create timeseries root.3e-3.-1.1/2.SNAPPY.RLE.81+12.+2.s/io.in[jack].hel[jjj.desc with " + "datatype=FLOAT, encoding=RLE, compression=SNAPPY tags(tag1=v1, tag2=v2)" + " attributes(attr1=v1, attr2=v2)"; PhysicalPlan plan1 = processor.parseSQLToPhysicalPlan(sqlStr1);
