abdullah alamoudi has posted comments on this change. Change subject: ASTERIXDB-1269 Fix Extraction of Query Segment and Refactor AQL Parser ......................................................................
Patch Set 2: (11 comments) https://asterix-gerrit.ics.uci.edu/#/c/988/2/asterixdb/asterix-lang-aql/src/main/javacc/AQL.jj File asterixdb/asterix-lang-aql/src/main/javacc/AQL.jj: Line 426: (<ON> nodeGroupName = Identifier() )? > space missing Done Line 467: (<AUTOGENERATED> { autogenerated = true; } )? > space missing Done Line 468: (<ON> nodeGroupName = Identifier() )? > space missing Done Line 604: (<BTREE> > space missing Done Line 657: <FUNCTION>fctName = FunctionName() > space missing Done Line 689: <SECONDARY> <FEED> nameComponents = QualifiedName() ifNotExists = IfNotExists() > 2 spaces Done Line 720: <INGESTION> <POLICY> policyName = Identifier() ifNotExists = IfNotExists() > 2 spaces Done Line 812: fctName = FunctionName() <SYMBOLAT><INTEGER_LITERAL> > space missing Done Line 1332: (<SYMBOLHASH> third = Identifier())? | <SYMBOLHASH> second = Identifier() )? > space missing Done Line 1381: ((<IDENTIFIER>|<NOT>) > Why is NOT an identifier? NOT is a keyword used in: if not exists; we also have a not function. So when the parser encounters it, it will think that is the NOT keyword unless you specifically say that NOT can also be an identifier. This used to work before because if not exists was specified as a single string "if not exists" Line 1381: ((<IDENTIFIER>|<NOT>) > It's better to change test queries, instead of hacking identifiers here. why is that better? I really don't like having to add quotes. -- To view, visit https://asterix-gerrit.ics.uci.edu/988 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: comment Gerrit-Change-Id: I18ac4f8d86b3c5c7bfe226c98114499671649e93 Gerrit-PatchSet: 2 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: abdullah alamoudi <bamou...@gmail.com> Gerrit-Reviewer: Jenkins <jenk...@fulliautomatix.ics.uci.edu> Gerrit-Reviewer: Till Westmann <ti...@apache.org> Gerrit-Reviewer: Yingyi Bu <buyin...@gmail.com> Gerrit-Reviewer: abdullah alamoudi <bamou...@gmail.com> Gerrit-HasComments: Yes