asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From buyin...@apache.org
Subject [01/28] incubator-asterixdb git commit: ASTERIXDB-1383: reduce the number of lines for "AS".
Date Mon, 18 Apr 2016 15:48:26 GMT
Repository: incubator-asterixdb
Updated Branches:
  refs/heads/master 02dbadddc -> 1eedb4cb3


http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/1eedb4cb/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/query-issue810/query-issue810.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/query-issue810/query-issue810.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/query-issue810/query-issue810.3.ast
index 430ea72..9c62a28 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/query-issue810/query-issue810.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/query-issue810/query-issue810.3.ast
@@ -31,8 +31,7 @@ RecordConstructor [
 FROM [  FunctionCall Metadata.dataset@1[
     LiteralExpr [STRING] [LineItem]
   ]
-  AS
-  Variable [ Name=$l ]
+  AS Variable [ Name=$l ]
 ]
 Where
   OperatorExpr [
@@ -56,11 +55,9 @@ Groupby
     Variable [ Name=$l ]
     Field=l_linestatus
   ]
-  GROUP AS
-  Variable [ Name=#1 ]
+  GROUP AS Variable [ Name=#1 ]
   (
-  Variable [ Name=$l ]
-   AS l
+    l:=Variable [ Name=$l ]
   )
 
 Let Variable [ Name=$cheap ]
@@ -70,8 +67,7 @@ Let Variable [ Name=$cheap ]
     Variable [ Name=$m ]
     ]
     FROM [      Variable [ Name=$l ]
-      AS
-      Variable [ Name=$m ]
+      AS Variable [ Name=$m ]
     ]
     Where
       OperatorExpr [
@@ -90,8 +86,7 @@ Let Variable [ Name=$expensive ]
     Variable [ Name=$a ]
     ]
     FROM [      Variable [ Name=$l ]
-      AS
-      Variable [ Name=$a ]
+      AS Variable [ Name=$a ]
     ]
     Where
       OperatorExpr [

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/1eedb4cb/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/query-issue827-2/query-issue827-2.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/query-issue827-2/query-issue827-2.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/query-issue827-2/query-issue827-2.3.ast
index ad296a8..a11b5e2 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/query-issue827-2/query-issue827-2.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/query-issue827-2/query-issue827-2.3.ast
@@ -15,8 +15,7 @@ RecordConstructor [
         FROM [          FunctionCall Metadata.dataset@1[
             LiteralExpr [STRING] [LineItem]
           ]
-          AS
-          Variable [ Name=$i ]
+          AS Variable [ Name=$i ]
         ]
         Where
           OperatorExpr [
@@ -44,8 +43,7 @@ RecordConstructor [
         FROM [          FunctionCall Metadata.dataset@1[
             LiteralExpr [STRING] [LineItem]
           ]
-          AS
-          Variable [ Name=$i ]
+          AS Variable [ Name=$i ]
         ]
       )
     ]
@@ -75,8 +73,7 @@ RecordConstructor [
         FROM [          FunctionCall Metadata.dataset@1[
             LiteralExpr [STRING] [LineItem]
           ]
-          AS
-          Variable [ Name=$i ]
+          AS Variable [ Name=$i ]
         ]
       )
     ]
@@ -115,8 +112,7 @@ RecordConstructor [
         FROM [          FunctionCall Metadata.dataset@1[
             LiteralExpr [STRING] [LineItem]
           ]
-          AS
-          Variable [ Name=$i ]
+          AS Variable [ Name=$i ]
         ]
       )
     ]
@@ -135,8 +131,7 @@ RecordConstructor [
         FROM [          FunctionCall Metadata.dataset@1[
             LiteralExpr [STRING] [LineItem]
           ]
-          AS
-          Variable [ Name=$i ]
+          AS Variable [ Name=$i ]
         ]
         Where
           OperatorExpr [
@@ -164,8 +159,7 @@ RecordConstructor [
         FROM [          FunctionCall Metadata.dataset@1[
             LiteralExpr [STRING] [LineItem]
           ]
-          AS
-          Variable [ Name=$i ]
+          AS Variable [ Name=$i ]
         ]
       )
     ]
@@ -184,8 +178,7 @@ RecordConstructor [
         FROM [          FunctionCall Metadata.dataset@1[
             LiteralExpr [STRING] [LineItem]
           ]
-          AS
-          Variable [ Name=$i ]
+          AS Variable [ Name=$i ]
         ]
       )
     ]
@@ -201,8 +194,7 @@ RecordConstructor [
         FROM [          FunctionCall Metadata.dataset@1[
             LiteralExpr [STRING] [LineItem]
           ]
-          AS
-          Variable [ Name=$l ]
+          AS Variable [ Name=$l ]
         ]
       )
     ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/1eedb4cb/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/query-issue827/query-issue827.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/query-issue827/query-issue827.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/query-issue827/query-issue827.3.ast
index 8c3f767..7ebf5f7 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/query-issue827/query-issue827.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/query-issue827/query-issue827.3.ast
@@ -15,8 +15,7 @@ RecordConstructor [
         FROM [          FunctionCall Metadata.dataset@1[
             LiteralExpr [STRING] [LineItem]
           ]
-          AS
-          Variable [ Name=$l ]
+          AS Variable [ Name=$l ]
         ]
       )
     ]
@@ -39,12 +38,10 @@ RecordConstructor [
             FROM [              FunctionCall Metadata.dataset@1[
                 LiteralExpr [STRING] [LineItem]
               ]
-              AS
-              Variable [ Name=$l ]
+              AS Variable [ Name=$l ]
             ]
           )
-          AS
-          Variable [ Name=$e ]
+          AS Variable [ Name=$e ]
         ]
       )
     ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/1eedb4cb/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/opentype_orderby_01/opentype_orderby_01.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/opentype_orderby_01/opentype_orderby_01.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/opentype_orderby_01/opentype_orderby_01.3.ast
