You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@asterixdb.apache.org by bu...@apache.org on 2016/06/04 06:47:44 UTC

incubator-asterixdb git commit: ASTERIXDB-1131 and ASTERIXDB-1230: add regression tests.

Repository: incubator-asterixdb
Updated Branches:
  refs/heads/master 3cfb695fc -> 91a840d5b


ASTERIXDB-1131 and ASTERIXDB-1230: add regression tests.

Change-Id: I3b520d27e2c9ea2fbbd0cf5fbbcfa6d24ed094d9
Reviewed-on: https://asterix-gerrit.ics.uci.edu/907
Reviewed-by: Jenkins <je...@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <je...@fulliautomatix.ics.uci.edu>
Reviewed-by: Jianfeng Jia <ji...@gmail.com>
Reviewed-by: Ildar Absalyamov <il...@gmail.com>


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

Branch: refs/heads/master
Commit: 91a840d5bbd95a5c31b9f2b9224af53f8c585399
Parents: 3cfb695
Author: Yingyi Bu <yi...@couchbase.com>
Authored: Fri Jun 3 21:42:49 2016 -0700
Committer: Ildar Absalyamov <il...@gmail.com>
Committed: Fri Jun 3 23:45:47 2016 -0700

----------------------------------------------------------------------
 .../query-ASTERIXDB-1230.1.ddl.aql              | 30 ++++++++++++++++++++
 .../query-ASTERIXDB-1230.2.update.aql           | 23 +++++++++++++++
 .../query-ASTERIXDB-1230.3.query.aql            | 23 +++++++++++++++
 .../query-ASTERIXDB-1230.4.ddl.aql              | 20 +++++++++++++
 .../query-ASTERIXDB-1131.1.query.aql            | 25 ++++++++++++++++
 .../query-ASTERIXDB-1131.1.query.aql            | 24 ++++++++++++++++
 .../query-ASTERIXDB-1230.1.adm                  |  1 +
 .../query-ASTERIXDB-1131-2.1.adm                |  3 ++
 .../query-ASTERIXDB-1131.1.adm                  |  2 ++
 .../src/test/resources/runtimets/testsuite.xml  | 15 ++++++++++
 10 files changed, 166 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/91a840d5/asterixdb/asterix-app/src/test/resources/runtimets/queries/aggregate/query-ASTERIXDB-1230/query-ASTERIXDB-1230.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/aggregate/query-ASTERIXDB-1230/query-ASTERIXDB-1230.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/aggregate/query-ASTERIXDB-1230/query-ASTERIXDB-1230.1.ddl.aql
