asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wangs...@apache.org
Subject [1/2] incubator-asterixdb git commit: ASTERIXDB-1157: Pushdown Limit
Date Fri, 12 Feb 2016 07:51:34 GMT
Repository: incubator-asterixdb
Updated Branches:
  refs/heads/master a1c45ff45 -> 760ce9041


http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/760ce904/asterix-app/src/test/resources/runtimets/queries/orderby_limit/orderby_limit_primary_index_01/orderby_limit_primary_index_01.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/orderby_limit/orderby_limit_primary_index_01/orderby_limit_primary_index_01.1.ddl.aql
b/asterix-app/src/test/resources/runtimets/queries/orderby_limit/orderby_limit_primary_index_01/orderby_limit_primary_index_01.1.ddl.aql
new file mode 100644
index 0000000..e821faf
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/orderby_limit/orderby_limit_primary_index_01/orderby_limit_primary_index_01.1.ddl.aql
@@ -0,0 +1,53 @@
+/*
+ * 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 Push-down into an external sort after an index-search - order
by the primary key field.
+ *  Expected Result : Success
+ *
+*/
+
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+create type MyRecord as closed {
+  id: int64,
+  docid: int64,
+  val1: int64,
+  title: string,
+  point: point,
+  kwds: string,
+  line1: line,
+  line2: line,
+  poly1: polygon,
+  poly2: polygon,
+  rec: rectangle,
+  circle: circle
+}
+
+create dataset MyData(MyRecord)
+  primary key id;
+
+create index btree_index_docid on MyData(docid) type btree;
+create index btree_index_val1 on MyData(val1) type btree;
+create index rtree_index_point on MyData(point) type rtree;
+create index rtree_index_rec on MyData(rec) type rtree;
+create index ngram_index_title on MyData(title) type ngram(3);
+create index keyword_index_title on MyData(title) type keyword;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/760ce904/asterix-app/src/test/resources/runtimets/queries/orderby_limit/orderby_limit_primary_index_01/orderby_limit_primary_index_01.2.update.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/orderby_limit/orderby_limit_primary_index_01/orderby_limit_primary_index_01.2.update.aql
b/asterix-app/src/test/resources/runtimets/queries/orderby_limit/orderby_limit_primary_index_01/orderby_limit_primary_index_01.2.update.aql
new file mode 100644
index 0000000..07eb916
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/orderby_limit/orderby_limit_primary_index_01/orderby_limit_primary_index_01.2.update.aql
@@ -0,0 +1,31 @@
+/*
+ * 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 Push-down into an external sort after an index-search - order
by the primary key field.
+ *  Expected Result : Success
+ *
+*/
+
+ use dataverse test;
+
+load dataset MyData
+using "org.apache.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="asterix_nc1://data/spatial/spatialData2.json"),("format"="adm"));
+

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/760ce904/asterix-app/src/test/resources/runtimets/queries/orderby_limit/orderby_limit_primary_index_01/orderby_limit_primary_index_01.3.query.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/orderby_limit/orderby_limit_primary_index_01/orderby_limit_primary_index_01.3.query.aql
b/asterix-app/src/test/resources/runtimets/queries/orderby_limit/orderby_limit_primary_index_01/orderby_limit_primary_index_01.3.query.aql
new file mode 100644
index 0000000..95db56e
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/orderby_limit/orderby_limit_primary_index_01/orderby_limit_primary_index_01.3.query.aql
@@ -0,0 +1,32 @@
+/*
+ * 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 Push-down into an external sort after an index-search - order
by the primary key field.
+ *  Expected Result : Success
+ *
+*/
+
+use dataverse test;
+
+for $o in dataset('MyData')
+where $o.id < 50
+order by $o.id
+limit 2
+return {"pk":$o.id, "sk":$o.docid}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/760ce904/asterix-app/src/test/resources/runtimets/results/index-selection/btree-index-limit-orderby-01/btree-index-limit-orderby-01.1.adm
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/results/index-selection/btree-index-limit-orderby-01/btree-index-limit-orderby-01.1.adm
b/asterix-app/src/test/resources/runtimets/results/index-selection/btree-index-limit-orderby-01/btree-index-limit-orderby-01.1.adm
new file mode 100644
index 0000000..77076cd
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/index-selection/btree-index-limit-orderby-01/btree-index-limit-orderby-01.1.adm
@@ -0,0 +1,2 @@
+{ "pk": 1, "sk": 1 }
+{ "pk": 2, "sk": 2 }

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/760ce904/asterix-app/src/test/resources/runtimets/results/index-selection/btree-index-limit-orderby-02/btree-index-limit-orderby-02.1.adm
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/results/index-selection/btree-index-limit-orderby-02/btree-index-limit-orderby-02.1.adm
b/asterix-app/src/test/resources/runtimets/results/index-selection/btree-index-limit-orderby-02/btree-index-limit-orderby-02.1.adm
new file mode 100644
index 0000000..77076cd
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/index-selection/btree-index-limit-orderby-02/btree-index-limit-orderby-02.1.adm
@@ -0,0 +1,2 @@
+{ "pk": 1, "sk": 1 }
+{ "pk": 2, "sk": 2 }

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/760ce904/asterix-app/src/test/resources/runtimets/results/orderby_limit/orderby_limit_01/orderby_limit_01.1.adm
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/results/orderby_limit/orderby_limit_01/orderby_limit_01.1.adm
b/asterix-app/src/test/resources/runtimets/results/orderby_limit/orderby_limit_01/orderby_limit_01.1.adm
new file mode 100644
index 0000000..77076cd
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/orderby_limit/orderby_limit_01/orderby_limit_01.1.adm
@@ -0,0 +1,2 @@
+{ "pk": 1, "sk": 1 }
+{ "pk": 2, "sk": 2 }

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/760ce904/asterix-app/src/test/resources/runtimets/results/orderby_limit/orderby_limit_offset_01/orderby_limit_offset_01.1.adm
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/results/orderby_limit/orderby_limit_offset_01/orderby_limit_offset_01.1.adm
b/asterix-app/src/test/resources/runtimets/results/orderby_limit/orderby_limit_offset_01/orderby_limit_offset_01.1.adm
new file mode 100644
index 0000000..1c4d1bd
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/orderby_limit/orderby_limit_offset_01/orderby_limit_offset_01.1.adm
@@ -0,0 +1,2 @@
+{ "pk": 3, "sk": 3 }
+{ "pk": 4, "sk": 4 }

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/760ce904/asterix-app/src/test/resources/runtimets/results/orderby_limit/orderby_limit_primary_index_01/orderby_limit_primary_index_01.1.adm
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/results/orderby_limit/orderby_limit_primary_index_01/orderby_limit_primary_index_01.1.adm
b/asterix-app/src/test/resources/runtimets/results/orderby_limit/orderby_limit_primary_index_01/orderby_limit_primary_index_01.1.adm
new file mode 100644
index 0000000..77076cd
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/orderby_limit/orderby_limit_primary_index_01/orderby_limit_primary_index_01.1.adm
@@ -0,0 +1,2 @@
+{ "pk": 1, "sk": 1 }
+{ "pk": 2, "sk": 2 }

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/760ce904/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 9b03eaf..ac1f8f2 100644
--- a/asterix-app/src/test/resources/runtimets/testsuite.xml
+++ b/asterix-app/src/test/resources/runtimets/testsuite.xml
@@ -4284,6 +4284,23 @@
             </compilation-unit>
         </test-case>
     </test-group>
+    <test-group name="orderby_limit">
+        <test-case FilePath="orderby_limit">
+            <compilation-unit name="orderby_limit_01">
+                <output-dir compare="Text">orderby_limit_01</output-dir>
+            </compilation-unit>
+        </test-case>
+        <test-case FilePath="orderby_limit">
+            <compilation-unit name="orderby_limit_offset_01">
+                <output-dir compare="Text">orderby_limit_offset_01</output-dir>
+            </compilation-unit>
+        </test-case>
+        <test-case FilePath="orderby_limit">
+            <compilation-unit name="orderby_limit_primary_index_01">
+                <output-dir compare="Text">orderby_limit_primary_index_01</output-dir>
+            </compilation-unit>
+        </test-case>
+    </test-group>
     <test-group name="quantifiers">
         <test-case FilePath="quantifiers">
             <compilation-unit name="everysat_01">


Mime
View raw message