Yingyi Bu has submitted this change and it was merged.

Change subject: Add an optional <END> for quantifiers.
......................................................................


Add an optional <END> for quantifiers.

Change-Id: Ia2d037c31752867a4a9e567dfcc76b101f94220d
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1283
Sonar-Qube: Jenkins <jenk...@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenk...@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <jenk...@fulliautomatix.ics.uci.edu>
Reviewed-by: Till Westmann <ti...@apache.org>
---
M 
asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/quantifiers/everysat_04/everysat_04.3.query.sqlpp
M 
asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/quantifiers/somesat_06/somesat_06.3.query.sqlpp
M asterixdb/asterix-doc/src/main/markdown/sqlpp/2_expr.md
M asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj
4 files changed, 4 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_sqlpp/quantifiers/everysat_04/everysat_04.3.query.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/quantifiers/everysat_04/everysat_04.3.query.sqlpp
index 06eb088..113bedd 100644
--- 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/quantifiers/everysat_04/everysat_04.3.query.sqlpp
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/quantifiers/everysat_04/everysat_04.3.query.sqlpp
@@ -23,7 +23,7 @@
 
 use test;
 
-with  x as [every x in [false,false] satisfies x,every x in [true,false] 
satisfies x,every x in [false,true] satisfies x,every x in [true,true] 
satisfies x,every x in [false,false] satisfies not x,every x in [true,false] 
satisfies not x,every x in [false,true] satisfies not x,every x in [true,true] 
satisfies not x]
+with  x as [every x in [false,false] satisfies x end,every x in [true,false] 
satisfies x,every x in [false,true] satisfies x,every x in [true,true] 
satisfies x,every x in [false,false] satisfies not x,every x in [true,false] 
satisfies not x,every x in [false,true] satisfies not x,every x in [true,true] 
satisfies not x]
 select element i
 from  x as i
 ;
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/quantifiers/somesat_06/somesat_06.3.query.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/quantifiers/somesat_06/somesat_06.3.query.sqlpp
index 8186a43..f8e9bf8 100644
--- 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/quantifiers/somesat_06/somesat_06.3.query.sqlpp
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/quantifiers/somesat_06/somesat_06.3.query.sqlpp
@@ -26,7 +26,7 @@
 
 set `import-private-functions` `true`;
 
-with  x as [some x in [false,false] satisfies x,some x in [true,false] 
satisfies x,some x in [false,true] satisfies x,some x in [true,true] satisfies 
x,some x in [false,false] satisfies NOT x,some x in [true,false] satisfies not 
x,some x in [false,true] satisfies NOT x,some x in [true,true] satisfies not x]
+with  x as [some x in [false,false] satisfies x,some x in [true,false] 
satisfies x,some x in [false,true] satisfies x,some x in [true,true] satisfies 
x,some x in [false,false] satisfies NOT x,some x in [true,false] satisfies not 
x,some x in [false,true] satisfies NOT x,some x in [true,true] satisfies not x 
end]
 select element i
 from  x as i
 ;
diff --git a/asterixdb/asterix-doc/src/main/markdown/sqlpp/2_expr.md 
b/asterixdb/asterix-doc/src/main/markdown/sqlpp/2_expr.md
index 2733679..811094e 100644
--- a/asterixdb/asterix-doc/src/main/markdown/sqlpp/2_expr.md
+++ b/asterixdb/asterix-doc/src/main/markdown/sqlpp/2_expr.md
@@ -311,7 +311,7 @@
 ### <a id="Quantified_expressions">Quantified expressions</a>
 
     QuantifiedExpression ::= ( (<ANY>|<SOME>) | <EVERY> ) Variable <IN> 
Expression ( "," Variable "in" Expression )*
-                             <SATISFIES> Expression
+                             <SATISFIES> Expression (<END>)?
 
 Quantified expressions are used for expressing existential or universal 
predicates involving the elements of a collection.
 
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj 
b/asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj
index 566d9e9..f113894 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj
+++ b/asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj
@@ -2980,7 +2980,7 @@
       quantifiedList.add(pair);
     }
     )*
-     <SATISFIES> satisfiesExpr = Expression()
+     <SATISFIES> satisfiesExpr = Expression() (<END>)?
      {
        qc.setSatisfiesExpr(satisfiesExpr);
        qc.setQuantifiedList(quantifiedList);

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/1283
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia2d037c31752867a4a9e567dfcc76b101f94220d
Gerrit-PatchSet: 3
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Yingyi Bu <buyin...@gmail.com>
Gerrit-Reviewer: Jenkins <jenk...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Michael Blow <mb...@apache.org>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-Reviewer: Yingyi Bu <buyin...@gmail.com>
Gerrit-Reviewer: abdullah alamoudi <bamou...@gmail.com>

Reply via email to