asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From buyin...@apache.org
Subject [01/51] [partial] incubator-asterixdb git commit: ASTERIXDB-1226: implement SQL++ core group-by semantics and syntatic sugars.
Date Mon, 28 Mar 2016 20:18:28 GMT
Repository: incubator-asterixdb
Updated Branches:
  refs/heads/master b71a9d09b -> acc12a9b5


http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/acc12a9b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q08_national_market_share/q08_national_market_share.3.ast
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q08_national_market_share/q08_national_market_share.3.ast
b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q08_national_market_share/q08_national_market_share.3.ast
index f6dbd18..eca3549 100644
--- a/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q08_national_market_share/q08_national_market_share.3.ast
+++ b/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q08_national_market_share/q08_national_market_share.3.ast
@@ -5,7 +5,7 @@ RecordConstructor [
   (
     LiteralExpr [STRING] [year]
     :
-    Variable [ Name=year ]
+    Variable [ Name=$year ]
   )
   (
     LiteralExpr [STRING] [mkt_share]
@@ -17,7 +17,7 @@ RecordConstructor [
           FunctionCall tpch.switch-case@5[
             OperatorExpr [
               FieldAccessor [
-                Variable [ Name=i ]
+                Variable [ Name=$i ]
                 Field=s_name
               ]
               =
@@ -25,16 +25,16 @@ RecordConstructor [
             ]
             LiteralExpr [TRUE]
             FieldAccessor [
-              Variable [ Name=i ]
+              Variable [ Name=$i ]
               Field=revenue
             ]
             LiteralExpr [FALSE]
             LiteralExpr [DOUBLE] [0.0]
           ]
           ]
-          FROM [            Variable [ Name=t ]
+          FROM [            Variable [ Name=$t ]
             AS
-            Variable [ Name=i ]
+            Variable [ Name=$i ]
           ]
         )
       ]
@@ -43,13 +43,13 @@ RecordConstructor [
         (
           SELECT ELEMENT [
           FieldAccessor [
-            Variable [ Name=i ]
+            Variable [ Name=$i ]
             Field=revenue
           ]
           ]
-          FROM [            Variable [ Name=t ]
+          FROM [            Variable [ Name=$t ]
             AS
-            Variable [ Name=i ]
+            Variable [ Name=$i ]
           ]
         )
       ]
@@ -63,14 +63,14 @@ FROM [  (
       (
         LiteralExpr [STRING] [year]
         :
-        Variable [ Name=o_year ]
+        Variable [ Name=$o_year ]
       )
       (
         LiteralExpr [STRING] [revenue]
         :
         OperatorExpr [
           FieldAccessor [
-            Variable [ Name=slnrcop ]
+            Variable [ Name=$slnrcop ]
             Field=l_extendedprice
           ]
           *
@@ -78,7 +78,7 @@ FROM [  (
             LiteralExpr [LONG] [1]
             -
             FieldAccessor [
-              Variable [ Name=slnrcop ]
+              Variable [ Name=$slnrcop ]
               Field=l_discount
             ]
           ]
@@ -88,7 +88,7 @@ FROM [  (
         LiteralExpr [STRING] [s_name]
         :
         FieldAccessor [
-          Variable [ Name=n2 ]
+          Variable [ Name=$n2 ]
           Field=n_name
         ]
       )
@@ -101,7 +101,7 @@ FROM [  (
             LiteralExpr [STRING] [o_orderdate]
             :
             FieldAccessor [
-              Variable [ Name=lnrcop ]
+              Variable [ Name=$lnrcop ]
               Field=o_orderdate
             ]
           )
@@ -109,7 +109,7 @@ FROM [  (
             LiteralExpr [STRING] [l_discount]
             :
             FieldAccessor [
-              Variable [ Name=lnrcop ]
+              Variable [ Name=$lnrcop ]
               Field=l_discount
             ]
           )
@@ -117,7 +117,7 @@ FROM [  (
             LiteralExpr [STRING] [l_extendedprice]
             :
             FieldAccessor [
-              Variable [ Name=lnrcop ]
+              Variable [ Name=$lnrcop ]
               Field=l_extendedprice
             ]
           )
@@ -125,7 +125,7 @@ FROM [  (
             LiteralExpr [STRING] [l_suppkey]
             :
             FieldAccessor [
-              Variable [ Name=lnrcop ]
+              Variable [ Name=$lnrcop ]
               Field=l_suppkey
             ]
           )
@@ -133,7 +133,7 @@ FROM [  (
             LiteralExpr [STRING] [s_nationkey]
             :
             FieldAccessor [
-              Variable [ Name=s ]
+              Variable [ Name=$s ]
               Field=s_nationkey
             ]
           )
@@ -143,7 +143,7 @@ FROM [  (
             LiteralExpr [STRING] [Supplier]
           ]
           AS
-          Variable [ Name=s ]
+          Variable [ Name=$s ]
 ,
           (
             SELECT ELEMENT [
@@ -152,7 +152,7 @@ FROM [  (
                 LiteralExpr [STRING] [o_orderdate]
                 :
                 FieldAccessor [
-                  Variable [ Name=lnrco ]
+                  Variable [ Name=$lnrco ]
                   Field=o_orderdate
                 ]
               )
@@ -160,7 +160,7 @@ FROM [  (
                 LiteralExpr [STRING] [l_discount]
                 :
                 FieldAccessor [
-                  Variable [ Name=lnrco ]
+                  Variable [ Name=$lnrco ]
                   Field=l_discount
                 ]
               )
@@ -168,7 +168,7 @@ FROM [  (
                 LiteralExpr [STRING] [l_extendedprice]
                 :
                 FieldAccessor [
-                  Variable [ Name=lnrco ]
+                  Variable [ Name=$lnrco ]
                   Field=l_extendedprice
                 ]
               )
@@ -176,7 +176,7 @@ FROM [  (
                 LiteralExpr [STRING] [l_suppkey]
                 :
                 FieldAccessor [
-                  Variable [ Name=lnrco ]
+                  Variable [ Name=$lnrco ]
                   Field=l_suppkey
                 ]
               )
@@ -189,7 +189,7 @@ FROM [  (
                     LiteralExpr [STRING] [o_orderdate]
                     :
                     FieldAccessor [
-                      Variable [ Name=nrco ]
+                      Variable [ Name=$nrco ]
                       Field=o_orderdate
                     ]
                   )
@@ -197,7 +197,7 @@ FROM [  (
                     LiteralExpr [STRING] [l_partkey]
                     :
                     FieldAccessor [
-                      Variable [ Name=l ]
+                      Variable [ Name=$l ]
                       Field=l_partkey
                     ]
                   )
@@ -205,7 +205,7 @@ FROM [  (
                     LiteralExpr [STRING] [l_discount]
                     :
                     FieldAccessor [
-                      Variable [ Name=l ]
+                      Variable [ Name=$l ]
                       Field=l_discount
                     ]
                   )
@@ -213,7 +213,7 @@ FROM [  (
                     LiteralExpr [STRING] [l_extendedprice]
                     :
                     FieldAccessor [
-                      Variable [ Name=l ]
+                      Variable [ Name=$l ]
                       Field=l_extendedprice
                     ]
                   )
@@ -221,7 +221,7 @@ FROM [  (
                     LiteralExpr [STRING] [l_suppkey]
                     :
                     FieldAccessor [
-                      Variable [ Name=l ]
+                      Variable [ Name=$l ]
                       Field=l_suppkey
                     ]
                   )
@@ -231,7 +231,7 @@ FROM [  (
                     LiteralExpr [STRING] [LineItem]
                   ]
                   AS
-                  Variable [ Name=l ]
+                  Variable [ Name=$l ]
 ,
                   (
                     SELECT ELEMENT [
@@ -240,7 +240,7 @@ FROM [  (
                         LiteralExpr [STRING] [o_orderdate]
                         :
                         FieldAccessor [
-                          Variable [ Name=o ]
+                          Variable [ Name=$o ]
                           Field=o_orderdate
                         ]
                       )
@@ -248,7 +248,7 @@ FROM [  (
                         LiteralExpr [STRING] [o_orderkey]
                         :
                         FieldAccessor [
-                          Variable [ Name=o ]
+                          Variable [ Name=$o ]
                           Field=o_orderkey
                         ]
                       )
@@ -258,7 +258,7 @@ FROM [  (
                         LiteralExpr [STRING] [Orders]
                       ]
                       AS
-                      Variable [ Name=o ]
+                      Variable [ Name=$o ]
 ,
                       (
                         SELECT ELEMENT [
@@ -267,7 +267,7 @@ FROM [  (
                             LiteralExpr [STRING] [c_custkey]
                             :
                             FieldAccessor [
-                              Variable [ Name=c ]
+                              Variable [ Name=$c ]
                               Field=c_custkey
                             ]
                           )
@@ -277,7 +277,7 @@ FROM [  (
                             LiteralExpr [STRING] [Customer]
                           ]
                           AS
-                          Variable [ Name=c ]
+                          Variable [ Name=$c ]
 ,
                           (
                             SELECT ELEMENT [
@@ -286,7 +286,7 @@ FROM [  (
                                 LiteralExpr [STRING] [n_nationkey]
                                 :
                                 FieldAccessor [
-                                  Variable [ Name=n1 ]
+                                  Variable [ Name=$n1 ]
                                   Field=n_nationkey
                                 ]
                               )
@@ -296,31 +296,31 @@ FROM [  (
                                 LiteralExpr [STRING] [Nation]
                               ]
                               AS
-                              Variable [ Name=n1 ]
+                              Variable [ Name=$n1 ]
 ,
                               FunctionCall Metadata.dataset@1[
                                 LiteralExpr [STRING] [Region]
                               ]
                               AS
-                              Variable [ Name=r1 ]
+                              Variable [ Name=$r1 ]
                             ]
                             Where
                               OperatorExpr [
                                 OperatorExpr [
                                   FieldAccessor [
-                                    Variable [ Name=n1 ]
+                                    Variable [ Name=$n1 ]
                                     Field=n_regionkey
                                   ]
                                   =
                                   FieldAccessor [
-                                    Variable [ Name=r1 ]
+                                    Variable [ Name=$r1 ]
                                     Field=r_regionkey
                                   ]
                                 ]
                                 and
                                 OperatorExpr [
                                   FieldAccessor [
-                                    Variable [ Name=r1 ]
+                                    Variable [ Name=$r1 ]
                                     Field=r_name
                                   ]
                                   =
@@ -329,57 +329,57 @@ FROM [  (
                               ]
                           )
                           AS
-                          Variable [ Name=nr ]
+                          Variable [ Name=$nr ]
                         ]
                         Where
                           OperatorExpr [
                             FieldAccessor [
-                              Variable [ Name=c ]
+                              Variable [ Name=$c ]
                               Field=c_nationkey
                             ]
                             =
                             FieldAccessor [
-                              Variable [ Name=nr ]
+                              Variable [ Name=$nr ]
                               Field=n_nationkey
                             ]
                           ]
                       )
                       AS
-                      Variable [ Name=nrc ]
+                      Variable [ Name=$nrc ]
                     ]
                     Where
                       OperatorExpr [
                         FieldAccessor [
-                          Variable [ Name=nrc ]
+                          Variable [ Name=$nrc ]
                           Field=c_custkey
                         ]
                         =
                         FieldAccessor [
-                          Variable [ Name=o ]
+                          Variable [ Name=$o ]
                           Field=o_custkey
                         ]
                       ]
                   )
                   AS
-                  Variable [ Name=nrco ]
+                  Variable [ Name=$nrco ]
                 ]
                 Where
                   OperatorExpr [
                     OperatorExpr [
                       FieldAccessor [
-                        Variable [ Name=l ]
+                        Variable [ Name=$l ]
                         Field=l_orderkey
                       ]
                       =
                       FieldAccessor [
-                        Variable [ Name=nrco ]
+                        Variable [ Name=$nrco ]
                         Field=o_orderkey
                       ]
                     ]
                     and
                     OperatorExpr [
                       FieldAccessor [
-                        Variable [ Name=nrco ]
+                        Variable [ Name=$nrco ]
                         Field=o_orderdate
                       ]
                       >=
@@ -388,7 +388,7 @@ FROM [  (
                     and
                     OperatorExpr [
                       FieldAccessor [
-                        Variable [ Name=nrco ]
+                        Variable [ Name=$nrco ]
                         Field=o_orderdate
                       ]
                       <
@@ -397,31 +397,31 @@ FROM [  (
                   ]
               )
               AS
-              Variable [ Name=lnrco ]
+              Variable [ Name=$lnrco ]
 ,
               FunctionCall Metadata.dataset@1[
                 LiteralExpr [STRING] [Part]
               ]
               AS
-              Variable [ Name=p ]
+              Variable [ Name=$p ]
             ]
             Where
               OperatorExpr [
                 OperatorExpr [
                   FieldAccessor [
-                    Variable [ Name=p ]
+                    Variable [ Name=$p ]
                     Field=p_partkey
                   ]
                   =
                   FieldAccessor [
-                    Variable [ Name=lnrco ]
+                    Variable [ Name=$lnrco ]
                     Field=l_partkey
                   ]
                 ]
                 and
                 OperatorExpr [
                   FieldAccessor [
-                    Variable [ Name=p ]
+                    Variable [ Name=$p ]
                     Field=p_type
                   ]
                   =
@@ -430,65 +430,69 @@ FROM [  (
               ]
           )
           AS
-          Variable [ Name=lnrcop ]
+          Variable [ Name=$lnrcop ]
         ]
         Where
           OperatorExpr [
             FieldAccessor [
-              Variable [ Name=s ]
+              Variable [ Name=$s ]
               Field=s_suppkey
             ]
             =
             FieldAccessor [
-              Variable [ Name=lnrcop ]
+              Variable [ Name=$lnrcop ]
               Field=l_suppkey
             ]
           ]
       )
       AS
-      Variable [ Name=slnrcop ]
+      Variable [ Name=$slnrcop ]
 ,
       FunctionCall Metadata.dataset@1[
         LiteralExpr [STRING] [Nation]
       ]
       AS
-      Variable [ Name=n2 ]
+      Variable [ Name=$n2 ]
     ]
-    LetVariable [ Name=o_year ]
+    Let Variable [ Name=$o_year ]
       :=
       FunctionCall tpch.get-year@1[
         FieldAccessor [
-          Variable [ Name=slnrcop ]
+          Variable [ Name=$slnrcop ]
           Field=o_orderdate
         ]
       ]
     Where
       OperatorExpr [
         FieldAccessor [
-          Variable [ Name=slnrcop ]
+          Variable [ Name=$slnrcop ]
           Field=s_nationkey
         ]
         =
         FieldAccessor [
-          Variable [ Name=n2 ]
+          Variable [ Name=$n2 ]
           Field=n_nationkey
         ]
       ]
   )
   AS
-  Variable [ Name=t ]
+  Variable [ Name=$t ]
 ]
 Groupby
-  Variable [ Name=year ]
+  Variable [ Name=$year ]
   :=
   FieldAccessor [
-    Variable [ Name=t ]
+    Variable [ Name=$t ]
     Field=year
   ]
-  With
-  Variable [ Name=t ]
+  GROUP AS
+  Variable [ Name=#1 ]
+  (
+  Variable [ Name=$t ]
+   AS t
+  )
 
 Orderby
-  Variable [ Name=year ]
+  Variable [ Name=$year ]
   ASC
 


Mime
View raw message