asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wangs...@apache.org
Subject incubator-asterixdb git commit: ASTERIXDB-1204: fixed LIMIT pushdown into join
Date Sun, 14 Feb 2016 18:34:25 GMT
Repository: incubator-asterixdb
Updated Branches:
  refs/heads/master 5a2698d9b -> a516390aa


ASTERIXDB-1204: fixed LIMIT pushdown into join

 - Added a test case

Change-Id: Id4bb09bddca64b26598d693d295fdc3ec9d63052
Reviewed-on: https://asterix-gerrit.ics.uci.edu/633
Reviewed-by: Yingyi Bu <buyingyi@gmail.com>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>


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

Branch: refs/heads/master
Commit: a516390aa0baa24e4b31150a293e4958a5731cf9
Parents: 5a2698d
Author: Taewoo Kim <wangsaeu@yahoo.com>
Authored: Sun Feb 14 10:17:15 2016 -0800
Committer: Taewoo Kim <wangsaeu@gmail.com>
Committed: Sun Feb 14 10:29:43 2016 -0800

----------------------------------------------------------------------
 .../limit_on_variable_01.1.ddl.aql              | 37 ++++++++++++
 .../limit_on_variable_01.2.update.aql           | 59 ++++++++++++++++++++
 .../limit_on_variable_01.3.query.aql            | 46 +++++++++++++++
 .../limit_on_variable_01.1.adm                  |  1 +
 .../src/test/resources/runtimets/testsuite.xml  |  5 ++
 5 files changed, 148 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/a516390a/asterix-app/src/test/resources/runtimets/queries/orderby_limit/limit_on_variable_01/limit_on_variable_01.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/orderby_limit/limit_on_variable_01/limit_on_variable_01.1.ddl.aql
b/asterix-app/src/test/resources/runtimets/queries/orderby_limit/limit_on_variable_01/limit_on_variable_01.1.ddl.aql
new file mode 100644
index 0000000..11daffe
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/orderby_limit/limit_on_variable_01/limit_on_variable_01.1.ddl.aql
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/*
+ *  Description     : Limit on a variable should work.
+ *  Issue           : ASTERIXDB-1204
+ *  Expected Result : Success
+ *
+*/
+
+drop dataverse ifVerse if exists;
+create dataverse ifVerse;
+use dataverse ifVerse;
+
+create type ifType as open
+{
+    id: int32
+}
+
+create dataset ifds(ifType)
+primary key id;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/a516390a/asterix-app/src/test/resources/runtimets/queries/orderby_limit/limit_on_variable_01/limit_on_variable_01.2.update.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/orderby_limit/limit_on_variable_01/limit_on_variable_01.2.update.aql
b/asterix-app/src/test/resources/runtimets/queries/orderby_limit/limit_on_variable_01/limit_on_variable_01.2.update.aql
new file mode 100644
index 0000000..88d1d2a
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/orderby_limit/limit_on_variable_01/limit_on_variable_01.2.update.aql
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/*
+ *  Description     : Limit on a variable should work.
+ *  Issue           : ASTERIXDB-1204
+ *  Expected Result : Success
+ *
+*/
+
+use dataverse ifVerse;
+
+insert into dataset ifds(
+{
+  "id":0,
+  "names":{
+    "count": "1",
+    "name" :{
+      "firstName" : "wail",
+      "lastName" : "Alkowaileet"
+    }
+  }
+}
+);
+
+insert into dataset ifds(
+{
+  "id":1,
+  "names":{
+    "count": "2",
+    "name" :[
+    {
+      "firstName" : "wail",
+      "lastName" : "Alkowaileet"
+    },
+    {
+      "firstName" : "Sattam",
+      "lastName" : "Alsubaiee"
+    }
+    ]
+  }
+}
+);

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/a516390a/asterix-app/src/test/resources/runtimets/queries/orderby_limit/limit_on_variable_01/limit_on_variable_01.3.query.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/orderby_limit/limit_on_variable_01/limit_on_variable_01.3.query.aql
b/asterix-app/src/test/resources/runtimets/queries/orderby_limit/limit_on_variable_01/limit_on_variable_01.3.query.aql
new file mode 100644
index 0000000..c2015b6
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/orderby_limit/limit_on_variable_01/limit_on_variable_01.3.query.aql
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/*
+ *  Description     : Limit on a variable should work.
+ *  Issue           : ASTERIXDB-1204
+ *  Expected Result : Success
+ *
+*/
+
+use dataverse ifVerse;
+
+let $coAuthList := (for $x in dataset ifds
+let $nameString := "names"
+where $x.names.count != "1"
+return
+{$nameString:$x.names.name}
+)
+
+let $coAuth := (for $x in $coAuthList
+for $y in $x.names
+return {
+"firstName" : $y.firstName,
+"lastName" : $y.lastName
+}
+)
+
+for $x in $coAuth
+limit 1
+return $x;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/a516390a/asterix-app/src/test/resources/runtimets/results/orderby_limit/limit_on_variable_01/limit_on_variable_01.1.adm
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/results/orderby_limit/limit_on_variable_01/limit_on_variable_01.1.adm
b/asterix-app/src/test/resources/runtimets/results/orderby_limit/limit_on_variable_01/limit_on_variable_01.1.adm
new file mode 100644
index 0000000..aa0442d
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/orderby_limit/limit_on_variable_01/limit_on_variable_01.1.adm
@@ -0,0 +1 @@
+{ "firstName": "wail", "lastName": "Alkowaileet" }

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/a516390a/asterix-app/src/test/resources/runtimets/testsuite.xml
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/testsuite.xml b/asterix-app/src/test/resources/runtimets/testsuite.xml
index 99b195d..48dcbb4 100644
--- a/asterix-app/src/test/resources/runtimets/testsuite.xml
+++ b/asterix-app/src/test/resources/runtimets/testsuite.xml
@@ -4296,6 +4296,11 @@
     </test-group>
     <test-group name="orderby_limit">
         <test-case FilePath="orderby_limit">
+            <compilation-unit name="limit_on_variable_01">
+                <output-dir compare="Text">limit_on_variable_01</output-dir>
+            </compilation-unit>
+        </test-case>
+        <test-case FilePath="orderby_limit">
             <compilation-unit name="orderby_limit_01">
                 <output-dir compare="Text">orderby_limit_01</output-dir>
             </compilation-unit>


Mime
View raw message