ASTERIXDB-1226: implement SQL++ core group-by semantics and syntatic sugars.
-Implmented SQL++ core group-by semantics;
-Implemented SQL++ group-by syntatic sugars for standard SQL;
-Added test cases;
-Fixed column alias rewriter;
-Fixed the variable scoping for joins.
Change-Id: I6e5477d5bf80114cfff49c8ecb163849ee55eba6
Reviewed-on: https://asterix-gerrit.ics.uci.edu/752
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Till Westmann <tillw@apache.org>
diff --git a/asterix-lang-sqlpp/src/main/javacc/SQLPP.html b/asterix-lang-sqlpp/src/main/javacc/SQLPP.html
index ebe7926..bbecc21 100644
--- a/asterix-lang-sqlpp/src/main/javacc/SQLPP.html
+++ b/asterix-lang-sqlpp/src/main/javacc/SQLPP.html
@@ -863,7 +863,7 @@
<TR>
<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod93">GroupbyClause</A></TD>
<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
-<TD ALIGN=LEFT VALIGN=BASELINE><GROUP> <BY> ( <A HREF="#prod43">Expression</A> ( ( <AS> )? <A HREF="#prod49">Variable</A> )? ( <COMMA> <A HREF="#prod43">Expression</A> ( ( <AS> )? <A HREF="#prod49">Variable</A> )? )* )</TD>
+<TD ALIGN=LEFT VALIGN=BASELINE><GROUP> <BY> ( <A HREF="#prod43">Expression</A> ( ( <AS> )? <A HREF="#prod49">Variable</A> )? ( <COMMA> <A HREF="#prod43">Expression</A> ( ( <AS> )? <A HREF="#prod49">Variable</A> )? )* ) ( <GROUP> <AS> <A HREF="#prod49">Variable</A> ( <LEFTPAREN> <A HREF="#prod75">VariableRef</A> <AS> <A HREF="#prod18">Identifier</A> ( <COMMA> <A HREF="#prod75">VariableRef</A> <AS> <A HREF="#prod18">Identifier</A> )* <RIGHTPAREN> )? )?</TD>
</TR>
<TR>
<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod94">HavingClause</A></TD>