Yingyi Bu has submitted this change and it was merged. Change subject: ASTERIXDB-1529: remove "not" from reserved keywords in AQL. ......................................................................
ASTERIXDB-1529: remove "not" from reserved keywords in AQL. Change-Id: Ib79fee208acc7ae28f8e082eebb26ed728b39723 Reviewed-on: https://asterix-gerrit.ics.uci.edu/1062 Sonar-Qube: Jenkins <[email protected]> Tested-by: Jenkins <[email protected]> Integration-Tests: Jenkins <[email protected]> Reviewed-by: Till Westmann <[email protected]> --- M asterixdb/asterix-app/src/test/resources/runtimets/queries/tinysocial/tinysocial-suite/tinysocial-suite.13.query.aql M asterixdb/asterix-lang-aql/src/main/javacc/AQL.jj 2 files changed, 17 insertions(+), 4 deletions(-) Approvals: Till Westmann: Looks good to me, approved Jenkins: Verified; No violations found; Verified 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"> -- To view, visit https://asterix-gerrit.ics.uci.edu/1062 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib79fee208acc7ae28f8e082eebb26ed728b39723 Gerrit-PatchSet: 2 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Yingyi Bu <[email protected]> Gerrit-Reviewer: Jenkins <[email protected]> Gerrit-Reviewer: Michael Blow <[email protected]> Gerrit-Reviewer: Till Westmann <[email protected]> Gerrit-Reviewer: Yingyi Bu <[email protected]> Gerrit-Reviewer: abdullah alamoudi <[email protected]>
