asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From buyin...@apache.org
Subject asterixdb git commit: Remove NEST from the syntax.
Date Wed, 13 Jul 2016 20:34:12 GMT
Repository: asterixdb
Updated Branches:
  refs/heads/master e6e54f37f -> 6d999ed1a


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>


Project: http://git-wip-us.apache.org/repos/asf/asterixdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/asterixdb/commit/6d999ed1
Tree: http://git-wip-us.apache.org/repos/asf/asterixdb/tree/6d999ed1
Diff: http://git-wip-us.apache.org/repos/asf/asterixdb/diff/6d999ed1

Branch: refs/heads/master
Commit: 6d999ed1a24662c87bde4897b7f4edab671ddc57
Parents: e6e54f3
Author: Yingyi Bu <yingyi@couchbase.com>
Authored: Wed Jul 13 11:59:06 2016 -0700
Committer: Yingyi Bu <buyingyi@gmail.com>
Committed: Wed Jul 13 13:33:36 2016 -0700

----------------------------------------------------------------------
 .../src/main/javacc/SQLPP.html                  | 16 ++++---------
 .../asterix-lang-sqlpp/src/main/javacc/SQLPP.jj | 24 +-------------------
 2 files changed, 6 insertions(+), 34 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/asterixdb/blob/6d999ed1/asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.html
----------------------------------------------------------------------
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 @@
 | &lt;LIKE: "like"&gt;
 | &lt;LIMIT: "limit"&gt;
 | &lt;LOAD: "load"&gt;
-| &lt;NEST: "nest"&gt;
 | &lt;NODEGROUP: "nodegroup"&gt;
 | &lt;NGRAM: "ngram"&gt;
 | &lt;NOT: "not"&gt;
@@ -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> ( ( &lt;AS&gt;
)? <A HREF="#prod50">Variable</A> )? ( &lt;AT&gt; <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> ( ( &lt;AS&gt;
)? <A HREF="#prod50">Variable</A> )? ( &lt;AT&gt; <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>&lt;JOIN&gt; <A HREF="#prod44">Expression</A>
( ( &lt;AS&gt; )? <A HREF="#prod50">Variable</A> )? ( &lt;AT&gt;
<A HREF="#prod50">Variable</A> )? &lt;ON&gt; <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>&lt;NEST&gt; <A HREF="#prod44">Expression</A>
( ( &lt;AS&gt; )? <A HREF="#prod50">Variable</A> )? ( &lt;AT&gt;
<A HREF="#prod50">Variable</A> )? &lt;ON&gt; <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>( &lt;UNNEST&gt; | &lt;CORRELATE&gt;
| &lt;FLATTEN&gt; ) <A HREF="#prod44">Expression</A> ( ( &lt;AS&gt;
)? <A HREF="#prod50">Variable</A> ) ( &lt;AT&gt; <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>( ( &lt;LET&gt; | &lt;LETTING&gt; )
<A HREF="#prod106">LetElement</A> ( &lt;COMMA&gt; <A HREF="#prod106">LetElement</A>
)* | &lt;WITH&gt; <A HREF="#prod107">WithElement</A> ( &lt;COMMA&gt;
<A HREF="#prod107">WithElement</A> )* )</TD>
+<TD ALIGN=LEFT VALIGN=BASELINE>( ( &lt;LET&gt; | &lt;LETTING&gt; )
<A HREF="#prod105">LetElement</A> ( &lt;COMMA&gt; <A HREF="#prod105">LetElement</A>
)* | &lt;WITH&gt; <A HREF="#prod106">WithElement</A> ( &lt;COMMA&gt;
<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>( ( &lt;SOME&gt; ) | ( &lt;EVERY&gt;
) ) <A HREF="#prod50">Variable</A> &lt;IN&gt; <A HREF="#prod44">Expression</A>
( &lt;COMMA&gt; <A HREF="#prod50">Variable</A> &lt;IN&gt; <A
HREF="#prod44">Expression</A> )* &lt;SATISFIES&gt; <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> &lt;EQ&gt;
<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> &lt;AS&gt;
<A HREF="#prod44">Expression</A></TD>
 </TR>

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/6d999ed1/asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj
----------------------------------------------------------------------
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.FromClause;
 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 @@ FromTerm FromTerm() throws ParseException :
        AbstractBinaryCorrelateClause correlateClause = null;
      }
      (correlateClause = JoinClause(joinType)
-      |
-      correlateClause = NestClause(joinType)
-      |
-      correlateClause = UnnestClause(joinType)
+      | correlateClause = UnnestClause(joinType)
      )
      {
         correlateClauses.add(correlateClause);
@@ -2449,23 +2445,6 @@ JoinClause JoinClause(JoinType joinType) throws ParseException :
   }
 }
 
-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 @@ TOKEN [IGNORE_CASE]:
   | <LIKE : "like">
   | <LIMIT : "limit">
   | <LOAD : "load">
-  | <NEST : "nest">
   | <NODEGROUP : "nodegroup">
   | <NGRAM : "ngram">
   | <NOT : "not">


Mime
View raw message