You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ha...@apache.org on 2021/03/10 10:31:44 UTC

[iotdb] branch fix1192 created (now f4f177e)

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

haonan pushed a change to branch fix1192
in repository https://gitbox.apache.org/repos/asf/iotdb.git.


      at f4f177e  fix sql end with semicolon

This branch includes the following new commits:

     new f4f177e  fix sql end with semicolon

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[iotdb] 01/01: fix sql end with semicolon

Posted by ha...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

haonan pushed a commit to branch fix1192
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit f4f177e858beb50b9c39123ae1e90eacb87c95e9
Author: HTHou <hh...@outlook.com>
AuthorDate: Wed Mar 10 18:27:42 2021 +0800

    fix sql end with semicolon
---
 antlr/src/main/antlr4/org/apache/iotdb/db/qp/sql/SqlBase.g4       | 2 +-
 .../java/org/apache/iotdb/db/integration/IoTDBQueryDemoIT.java    | 8 ++++----
 2 files changed, 5 insertions(+), 5 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 37d9056..fac9d26 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
@@ -20,7 +20,7 @@
 grammar SqlBase;
 
 singleStatement
-    : statement EOF
+    : statement (';')? EOF
     ;
 
 /*
diff --git a/server/src/test/java/org/apache/iotdb/db/integration/IoTDBQueryDemoIT.java b/server/src/test/java/org/apache/iotdb/db/integration/IoTDBQueryDemoIT.java
index 208478c..ba247fc 100644
--- a/server/src/test/java/org/apache/iotdb/db/integration/IoTDBQueryDemoIT.java
+++ b/server/src/test/java/org/apache/iotdb/db/integration/IoTDBQueryDemoIT.java
@@ -63,10 +63,10 @@ public class IoTDBQueryDemoIT {
         "insert into root.ln.wf01.wt01(timestamp,temperature) values(1509465780000,20.182663)",
         "insert into root.ln.wf01.wt01(timestamp,temperature) values(1509465840000,21.125198)",
         "insert into root.ln.wf01.wt01(timestamp,temperature) values(1509465900000,22.720892)",
-        "insert into root.ln.wf01.wt01(timestamp,temperature) values(1509465960000,20.71)",
-        "insert into root.ln.wf01.wt01(timestamp,temperature) values(1509466020000,21.451046)",
-        "insert into root.ln.wf01.wt01(timestamp,temperature) values(1509466080000,22.57987)",
-        "insert into root.ln.wf01.wt01(timestamp,temperature) values(1509466140000,20.98177)",
+        "insert into root.ln.wf01.wt01(timestamp,temperature) values(1509465960000,20.71);",
+        "insert into root.ln.wf01.wt01(timestamp,temperature) values(1509466020000,21.451046);",
+        "insert into root.ln.wf01.wt01(timestamp,temperature) values(1509466080000,22.57987);",
+        "insert into root.ln.wf01.wt01(timestamp,temperature) values(1509466140000,20.98177);",
         "create timeseries root.ln.wf02.wt02.hardware with datatype=TEXT,encoding=PLAIN",
         "insert into root.ln.wf02.wt02(timestamp,hardware) values(1509465600000,\"v2\")",
         "insert into root.ln.wf02.wt02(timestamp,hardware) values(1509465660000,\"v2\")",