index 6e865d0..3bfb16d 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/opentype_orderby_01/opentype_orderby_01.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/opentype_orderby_01/opentype_orderby_01.3.ast
@@ -23,8 +23,7 @@ RecordConstructor [
 FROM [  FunctionCall Metadata.dataset@1[
     LiteralExpr [STRING] [empDataset]
   ]
-  AS
-  Variable [ Name=$emp ]
+  AS Variable [ Name=$emp ]
 ]
 Orderby
   FieldAccessor [

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/1eedb4cb/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_closedtype_field_01/promotion_closedtype_field_vs_closedtype_field_01.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_closedtype_field_01/promotion_closedtype_field_vs_closedtype_field_01.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_closedtype_field_01/promotion_closedtype_field_vs_closedtype_field_01.3.ast
index f9aa2ab..0213ef7 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_closedtype_field_01/promotion_closedtype_field_vs_closedtype_field_01.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_closedtype_field_01/promotion_closedtype_field_vs_closedtype_field_01.3.ast
@@ -39,14 +39,12 @@ RecordConstructor [
 FROM [  FunctionCall Metadata.dataset@1[
     LiteralExpr [STRING] [empDataset]
   ]
-  AS
-  Variable [ Name=$emp ]
+  AS Variable [ Name=$emp ]
 ,
   FunctionCall Metadata.dataset@1[
     LiteralExpr [STRING] [deptDataset]
   ]
-  AS
-  Variable [ Name=$dept ]
+  AS Variable [ Name=$dept ]
 ]
 Where
   OperatorExpr [

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/1eedb4cb/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_closedtype_field_02/promotion_closedtype_field_vs_closedtype_field_02.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_closedtype_field_02/promotion_closedtype_field_vs_closedtype_field_02.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_closedtype_field_02/promotion_closedtype_field_vs_closedtype_field_02.3.ast
index 074b476..64df8db 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_closedtype_field_02/promotion_closedtype_field_vs_closedtype_field_02.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_closedtype_field_02/promotion_closedtype_field_vs_closedtype_field_02.3.ast
@@ -43,14 +43,12 @@ RecordConstructor [
 FROM [  FunctionCall Metadata.dataset@1[
     LiteralExpr [STRING] [empDataset]
   ]
-  AS
-  Variable [ Name=$emp ]
+  AS Variable [ Name=$emp ]
 ,
   FunctionCall Metadata.dataset@1[
     LiteralExpr [STRING] [deptDataset]
   ]
-  AS
-  Variable [ Name=$dept ]
+  AS Variable [ Name=$dept ]
 ]
 Where
   OperatorExpr [

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/1eedb4cb/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_closedtype_field_03/promotion_closedtype_field_vs_closedtype_field_03.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_closedtype_field_03/promotion_closedtype_field_vs_closedtype_field_03.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_closedtype_field_03/promotion_closedtype_field_vs_closedtype_field_03.3.ast
index 51d0ae9..94a96b3 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_closedtype_field_03/promotion_closedtype_field_vs_closedtype_field_03.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_closedtype_field_03/promotion_closedtype_field_vs_closedtype_field_03.3.ast
@@ -39,14 +39,12 @@ RecordConstructor [
 FROM [  FunctionCall Metadata.dataset@1[
     LiteralExpr [STRING] [empDataset]
   ]
-  AS
-  Variable [ Name=$emp ]
+  AS Variable [ Name=$emp ]
 ,
   FunctionCall Metadata.dataset@1[
     LiteralExpr [STRING] [deptDataset]
   ]
-  AS
-  Variable [ Name=$dept ]
+  AS Variable [ Name=$dept ]
 ]
 Where
   OperatorExpr [

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/1eedb4cb/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_closedtype_field_04/promotion_closedtype_field_vs_closedtype_field_04.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_closedtype_field_04/promotion_closedtype_field_vs_closedtype_field_04.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_closedtype_field_04/promotion_closedtype_field_vs_closedtype_field_04.3.ast
index 544d403..7f64ba5 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_closedtype_field_04/promotion_closedtype_field_vs_closedtype_field_04.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_closedtype_field_04/promotion_closedtype_field_vs_closedtype_field_04.3.ast
@@ -39,14 +39,12 @@ RecordConstructor [
 FROM [  FunctionCall Metadata.dataset@1[
     LiteralExpr [STRING] [empDataset]
   ]
-  AS
-  Variable [ Name=$emp ]
+  AS Variable [ Name=$emp ]
 ,
   FunctionCall Metadata.dataset@1[
     LiteralExpr [STRING] [deptDataset]
   ]
-  AS
-  Variable [ Name=$dept ]
+  AS Variable [ Name=$dept ]
 ]
 Where
   OperatorExpr [

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/1eedb4cb/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_closedtype_field_05/promotion_closedtype_field_vs_closedtype_field_05.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_closedtype_field_05/promotion_closedtype_field_vs_closedtype_field_05.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_closedtype_field_05/promotion_closedtype_field_vs_closedtype_field_05.3.ast
index 3c1440a..a2dace8 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_closedtype_field_05/promotion_closedtype_field_vs_closedtype_field_05.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_closedtype_field_05/promotion_closedtype_field_vs_closedtype_field_05.3.ast
@@ -39,14 +39,12 @@ RecordConstructor [
 FROM [  FunctionCall Metadata.dataset@1[
     LiteralExpr [STRING] [empDataset]
   ]
-  AS
-  Variable [ Name=$emp ]
+  AS Variable [ Name=$emp ]
 ,
   FunctionCall Metadata.dataset@1[
     LiteralExpr [STRING] [deptDataset]
   ]
-  AS
-  Variable [ Name=$dept ]
+  AS Variable [ Name=$dept ]
 ]
 Where
   OperatorExpr [

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/1eedb4cb/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_constant_01/promotion_closedtype_field_vs_constant_01.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_constant_01/promotion_closedtype_field_vs_constant_01.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_constant_01/promotion_closedtype_field_vs_constant_01.3.ast
index 3965471..9c92b73 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_constant_01/promotion_closedtype_field_vs_constant_01.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_constant_01/promotion_closedtype_field_vs_constant_01.3.ast
@@ -23,8 +23,7 @@ RecordConstructor [
 FROM [  FunctionCall Metadata.dataset@1[
     LiteralExpr [STRING] [empDataset]
   ]
-  AS
-  Variable [ Name=$emp ]
+  AS Variable [ Name=$emp ]
 ]
 Where
   OperatorExpr [

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/1eedb4cb/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_constant_02/promotion_closedtype_field_vs_constant_02.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_constant_02/promotion_closedtype_field_vs_constant_02.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_constant_02/promotion_closedtype_field_vs_constant_02.3.ast
index b4551ab..dc2d65e 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_constant_02/promotion_closedtype_field_vs_constant_02.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_constant_02/promotion_closedtype_field_vs_constant_02.3.ast
@@ -23,8 +23,7 @@ RecordConstructor [
 FROM [  FunctionCall Metadata.dataset@1[
     LiteralExpr [STRING] [empDataset]
   ]
-  AS
-  Variable [ Name=$emp ]
+  AS Variable [ Name=$emp ]
 ]
 Where
   OperatorExpr [

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/1eedb4cb/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_constant_03/promotion_closedtype_field_vs_constant_03.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_constant_03/promotion_closedtype_field_vs_constant_03.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_constant_03/promotion_closedtype_field_vs_constant_03.3.ast
index 0cf8281..ce149e5 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_constant_03/promotion_closedtype_field_vs_constant_03.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_constant_03/promotion_closedtype_field_vs_constant_03.3.ast
@@ -23,8 +23,7 @@ RecordConstructor [
 FROM [  FunctionCall Metadata.dataset@1[
     LiteralExpr [STRING] [empDataset]
   ]
-  AS
-  Variable [ Name=$emp ]
+  AS Variable [ Name=$emp ]
 ]
 Where
   OperatorExpr [

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/1eedb4cb/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_constant_04/promotion_closedtype_field_vs_constant_04.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_constant_04/promotion_closedtype_field_vs_constant_04.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_constant_04/promotion_closedtype_field_vs_constant_04.3.ast
index 7f644e6..bb6e108 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_constant_04/promotion_closedtype_field_vs_constant_04.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_constant_04/promotion_closedtype_field_vs_constant_04.3.ast
@@ -23,8 +23,7 @@ RecordConstructor [
 FROM [  FunctionCall Metadata.dataset@1[
     LiteralExpr [STRING] [empDataset]
   ]
-  AS
-  Variable [ Name=$emp ]
+  AS Variable [ Name=$emp ]
 ]
 Where
   OperatorExpr [

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/1eedb4cb/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_constant_05/promotion_closedtype_field_vs_constant_05.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_constant_05/promotion_closedtype_field_vs_constant_05.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_constant_05/promotion_closedtype_field_vs_constant_05.3.ast
index aa1e0d3..9c09b76 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_constant_05/promotion_closedtype_field_vs_constant_05.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_constant_05/promotion_closedtype_field_vs_constant_05.3.ast
@@ -23,8 +23,7 @@ RecordConstructor [
 FROM [  FunctionCall Metadata.dataset@1[
     LiteralExpr [STRING] [empDataset]
   ]
-  AS
-  Variable [ Name=$emp ]
+  AS Variable [ Name=$emp ]
 ]
 Where
   OperatorExpr [

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/1eedb4cb/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_constant_06/promotion_closedtype_field_vs_constant_06.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_constant_06/promotion_closedtype_field_vs_constant_06.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_constant_06/promotion_closedtype_field_vs_constant_06.3.ast
index 7f644e6..bb6e108 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_constant_06/promotion_closedtype_field_vs_constant_06.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_constant_06/promotion_closedtype_field_vs_constant_06.3.ast
@@ -23,8 +23,7 @@ RecordConstructor [
 FROM [  FunctionCall Metadata.dataset@1[
     LiteralExpr [STRING] [empDataset]
   ]
-  AS
-  Variable [ Name=$emp ]
+  AS Variable [ Name=$emp ]
 ]
 Where
   OperatorExpr [

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/1eedb4cb/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_constant_07/promotion_closedtype_field_vs_constant_07.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_constant_07/promotion_closedtype_field_vs_constant_07.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_constant_07/promotion_closedtype_field_vs_constant_07.3.ast
index 5594115..f72fe79 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_constant_07/promotion_closedtype_field_vs_constant_07.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_constant_07/promotion_closedtype_field_vs_constant_07.3.ast
@@ -23,8 +23,7 @@ RecordConstructor [
 FROM [  FunctionCall Metadata.dataset@1[
     LiteralExpr [STRING] [empDataset]
   ]
-  AS
-  Variable [ Name=$emp ]
+  AS Variable [ Name=$emp ]
 ]
 Where
   OperatorExpr [

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/1eedb4cb/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_constant_08/promotion_closedtype_field_vs_constant_08.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_constant_08/promotion_closedtype_field_vs_constant_08.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_constant_08/promotion_closedtype_field_vs_constant_08.3.ast
index eaaaa6e..6d9aeb1 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_constant_08/promotion_closedtype_field_vs_constant_08.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_constant_08/promotion_closedtype_field_vs_constant_08.3.ast
@@ -23,8 +23,7 @@ RecordConstructor [
 FROM [  FunctionCall Metadata.dataset@1[
     LiteralExpr [STRING] [empDataset]
   ]
-  AS
-  Variable [ Name=$emp ]
+  AS Variable [ Name=$emp ]
 ]
 Where
   OperatorExpr [

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/1eedb4cb/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_constant_09/promotion_closedtype_field_vs_constant_09.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_constant_09/promotion_closedtype_field_vs_constant_09.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_constant_09/promotion_closedtype_field_vs_constant_09.3.ast
index fe2fdfb..c9bb1db 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_constant_09/promotion_closedtype_field_vs_constant_09.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_constant_09/promotion_closedtype_field_vs_constant_09.3.ast
@@ -23,8 +23,7 @@ RecordConstructor [
 FROM [  FunctionCall Metadata.dataset@1[
     LiteralExpr [STRING] [empDataset]
   ]
-  AS
-  Variable [ Name=$emp ]
+  AS Variable [ Name=$emp ]
 ]
 Where
   OperatorExpr [

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/1eedb4cb/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_constant_10/promotion_closedtype_field_vs_constant_10.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_constant_10/promotion_closedtype_field_vs_constant_10.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_constant_10/promotion_closedtype_field_vs_constant_10.3.ast
index c346569..ba64cdb 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_constant_10/promotion_closedtype_field_vs_constant_10.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_constant_10/promotion_closedtype_field_vs_constant_10.3.ast
@@ -23,8 +23,7 @@ RecordConstructor [
 FROM [  FunctionCall Metadata.dataset@1[
     LiteralExpr [STRING] [empDataset]
   ]
-  AS
-  Variable [ Name=$emp ]
+  AS Variable [ Name=$emp ]
 ]
 Where
   OperatorExpr [

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/1eedb4cb/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_constant_11/promotion_closedtype_field_vs_constant_11.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_constant_11/promotion_closedtype_field_vs_constant_11.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_constant_11/promotion_closedtype_field_vs_constant_11.3.ast
index 4b743fe..2b34755 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_constant_11/promotion_closedtype_field_vs_constant_11.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_constant_11/promotion_closedtype_field_vs_constant_11.3.ast
@@ -23,8 +23,7 @@ RecordConstructor [
 FROM [  FunctionCall Metadata.dataset@1[
     LiteralExpr [STRING] [empDataset]
   ]
-  AS
-  Variable [ Name=$emp ]
+  AS Variable [ Name=$emp ]
 ]
 Where
   OperatorExpr [

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/1eedb4cb/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_opentype_field_01/promotion_closedtype_field_vs_opentype_field_01.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_opentype_field_01/promotion_closedtype_field_vs_opentype_field_01.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_opentype_field_01/promotion_closedtype_field_vs_opentype_field_01.3.ast
index 13d89f7..ba51a7d 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_opentype_field_01/promotion_closedtype_field_vs_opentype_field_01.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_opentype_field_01/promotion_closedtype_field_vs_opentype_field_01.3.ast
@@ -39,14 +39,12 @@ RecordConstructor [
 FROM [  FunctionCall Metadata.dataset@1[
     LiteralExpr [STRING] [empDataset]
   ]
-  AS
-  Variable [ Name=$emp ]
+  AS Variable [ Name=$emp ]
 ,
   FunctionCall Metadata.dataset@1[
     LiteralExpr [STRING] [deptDataset]
   ]
-  AS
-  Variable [ Name=$dept ]
+  AS Variable [ Name=$dept ]
 ]
 Where
   OperatorExpr [

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/1eedb4cb/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_opentype_field_02/promotion_closedtype_field_vs_opentype_field_02.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_opentype_field_02/promotion_closedtype_field_vs_opentype_field_02.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_opentype_field_02/promotion_closedtype_field_vs_opentype_field_02.3.ast
index ff2e1cd..bd77024 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_opentype_field_02/promotion_closedtype_field_vs_opentype_field_02.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_opentype_field_02/promotion_closedtype_field_vs_opentype_field_02.3.ast
@@ -39,14 +39,12 @@ RecordConstructor [
 FROM [  FunctionCall Metadata.dataset@1[
     LiteralExpr [STRING] [empDataset]
   ]
-  AS
-  Variable [ Name=$emp ]
+  AS Variable [ Name=$emp ]
 ,
   FunctionCall Metadata.dataset@1[
     LiteralExpr [STRING] [deptDataset]
   ]
-  AS
-  Variable [ Name=$dept ]
+  AS Variable [ Name=$dept ]
 ]
 Where
   OperatorExpr [

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/1eedb4cb/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_opentype_field_03/promotion_closedtype_field_vs_opentype_field_03.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_opentype_field_03/promotion_closedtype_field_vs_opentype_field_03.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_opentype_field_03/promotion_closedtype_field_vs_opentype_field_03.3.ast
index 2cce29f..b98cf75 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_opentype_field_03/promotion_closedtype_field_vs_opentype_field_03.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_opentype_field_03/promotion_closedtype_field_vs_opentype_field_03.3.ast
@@ -39,14 +39,12 @@ RecordConstructor [
 FROM [  FunctionCall Metadata.dataset@1[
     LiteralExpr [STRING] [empDataset]
   ]
-  AS
-  Variable [ Name=$emp ]
+  AS Variable [ Name=$emp ]
 ,
   FunctionCall Metadata.dataset@1[
     LiteralExpr [STRING] [deptDataset]
   ]
-  AS
-  Variable [ Name=$dept ]
+  AS Variable [ Name=$dept ]
 ]
 Where
   OperatorExpr [

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/1eedb4cb/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_opentype_field_04/promotion_closedtype_field_vs_opentype_field_04.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_opentype_field_04/promotion_closedtype_field_vs_opentype_field_04.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_opentype_field_04/promotion_closedtype_field_vs_opentype_field_04.3.ast
index 94c4097..c35de65 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_opentype_field_04/promotion_closedtype_field_vs_opentype_field_04.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_closedtype_field_vs_opentype_field_04/promotion_closedtype_field_vs_opentype_field_04.3.ast
@@ -31,14 +31,12 @@ RecordConstructor [
 FROM [  FunctionCall Metadata.dataset@1[
     LiteralExpr [STRING] [empDataset]
   ]
-  AS
-  Variable [ Name=$emp ]
+  AS Variable [ Name=$emp ]
 ,
   FunctionCall Metadata.dataset@1[
     LiteralExpr [STRING] [deptDataset]
   ]
-  AS
-  Variable [ Name=$dept ]
+  AS Variable [ Name=$dept ]
 ]
 Where
   OperatorExpr [

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/1eedb4cb/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_opentype_field_vs_constant_01/promotion_opentype_field_vs_constant_01.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_opentype_field_vs_constant_01/promotion_opentype_field_vs_constant_01.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_opentype_field_vs_constant_01/promotion_opentype_field_vs_constant_01.3.ast
index b0faed9..d9b7e47 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_opentype_field_vs_constant_01/promotion_opentype_field_vs_constant_01.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_opentype_field_vs_constant_01/promotion_opentype_field_vs_constant_01.3.ast
@@ -23,8 +23,7 @@ RecordConstructor [
 FROM [  FunctionCall Metadata.dataset@1[
     LiteralExpr [STRING] [empDataset]
   ]
-  AS
-  Variable [ Name=$emp ]
+  AS Variable [ Name=$emp ]
 ]
 Where
   OperatorExpr [

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/1eedb4cb/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_opentype_field_vs_constant_02/promotion_opentype_field_vs_constant_02.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_opentype_field_vs_constant_02/promotion_opentype_field_vs_constant_02.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_opentype_field_vs_constant_02/promotion_opentype_field_vs_constant_02.3.ast
index 8b3dd65..3a70fcd 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_opentype_field_vs_constant_02/promotion_opentype_field_vs_constant_02.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_opentype_field_vs_constant_02/promotion_opentype_field_vs_constant_02.3.ast
@@ -23,8 +23,7 @@ RecordConstructor [
 FROM [  FunctionCall Metadata.dataset@1[
     LiteralExpr [STRING] [empDataset]
   ]
-  AS
-  Variable [ Name=$emp ]
+  AS Variable [ Name=$emp ]
 ]
 Where
   OperatorExpr [

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/1eedb4cb/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_opentype_field_vs_constant_03/promotion_opentype_field_vs_constant_03.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_opentype_field_vs_constant_03/promotion_opentype_field_vs_constant_03.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_opentype_field_vs_constant_03/promotion_opentype_field_vs_constant_03.3.ast
index 6e5db45..2a43942 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_opentype_field_vs_constant_03/promotion_opentype_field_vs_constant_03.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_opentype_field_vs_constant_03/promotion_opentype_field_vs_constant_03.3.ast
@@ -23,8 +23,7 @@ RecordConstructor [
 FROM [  FunctionCall Metadata.dataset@1[
     LiteralExpr [STRING] [empDataset]
   ]
-  AS
-  Variable [ Name=$emp ]
+  AS Variable [ Name=$emp ]
 ]
 Where
   OperatorExpr [

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/1eedb4cb/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_opentype_field_vs_constant_04/promotion_opentype_field_vs_constant_04.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_opentype_field_vs_constant_04/promotion_opentype_field_vs_constant_04.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_opentype_field_vs_constant_04/promotion_opentype_field_vs_constant_04.3.ast
index d2e4c76..280cc68 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_opentype_field_vs_constant_04/promotion_opentype_field_vs_constant_04.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_opentype_field_vs_constant_04/promotion_opentype_field_vs_constant_04.3.ast
@@ -23,8 +23,7 @@ RecordConstructor [
 FROM [  FunctionCall Metadata.dataset@1[
     LiteralExpr [STRING] [empDataset]
   ]
-  AS
-  Variable [ Name=$emp ]
+  AS Variable [ Name=$emp ]
 ]
 Where
   OperatorExpr [

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/1eedb4cb/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_opentype_field_vs_constant_05/promotion_opentype_field_vs_constant_05.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_opentype_field_vs_constant_05/promotion_opentype_field_vs_constant_05.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_opentype_field_vs_constant_05/promotion_opentype_field_vs_constant_05.3.ast
index c2788a6..b3157c6 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_opentype_field_vs_constant_05/promotion_opentype_field_vs_constant_05.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_opentype_field_vs_constant_05/promotion_opentype_field_vs_constant_05.3.ast
@@ -23,8 +23,7 @@ RecordConstructor [
 FROM [  FunctionCall Metadata.dataset@1[
     LiteralExpr [STRING] [empDataset]
   ]
-  AS
-  Variable [ Name=$emp ]
+  AS Variable [ Name=$emp ]
 ]
 Where
   OperatorExpr [

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/1eedb4cb/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_opentype_field_vs_constant_06/promotion_opentype_field_vs_constant_06.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_opentype_field_vs_constant_06/promotion_opentype_field_vs_constant_06.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_opentype_field_vs_constant_06/promotion_opentype_field_vs_constant_06.3.ast
index bdb3906..d75525e 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_opentype_field_vs_constant_06/promotion_opentype_field_vs_constant_06.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_opentype_field_vs_constant_06/promotion_opentype_field_vs_constant_06.3.ast
@@ -23,8 +23,7 @@ RecordConstructor [
 FROM [  FunctionCall Metadata.dataset@1[
     LiteralExpr [STRING] [empDataset]
   ]
-  AS
-  Variable [ Name=$emp ]
+  AS Variable [ Name=$emp ]
 ]
 Where
   OperatorExpr [

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/1eedb4cb/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_opentype_field_vs_constant_07/promotion_opentype_field_vs_constant_07.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_opentype_field_vs_constant_07/promotion_opentype_field_vs_constant_07.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_opentype_field_vs_constant_07/promotion_opentype_field_vs_constant_07.3.ast
index 8f5fc41..2fec640 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_opentype_field_vs_constant_07/promotion_opentype_field_vs_constant_07.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_opentype_field_vs_constant_07/promotion_opentype_field_vs_constant_07.3.ast
@@ -23,8 +23,7 @@ RecordConstructor [
 FROM [  FunctionCall Metadata.dataset@1[
     LiteralExpr [STRING] [empDataset]
   ]
-  AS
-  Variable [ Name=$emp ]
+  AS Variable [ Name=$emp ]
 ]
 Where
   OperatorExpr [

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/1eedb4cb/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_opentype_field_vs_constant_08/promotion_opentype_field_vs_constant_08.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_opentype_field_vs_constant_08/promotion_opentype_field_vs_constant_08.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_opentype_field_vs_constant_08/promotion_opentype_field_vs_constant_08.3.ast
index 972ced0..eeeaaf0 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_opentype_field_vs_constant_08/promotion_opentype_field_vs_constant_08.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_opentype_field_vs_constant_08/promotion_opentype_field_vs_constant_08.3.ast
@@ -23,8 +23,7 @@ RecordConstructor [
 FROM [  FunctionCall Metadata.dataset@1[
     LiteralExpr [STRING] [empDataset]
   ]
-  AS
-  Variable [ Name=$emp ]
+  AS Variable [ Name=$emp ]
 ]
 Where
   OperatorExpr [

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/1eedb4cb/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_opentype_field_vs_opentype_field_01/promotion_opentype_field_vs_opentype_field_01.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_opentype_field_vs_opentype_field_01/promotion_opentype_field_vs_opentype_field_01.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_opentype_field_vs_opentype_field_01/promotion_opentype_field_vs_opentype_field_01.3.ast
index 719ef23..7e17d14 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_opentype_field_vs_opentype_field_01/promotion_opentype_field_vs_opentype_field_01.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_opentype_field_vs_opentype_field_01/promotion_opentype_field_vs_opentype_field_01.3.ast
@@ -31,14 +31,12 @@ RecordConstructor [
 FROM [  FunctionCall Metadata.dataset@1[
     LiteralExpr [STRING] [empDataset]
   ]
-  AS
-  Variable [ Name=$emp ]
+  AS Variable [ Name=$emp ]
 ,
   FunctionCall Metadata.dataset@1[
     LiteralExpr [STRING] [deptDataset]
   ]
-  AS
-  Variable [ Name=$dept ]
+  AS Variable [ Name=$dept ]
 ]
 Where
   OperatorExpr [

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/1eedb4cb/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_opentype_field_vs_opentype_field_02/promotion_opentype_field_vs_opentype_field_02.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_opentype_field_vs_opentype_field_02/promotion_opentype_field_vs_opentype_field_02.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_opentype_field_vs_opentype_field_02/promotion_opentype_field_vs_opentype_field_02.3.ast
index e011d74..5230c60 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_opentype_field_vs_opentype_field_02/promotion_opentype_field_vs_opentype_field_02.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/promotion_opentype_field_vs_opentype_field_02/promotion_opentype_field_vs_opentype_field_02.3.ast
@@ -31,14 +31,12 @@ RecordConstructor [
 FROM [  FunctionCall Metadata.dataset@1[
     LiteralExpr [STRING] [empDataset]
   ]
-  AS
-  Variable [ Name=$emp ]
+  AS Variable [ Name=$emp ]
 ,
   FunctionCall Metadata.dataset@1[
     LiteralExpr [STRING] [deptDataset]
   ]
-  AS
-  Variable [ Name=$dept ]
+  AS Variable [ Name=$dept ]
 ]
 Where
   OperatorExpr [

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/1eedb4cb/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/type_promotion_0/type_promotion_0.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/type_promotion_0/type_promotion_0.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/type_promotion_0/type_promotion_0.3.ast
index 1652835..60d0074 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/type_promotion_0/type_promotion_0.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/type_promotion_0/type_promotion_0.3.ast
@@ -6,6 +6,5 @@ Variable [ Name=$i ]
 FROM [  FunctionCall Metadata.dataset@1[
     LiteralExpr [STRING] [Int64Test]
   ]
-  AS
-  Variable [ Name=$i ]
+  AS Variable [ Name=$i ]
 ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/1eedb4cb/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/type_promotion_1/type_promotion_1.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/type_promotion_1/type_promotion_1.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/type_promotion_1/type_promotion_1.3.ast
index 0c83f61..98f9e80 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/type_promotion_1/type_promotion_1.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/types/type_promotion_1/type_promotion_1.3.ast
@@ -6,6 +6,5 @@ Variable [ Name=$i ]
 FROM [  FunctionCall Metadata.dataset@1[
     LiteralExpr [STRING] [TestSet]
   ]
-  AS
-  Variable [ Name=$i ]
+  AS Variable [ Name=$i ]
 ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/1eedb4cb/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/invoke-private-function/invoke-private-function.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/invoke-private-function/invoke-private-function.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/invoke-private-function/invoke-private-function.3.ast
index 4d168c2..259fce4 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/invoke-private-function/invoke-private-function.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/invoke-private-function/invoke-private-function.3.ast
@@ -128,6 +128,5 @@ SELECT ELEMENT [
 Variable [ Name=$i ]
 ]
 FROM [  Variable [ Name=$results ]
-  AS
-  Variable [ Name=$i ]
+  AS Variable [ Name=$i ]
 ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/1eedb4cb/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/query-issue201/query-issue201.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/query-issue201/query-issue201.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/query-issue201/query-issue201.3.ast
index c19b7e0..5560bd3 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/query-issue201/query-issue201.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/query-issue201/query-issue201.3.ast
@@ -10,6 +10,5 @@ SELECT ELEMENT [
 Variable [ Name=$i ]
 ]
 FROM [  Variable [ Name=$x ]
-  AS
-  Variable [ Name=$i ]
+  AS Variable [ Name=$i ]
 ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/1eedb4cb/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/query-issue244/query-issue244.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/query-issue244/query-issue244.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/query-issue244/query-issue244.3.ast
index 39d4a9d..f1655e7 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/query-issue244/query-issue244.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/query-issue244/query-issue244.3.ast
@@ -6,8 +6,7 @@ Variable [ Name=$l ]
 FROM [  FunctionCall Metadata.dataset@1[
     LiteralExpr [STRING] [t2]
   ]
-  AS
-  Variable [ Name=$l ]
+  AS Variable [ Name=$l ]
 ]
 Orderby
   FieldAccessor [

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/1eedb4cb/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/query-issue489/query-issue489.2.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/query-issue489/query-issue489.2.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/query-issue489/query-issue489.2.ast
index beae2d4..4826f57 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/query-issue489/query-issue489.2.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/query-issue489/query-issue489.2.ast
@@ -8,8 +8,7 @@ FunctionCall null.count@1[
     FROM [      FunctionCall Metadata.dataset@1[
         LiteralExpr [STRING] [Metadata.Function]
       ]
-      AS
-      Variable [ Name=$x ]
+      AS Variable [ Name=$x ]
     ]
     Where
       OperatorExpr [

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/1eedb4cb/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/query-issue489/query-issue489.4.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/query-issue489/query-issue489.4.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/query-issue489/query-issue489.4.ast
index beae2d4..4826f57 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/query-issue489/query-issue489.4.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/query-issue489/query-issue489.4.ast
@@ -8,8 +8,7 @@ FunctionCall null.count@1[
     FROM [      FunctionCall Metadata.dataset@1[
         LiteralExpr [STRING] [Metadata.Function]
       ]
-      AS
-      Variable [ Name=$x ]
+      AS Variable [ Name=$x ]
     ]
     Where
       OperatorExpr [

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/1eedb4cb/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/udf01/udf01.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/udf01/udf01.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/udf01/udf01.3.ast
index 4d96d9d..aa9d183 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/udf01/udf01.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/udf01/udf01.3.ast
@@ -17,6 +17,5 @@ FROM [  OrderedListConstructor [
     LiteralExpr [LONG] [9]
     LiteralExpr [LONG] [10]
   ]
-  AS
-  Variable [ Name=$a ]
+  AS Variable [ Name=$a ]
 ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/1eedb4cb/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/udf02/udf02.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/udf02/udf02.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/udf02/udf02.3.ast
index c5d0ad6..1790bdd 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/udf02/udf02.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/udf02/udf02.3.ast
@@ -15,6 +15,5 @@ FROM [  OrderedListConstructor [
       LiteralExpr [LONG] [4]
     ]
   ]
-  AS
-  Variable [ Name=$a ]
+  AS Variable [ Name=$a ]
 ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/1eedb4cb/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/udf04/udf04.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/udf04/udf04.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/udf04/udf04.3.ast
index eb3db35..fcd2453 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/udf04/udf04.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/udf04/udf04.3.ast
@@ -58,6 +58,5 @@ FROM [  OrderedListConstructor [
       )
     ]
   ]
-  AS
-  Variable [ Name=$a ]
+  AS Variable [ Name=$a ]
 ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/1eedb4cb/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/udf09/udf09.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/udf09/udf09.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/udf09/udf09.3.ast
index 21264bc..4965a73 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/udf09/udf09.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/udf09/udf09.3.ast
@@ -9,8 +9,7 @@ FunctionCall test.readDataset@1[
     FROM [      FunctionCall Metadata.dataset@1[
         LiteralExpr [STRING] [test.t1]
       ]
-      AS
-      Variable [ Name=$a ]
+      AS Variable [ Name=$a ]
     ]
     Orderby
       FieldAccessor [

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/1eedb4cb/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/udf11/udf11.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/udf11/udf11.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/udf11/udf11.3.ast
index a7fad06..e59a071 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/udf11/udf11.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/udf11/udf11.3.ast
@@ -5,6 +5,5 @@ Variable [ Name=$a ]
 ]
 FROM [  FunctionCall test.OList@0[
   ]
-  AS
-  Variable [ Name=$a ]
+  AS Variable [ Name=$a ]
 ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/1eedb4cb/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/udf19/udf19.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/udf19/udf19.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/udf19/udf19.3.ast
index 5d459e1..e0fae3a 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/udf19/udf19.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/udf19/udf19.3.ast
@@ -13,8 +13,7 @@ FROM [  OrderedListConstructor [
     LiteralExpr [LONG] [10]
     LiteralExpr [LONG] [12]
   ]
-  AS
-  Variable [ Name=$a ]
+  AS Variable [ Name=$a ]
 ]
 Where
   OperatorExpr [

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/1eedb4cb/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/udf20/udf20.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/udf20/udf20.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/udf20/udf20.3.ast
index badfd49..6aa5d8e 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/udf20/udf20.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/udf20/udf20.3.ast
@@ -24,8 +24,7 @@ FROM [  OrderedListConstructor [
     LiteralExpr [LONG] [10]
     LiteralExpr [LONG] [12]
   ]
-  AS
-  Variable [ Name=$a ]
+  AS Variable [ Name=$a ]
 ]
 Where
   OperatorExpr [

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/1eedb4cb/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/udf21/udf21.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/udf21/udf21.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/udf21/udf21.3.ast
index d88293a..243e7cc 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/udf21/udf21.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/udf21/udf21.3.ast
@@ -28,8 +28,7 @@ FROM [  OrderedListConstructor [
     LiteralExpr [LONG] [65]
     LiteralExpr [LONG] [75]
   ]
-  AS
-  Variable [ Name=$a ]
+  AS Variable [ Name=$a ]
 ]
 Where
   FunctionCall test.isOdd@1[

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/1eedb4cb/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/udf23/udf23.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/udf23/udf23.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/udf23/udf23.3.ast
index dac2422..6280700 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/udf23/udf23.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/udf23/udf23.3.ast
@@ -6,8 +6,7 @@ Variable [ Name=$l ]
 FROM [  FunctionCall Metadata.dataset@1[
     LiteralExpr [STRING] [Metadata.Dataset]
   ]
-  AS
-  Variable [ Name=$l ]
+  AS Variable [ Name=$l ]
 ]
 Where
   OperatorExpr [

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/1eedb4cb/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/udf28/udf28.2.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/udf28/udf28.2.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/udf28/udf28.2.ast
index 343f76b..95a8e86 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/udf28/udf28.2.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/udf28/udf28.2.ast
@@ -6,8 +6,7 @@ Variable [ Name=$x ]
 FROM [  FunctionCall Metadata.dataset@1[
     LiteralExpr [STRING] [Metadata.Function]
   ]
-  AS
-  Variable [ Name=$x ]
+  AS Variable [ Name=$x ]
 ]
 Where
   OperatorExpr [

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/1eedb4cb/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/writers/print_01/print_01.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/writers/print_01/print_01.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/writers/print_01/print_01.3.ast
index bdd0649..74a29ba 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/writers/print_01/print_01.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/writers/print_01/print_01.3.ast
@@ -7,6 +7,5 @@ FROM [  OrderedListConstructor [
     LiteralExpr [STRING] [foo]
     LiteralExpr [STRING] [bar]
   ]
-  AS
-  Variable [ Name=$x ]
+  AS Variable [ Name=$x ]
 ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/1eedb4cb/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/SqlppAstPrintVisitor.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/SqlppAstPrintVisitor.java b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/SqlppAstPrintVisitor.java
index 0f36646..a613e90 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/SqlppAstPrintVisitor.java
+++ b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/SqlppAstPrintVisitor.java
@@ -81,11 +81,11 @@ public class SqlppAstPrintVisitor extends QueryPrintVisitor implements ISqlppVis
     @Override
     public Void visit(FromTerm fromTerm, Integer step) throws AsterixException {
         fromTerm.getLeftExpression().accept(this, step);
-        out.println(skip(step) + "AS");
-        fromTerm.getLeftVariable().accept(this, step);
+        out.print(skip(step) + "AS ");
+        fromTerm.getLeftVariable().accept(this, 0);
         if (fromTerm.hasPositionalVariable()) {
-            out.println(skip(step) + "AT");
-            fromTerm.getPositionalVariable().accept(this, step);
+            out.println(" AT ");
+            fromTerm.getPositionalVariable().accept(this, 0);
         }
         if (fromTerm.hasCorrelateClauses()) {
             for (AbstractBinaryCorrelateClause correlateClause : fromTerm.getCorrelateClauses()) {
@@ -99,11 +99,11 @@ public class SqlppAstPrintVisitor extends QueryPrintVisitor implements ISqlppVis
     public Void visit(JoinClause joinClause, Integer step) throws AsterixException {
         out.println(skip(step) + joinClause.getJoinType() + " JOIN");
         joinClause.getRightExpression().accept(this, step + 1);
-        out.println(skip(step + 1) + "AS");
-        joinClause.getRightVariable().accept(this, step + 1);
+        out.print(skip(step + 1) + "AS ");
+        joinClause.getRightVariable().accept(this, 0);
         if (joinClause.hasPositionalVariable()) {
-            out.println(skip(step + 1) + "AT");
-            joinClause.getPositionalVariable().accept(this, step + 1);
+            out.print(" AT ");
+            joinClause.getPositionalVariable().accept(this, 0);
         }
         out.println(skip(step + 1) + "ON");
         joinClause.getConditionExpression().accept(this, step + 1);
@@ -114,11 +114,11 @@ public class SqlppAstPrintVisitor extends QueryPrintVisitor implements ISqlppVis
     public Void visit(NestClause nestClause, Integer step) throws AsterixException {
         out.println(skip(step) + nestClause.getJoinType() + " NEST");
         nestClause.getRightExpression().accept(this, step + 1);
-        out.println(skip(step + 1) + "AS");
-        nestClause.getRightVariable().accept(this, step + 1);
+        out.print(skip(step + 1) + "AS ");
+        nestClause.getRightVariable().accept(this, 0);
         if (nestClause.hasPositionalVariable()) {
-            out.println(skip(step + 1) + "AT");
-            nestClause.getPositionalVariable().accept(this, step + 1);
+            out.print(" AT ");
+            nestClause.getPositionalVariable().accept(this, 0);
         }
         out.println(skip(step + 1) + "ON");
         nestClause.getConditionExpression().accept(this, step + 1);
@@ -230,11 +230,11 @@ public class SqlppAstPrintVisitor extends QueryPrintVisitor implements ISqlppVis
     public Void visit(UnnestClause unnestClause, Integer step) throws AsterixException {
         out.println(skip(step) + unnestClause.getJoinType() + " UNNEST");
         unnestClause.getRightExpression().accept(this, step + 1);
-        out.println(skip(step + 1) + " AS");
-        unnestClause.getRightVariable().accept(this, step + 1);
+        out.print(skip(step + 1) + " AS ");
+        unnestClause.getRightVariable().accept(this, 0);
         if (unnestClause.hasPositionalVariable()) {
-            out.println(skip(step + 1) + " AT");
-            unnestClause.getPositionalVariable().accept(this, step + 1);
+            out.println(" AT");
+            unnestClause.getPositionalVariable().accept(this, 0);
         }
         return null;
     }
@@ -277,13 +277,13 @@ public class SqlppAstPrintVisitor extends QueryPrintVisitor implements ISqlppVis
             pair.getExpr().accept(this, step + 1);
         }
         if (gc.hasGroupVar()) {
-            out.println(skip(step + 1) + "GROUP AS");
-            gc.getGroupVar().accept(this, step + 1);
+            out.print(skip(step + 1) + "GROUP AS ");
+            gc.getGroupVar().accept(this, 0);
             if (gc.hasGroupFieldList()) {
                 out.println(skip(step + 1) + "(");
                 for (Pair<Expression, Identifier> field : gc.getGroupFieldList()) {
-                    field.first.accept(this, step + 1);
-                    out.println(skip(step + 1) + " AS " + field.second);
+                    out.print(skip(step + 2) + field.second + ":=");
+                    field.first.accept(this, 0);
                 }
                 out.println(skip(step + 1) + ")");
             }


Mime
View raw message