new file mode 100644
index 0000000..acc0866
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/aggregate/query-ASTERIXDB-1230/query-ASTERIXDB-1230.1.ddl.aql
@@ -0,0 +1,30 @@
+/*
+ * 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.
+ */
+
+drop dataverse test if exists;
+create dataverse test
+use dataverse test
+
+create type listType as {
+  "id": int64,
+  "list": [int64]
+}
+
+create dataset listDS(listType) primary key id;
+

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/91a840d5/asterixdb/asterix-app/src/test/resources/runtimets/queries/aggregate/query-ASTERIXDB-1230/query-ASTERIXDB-1230.2.update.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/aggregate/query-ASTERIXDB-1230/query-ASTERIXDB-1230.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/aggregate/query-ASTERIXDB-1230/query-ASTERIXDB-1230.2.update.aql
new file mode 100644
index 0000000..ea52da4
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/aggregate/query-ASTERIXDB-1230/query-ASTERIXDB-1230.2.update.aql
@@ -0,0 +1,23 @@
+/*
+ * 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.
+ */
+
+use dataverse test;
+
+insert into dataset listDS({"id":1, "list":[1,2,3]});
+

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/91a840d5/asterixdb/asterix-app/src/test/resources/runtimets/queries/aggregate/query-ASTERIXDB-1230/query-ASTERIXDB-1230.3.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/aggregate/query-ASTERIXDB-1230/query-ASTERIXDB-1230.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/aggregate/query-ASTERIXDB-1230/query-ASTERIXDB-1230.3.query.aql
new file mode 100644
index 0000000..3ba701b
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/aggregate/query-ASTERIXDB-1230/query-ASTERIXDB-1230.3.query.aql
@@ -0,0 +1,23 @@
+/*
+ * 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.
+ */
+
+use dataverse test;
+
+for $x in dataset listDS
+return  avg($x.list);

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/91a840d5/asterixdb/asterix-app/src/test/resources/runtimets/queries/aggregate/query-ASTERIXDB-1230/query-ASTERIXDB-1230.4.ddl.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/aggregate/query-ASTERIXDB-1230/query-ASTERIXDB-1230.4.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/aggregate/query-ASTERIXDB-1230/query-ASTERIXDB-1230.4.ddl.aql
new file mode 100644
index 0000000..821b1a7
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/aggregate/query-ASTERIXDB-1230/query-ASTERIXDB-1230.4.ddl.aql
@@ -0,0 +1,20 @@
+/*
+ * 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.
+ */
+
+drop dataverse test;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/91a840d5/asterixdb/asterix-app/src/test/resources/runtimets/queries/list/query-ASTERIXDB-1131-2/query-ASTERIXDB-1131.1.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/list/query-ASTERIXDB-1131-2/query-ASTERIXDB-1131.1.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/list/query-ASTERIXDB-1131-2/query-ASTERIXDB-1131.1.query.aql
new file mode 100644
index 0000000..69a8926
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/list/query-ASTERIXDB-1131-2/query-ASTERIXDB-1131.1.query.aql
@@ -0,0 +1,25 @@
+/*
+ * 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.
+ */
+
+for $a in [
+null,
+starts-with("xy", null),
+starts-with("xy", "x")
+]
+return $a;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/91a840d5/asterixdb/asterix-app/src/test/resources/runtimets/queries/list/query-ASTERIXDB-1131/query-ASTERIXDB-1131.1.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/list/query-ASTERIXDB-1131/query-ASTERIXDB-1131.1.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/list/query-ASTERIXDB-1131/query-ASTERIXDB-1131.1.query.aql
new file mode 100644
index 0000000..680086b
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/list/query-ASTERIXDB-1131/query-ASTERIXDB-1131.1.query.aql
@@ -0,0 +1,24 @@
+/*
+ * 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.
+ */
+
+for $a in [
+starts-with("xyz", null),
+starts-with("xy", "x")
+]
+return $a;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/91a840d5/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/query-ASTERIXDB-1230/query-ASTERIXDB-1230.1.adm
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/query-ASTERIXDB-1230/query-ASTERIXDB-1230.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/query-ASTERIXDB-1230/query-ASTERIXDB-1230.1.adm
new file mode 100644
index 0000000..e64425e
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/aggregate/query-ASTERIXDB-1230/query-ASTERIXDB-1230.1.adm
@@ -0,0 +1 @@
+2.0d

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/91a840d5/asterixdb/asterix-app/src/test/resources/runtimets/results/list/query-ASTERIXDB-1131-2/query-ASTERIXDB-1131-2.1.adm
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/list/query-ASTERIXDB-1131-2/query-ASTERIXDB-1131-2.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/list/query-ASTERIXDB-1131-2/query-ASTERIXDB-1131-2.1.adm
new file mode 100644
index 0000000..d102f75
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/list/query-ASTERIXDB-1131-2/query-ASTERIXDB-1131-2.1.adm
@@ -0,0 +1,3 @@
+null
+null
+true

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/91a840d5/asterixdb/asterix-app/src/test/resources/runtimets/results/list/query-ASTERIXDB-1131/query-ASTERIXDB-1131.1.adm
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/list/query-ASTERIXDB-1131/query-ASTERIXDB-1131.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/list/query-ASTERIXDB-1131/query-ASTERIXDB-1131.1.adm
new file mode 100644
index 0000000..9e73731
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/list/query-ASTERIXDB-1131/query-ASTERIXDB-1131.1.adm
@@ -0,0 +1,2 @@
+null
+true

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/91a840d5/asterixdb/asterix-app/src/test/resources/runtimets/testsuite.xml
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite.xml b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite.xml
index 83945e3..adbf40f 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite.xml
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite.xml
@@ -795,6 +795,11 @@
         <output-dir compare="Text">sum_numeric_null</output-dir>
       </compilation-unit>
     </test-case>
+    <test-case FilePath="aggregate">
+      <compilation-unit name="query-ASTERIXDB-1230">
+        <output-dir compare="Text">query-ASTERIXDB-1230</output-dir>
+      </compilation-unit>
+    </test-case>
   </test-group>
   <test-group name="aggregate-sql">
     <test-case FilePath="aggregate-sql">
@@ -3024,6 +3029,16 @@
         <output-dir compare="Text">query-ASTERIXDB-673</output-dir>
       </compilation-unit>
     </test-case>
+    <test-case FilePath="list">
+      <compilation-unit name="query-ASTERIXDB-1131">
+        <output-dir compare="Text">query-ASTERIXDB-1131</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="list">
+      <compilation-unit name="query-ASTERIXDB-1131-2">
+        <output-dir compare="Text">query-ASTERIXDB-1131-2</output-dir>
+      </compilation-unit>
+    </test-case>
   </test-group>
   <test-group name="meta">
     <test-case FilePath="meta">