commit | dcd9112fa71689c015a525adcdbe3ce78c79f17f | [log] [tgz] |
---|---|---|
author | Yingyi Bu <yingyi@couchbase.com> | Wed Aug 10 12:13:36 2016 -0700 |
committer | Yingyi Bu <buyingyi@gmail.com> | Wed Aug 10 15:07:39 2016 -0700 |
tree | ce1120f03dfb950b038d13a948c6a7dc23211209 | |
parent | 52f183f699fd2d1c5ac37f806ab97f64a377ed1b [diff] |
ASTERIXDB-1529: remove "not" from reserved keywords in AQL. Change-Id: Ib79fee208acc7ae28f8e082eebb26ed728b39723 Reviewed-on: https://asterix-gerrit.ics.uci.edu/1062 Sonar-Qube: Jenkins <jenkins@fulliautomatix.ics.uci.edu> Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu> Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu> Reviewed-by: Till Westmann <tillw@apache.org>
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/tinysocial/tinysocial-suite/tinysocial-suite.13.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/tinysocial/tinysocial-suite/tinysocial-suite.13.query.aql index 573c38c..b6f302d 100644 --- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/tinysocial/tinysocial-suite/tinysocial-suite.13.query.aql +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/tinysocial/tinysocial-suite/tinysocial-suite.13.query.aql
@@ -24,6 +24,6 @@ for $fbu in dataset FacebookUsers -where (every $e in $fbu.employment satisfies "not"(is-missing($e.end-date))) +where (every $e in $fbu.employment satisfies not(is-missing($e.end-date))) order by $fbu.id return $fbu;
diff --git a/asterixdb/asterix-lang-aql/src/main/javacc/AQL.jj b/asterixdb/asterix-lang-aql/src/main/javacc/AQL.jj index b3f6200..b690f03 100644 --- a/asterixdb/asterix-lang-aql/src/main/javacc/AQL.jj +++ b/asterixdb/asterix-lang-aql/src/main/javacc/AQL.jj
@@ -769,7 +769,19 @@ { } { - ( <IF> <NOT> <EXISTS> + ( + LOOKAHEAD(1) + <IF> + <IDENTIFIER> + ( + { + if(!token.image.equals("not")){ + throw new ParseException("Expect word \"not\" at line " + token.beginLine + ", column " + + token.beginColumn +"!"); + } + } + ) + <EXISTS> { return true; } @@ -900,7 +912,9 @@ { } { - ( <IF> <EXISTS> + ( + LOOKAHEAD(1) + <IF> <EXISTS> { return true; } @@ -2621,7 +2635,6 @@ | <LOAD : "load"> | <NGRAM : "ngram"> | <NODEGROUP : "nodegroup"> - | <NOT : "not"> | <OFFSET : "offset"> | <ON : "on"> | <OPEN : "open">