You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by hx...@apache.org on 2021/03/11 05:48:01 UTC
[iotdb] branch master updated: [IOTDB-1192] Fix sql end with
semicolon (#2798)
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 7d5329f [IOTDB-1192] Fix sql end with semicolon (#2798)
7d5329f is described below
commit 7d5329f0fdf1247b886e48ec6a2c92457304a2cd
Author: Haonan <hh...@outlook.com>
AuthorDate: Thu Mar 11 13:47:43 2021 +0800
[IOTDB-1192] Fix sql end with semicolon (#2798)
---
antlr/src/main/antlr4/org/apache/iotdb/db/qp/sql/SqlBase.g4 | 2 +-
.../java/org/apache/iotdb/db/integration/IoTDBQueryDemoIT.java | 8 ++++----
.../test/java/org/apache/zeppelin/iotdb/IoTDBInterpreterTest.java | 2 +-
3 files changed, 6 insertions(+), 6 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\")",
diff --git a/zeppelin-interpreter/src/test/java/org/apache/zeppelin/iotdb/IoTDBInterpreterTest.java b/zeppelin-interpreter/src/test/java/org/apache/zeppelin/iotdb/IoTDBInterpreterTest.java
index 81f58a6..1525b3c 100644
--- a/zeppelin-interpreter/src/test/java/org/apache/zeppelin/iotdb/IoTDBInterpreterTest.java
+++ b/zeppelin-interpreter/src/test/java/org/apache/zeppelin/iotdb/IoTDBInterpreterTest.java
@@ -226,7 +226,7 @@ public class IoTDBInterpreterTest {
Assert.assertNotNull(actual);
Assert.assertEquals(Code.ERROR, actual.code());
Assert.assertEquals(
- "SQLException: 401: Error occurred while parsing SQL to physical plan: line 1:19 extraneous input 'a' expecting <EOF>",
+ "SQLException: 401: Error occurred while parsing SQL to physical plan: line 1:19 extraneous input 'a' expecting {<EOF>, ';'}",
actual.message().get(0).getData());
}