asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mb...@apache.org
Subject asterixdb git commit: Allow spurious semicolons at the end of statements
Date Fri, 17 Mar 2017 14:08:10 GMT
Repository: asterixdb
Updated Branches:
  refs/heads/master 58e0184e5 -> 81870d71a


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>


Project: http://git-wip-us.apache.org/repos/asf/asterixdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/asterixdb/commit/81870d71
Tree: http://git-wip-us.apache.org/repos/asf/asterixdb/tree/81870d71
Diff: http://git-wip-us.apache.org/repos/asf/asterixdb/diff/81870d71

Branch: refs/heads/master
Commit: 81870d71a10b7be0a0792d3fb73ea954da280ff3
Parents: 58e0184
Author: Till Westmann <tillw@apache.org>
Authored: Thu Mar 16 18:11:23 2017 -0700
Committer: Michael Blow <mblow@apache.org>
Committed: Fri Mar 17 07:07:54 2017 -0700

----------------------------------------------------------------------
 .../org/apache/asterix/api/http/server/QueryServiceServlet.java    | 2 +-
 asterixdb/asterix-lang-aql/src/main/javacc/AQL.jj                  | 1 +
 asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj              | 1 +
 3 files changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/asterixdb/blob/81870d71/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/QueryServiceServlet.java
----------------------------------------------------------------------
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 @@ public class QueryServiceServlet extends AbstractQueryApiServlet {
             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 =

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/81870d71/asterixdb/asterix-lang-aql/src/main/javacc/AQL.jj
----------------------------------------------------------------------
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 @@ List<Statement> Statement() throws ParseException:
       decls.add(stmt);
     }
   )*
+  (";") *
   <EOF>
   {
     return decls;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/81870d71/asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj
----------------------------------------------------------------------
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 @@ List<Statement> Statement() throws ParseException:
       decls.add(stmt);
     }
   )*
+  (<SEMICOLON>)*
   <EOF>
   {
     return decls;


Mime
View raw message