commit | 81870d71a10b7be0a0792d3fb73ea954da280ff3 | [log] [tgz] |
---|---|---|
author | Till Westmann <tillw@apache.org> | Thu Mar 16 18:11:23 2017 -0700 |
committer | Michael Blow <mblow@apache.org> | Fri Mar 17 07:07:54 2017 -0700 |
tree | 68e8ddfba2356f6774048936cbc9c12169641151 | |
parent | 58e0184e52a51cac405e2484f7f5a75f1b4fcc45 [diff] |
Allow spurious semicolons at the end of statements Change-Id: Iea49d46ed361a3540c391a681b5ed16d8958cea4 Reviewed-on: https://asterix-gerrit.ics.uci.edu/1593 Reviewed-by: Yingyi Bu <buyingyi@gmail.com> Sonar-Qube: Jenkins <jenkins@fulliautomatix.ics.uci.edu> Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu> BAD: Jenkins <jenkins@fulliautomatix.ics.uci.edu> Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/QueryServiceServlet.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/QueryServiceServlet.java index b0a9586..101fa97 100644 --- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/QueryServiceServlet.java +++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/QueryServiceServlet.java
@@ -426,7 +426,7 @@ if (param.statement == null || param.statement.isEmpty()) { throw new AsterixException("Empty request, no statement provided"); } - IParser parser = compilationProvider.getParserFactory().createParser(param.statement); + IParser parser = compilationProvider.getParserFactory().createParser(param.statement + ";"); List<Statement> statements = parser.parse(); MetadataManager.INSTANCE.init(); IStatementExecutor translator =
diff --git a/asterixdb/asterix-lang-aql/src/main/javacc/AQL.jj b/asterixdb/asterix-lang-aql/src/main/javacc/AQL.jj index f4cdfb8..33b154e 100644 --- a/asterixdb/asterix-lang-aql/src/main/javacc/AQL.jj +++ b/asterixdb/asterix-lang-aql/src/main/javacc/AQL.jj
@@ -288,6 +288,7 @@ decls.add(stmt); } )* + (";") * <EOF> { return decls;
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj b/asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj index d791c85..f8685be 100644 --- a/asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj +++ b/asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj
@@ -335,6 +335,7 @@ decls.add(stmt); } )* + (<SEMICOLON>)* <EOF> { return decls;