asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From buyin...@apache.org
Subject [05/51] [partial] incubator-asterixdb git commit: ASTERIXDB-1226: implement SQL++ core group-by semantics and syntatic sugars.
Date Mon, 28 Mar 2016 20:18:32 GMT
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/acc12a9b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tinysocial/tinysocial-suite/tinysocial-suite.25.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tinysocial/tinysocial-suite/tinysocial-suite.25.ast b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tinysocial/tinysocial-suite/tinysocial-suite.25.ast
index cf21764..05a04de 100644
--- a/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tinysocial/tinysocial-suite/tinysocial-suite.25.ast
+++ b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tinysocial/tinysocial-suite/tinysocial-suite.25.ast
@@ -6,7 +6,7 @@ FunctionCall TinySocial.avg@1[
     SELECT ELEMENT [
     FunctionCall TinySocial.string-length@1[
       FieldAccessor [
-        Variable [ Name=message ]
+        Variable [ Name=$message ]
         Field=message
       ]
     ]
@@ -15,13 +15,13 @@ FunctionCall TinySocial.avg@1[
         LiteralExpr [STRING] [FacebookMessages]
       ]
       AS
-      Variable [ Name=message ]
+      Variable [ Name=$message ]
     ]
     Where
       OperatorExpr [
         OperatorExpr [
           FieldAccessor [
-            Variable [ Name=message ]
+            Variable [ Name=$message ]
             Field=in-response-to
           ]
           >=
@@ -30,7 +30,7 @@ FunctionCall TinySocial.avg@1[
         and
         OperatorExpr [
           FieldAccessor [
-            Variable [ Name=message ]
+            Variable [ Name=$message ]
             Field=in-response-to
           ]
           <

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/acc12a9b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tinysocial/tinysocial-suite/tinysocial-suite.4.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tinysocial/tinysocial-suite/tinysocial-suite.4.ast b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tinysocial/tinysocial-suite/tinysocial-suite.4.ast
index 760a841..d198d59 100644
--- a/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tinysocial/tinysocial-suite/tinysocial-suite.4.ast
+++ b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tinysocial/tinysocial-suite/tinysocial-suite.4.ast
@@ -1,18 +1,18 @@
 DataverseUse TinySocial
 Query:
 SELECT ELEMENT [
-Variable [ Name=user ]
+Variable [ Name=$user ]
 ]
 FROM [  FunctionCall Metadata.dataset@1[
     LiteralExpr [STRING] [FacebookUsers]
   ]
   AS
-  Variable [ Name=user ]
+  Variable [ Name=$user ]
 ]
 Where
   OperatorExpr [
     FieldAccessor [
-      Variable [ Name=user ]
+      Variable [ Name=$user ]
       Field=id
     ]
     =

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/acc12a9b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tinysocial/tinysocial-suite/tinysocial-suite.5.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tinysocial/tinysocial-suite/tinysocial-suite.5.ast b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tinysocial/tinysocial-suite/tinysocial-suite.5.ast
index 2aa7368..1b17ecc 100644
--- a/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tinysocial/tinysocial-suite/tinysocial-suite.5.ast
+++ b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tinysocial/tinysocial-suite/tinysocial-suite.5.ast
@@ -1,19 +1,19 @@
 DataverseUse TinySocial
 Query:
 SELECT ELEMENT [
-Variable [ Name=user ]
+Variable [ Name=$user ]
 ]
 FROM [  FunctionCall Metadata.dataset@1[
     LiteralExpr [STRING] [FacebookUsers]
   ]
   AS
-  Variable [ Name=user ]
+  Variable [ Name=$user ]
 ]
 Where
   OperatorExpr [
     OperatorExpr [
       FieldAccessor [
-        Variable [ Name=user ]
+        Variable [ Name=$user ]
         Field=id
       ]
       >=
@@ -22,7 +22,7 @@ Where
     and
     OperatorExpr [
       FieldAccessor [
-        Variable [ Name=user ]
+        Variable [ Name=$user ]
         Field=id
       ]
       <=
@@ -31,7 +31,7 @@ Where
   ]
 Orderby
   FieldAccessor [
-    Variable [ Name=user ]
+    Variable [ Name=$user ]
     Field=id
   ]
   ASC

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/acc12a9b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tinysocial/tinysocial-suite/tinysocial-suite.6.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tinysocial/tinysocial-suite/tinysocial-suite.6.ast b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tinysocial/tinysocial-suite/tinysocial-suite.6.ast
index ebb834b..61b959b 100644
--- a/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tinysocial/tinysocial-suite/tinysocial-suite.6.ast
+++ b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tinysocial/tinysocial-suite/tinysocial-suite.6.ast
@@ -1,19 +1,19 @@
 DataverseUse TinySocial
 Query:
 SELECT ELEMENT [
-Variable [ Name=user ]
+Variable [ Name=$user ]
 ]
 FROM [  FunctionCall Metadata.dataset@1[
     LiteralExpr [STRING] [FacebookUsers]
   ]
   AS
-  Variable [ Name=user ]
+  Variable [ Name=$user ]
 ]
 Where
   OperatorExpr [
     OperatorExpr [
       FieldAccessor [
-        Variable [ Name=user ]
+        Variable [ Name=$user ]
         Field=user-since
       ]
       >=
@@ -24,7 +24,7 @@ Where
     and
     OperatorExpr [
       FieldAccessor [
-        Variable [ Name=user ]
+        Variable [ Name=$user ]
         Field=user-since
       ]
       <=
@@ -35,7 +35,7 @@ Where
   ]
 Orderby
   FieldAccessor [
-    Variable [ Name=user ]
+    Variable [ Name=$user ]
     Field=id
   ]
   ASC

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/acc12a9b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tinysocial/tinysocial-suite/tinysocial-suite.7.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tinysocial/tinysocial-suite/tinysocial-suite.7.ast b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tinysocial/tinysocial-suite/tinysocial-suite.7.ast
index fc54b9d..40c8c3d 100644
--- a/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tinysocial/tinysocial-suite/tinysocial-suite.7.ast
+++ b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tinysocial/tinysocial-suite/tinysocial-suite.7.ast
@@ -6,7 +6,7 @@ RecordConstructor [
     LiteralExpr [STRING] [uname]
     :
     FieldAccessor [
-      Variable [ Name=user ]
+      Variable [ Name=$user ]
       Field=name
     ]
   )
@@ -14,7 +14,7 @@ RecordConstructor [
     LiteralExpr [STRING] [message]
     :
     FieldAccessor [
-      Variable [ Name=message ]
+      Variable [ Name=$message ]
       Field=message
     ]
   )
@@ -24,34 +24,34 @@ FROM [  FunctionCall Metadata.dataset@1[
     LiteralExpr [STRING] [FacebookUsers]
   ]
   AS
-  Variable [ Name=user ]
+  Variable [ Name=$user ]
 ,
   FunctionCall Metadata.dataset@1[
     LiteralExpr [STRING] [FacebookMessages]
   ]
   AS
-  Variable [ Name=message ]
+  Variable [ Name=$message ]
 ]
 Where
   OperatorExpr [
     FieldAccessor [
-      Variable [ Name=message ]
+      Variable [ Name=$message ]
       Field=author-id
     ]
     =
     FieldAccessor [
-      Variable [ Name=user ]
+      Variable [ Name=$user ]
       Field=id
     ]
   ]
 Orderby
   FieldAccessor [
-    Variable [ Name=user ]
+    Variable [ Name=$user ]
     Field=name
   ]
   ASC
   FieldAccessor [
-    Variable [ Name=message ]
+    Variable [ Name=$message ]
     Field=message-id
   ]
   ASC

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/acc12a9b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tinysocial/tinysocial-suite/tinysocial-suite.8.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tinysocial/tinysocial-suite/tinysocial-suite.8.ast b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tinysocial/tinysocial-suite/tinysocial-suite.8.ast
index fc54b9d..40c8c3d 100644
--- a/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tinysocial/tinysocial-suite/tinysocial-suite.8.ast
+++ b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tinysocial/tinysocial-suite/tinysocial-suite.8.ast
@@ -6,7 +6,7 @@ RecordConstructor [
     LiteralExpr [STRING] [uname]
     :
     FieldAccessor [
-      Variable [ Name=user ]
+      Variable [ Name=$user ]
       Field=name
     ]
   )
@@ -14,7 +14,7 @@ RecordConstructor [
     LiteralExpr [STRING] [message]
     :
     FieldAccessor [
-      Variable [ Name=message ]
+      Variable [ Name=$message ]
       Field=message
     ]
   )
@@ -24,34 +24,34 @@ FROM [  FunctionCall Metadata.dataset@1[
     LiteralExpr [STRING] [FacebookUsers]
   ]
   AS
-  Variable [ Name=user ]
+  Variable [ Name=$user ]
 ,
   FunctionCall Metadata.dataset@1[
     LiteralExpr [STRING] [FacebookMessages]
   ]
   AS
-  Variable [ Name=message ]
+  Variable [ Name=$message ]
 ]
 Where
   OperatorExpr [
     FieldAccessor [
-      Variable [ Name=message ]
+      Variable [ Name=$message ]
       Field=author-id
     ]
     =
     FieldAccessor [
-      Variable [ Name=user ]
+      Variable [ Name=$user ]
       Field=id
     ]
   ]
 Orderby
   FieldAccessor [
-    Variable [ Name=user ]
+    Variable [ Name=$user ]
     Field=name
   ]
   ASC
   FieldAccessor [
-    Variable [ Name=message ]
+    Variable [ Name=$message ]
     Field=message-id
   ]
   ASC

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/acc12a9b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tinysocial/tinysocial-suite/tinysocial-suite.9.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tinysocial/tinysocial-suite/tinysocial-suite.9.ast b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tinysocial/tinysocial-suite/tinysocial-suite.9.ast
index 4f5ba43..d592be5 100644
--- a/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tinysocial/tinysocial-suite/tinysocial-suite.9.ast
+++ b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tinysocial/tinysocial-suite/tinysocial-suite.9.ast
@@ -6,7 +6,7 @@ RecordConstructor [
     LiteralExpr [STRING] [uname]
     :
     FieldAccessor [
-      Variable [ Name=user ]
+      Variable [ Name=$user ]
       Field=name
     ]
   )
@@ -16,7 +16,7 @@ RecordConstructor [
     (
       SELECT ELEMENT [
       FieldAccessor [
-        Variable [ Name=message ]
+        Variable [ Name=$message ]
         Field=message
       ]
       ]
@@ -24,23 +24,23 @@ RecordConstructor [
           LiteralExpr [STRING] [FacebookMessages]
         ]
         AS
-        Variable [ Name=message ]
+        Variable [ Name=$message ]
       ]
       Where
         OperatorExpr [
           FieldAccessor [
-            Variable [ Name=message ]
+            Variable [ Name=$message ]
             Field=author-id
           ]
           =
           FieldAccessor [
-            Variable [ Name=user ]
+            Variable [ Name=$user ]
             Field=id
           ]
         ]
       Orderby
         FieldAccessor [
-          Variable [ Name=message ]
+          Variable [ Name=$message ]
           Field=message-id
         ]
         ASC
@@ -53,11 +53,11 @@ FROM [  FunctionCall Metadata.dataset@1[
     LiteralExpr [STRING] [FacebookUsers]
   ]
   AS
-  Variable [ Name=user ]
+  Variable [ Name=$user ]
 ]
 Orderby
   FieldAccessor [
-    Variable [ Name=user ]
+    Variable [ Name=$user ]
     Field=name
   ]
   ASC

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/acc12a9b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tokenizers/counthashed-gram-tokens_01/counthashed-gram-tokens_01.3.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tokenizers/counthashed-gram-tokens_01/counthashed-gram-tokens_01.3.ast b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tokenizers/counthashed-gram-tokens_01/counthashed-gram-tokens_01.3.ast
index f3bb967..e8e98ba 100644
--- a/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tokenizers/counthashed-gram-tokens_01/counthashed-gram-tokens_01.3.ast
+++ b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tokenizers/counthashed-gram-tokens_01/counthashed-gram-tokens_01.3.ast
@@ -1,20 +1,20 @@
 DataverseUse test
 Set import-private-functions=true
 Query:
-LetVariable [ Name=txt ]
+Let Variable [ Name=$txt ]
   :=
   LiteralExpr [STRING] [Jürgen S. Generic's Car]
-LetVariable [ Name=tokens ]
+Let Variable [ Name=$tokens ]
   :=
   FunctionCall test.counthashed-gram-tokens@3[
-    Variable [ Name=txt ]
+    Variable [ Name=$txt ]
     LiteralExpr [LONG] [3]
     LiteralExpr [FALSE]
   ]
 SELECT ELEMENT [
-Variable [ Name=token ]
+Variable [ Name=$token ]
 ]
-FROM [  Variable [ Name=tokens ]
+FROM [  Variable [ Name=$tokens ]
   AS
-  Variable [ Name=token ]
+  Variable [ Name=$token ]
 ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/acc12a9b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tokenizers/counthashed-gram-tokens_02/counthashed-gram-tokens_02.3.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tokenizers/counthashed-gram-tokens_02/counthashed-gram-tokens_02.3.ast b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tokenizers/counthashed-gram-tokens_02/counthashed-gram-tokens_02.3.ast
index 069f959..3ea7057 100644
--- a/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tokenizers/counthashed-gram-tokens_02/counthashed-gram-tokens_02.3.ast
+++ b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tokenizers/counthashed-gram-tokens_02/counthashed-gram-tokens_02.3.ast
@@ -1,20 +1,20 @@
 DataverseUse test
 Set import-private-functions=true
 Query:
-LetVariable [ Name=txt ]
+Let Variable [ Name=$txt ]
   :=
   LiteralExpr [STRING] [Jürgen S. Generic's Car]
-LetVariable [ Name=tokens ]
+Let Variable [ Name=$tokens ]
   :=
   FunctionCall test.counthashed-gram-tokens@3[
-    Variable [ Name=txt ]
+    Variable [ Name=$txt ]
     LiteralExpr [LONG] [3]
     LiteralExpr [TRUE]
   ]
 SELECT ELEMENT [
-Variable [ Name=token ]
+Variable [ Name=$token ]
 ]
-FROM [  Variable [ Name=tokens ]
+FROM [  Variable [ Name=$tokens ]
   AS
-  Variable [ Name=token ]
+  Variable [ Name=$token ]
 ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/acc12a9b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tokenizers/counthashed-word-tokens_01/counthashed-word-tokens_01.3.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tokenizers/counthashed-word-tokens_01/counthashed-word-tokens_01.3.ast b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tokenizers/counthashed-word-tokens_01/counthashed-word-tokens_01.3.ast
index bca36f6..38c2cb2 100644
--- a/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tokenizers/counthashed-word-tokens_01/counthashed-word-tokens_01.3.ast
+++ b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tokenizers/counthashed-word-tokens_01/counthashed-word-tokens_01.3.ast
@@ -1,18 +1,18 @@
 DataverseUse test
 Set import-private-functions=true
 Query:
-LetVariable [ Name=txt ]
+Let Variable [ Name=$txt ]
   :=
   LiteralExpr [STRING] [Hello World, I would like to inform you of the importance of Foo Bar. Yes, Foo Bar. Jürgen.]
-LetVariable [ Name=tokens ]
+Let Variable [ Name=$tokens ]
   :=
   FunctionCall test.counthashed-word-tokens@1[
-    Variable [ Name=txt ]
+    Variable [ Name=$txt ]
   ]
 SELECT ELEMENT [
-Variable [ Name=token ]
+Variable [ Name=$token ]
 ]
-FROM [  Variable [ Name=tokens ]
+FROM [  Variable [ Name=$tokens ]
   AS
-  Variable [ Name=token ]
+  Variable [ Name=$token ]
 ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/acc12a9b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tokenizers/gram-tokens_01/gram-tokens_01.3.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tokenizers/gram-tokens_01/gram-tokens_01.3.ast b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tokenizers/gram-tokens_01/gram-tokens_01.3.ast
index 28db2a4..1f6fff0 100644
--- a/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tokenizers/gram-tokens_01/gram-tokens_01.3.ast
+++ b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tokenizers/gram-tokens_01/gram-tokens_01.3.ast
@@ -1,20 +1,20 @@
 DataverseUse test
 Set import-private-functions=true
 Query:
-LetVariable [ Name=txt ]
+Let Variable [ Name=$txt ]
   :=
   LiteralExpr [STRING] [Jürgen S. Generic's Car]
-LetVariable [ Name=tokens ]
+Let Variable [ Name=$tokens ]
   :=
   FunctionCall test.gram-tokens@3[
-    Variable [ Name=txt ]
+    Variable [ Name=$txt ]
     LiteralExpr [LONG] [3]
     LiteralExpr [FALSE]
   ]
 SELECT ELEMENT [
-Variable [ Name=token ]
+Variable [ Name=$token ]
 ]
-FROM [  Variable [ Name=tokens ]
+FROM [  Variable [ Name=$tokens ]
   AS
-  Variable [ Name=token ]
+  Variable [ Name=$token ]
 ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/acc12a9b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tokenizers/gram-tokens_02/gram-tokens_02.3.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tokenizers/gram-tokens_02/gram-tokens_02.3.ast b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tokenizers/gram-tokens_02/gram-tokens_02.3.ast
index 09febc7..3e3cf03 100644
--- a/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tokenizers/gram-tokens_02/gram-tokens_02.3.ast
+++ b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tokenizers/gram-tokens_02/gram-tokens_02.3.ast
@@ -1,20 +1,20 @@
 DataverseUse test
 Set import-private-functions=true
 Query:
-LetVariable [ Name=txt ]
+Let Variable [ Name=$txt ]
   :=
   LiteralExpr [STRING] [Jürgen S. Generic's Car]
-LetVariable [ Name=tokens ]
+Let Variable [ Name=$tokens ]
   :=
   FunctionCall test.gram-tokens@3[
-    Variable [ Name=txt ]
+    Variable [ Name=$txt ]
     LiteralExpr [LONG] [3]
     LiteralExpr [TRUE]
   ]
 SELECT ELEMENT [
-Variable [ Name=token ]
+Variable [ Name=$token ]
 ]
-FROM [  Variable [ Name=tokens ]
+FROM [  Variable [ Name=$tokens ]
   AS
-  Variable [ Name=token ]
+  Variable [ Name=$token ]
 ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/acc12a9b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tokenizers/hashed-gram-tokens_01/hashed-gram-tokens_01.3.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tokenizers/hashed-gram-tokens_01/hashed-gram-tokens_01.3.ast b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tokenizers/hashed-gram-tokens_01/hashed-gram-tokens_01.3.ast
index ff45c5b..adf1b62 100644
--- a/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tokenizers/hashed-gram-tokens_01/hashed-gram-tokens_01.3.ast
+++ b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tokenizers/hashed-gram-tokens_01/hashed-gram-tokens_01.3.ast
@@ -1,20 +1,20 @@
 DataverseUse test
 Set import-private-functions=true
 Query:
-LetVariable [ Name=txt ]
+Let Variable [ Name=$txt ]
   :=
   LiteralExpr [STRING] [Jürgen S. Generic's Car]
-LetVariable [ Name=tokens ]
+Let Variable [ Name=$tokens ]
   :=
   FunctionCall test.hashed-gram-tokens@3[
-    Variable [ Name=txt ]
+    Variable [ Name=$txt ]
     LiteralExpr [LONG] [3]
     LiteralExpr [FALSE]
   ]
 SELECT ELEMENT [
-Variable [ Name=token ]
+Variable [ Name=$token ]
 ]
-FROM [  Variable [ Name=tokens ]
+FROM [  Variable [ Name=$tokens ]
   AS
-  Variable [ Name=token ]
+  Variable [ Name=$token ]
 ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/acc12a9b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tokenizers/hashed-gram-tokens_02/hashed-gram-tokens_02.3.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tokenizers/hashed-gram-tokens_02/hashed-gram-tokens_02.3.ast b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tokenizers/hashed-gram-tokens_02/hashed-gram-tokens_02.3.ast
index 89a551b..f31621f 100644
--- a/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tokenizers/hashed-gram-tokens_02/hashed-gram-tokens_02.3.ast
+++ b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tokenizers/hashed-gram-tokens_02/hashed-gram-tokens_02.3.ast
@@ -1,20 +1,20 @@
 DataverseUse test
 Set import-private-functions=true
 Query:
-LetVariable [ Name=txt ]
+Let Variable [ Name=$txt ]
   :=
   LiteralExpr [STRING] [Jürgen S. Generic's Car]
-LetVariable [ Name=tokens ]
+Let Variable [ Name=$tokens ]
   :=
   FunctionCall test.hashed-gram-tokens@3[
-    Variable [ Name=txt ]
+    Variable [ Name=$txt ]
     LiteralExpr [LONG] [3]
     LiteralExpr [TRUE]
   ]
 SELECT ELEMENT [
-Variable [ Name=token ]
+Variable [ Name=$token ]
 ]
-FROM [  Variable [ Name=tokens ]
+FROM [  Variable [ Name=$tokens ]
   AS
-  Variable [ Name=token ]
+  Variable [ Name=$token ]
 ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/acc12a9b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tokenizers/hashed-word-tokens_01/hashed-word-tokens_01.3.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tokenizers/hashed-word-tokens_01/hashed-word-tokens_01.3.ast b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tokenizers/hashed-word-tokens_01/hashed-word-tokens_01.3.ast
index d304f15..0308da3 100644
--- a/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tokenizers/hashed-word-tokens_01/hashed-word-tokens_01.3.ast
+++ b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tokenizers/hashed-word-tokens_01/hashed-word-tokens_01.3.ast
@@ -1,18 +1,18 @@
 DataverseUse test
 Set import-private-functions=true
 Query:
-LetVariable [ Name=txt ]
+Let Variable [ Name=$txt ]
   :=
   LiteralExpr [STRING] [Hello World, I would like to inform you of the importance of Foo Bar. Yes, Foo Bar. Jürgen.]
-LetVariable [ Name=tokens ]
+Let Variable [ Name=$tokens ]
   :=
   FunctionCall test.hashed-word-tokens@1[
-    Variable [ Name=txt ]
+    Variable [ Name=$txt ]
   ]
 SELECT ELEMENT [
-Variable [ Name=token ]
+Variable [ Name=$token ]
 ]
-FROM [  Variable [ Name=tokens ]
+FROM [  Variable [ Name=$tokens ]
   AS
-  Variable [ Name=token ]
+  Variable [ Name=$token ]
 ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/acc12a9b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tokenizers/word-tokens_01/word-tokens_01.3.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tokenizers/word-tokens_01/word-tokens_01.3.ast b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tokenizers/word-tokens_01/word-tokens_01.3.ast
index 778567b..98d2f14 100644
--- a/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tokenizers/word-tokens_01/word-tokens_01.3.ast
+++ b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tokenizers/word-tokens_01/word-tokens_01.3.ast
@@ -1,17 +1,17 @@
 DataverseUse test
 Query:
-LetVariable [ Name=txt ]
+Let Variable [ Name=$txt ]
   :=
   LiteralExpr [STRING] [Hello World, I would like to inform you of the importance of Foo Bar. Yes, Foo Bar. Jürgen.]
-LetVariable [ Name=tokens ]
+Let Variable [ Name=$tokens ]
   :=
   FunctionCall test.word-tokens@1[
-    Variable [ Name=txt ]
+    Variable [ Name=$txt ]
   ]
 SELECT ELEMENT [
-Variable [ Name=token ]
+Variable [ Name=$token ]
 ]
-FROM [  Variable [ Name=tokens ]
+FROM [  Variable [ Name=$tokens ]
   AS
-  Variable [ Name=token ]
+  Variable [ Name=$token ]
 ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/acc12a9b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tokenizers/word-tokens_02/word-tokens_02.3.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tokenizers/word-tokens_02/word-tokens_02.3.ast b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tokenizers/word-tokens_02/word-tokens_02.3.ast
index f9ee71a..a81280f 100644
--- a/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tokenizers/word-tokens_02/word-tokens_02.3.ast
+++ b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tokenizers/word-tokens_02/word-tokens_02.3.ast
@@ -1,17 +1,17 @@
 DataverseUse test
 Query:
-LetVariable [ Name=txt ]
+Let Variable [ Name=$txt ]
   :=
   LiteralExpr [STRING] [ΩΣ]
-LetVariable [ Name=tokens ]
+Let Variable [ Name=$tokens ]
   :=
   FunctionCall test.word-tokens@1[
-    Variable [ Name=txt ]
+    Variable [ Name=$txt ]
   ]
 SELECT ELEMENT [
-Variable [ Name=token ]
+Variable [ Name=$token ]
 ]
-FROM [  Variable [ Name=tokens ]
+FROM [  Variable [ Name=$tokens ]
   AS
-  Variable [ Name=token ]
+  Variable [ Name=$token ]
 ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/acc12a9b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q01_pricing_summary_report_nt/q01_pricing_summary_report_nt.3.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q01_pricing_summary_report_nt/q01_pricing_summary_report_nt.3.ast b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q01_pricing_summary_report_nt/q01_pricing_summary_report_nt.3.ast
index 40474c7..cafd221 100644
--- a/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q01_pricing_summary_report_nt/q01_pricing_summary_report_nt.3.ast
+++ b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q01_pricing_summary_report_nt/q01_pricing_summary_report_nt.3.ast
@@ -6,12 +6,12 @@ RecordConstructor [
   (
     LiteralExpr [STRING] [l_returnflag]
     :
-    Variable [ Name=l_returnflag ]
+    Variable [ Name=$l_returnflag ]
   )
   (
     LiteralExpr [STRING] [l_linestatus]
     :
-    Variable [ Name=l_linestatus ]
+    Variable [ Name=$l_linestatus ]
   )
   (
     LiteralExpr [STRING] [sum_qty]
@@ -20,13 +20,13 @@ RecordConstructor [
       (
         SELECT ELEMENT [
         FieldAccessor [
-          Variable [ Name=i ]
+          Variable [ Name=$i ]
           Field=l_quantity
         ]
         ]
-        FROM [          Variable [ Name=l ]
+        FROM [          Variable [ Name=$l ]
           AS
-          Variable [ Name=i ]
+          Variable [ Name=$i ]
         ]
       )
     ]
@@ -38,13 +38,13 @@ RecordConstructor [
       (
         SELECT ELEMENT [
         FieldAccessor [
-          Variable [ Name=i ]
+          Variable [ Name=$i ]
           Field=l_extendedprice
         ]
         ]
-        FROM [          Variable [ Name=l ]
+        FROM [          Variable [ Name=$l ]
           AS
-          Variable [ Name=i ]
+          Variable [ Name=$i ]
         ]
       )
     ]
@@ -57,7 +57,7 @@ RecordConstructor [
         SELECT ELEMENT [
         OperatorExpr [
           FieldAccessor [
-            Variable [ Name=i ]
+            Variable [ Name=$i ]
             Field=l_extendedprice
           ]
           *
@@ -65,15 +65,15 @@ RecordConstructor [
             LiteralExpr [LONG] [1]
             -
             FieldAccessor [
-              Variable [ Name=i ]
+              Variable [ Name=$i ]
               Field=l_discount
             ]
           ]
         ]
         ]
-        FROM [          Variable [ Name=l ]
+        FROM [          Variable [ Name=$l ]
           AS
-          Variable [ Name=i ]
+          Variable [ Name=$i ]
         ]
       )
     ]
@@ -86,7 +86,7 @@ RecordConstructor [
         SELECT ELEMENT [
         OperatorExpr [
           FieldAccessor [
-            Variable [ Name=i ]
+            Variable [ Name=$i ]
             Field=l_extendedprice
           ]
           *
@@ -94,7 +94,7 @@ RecordConstructor [
             LiteralExpr [LONG] [1]
             -
             FieldAccessor [
-              Variable [ Name=i ]
+              Variable [ Name=$i ]
               Field=l_discount
             ]
           ]
@@ -103,15 +103,15 @@ RecordConstructor [
             LiteralExpr [LONG] [1]
             +
             FieldAccessor [
-              Variable [ Name=i ]
+              Variable [ Name=$i ]
               Field=l_tax
             ]
           ]
         ]
         ]
-        FROM [          Variable [ Name=l ]
+        FROM [          Variable [ Name=$l ]
           AS
-          Variable [ Name=i ]
+          Variable [ Name=$i ]
         ]
       )
     ]
@@ -123,13 +123,13 @@ RecordConstructor [
       (
         SELECT ELEMENT [
         FieldAccessor [
-          Variable [ Name=i ]
+          Variable [ Name=$i ]
           Field=l_quantity
         ]
         ]
-        FROM [          Variable [ Name=l ]
+        FROM [          Variable [ Name=$l ]
           AS
-          Variable [ Name=i ]
+          Variable [ Name=$i ]
         ]
       )
     ]
@@ -141,13 +141,13 @@ RecordConstructor [
       (
         SELECT ELEMENT [
         FieldAccessor [
-          Variable [ Name=i ]
+          Variable [ Name=$i ]
           Field=l_extendedprice
         ]
         ]
-        FROM [          Variable [ Name=l ]
+        FROM [          Variable [ Name=$l ]
           AS
-          Variable [ Name=i ]
+          Variable [ Name=$i ]
         ]
       )
     ]
@@ -159,13 +159,13 @@ RecordConstructor [
       (
         SELECT ELEMENT [
         FieldAccessor [
-          Variable [ Name=i ]
+          Variable [ Name=$i ]
           Field=l_discount
         ]
         ]
-        FROM [          Variable [ Name=l ]
+        FROM [          Variable [ Name=$l ]
           AS
-          Variable [ Name=i ]
+          Variable [ Name=$i ]
         ]
       )
     ]
@@ -174,7 +174,18 @@ RecordConstructor [
     LiteralExpr [STRING] [count_order]
     :
     FunctionCall tpch.count@1[
-      Variable [ Name=l ]
+      (
+        SELECT ELEMENT [
+        FieldAccessor [
+          Variable [ Name=#2 ]
+          Field=l
+        ]
+        ]
+        FROM [          Variable [ Name=#1 ]
+          AS
+          Variable [ Name=#2 ]
+        ]
+      )
     ]
   )
 ]
@@ -183,36 +194,40 @@ FROM [  FunctionCall Metadata.dataset@1[
     LiteralExpr [STRING] [LineItem]
   ]
   AS
-  Variable [ Name=l ]
+  Variable [ Name=$l ]
 ]
 Where
   OperatorExpr [
     FieldAccessor [
-      Variable [ Name=l ]
+      Variable [ Name=$l ]
       Field=l_shipdate
     ]
     <=
     LiteralExpr [STRING] [1998-09-02]
   ]
 Groupby
-  Variable [ Name=l_returnflag ]
+  Variable [ Name=$l_returnflag ]
   :=
   FieldAccessor [
-    Variable [ Name=l ]
+    Variable [ Name=$l ]
     Field=l_returnflag
   ]
-  Variable [ Name=l_linestatus ]
+  Variable [ Name=$l_linestatus ]
   :=
   FieldAccessor [
-    Variable [ Name=l ]
+    Variable [ Name=$l ]
     Field=l_linestatus
   ]
-  With
-  Variable [ Name=l ]
+  GROUP AS
+  Variable [ Name=#1 ]
+  (
+  Variable [ Name=$l ]
+   AS l
+  )
 
 Orderby
-  Variable [ Name=l_returnflag ]
+  Variable [ Name=$l_returnflag ]
   ASC
-  Variable [ Name=l_linestatus ]
+  Variable [ Name=$l_linestatus ]
   ASC
 

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/acc12a9b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q02_minimum_cost_supplier/q02_minimum_cost_supplier.3.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q02_minimum_cost_supplier/q02_minimum_cost_supplier.3.ast b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q02_minimum_cost_supplier/q02_minimum_cost_supplier.3.ast
index 52df01f..bcdbaa0 100644
--- a/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q02_minimum_cost_supplier/q02_minimum_cost_supplier.3.ast
+++ b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q02_minimum_cost_supplier/q02_minimum_cost_supplier.3.ast
@@ -7,7 +7,7 @@ FunctionDecl tmp1([]) {
         LiteralExpr [STRING] [s_acctbal]
         :
         FieldAccessor [
-          Variable [ Name=pssrn ]
+          Variable [ Name=$pssrn ]
           Field=s_acctbal
         ]
       )
@@ -15,7 +15,7 @@ FunctionDecl tmp1([]) {
         LiteralExpr [STRING] [s_name]
         :
         FieldAccessor [
-          Variable [ Name=pssrn ]
+          Variable [ Name=$pssrn ]
           Field=s_name
         ]
       )
@@ -23,7 +23,7 @@ FunctionDecl tmp1([]) {
         LiteralExpr [STRING] [n_name]
         :
         FieldAccessor [
-          Variable [ Name=pssrn ]
+          Variable [ Name=$pssrn ]
           Field=n_name
         ]
       )
@@ -31,7 +31,7 @@ FunctionDecl tmp1([]) {
         LiteralExpr [STRING] [p_partkey]
         :
         FieldAccessor [
-          Variable [ Name=p ]
+          Variable [ Name=$p ]
           Field=p_partkey
         ]
       )
@@ -39,7 +39,7 @@ FunctionDecl tmp1([]) {
         LiteralExpr [STRING] [ps_supplycost]
         :
         FieldAccessor [
-          Variable [ Name=pssrn ]
+          Variable [ Name=$pssrn ]
           Field=ps_supplycost
         ]
       )
@@ -47,7 +47,7 @@ FunctionDecl tmp1([]) {
         LiteralExpr [STRING] [p_mfgr]
         :
         FieldAccessor [
-          Variable [ Name=p ]
+          Variable [ Name=$p ]
           Field=p_mfgr
         ]
       )
@@ -55,7 +55,7 @@ FunctionDecl tmp1([]) {
         LiteralExpr [STRING] [s_address]
         :
         FieldAccessor [
-          Variable [ Name=pssrn ]
+          Variable [ Name=$pssrn ]
           Field=s_address
         ]
       )
@@ -63,7 +63,7 @@ FunctionDecl tmp1([]) {
         LiteralExpr [STRING] [s_phone]
         :
         FieldAccessor [
-          Variable [ Name=pssrn ]
+          Variable [ Name=$pssrn ]
           Field=s_phone
         ]
       )
@@ -71,15 +71,15 @@ FunctionDecl tmp1([]) {
         LiteralExpr [STRING] [s_comment]
         :
         FieldAccessor [
-          Variable [ Name=pssrn ]
+          Variable [ Name=$pssrn ]
           Field=s_comment
         ]
       )
     ]
     ]
-    FROM [      Variable [ Name=Part ]
+    FROM [      Variable [ Name=$Part ]
       AS
-      Variable [ Name=p ]
+      Variable [ Name=$p ]
 ,
       (
         SELECT ELEMENT [
@@ -88,7 +88,7 @@ FunctionDecl tmp1([]) {
             LiteralExpr [STRING] [n_name]
             :
             FieldAccessor [
-              Variable [ Name=srn ]
+              Variable [ Name=$srn ]
               Field=n_name
             ]
           )
@@ -96,7 +96,7 @@ FunctionDecl tmp1([]) {
             LiteralExpr [STRING] [p_partkey]
             :
             FieldAccessor [
-              Variable [ Name=ps ]
+              Variable [ Name=$ps ]
               Field=ps_partkey
             ]
           )
@@ -104,7 +104,7 @@ FunctionDecl tmp1([]) {
             LiteralExpr [STRING] [ps_supplycost]
             :
             FieldAccessor [
-              Variable [ Name=ps ]
+              Variable [ Name=$ps ]
               Field=ps_supplycost
             ]
           )
@@ -112,7 +112,7 @@ FunctionDecl tmp1([]) {
             LiteralExpr [STRING] [s_name]
             :
             FieldAccessor [
-              Variable [ Name=srn ]
+              Variable [ Name=$srn ]
               Field=s_name
             ]
           )
@@ -120,7 +120,7 @@ FunctionDecl tmp1([]) {
             LiteralExpr [STRING] [s_acctbal]
             :
             FieldAccessor [
-              Variable [ Name=srn ]
+              Variable [ Name=$srn ]
               Field=s_acctbal
             ]
           )
@@ -128,7 +128,7 @@ FunctionDecl tmp1([]) {
             LiteralExpr [STRING] [s_address]
             :
             FieldAccessor [
-              Variable [ Name=srn ]
+              Variable [ Name=$srn ]
               Field=s_address
             ]
           )
@@ -136,7 +136,7 @@ FunctionDecl tmp1([]) {
             LiteralExpr [STRING] [s_phone]
             :
             FieldAccessor [
-              Variable [ Name=srn ]
+              Variable [ Name=$srn ]
               Field=s_phone
             ]
           )
@@ -144,15 +144,15 @@ FunctionDecl tmp1([]) {
             LiteralExpr [STRING] [s_comment]
             :
             FieldAccessor [
-              Variable [ Name=srn ]
+              Variable [ Name=$srn ]
               Field=s_comment
             ]
           )
         ]
         ]
-        FROM [          Variable [ Name=Partsupp ]
+        FROM [          Variable [ Name=$Partsupp ]
           AS
-          Variable [ Name=ps ]
+          Variable [ Name=$ps ]
 ,
           (
             SELECT ELEMENT [
@@ -161,7 +161,7 @@ FunctionDecl tmp1([]) {
                 LiteralExpr [STRING] [s_suppkey]
                 :
                 FieldAccessor [
-                  Variable [ Name=s ]
+                  Variable [ Name=$s ]
                   Field=s_suppkey
                 ]
               )
@@ -169,7 +169,7 @@ FunctionDecl tmp1([]) {
                 LiteralExpr [STRING] [n_name]
                 :
                 FieldAccessor [
-                  Variable [ Name=rn ]
+                  Variable [ Name=$rn ]
                   Field=n_name
                 ]
               )
@@ -177,7 +177,7 @@ FunctionDecl tmp1([]) {
                 LiteralExpr [STRING] [s_name]
                 :
                 FieldAccessor [
-                  Variable [ Name=s ]
+                  Variable [ Name=$s ]
                   Field=s_name
                 ]
               )
@@ -185,7 +185,7 @@ FunctionDecl tmp1([]) {
                 LiteralExpr [STRING] [s_acctbal]
                 :
                 FieldAccessor [
-                  Variable [ Name=s ]
+                  Variable [ Name=$s ]
                   Field=s_acctbal
                 ]
               )
@@ -193,7 +193,7 @@ FunctionDecl tmp1([]) {
                 LiteralExpr [STRING] [s_address]
                 :
                 FieldAccessor [
-                  Variable [ Name=s ]
+                  Variable [ Name=$s ]
                   Field=s_address
                 ]
               )
@@ -201,7 +201,7 @@ FunctionDecl tmp1([]) {
                 LiteralExpr [STRING] [s_phone]
                 :
                 FieldAccessor [
-                  Variable [ Name=s ]
+                  Variable [ Name=$s ]
                   Field=s_phone
                 ]
               )
@@ -209,15 +209,15 @@ FunctionDecl tmp1([]) {
                 LiteralExpr [STRING] [s_comment]
                 :
                 FieldAccessor [
-                  Variable [ Name=s ]
+                  Variable [ Name=$s ]
                   Field=s_comment
                 ]
               )
             ]
             ]
-            FROM [              Variable [ Name=Supplier ]
+            FROM [              Variable [ Name=$Supplier ]
               AS
-              Variable [ Name=s ]
+              Variable [ Name=$s ]
 ,
               (
                 SELECT ELEMENT [
@@ -226,7 +226,7 @@ FunctionDecl tmp1([]) {
                     LiteralExpr [STRING] [n_nationkey]
                     :
                     FieldAccessor [
-                      Variable [ Name=n ]
+                      Variable [ Name=$n ]
                       Field=n_nationkey
                     ]
                   )
@@ -234,37 +234,37 @@ FunctionDecl tmp1([]) {
                     LiteralExpr [STRING] [n_name]
                     :
                     FieldAccessor [
-                      Variable [ Name=n ]
+                      Variable [ Name=$n ]
                       Field=n_name
                     ]
                   )
                 ]
                 ]
-                FROM [                  Variable [ Name=Region ]
+                FROM [                  Variable [ Name=$Region ]
                   AS
-                  Variable [ Name=r ]
+                  Variable [ Name=$r ]
 ,
-                  Variable [ Name=Nation ]
+                  Variable [ Name=$Nation ]
                   AS
-                  Variable [ Name=n ]
+                  Variable [ Name=$n ]
                 ]
                 Where
                   OperatorExpr [
                     OperatorExpr [
                       FieldAccessor [
-                        Variable [ Name=n ]
+                        Variable [ Name=$n ]
                         Field=n_regionkey
                       ]
                       =
                       FieldAccessor [
-                        Variable [ Name=r ]
+                        Variable [ Name=$r ]
                         Field=r_regionkey
                       ]
                     ]
                     and
                     OperatorExpr [
                       FieldAccessor [
-                        Variable [ Name=r ]
+                        Variable [ Name=$r ]
                         Field=r_name
                       ]
                       =
@@ -273,57 +273,57 @@ FunctionDecl tmp1([]) {
                   ]
               )
               AS
-              Variable [ Name=rn ]
+              Variable [ Name=$rn ]
             ]
             Where
               OperatorExpr [
                 FieldAccessor [
-                  Variable [ Name=s ]
+                  Variable [ Name=$s ]
                   Field=s_nationkey
                 ]
                 =
                 FieldAccessor [
-                  Variable [ Name=rn ]
+                  Variable [ Name=$rn ]
                   Field=n_nationkey
                 ]
               ]
           )
           AS
-          Variable [ Name=srn ]
+          Variable [ Name=$srn ]
         ]
         Where
           OperatorExpr [
             FieldAccessor [
-              Variable [ Name=srn ]
+              Variable [ Name=$srn ]
               Field=s_suppkey
             ]
             =
             FieldAccessor [
-              Variable [ Name=ps ]
+              Variable [ Name=$ps ]
               Field=ps_suppkey
             ]
           ]
       )
       AS
-      Variable [ Name=pssrn ]
+      Variable [ Name=$pssrn ]
     ]
     Where
       OperatorExpr [
         OperatorExpr [
           FieldAccessor [
-            Variable [ Name=p ]
+            Variable [ Name=$p ]
             Field=p_partkey
           ]
           =
           FieldAccessor [
-            Variable [ Name=pssrn ]
+            Variable [ Name=$pssrn ]
             Field=p_partkey
           ]
         ]
         and
         FunctionCall tpch.like@2[
           FieldAccessor [
-            Variable [ Name=p ]
+            Variable [ Name=$p ]
             Field=p_type
           ]
           LiteralExpr [STRING] [%BRASS]
@@ -339,7 +339,7 @@ FunctionDecl tmp2([]) {
       (
         LiteralExpr [STRING] [p_partkey]
         :
-        Variable [ Name=p_partkey ]
+        Variable [ Name=$p_partkey ]
       )
       (
         LiteralExpr [STRING] [ps_min_supplycost]
@@ -348,22 +348,22 @@ FunctionDecl tmp2([]) {
           (
             SELECT ELEMENT [
             FieldAccessor [
-              Variable [ Name=i ]
+              Variable [ Name=$i ]
               Field=ps_supplycost
             ]
             ]
-            FROM [              Variable [ Name=pssrn ]
+            FROM [              Variable [ Name=$pssrn ]
               AS
-              Variable [ Name=i ]
+              Variable [ Name=$i ]
             ]
           )
         ]
       )
     ]
     ]
-    FROM [      Variable [ Name=Part ]
+    FROM [      Variable [ Name=$Part ]
       AS
-      Variable [ Name=p ]
+      Variable [ Name=$p ]
 ,
       (
         SELECT ELEMENT [
@@ -372,7 +372,7 @@ FunctionDecl tmp2([]) {
             LiteralExpr [STRING] [n_name]
             :
             FieldAccessor [
-              Variable [ Name=srn ]
+              Variable [ Name=$srn ]
               Field=n_name
             ]
           )
@@ -380,7 +380,7 @@ FunctionDecl tmp2([]) {
             LiteralExpr [STRING] [p_partkey]
             :
             FieldAccessor [
-              Variable [ Name=ps ]
+              Variable [ Name=$ps ]
               Field=ps_partkey
             ]
           )
@@ -388,7 +388,7 @@ FunctionDecl tmp2([]) {
             LiteralExpr [STRING] [ps_supplycost]
             :
             FieldAccessor [
-              Variable [ Name=ps ]
+              Variable [ Name=$ps ]
               Field=ps_supplycost
             ]
           )
@@ -396,7 +396,7 @@ FunctionDecl tmp2([]) {
             LiteralExpr [STRING] [s_name]
             :
             FieldAccessor [
-              Variable [ Name=srn ]
+              Variable [ Name=$srn ]
               Field=s_name
             ]
           )
@@ -404,7 +404,7 @@ FunctionDecl tmp2([]) {
             LiteralExpr [STRING] [s_acctbal]
             :
             FieldAccessor [
-              Variable [ Name=srn ]
+              Variable [ Name=$srn ]
               Field=s_acctbal
             ]
           )
@@ -412,7 +412,7 @@ FunctionDecl tmp2([]) {
             LiteralExpr [STRING] [s_address]
             :
             FieldAccessor [
-              Variable [ Name=srn ]
+              Variable [ Name=$srn ]
               Field=s_address
             ]
           )
@@ -420,7 +420,7 @@ FunctionDecl tmp2([]) {
             LiteralExpr [STRING] [s_phone]
             :
             FieldAccessor [
-              Variable [ Name=srn ]
+              Variable [ Name=$srn ]
               Field=s_phone
             ]
           )
@@ -428,15 +428,15 @@ FunctionDecl tmp2([]) {
             LiteralExpr [STRING] [s_comment]
             :
             FieldAccessor [
-              Variable [ Name=srn ]
+              Variable [ Name=$srn ]
               Field=s_comment
             ]
           )
         ]
         ]
-        FROM [          Variable [ Name=Partsupp ]
+        FROM [          Variable [ Name=$Partsupp ]
           AS
-          Variable [ Name=ps ]
+          Variable [ Name=$ps ]
 ,
           (
             SELECT ELEMENT [
@@ -445,7 +445,7 @@ FunctionDecl tmp2([]) {
                 LiteralExpr [STRING] [s_suppkey]
                 :
                 FieldAccessor [
-                  Variable [ Name=s ]
+                  Variable [ Name=$s ]
                   Field=s_suppkey
                 ]
               )
@@ -453,7 +453,7 @@ FunctionDecl tmp2([]) {
                 LiteralExpr [STRING] [n_name]
                 :
                 FieldAccessor [
-                  Variable [ Name=rn ]
+                  Variable [ Name=$rn ]
                   Field=n_name
                 ]
               )
@@ -461,7 +461,7 @@ FunctionDecl tmp2([]) {
                 LiteralExpr [STRING] [s_name]
                 :
                 FieldAccessor [
-                  Variable [ Name=s ]
+                  Variable [ Name=$s ]
                   Field=s_name
                 ]
               )
@@ -469,7 +469,7 @@ FunctionDecl tmp2([]) {
                 LiteralExpr [STRING] [s_acctbal]
                 :
                 FieldAccessor [
-                  Variable [ Name=s ]
+                  Variable [ Name=$s ]
                   Field=s_acctbal
                 ]
               )
@@ -477,7 +477,7 @@ FunctionDecl tmp2([]) {
                 LiteralExpr [STRING] [s_address]
                 :
                 FieldAccessor [
-                  Variable [ Name=s ]
+                  Variable [ Name=$s ]
                   Field=s_address
                 ]
               )
@@ -485,7 +485,7 @@ FunctionDecl tmp2([]) {
                 LiteralExpr [STRING] [s_phone]
                 :
                 FieldAccessor [
-                  Variable [ Name=s ]
+                  Variable [ Name=$s ]
                   Field=s_phone
                 ]
               )
@@ -493,15 +493,15 @@ FunctionDecl tmp2([]) {
                 LiteralExpr [STRING] [s_comment]
                 :
                 FieldAccessor [
-                  Variable [ Name=s ]
+                  Variable [ Name=$s ]
                   Field=s_comment
                 ]
               )
             ]
             ]
-            FROM [              Variable [ Name=Supplier ]
+            FROM [              Variable [ Name=$Supplier ]
               AS
-              Variable [ Name=s ]
+              Variable [ Name=$s ]
 ,
               (
                 SELECT ELEMENT [
@@ -510,7 +510,7 @@ FunctionDecl tmp2([]) {
                     LiteralExpr [STRING] [n_nationkey]
                     :
                     FieldAccessor [
-                      Variable [ Name=n ]
+                      Variable [ Name=$n ]
                       Field=n_nationkey
                     ]
                   )
@@ -518,37 +518,37 @@ FunctionDecl tmp2([]) {
                     LiteralExpr [STRING] [n_name]
                     :
                     FieldAccessor [
-                      Variable [ Name=n ]
+                      Variable [ Name=$n ]
                       Field=n_name
                     ]
                   )
                 ]
                 ]
-                FROM [                  Variable [ Name=Region ]
+                FROM [                  Variable [ Name=$Region ]
                   AS
-                  Variable [ Name=r ]
+                  Variable [ Name=$r ]
 ,
-                  Variable [ Name=Nation ]
+                  Variable [ Name=$Nation ]
                   AS
-                  Variable [ Name=n ]
+                  Variable [ Name=$n ]
                 ]
                 Where
                   OperatorExpr [
                     OperatorExpr [
                       FieldAccessor [
-                        Variable [ Name=n ]
+                        Variable [ Name=$n ]
                         Field=n_regionkey
                       ]
                       =
                       FieldAccessor [
-                        Variable [ Name=r ]
+                        Variable [ Name=$r ]
                         Field=r_regionkey
                       ]
                     ]
                     and
                     OperatorExpr [
                       FieldAccessor [
-                        Variable [ Name=r ]
+                        Variable [ Name=$r ]
                         Field=r_name
                       ]
                       =
@@ -557,67 +557,67 @@ FunctionDecl tmp2([]) {
                   ]
               )
               AS
-              Variable [ Name=rn ]
+              Variable [ Name=$rn ]
             ]
             Where
               OperatorExpr [
                 FieldAccessor [
-                  Variable [ Name=s ]
+                  Variable [ Name=$s ]
                   Field=s_nationkey
                 ]
                 =
                 FieldAccessor [
-                  Variable [ Name=rn ]
+                  Variable [ Name=$rn ]
                   Field=n_nationkey
                 ]
               ]
           )
           AS
-          Variable [ Name=srn ]
+          Variable [ Name=$srn ]
         ]
         Where
           OperatorExpr [
             FieldAccessor [
-              Variable [ Name=srn ]
+              Variable [ Name=$srn ]
               Field=s_suppkey
             ]
             =
             FieldAccessor [
-              Variable [ Name=ps ]
+              Variable [ Name=$ps ]
               Field=ps_suppkey
             ]
           ]
       )
       AS
-      Variable [ Name=pssrn ]
+      Variable [ Name=$pssrn ]
     ]
     Where
       OperatorExpr [
         OperatorExpr [
           FieldAccessor [
-            Variable [ Name=p ]
+            Variable [ Name=$p ]
             Field=p_partkey
           ]
           =
           FieldAccessor [
-            Variable [ Name=pssrn ]
+            Variable [ Name=$pssrn ]
             Field=p_partkey
           ]
         ]
         and
         FunctionCall tpch.like@2[
           FieldAccessor [
-            Variable [ Name=p ]
+            Variable [ Name=$p ]
             Field=p_type
           ]
           LiteralExpr [STRING] [%BRASS]
         ]
       ]
     Groupby
-      Variable [ Name=p_partkey ]
+      Variable [ Name=$p_partkey ]
       :=
       FieldAccessor [
-        Variable [ Name=pssrn ]
+        Variable [ Name=$pssrn ]
         Field=p_partkey
       ]
 
@@ -631,7 +631,7 @@ RecordConstructor [
     LiteralExpr [STRING] [s_acctbal]
     :
     FieldAccessor [
-      Variable [ Name=t1 ]
+      Variable [ Name=$t1 ]
       Field=s_acctbal
     ]
   )
@@ -639,7 +639,7 @@ RecordConstructor [
     LiteralExpr [STRING] [s_name]
     :
     FieldAccessor [
-      Variable [ Name=t1 ]
+      Variable [ Name=$t1 ]
       Field=s_name
     ]
   )
@@ -647,7 +647,7 @@ RecordConstructor [
     LiteralExpr [STRING] [n_name]
     :
     FieldAccessor [
-      Variable [ Name=t1 ]
+      Variable [ Name=$t1 ]
       Field=n_name
     ]
   )
@@ -655,7 +655,7 @@ RecordConstructor [
     LiteralExpr [STRING] [p_partkey]
     :
     FieldAccessor [
-      Variable [ Name=t1 ]
+      Variable [ Name=$t1 ]
       Field=p_partkey
     ]
   )
@@ -663,7 +663,7 @@ RecordConstructor [
     LiteralExpr [STRING] [p_mfgr]
     :
     FieldAccessor [
-      Variable [ Name=t1 ]
+      Variable [ Name=$t1 ]
       Field=p_mfgr
     ]
   )
@@ -671,7 +671,7 @@ RecordConstructor [
     LiteralExpr [STRING] [s_address]
     :
     FieldAccessor [
-      Variable [ Name=t1 ]
+      Variable [ Name=$t1 ]
       Field=s_address
     ]
   )
@@ -679,7 +679,7 @@ RecordConstructor [
     LiteralExpr [STRING] [s_phone]
     :
     FieldAccessor [
-      Variable [ Name=t1 ]
+      Variable [ Name=$t1 ]
       Field=s_phone
     ]
   )
@@ -687,7 +687,7 @@ RecordConstructor [
     LiteralExpr [STRING] [s_comment]
     :
     FieldAccessor [
-      Variable [ Name=t1 ]
+      Variable [ Name=$t1 ]
       Field=s_comment
     ]
   )
@@ -696,57 +696,57 @@ RecordConstructor [
 FROM [  FunctionCall tpch.tmp2@0[
   ]
   AS
-  Variable [ Name=t2 ]
+  Variable [ Name=$t2 ]
 ,
   FunctionCall tpch.tmp1@0[
   ]
   AS
-  Variable [ Name=t1 ]
+  Variable [ Name=$t1 ]
 ]
 Where
   OperatorExpr [
     OperatorExpr [
       FieldAccessor [
-        Variable [ Name=t1 ]
+        Variable [ Name=$t1 ]
         Field=p_partkey
       ]
       =
       FieldAccessor [
-        Variable [ Name=t2 ]
+        Variable [ Name=$t2 ]
         Field=p_partkey
       ]
     ]
     and
     OperatorExpr [
       FieldAccessor [
-        Variable [ Name=t1 ]
+        Variable [ Name=$t1 ]
         Field=ps_supplycost
       ]
       =
       FieldAccessor [
-        Variable [ Name=t2 ]
+        Variable [ Name=$t2 ]
         Field=ps_min_supplycost
       ]
     ]
   ]
 Orderby
   FieldAccessor [
-    Variable [ Name=t1 ]
+    Variable [ Name=$t1 ]
     Field=s_acctbal
   ]
   DESC
   FieldAccessor [
-    Variable [ Name=t1 ]
+    Variable [ Name=$t1 ]
     Field=n_name
   ]
   ASC
   FieldAccessor [
-    Variable [ Name=t1 ]
+    Variable [ Name=$t1 ]
     Field=s_name
   ]
   ASC
   FieldAccessor [
-    Variable [ Name=t1 ]
+    Variable [ Name=$t1 ]
     Field=p_partkey
   ]
   ASC

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/acc12a9b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q03_shipping_priority_nt/q03_shipping_priority_nt.3.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q03_shipping_priority_nt/q03_shipping_priority_nt.3.ast b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q03_shipping_priority_nt/q03_shipping_priority_nt.3.ast
index 8193892..5bb4ef8 100644
--- a/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q03_shipping_priority_nt/q03_shipping_priority_nt.3.ast
+++ b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q03_shipping_priority_nt/q03_shipping_priority_nt.3.ast
@@ -5,22 +5,22 @@ RecordConstructor [
   (
     LiteralExpr [STRING] [l_orderkey]
     :
-    Variable [ Name=l_orderkey ]
+    Variable [ Name=$l_orderkey ]
   )
   (
     LiteralExpr [STRING] [revenue]
     :
-    Variable [ Name=revenue ]
+    Variable [ Name=$revenue ]
   )
   (
     LiteralExpr [STRING] [o_orderdate]
     :
-    Variable [ Name=o_orderdate ]
+    Variable [ Name=$o_orderdate ]
   )
   (
     LiteralExpr [STRING] [o_shippriority]
     :
-    Variable [ Name=o_shippriority ]
+    Variable [ Name=$o_shippriority ]
   )
 ]
 ]
@@ -28,26 +28,26 @@ FROM [  FunctionCall Metadata.dataset@1[
     LiteralExpr [STRING] [Customer]
   ]
   AS
-  Variable [ Name=c ]
+  Variable [ Name=$c ]
 ,
   FunctionCall Metadata.dataset@1[
     LiteralExpr [STRING] [Orders]
   ]
   AS
-  Variable [ Name=o ]
+  Variable [ Name=$o ]
 ,
   FunctionCall Metadata.dataset@1[
     LiteralExpr [STRING] [LineItem]
   ]
   AS
-  Variable [ Name=l ]
+  Variable [ Name=$l ]
 ]
 Where
   OperatorExpr [
     OperatorExpr [
       OperatorExpr [
         FieldAccessor [
-          Variable [ Name=c ]
+          Variable [ Name=$c ]
           Field=c_mktsegment
         ]
         =
@@ -56,12 +56,12 @@ Where
       and
       OperatorExpr [
         FieldAccessor [
-          Variable [ Name=c ]
+          Variable [ Name=$c ]
           Field=c_custkey
         ]
         =
         FieldAccessor [
-          Variable [ Name=o ]
+          Variable [ Name=$o ]
           Field=o_custkey
         ]
       ]
@@ -70,19 +70,19 @@ Where
     OperatorExpr [
       OperatorExpr [
         FieldAccessor [
-          Variable [ Name=l ]
+          Variable [ Name=$l ]
           Field=l_orderkey
         ]
         =
         FieldAccessor [
-          Variable [ Name=o ]
+          Variable [ Name=$o ]
           Field=o_orderkey
         ]
       ]
       and
       OperatorExpr [
         FieldAccessor [
-          Variable [ Name=o ]
+          Variable [ Name=$o ]
           Field=o_orderdate
         ]
         <
@@ -91,7 +91,7 @@ Where
       and
       OperatorExpr [
         FieldAccessor [
-          Variable [ Name=l ]
+          Variable [ Name=$l ]
           Field=l_shipdate
         ]
         >
@@ -100,37 +100,43 @@ Where
     ]
   ]
 Groupby
-  Variable [ Name=l_orderkey ]
+  Variable [ Name=$l_orderkey ]
   :=
   FieldAccessor [
-    Variable [ Name=l ]
+    Variable [ Name=$l ]
     Field=l_orderkey
   ]
-  Variable [ Name=o_orderdate ]
+  Variable [ Name=$o_orderdate ]
   :=
   FieldAccessor [
-    Variable [ Name=o ]
+    Variable [ Name=$o ]
     Field=o_orderdate
   ]
-  Variable [ Name=o_shippriority ]
+  Variable [ Name=$o_shippriority ]
   :=
   FieldAccessor [
-    Variable [ Name=o ]
+    Variable [ Name=$o ]
     Field=o_shippriority
   ]
-  With
-  Variable [ Name=c ]
-  Variable [ Name=l ]
-  Variable [ Name=o ]
+  GROUP AS
+  Variable [ Name=#1 ]
+  (
+  Variable [ Name=$l ]
+   AS l
+  Variable [ Name=$o ]
+   AS o
+  Variable [ Name=$c ]
+   AS c
+  )
 
-LetVariable [ Name=revenue ]
+Let Variable [ Name=$revenue ]
   :=
   FunctionCall tpch.sum@1[
     (
       SELECT ELEMENT [
       OperatorExpr [
         FieldAccessor [
-          Variable [ Name=i ]
+          Variable [ Name=$i ]
           Field=l_extendedprice
         ]
         *
@@ -138,22 +144,22 @@ LetVariable [ Name=revenue ]
           LiteralExpr [LONG] [1]
           -
           FieldAccessor [
-            Variable [ Name=i ]
+            Variable [ Name=$i ]
             Field=l_discount
           ]
         ]
       ]
       ]
-      FROM [        Variable [ Name=l ]
+      FROM [        Variable [ Name=$l ]
         AS
-        Variable [ Name=i ]
+        Variable [ Name=$i ]
       ]
     )
   ]
 Orderby
-  Variable [ Name=revenue ]
+  Variable [ Name=$revenue ]
   DESC
-  Variable [ Name=o_orderdate ]
+  Variable [ Name=$o_orderdate ]
   ASC
 
 Limit

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/acc12a9b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q04_order_priority/q04_order_priority.3.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q04_order_priority/q04_order_priority.3.ast b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q04_order_priority/q04_order_priority.3.ast
index 4dc7445..bf4a408 100644
--- a/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q04_order_priority/q04_order_priority.3.ast
+++ b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q04_order_priority/q04_order_priority.3.ast
@@ -7,25 +7,25 @@ FunctionDecl tmp([]) {
         LiteralExpr [STRING] [o_orderkey]
         :
         FieldAccessor [
-          Variable [ Name=l ]
+          Variable [ Name=$l ]
           Field=l_orderkey
         ]
       )
     ]
     ]
-    FROM [      Variable [ Name=LineItem ]
+    FROM [      Variable [ Name=$LineItem ]
       AS
-      Variable [ Name=l ]
+      Variable [ Name=$l ]
     ]
     Where
       OperatorExpr [
         FieldAccessor [
-          Variable [ Name=l ]
+          Variable [ Name=$l ]
           Field=l_commitdate
         ]
         <
         FieldAccessor [
-          Variable [ Name=l ]
+          Variable [ Name=$l ]
           Field=l_receiptdate
         ]
       ]
@@ -38,13 +38,24 @@ RecordConstructor [
   (
     LiteralExpr [STRING] [order_priority]
     :
-    Variable [ Name=o_orderpriority ]
+    Variable [ Name=$o_orderpriority ]
   )
   (
     LiteralExpr [STRING] [count]
     :
     FunctionCall tpch.count@1[
-      Variable [ Name=o ]
+      (
+        SELECT ELEMENT [
+        FieldAccessor [
+          Variable [ Name=#2 ]
+          Field=o
+        ]
+        ]
+        FROM [          Variable [ Name=#1 ]
+          AS
+          Variable [ Name=#2 ]
+        ]
+      )
     ]
   )
 ]
@@ -53,30 +64,30 @@ FROM [  FunctionCall Metadata.dataset@1[
     LiteralExpr [STRING] [Orders]
   ]
   AS
-  Variable [ Name=o ]
+  Variable [ Name=$o ]
 ,
   FunctionCall tpch.tmp@0[
   ]
   AS
-  Variable [ Name=t ]
+  Variable [ Name=$t ]
 ]
 Where
   OperatorExpr [
     OperatorExpr [
       FieldAccessor [
-        Variable [ Name=o ]
+        Variable [ Name=$o ]
         Field=o_orderkey
       ]
       =
       FieldAccessor [
-        Variable [ Name=t ]
+        Variable [ Name=$t ]
         Field=o_orderkey
       ]
     ]
     and
     OperatorExpr [
       FieldAccessor [
-        Variable [ Name=o ]
+        Variable [ Name=$o ]
         Field=o_orderdate
       ]
       >=
@@ -85,7 +96,7 @@ Where
     and
     OperatorExpr [
       FieldAccessor [
-        Variable [ Name=o ]
+        Variable [ Name=$o ]
         Field=o_orderdate
       ]
       <
@@ -93,17 +104,22 @@ Where
     ]
   ]
 Groupby
-  Variable [ Name=o_orderpriority ]
+  Variable [ Name=$o_orderpriority ]
   :=
   FieldAccessor [
-    Variable [ Name=o ]
+    Variable [ Name=$o ]
     Field=o_orderpriority
   ]
-  With
-  Variable [ Name=t ]
-  Variable [ Name=o ]
+  GROUP AS
+  Variable [ Name=#1 ]
+  (
+  Variable [ Name=$t ]
+   AS t
+  Variable [ Name=$o ]
+   AS o
+  )
 
 Orderby
-  Variable [ Name=o_orderpriority ]
+  Variable [ Name=$o_orderpriority ]
   ASC
 

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/acc12a9b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q05_local_supplier_volume/q05_local_supplier_volume.3.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q05_local_supplier_volume/q05_local_supplier_volume.3.ast b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q05_local_supplier_volume/q05_local_supplier_volume.3.ast
index 2b505fb..92d992a 100644
--- a/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q05_local_supplier_volume/q05_local_supplier_volume.3.ast
+++ b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q05_local_supplier_volume/q05_local_supplier_volume.3.ast
@@ -5,12 +5,12 @@ RecordConstructor [
   (
     LiteralExpr [STRING] [n_name]
     :
-    Variable [ Name=n_name ]
+    Variable [ Name=$n_name ]
   )
   (
     LiteralExpr [STRING] [revenue]
     :
-    Variable [ Name=revenue ]
+    Variable [ Name=$revenue ]
   )
 ]
 ]
@@ -18,7 +18,7 @@ FROM [  FunctionCall Metadata.dataset@1[
     LiteralExpr [STRING] [Customer]
   ]
   AS
-  Variable [ Name=c ]
+  Variable [ Name=$c ]
 ,
   (
     SELECT ELEMENT [
@@ -27,7 +27,7 @@ FROM [  FunctionCall Metadata.dataset@1[
         LiteralExpr [STRING] [n_name]
         :
         FieldAccessor [
-          Variable [ Name=l1 ]
+          Variable [ Name=$l1 ]
           Field=n_name
         ]
       )
@@ -35,7 +35,7 @@ FROM [  FunctionCall Metadata.dataset@1[
         LiteralExpr [STRING] [l_extendedprice]
         :
         FieldAccessor [
-          Variable [ Name=l1 ]
+          Variable [ Name=$l1 ]
           Field=l_extendedprice
         ]
       )
@@ -43,7 +43,7 @@ FROM [  FunctionCall Metadata.dataset@1[
         LiteralExpr [STRING] [l_discount]
         :
         FieldAccessor [
-          Variable [ Name=l1 ]
+          Variable [ Name=$l1 ]
           Field=l_discount
         ]
       )
@@ -51,7 +51,7 @@ FROM [  FunctionCall Metadata.dataset@1[
         LiteralExpr [STRING] [s_nationkey]
         :
         FieldAccessor [
-          Variable [ Name=l1 ]
+          Variable [ Name=$l1 ]
           Field=s_nationkey
         ]
       )
@@ -59,7 +59,7 @@ FROM [  FunctionCall Metadata.dataset@1[
         LiteralExpr [STRING] [o_custkey]
         :
         FieldAccessor [
-          Variable [ Name=o ]
+          Variable [ Name=$o ]
           Field=o_custkey
         ]
       )
@@ -69,7 +69,7 @@ FROM [  FunctionCall Metadata.dataset@1[
         LiteralExpr [STRING] [Orders]
       ]
       AS
-      Variable [ Name=o ]
+      Variable [ Name=$o ]
 ,
       (
         SELECT ELEMENT [
@@ -78,7 +78,7 @@ FROM [  FunctionCall Metadata.dataset@1[
             LiteralExpr [STRING] [n_name]
             :
             FieldAccessor [
-              Variable [ Name=s1 ]
+              Variable [ Name=$s1 ]
               Field=n_name
             ]
           )
@@ -86,7 +86,7 @@ FROM [  FunctionCall Metadata.dataset@1[
             LiteralExpr [STRING] [l_extendedprice]
             :
             FieldAccessor [
-              Variable [ Name=l ]
+              Variable [ Name=$l ]
               Field=l_extendedprice
             ]
           )
@@ -94,7 +94,7 @@ FROM [  FunctionCall Metadata.dataset@1[
             LiteralExpr [STRING] [l_discount]
             :
             FieldAccessor [
-              Variable [ Name=l ]
+              Variable [ Name=$l ]
               Field=l_discount
             ]
           )
@@ -102,7 +102,7 @@ FROM [  FunctionCall Metadata.dataset@1[
             LiteralExpr [STRING] [l_orderkey]
             :
             FieldAccessor [
-              Variable [ Name=l ]
+              Variable [ Name=$l ]
               Field=l_orderkey
             ]
           )
@@ -110,7 +110,7 @@ FROM [  FunctionCall Metadata.dataset@1[
             LiteralExpr [STRING] [s_nationkey]
             :
             FieldAccessor [
-              Variable [ Name=s1 ]
+              Variable [ Name=$s1 ]
               Field=s_nationkey
             ]
           )
@@ -120,7 +120,7 @@ FROM [  FunctionCall Metadata.dataset@1[
             LiteralExpr [STRING] [LineItem]
           ]
           AS
-          Variable [ Name=l ]
+          Variable [ Name=$l ]
 ,
           (
             SELECT ELEMENT [
@@ -129,7 +129,7 @@ FROM [  FunctionCall Metadata.dataset@1[
                 LiteralExpr [STRING] [n_name]
                 :
                 FieldAccessor [
-                  Variable [ Name=n1 ]
+                  Variable [ Name=$n1 ]
                   Field=n_name
                 ]
               )
@@ -137,7 +137,7 @@ FROM [  FunctionCall Metadata.dataset@1[
                 LiteralExpr [STRING] [s_suppkey]
                 :
                 FieldAccessor [
-                  Variable [ Name=s ]
+                  Variable [ Name=$s ]
                   Field=s_suppkey
                 ]
               )
@@ -145,7 +145,7 @@ FROM [  FunctionCall Metadata.dataset@1[
                 LiteralExpr [STRING] [s_nationkey]
                 :
                 FieldAccessor [
-                  Variable [ Name=s ]
+                  Variable [ Name=$s ]
                   Field=s_nationkey
                 ]
               )
@@ -155,7 +155,7 @@ FROM [  FunctionCall Metadata.dataset@1[
                 LiteralExpr [STRING] [Supplier]
               ]
               AS
-              Variable [ Name=s ]
+              Variable [ Name=$s ]
 ,
               (
                 SELECT ELEMENT [
@@ -164,7 +164,7 @@ FROM [  FunctionCall Metadata.dataset@1[
                     LiteralExpr [STRING] [n_name]
                     :
                     FieldAccessor [
-                      Variable [ Name=n ]
+                      Variable [ Name=$n ]
                       Field=n_name
                     ]
                   )
@@ -172,7 +172,7 @@ FROM [  FunctionCall Metadata.dataset@1[
                     LiteralExpr [STRING] [n_nationkey]
                     :
                     FieldAccessor [
-                      Variable [ Name=n ]
+                      Variable [ Name=$n ]
                       Field=n_nationkey
                     ]
                   )
@@ -182,79 +182,79 @@ FROM [  FunctionCall Metadata.dataset@1[
                     LiteralExpr [STRING] [Nation]
                   ]
                   AS
-                  Variable [ Name=n ]
+                  Variable [ Name=$n ]
 ,
                   FunctionCall Metadata.dataset@1[
                     LiteralExpr [STRING] [Region]
                   ]
                   AS
-                  Variable [ Name=r ]
+                  Variable [ Name=$r ]
                 ]
                 Where
                   OperatorExpr [
                     FieldAccessor [
-                      Variable [ Name=n ]
+                      Variable [ Name=$n ]
                       Field=n_regionkey
                     ]
                     =
                     FieldAccessor [
-                      Variable [ Name=r ]
+                      Variable [ Name=$r ]
                       Field=r_regionkey
                     ]
                   ]
               )
               AS
-              Variable [ Name=n1 ]
+              Variable [ Name=$n1 ]
             ]
             Where
               OperatorExpr [
                 FieldAccessor [
-                  Variable [ Name=s ]
+                  Variable [ Name=$s ]
                   Field=s_nationkey
                 ]
                 =
                 FieldAccessor [
-                  Variable [ Name=n1 ]
+                  Variable [ Name=$n1 ]
                   Field=n_nationkey
                 ]
               ]
           )
           AS
-          Variable [ Name=s1 ]
+          Variable [ Name=$s1 ]
         ]
         Where
           OperatorExpr [
             FieldAccessor [
-              Variable [ Name=l ]
+              Variable [ Name=$l ]
               Field=l_suppkey
             ]
             =
             FieldAccessor [
-              Variable [ Name=s1 ]
+              Variable [ Name=$s1 ]
               Field=s_suppkey
             ]
           ]
       )
       AS
-      Variable [ Name=l1 ]
+      Variable [ Name=$l1 ]
     ]
     Where
       OperatorExpr [
         OperatorExpr [
           FieldAccessor [
-            Variable [ Name=l1 ]
+            Variable [ Name=$l1 ]
             Field=l_orderkey
           ]
           =
           FieldAccessor [
-            Variable [ Name=o ]
+            Variable [ Name=$o ]
             Field=o_orderkey
           ]
         ]
         and
         OperatorExpr [
           FieldAccessor [
-            Variable [ Name=o ]
+            Variable [ Name=$o ]
             Field=o_orderdate
           ]
           >=
@@ -263,7 +263,7 @@ FROM [  FunctionCall Metadata.dataset@1[
         and
         OperatorExpr [
           FieldAccessor [
-            Variable [ Name=o ]
+            Variable [ Name=$o ]
             Field=o_orderdate
           ]
           <
@@ -272,53 +272,58 @@ FROM [  FunctionCall Metadata.dataset@1[
       ]
   )
   AS
-  Variable [ Name=o1 ]
+  Variable [ Name=$o1 ]
 ]
 Where
   OperatorExpr [
     OperatorExpr [
       FieldAccessor [
-        Variable [ Name=c ]
+        Variable [ Name=$c ]
         Field=c_nationkey
       ]
       =
       FieldAccessor [
-        Variable [ Name=o1 ]
+        Variable [ Name=$o1 ]
         Field=s_nationkey
       ]
     ]
     and
     OperatorExpr [
       FieldAccessor [
-        Variable [ Name=c ]
+        Variable [ Name=$c ]
         Field=c_custkey
       ]
       =
       FieldAccessor [
-        Variable [ Name=o1 ]
+        Variable [ Name=$o1 ]
         Field=o_custkey
       ]
     ]
   ]
 Groupby
-  Variable [ Name=n_name ]
+  Variable [ Name=$n_name ]
   :=
   FieldAccessor [
-    Variable [ Name=o1 ]
+    Variable [ Name=$o1 ]
     Field=n_name
   ]
-  With
-  Variable [ Name=o1 ]
-  Variable [ Name=c ]
+  GROUP AS
+  Variable [ Name=#1 ]
+  (
+  Variable [ Name=$o1 ]
+   AS o1
+  Variable [ Name=$c ]
+   AS c
+  )
 
-LetVariable [ Name=revenue ]
+Let Variable [ Name=$revenue ]
   :=
   FunctionCall tpch.sum@1[
     (
       SELECT ELEMENT [
       OperatorExpr [
         FieldAccessor [
-          Variable [ Name=i ]
+          Variable [ Name=$i ]
           Field=l_extendedprice
         ]
         *
@@ -326,19 +331,19 @@ LetVariable [ Name=revenue ]
           LiteralExpr [LONG] [1]
           -
           FieldAccessor [
-            Variable [ Name=i ]
+            Variable [ Name=$i ]
             Field=l_discount
           ]
         ]
       ]
       ]
-      FROM [        Variable [ Name=o1 ]
+      FROM [        Variable [ Name=$o1 ]
         AS
-        Variable [ Name=i ]
+        Variable [ Name=$i ]
       ]
     )
   ]
 Orderby
-  Variable [ Name=revenue ]
+  Variable [ Name=$revenue ]
   DESC
 

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/acc12a9b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q06_forecast_revenue_change/q06_forecast_revenue_change.3.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q06_forecast_revenue_change/q06_forecast_revenue_change.3.ast b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q06_forecast_revenue_change/q06_forecast_revenue_change.3.ast
index f802e5e..592238f 100644
--- a/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q06_forecast_revenue_change/q06_forecast_revenue_change.3.ast
+++ b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q06_forecast_revenue_change/q06_forecast_revenue_change.3.ast
@@ -9,12 +9,12 @@ RecordConstructor [
         SELECT ELEMENT [
         OperatorExpr [
           FieldAccessor [
-            Variable [ Name=l ]
+            Variable [ Name=$l ]
             Field=l_extendedprice
           ]
           *
           FieldAccessor [
-            Variable [ Name=l ]
+            Variable [ Name=$l ]
             Field=l_discount
           ]
         ]
@@ -23,13 +23,13 @@ RecordConstructor [
             LiteralExpr [STRING] [LineItem]
           ]
           AS
-          Variable [ Name=l ]
+          Variable [ Name=$l ]
         ]
         Where
           OperatorExpr [
             OperatorExpr [
               FieldAccessor [
-                Variable [ Name=l ]
+                Variable [ Name=$l ]
                 Field=l_shipdate
               ]
               >=
@@ -38,7 +38,7 @@ RecordConstructor [
             and
             OperatorExpr [
               FieldAccessor [
-                Variable [ Name=l ]
+                Variable [ Name=$l ]
                 Field=l_shipdate
               ]
               <
@@ -47,7 +47,7 @@ RecordConstructor [
             and
             OperatorExpr [
               FieldAccessor [
-                Variable [ Name=l ]
+                Variable [ Name=$l ]
                 Field=l_discount
               ]
               >=
@@ -56,7 +56,7 @@ RecordConstructor [
             and
             OperatorExpr [
               FieldAccessor [
-                Variable [ Name=l ]
+                Variable [ Name=$l ]
                 Field=l_discount
               ]
               <=
@@ -65,7 +65,7 @@ RecordConstructor [
             and
             OperatorExpr [
               FieldAccessor [
-                Variable [ Name=l ]
+                Variable [ Name=$l ]
                 Field=l_quantity
               ]
               <


Mime
View raw message