Remove NEST from the syntax.
Change-Id: I0e982523fc3fbf916ae4dd1b14e64ecf12844bcb
Reviewed-on: https://asterix-gerrit.ics.uci.edu/992
Sonar-Qube: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Till Westmann <tillw@apache.org>
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.html b/asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.html
index 2f7b7c6..c651146 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.html
+++ b/asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.html
@@ -76,7 +76,6 @@
| <LIKE: "like">
| <LIMIT: "limit">
| <LOAD: "load">
-| <NEST: "nest">
| <NODEGROUP: "nodegroup">
| <NGRAM: "ngram">
| <NOT: "not">
@@ -845,7 +844,7 @@
<TR>
<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod101">FromTerm</A></TD>
<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
-<TD ALIGN=LEFT VALIGN=BASELINE><A HREF="#prod44">Expression</A> ( ( <AS> )? <A HREF="#prod50">Variable</A> )? ( <AT> <A HREF="#prod50">Variable</A> )? ( ( <A HREF="#prod102">JoinType</A> )? ( <A HREF="#prod103">JoinClause</A> | <A HREF="#prod104">NestClause</A> | <A HREF="#prod105">UnnestClause</A> ) )*</TD>
+<TD ALIGN=LEFT VALIGN=BASELINE><A HREF="#prod44">Expression</A> ( ( <AS> )? <A HREF="#prod50">Variable</A> )? ( <AT> <A HREF="#prod50">Variable</A> )? ( ( <A HREF="#prod102">JoinType</A> )? ( <A HREF="#prod103">JoinClause</A> | <A HREF="#prod104">UnnestClause</A> ) )*</TD>
</TR>
<TR>
<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod103">JoinClause</A></TD>
@@ -853,12 +852,7 @@
<TD ALIGN=LEFT VALIGN=BASELINE><JOIN> <A HREF="#prod44">Expression</A> ( ( <AS> )? <A HREF="#prod50">Variable</A> )? ( <AT> <A HREF="#prod50">Variable</A> )? <ON> <A HREF="#prod44">Expression</A></TD>
</TR>
<TR>
-<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod104">NestClause</A></TD>
-<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
-<TD ALIGN=LEFT VALIGN=BASELINE><NEST> <A HREF="#prod44">Expression</A> ( ( <AS> )? <A HREF="#prod50">Variable</A> )? ( <AT> <A HREF="#prod50">Variable</A> )? <ON> <A HREF="#prod44">Expression</A></TD>
-</TR>
-<TR>
-<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod105">UnnestClause</A></TD>
+<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod104">UnnestClause</A></TD>
<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
<TD ALIGN=LEFT VALIGN=BASELINE>( <UNNEST> | <CORRELATE> | <FLATTEN> ) <A HREF="#prod44">Expression</A> ( ( <AS> )? <A HREF="#prod50">Variable</A> ) ( <AT> <A HREF="#prod50">Variable</A> )?</TD>
</TR>
@@ -870,7 +864,7 @@
<TR>
<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod88">LetClause</A></TD>
<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
-<TD ALIGN=LEFT VALIGN=BASELINE>( ( <LET> | <LETTING> ) <A HREF="#prod106">LetElement</A> ( <COMMA> <A HREF="#prod106">LetElement</A> )* | <WITH> <A HREF="#prod107">WithElement</A> ( <COMMA> <A HREF="#prod107">WithElement</A> )* )</TD>
+<TD ALIGN=LEFT VALIGN=BASELINE>( ( <LET> | <LETTING> ) <A HREF="#prod105">LetElement</A> ( <COMMA> <A HREF="#prod105">LetElement</A> )* | <WITH> <A HREF="#prod106">WithElement</A> ( <COMMA> <A HREF="#prod106">WithElement</A> )* )</TD>
</TR>
<TR>
<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod95">WhereClause</A></TD>
@@ -903,12 +897,12 @@
<TD ALIGN=LEFT VALIGN=BASELINE>( ( <SOME> ) | ( <EVERY> ) ) <A HREF="#prod50">Variable</A> <IN> <A HREF="#prod44">Expression</A> ( <COMMA> <A HREF="#prod50">Variable</A> <IN> <A HREF="#prod44">Expression</A> )* <SATISFIES> <A HREF="#prod44">Expression</A></TD>
</TR>
<TR>
-<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod106">LetElement</A></TD>
+<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod105">LetElement</A></TD>
<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
<TD ALIGN=LEFT VALIGN=BASELINE><A HREF="#prod50">Variable</A> <EQ> <A HREF="#prod44">Expression</A></TD>
</TR>
<TR>
-<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod107">WithElement</A></TD>
+<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod106">WithElement</A></TD>
<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
<TD ALIGN=LEFT VALIGN=BASELINE><A HREF="#prod50">Variable</A> <AS> <A HREF="#prod44">Expression</A></TD>
</TR>
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj b/asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj
index 9f62ef2..dff69ab 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj
+++ b/asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj
@@ -130,7 +130,6 @@
import org.apache.asterix.lang.sqlpp.clause.FromTerm;
import org.apache.asterix.lang.sqlpp.clause.HavingClause;
import org.apache.asterix.lang.sqlpp.clause.JoinClause;
-import org.apache.asterix.lang.sqlpp.clause.NestClause;
import org.apache.asterix.lang.sqlpp.clause.Projection;
import org.apache.asterix.lang.sqlpp.clause.SelectBlock;
import org.apache.asterix.lang.sqlpp.clause.SelectClause;
@@ -2415,10 +2414,7 @@
AbstractBinaryCorrelateClause correlateClause = null;
}
(correlateClause = JoinClause(joinType)
- |
- correlateClause = NestClause(joinType)
- |
- correlateClause = UnnestClause(joinType)
+ | correlateClause = UnnestClause(joinType)
)
{
correlateClauses.add(correlateClause);
@@ -2449,23 +2445,6 @@
}
}
-NestClause NestClause(JoinType joinType) throws ParseException :
-{
- Expression rightExpr = null;
- VariableExpr rightVar = null;
- VariableExpr posVar = null;
- Expression conditionExpr = null;
-}
-{
- <NEST> rightExpr = Expression() ((<AS>)? rightVar = Variable())? (<AT> posVar = Variable())? <ON> conditionExpr = Expression()
- {
- if(rightVar==null){
- rightVar = ExpressionToVariableUtil.getGeneratedVariable(rightExpr);
- }
- return new NestClause(joinType, rightExpr, rightVar, posVar, conditionExpr);
- }
-}
-
UnnestClause UnnestClause(JoinType joinType) throws ParseException :
{
Expression rightExpr;
@@ -2845,7 +2824,6 @@
| <LIKE : "like">
| <LIMIT : "limit">
| <LOAD : "load">
- | <NEST : "nest">
| <NODEGROUP : "nodegroup">
| <NGRAM : "ngram">
| <NOT : "not">