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/03/10 23:19:27 UTC

incubator-asterixdb git commit: ASTERIXDB-923: add a regression test.

Repository: incubator-asterixdb
Updated Branches:
  refs/heads/master ae555bab6 -> 1cc3bd950


ASTERIXDB-923: add a regression test.

Change-Id: I5cf9da76e078abba452652cbad204fa53c8bb678
Reviewed-on: https://asterix-gerrit.ics.uci.edu/700
Tested-by: Jenkins <je...@fulliautomatix.ics.uci.edu>
Reviewed-by: Michael Blow <mi...@couchbase.com>
Reviewed-by: Till Westmann <ti...@apache.org>


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

Branch: refs/heads/master
Commit: 1cc3bd950c9591164b4c7064e2a63f83cea58715
Parents: ae555ba
Author: Yingyi Bu <yi...@couchbase.com>
Authored: Tue Mar 8 23:34:38 2016 -0800
Committer: Yingyi Bu <bu...@gmail.com>
Committed: Thu Mar 10 14:14:28 2016 -0800

----------------------------------------------------------------------
 .../query-ASTERIXDB-923.1.ddl.aql               | 42 ++++++++++++++++++++
 .../query-ASTERIXDB-923.2.update.aql            | 24 +++++++++++
 .../query-ASTERIXDB-923.3.query.aql             | 26 ++++++++++++
 .../query-ASTERIXDB-923.4.query.aql             | 24 +++++++++++
 .../query-ASTERIXDB-923.5.query.aql             | 24 +++++++++++
 .../query-ASTERIXDB-923.1.adm                   | 10 +++++
 .../query-ASTERIXDB-923.2.adm                   | 10 +++++
 .../query-ASTERIXDB-923.3.adm                   | 10 +++++
 .../src/test/resources/runtimets/testsuite.xml  |  5 +++
 9 files changed, 175 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/1cc3bd95/asterix-app/src/test/resources/runtimets/queries/aggregate/query-ASTERIXDB-923/query-ASTERIXDB-923.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/aggregate/query-ASTERIXDB-923/query-ASTERIXDB-923.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/aggregate/query-ASTERIXDB-923/query-ASTERIXDB-923.1.ddl.aql
new file mode 100644
index 0000000..6b59fb3
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/aggregate/query-ASTERIXDB-923/query-ASTERIXDB-923.1.ddl.aql
@@ -0,0 +1,42 @@
+/*
+ * 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 EmploymentType as
+{
+  "organization-name" : string,
+  "start-date" : date,
+  "end-date" : date?
+}
+
+create type FacebookUserType as
+ closed {
+  id : int64,
+  alias : string,
+  name : string,
+  "user-since" : datetime,
+  "friend-ids" : {{int64}},
+  employment : [EmploymentType]
+}
+
+create dataset FacebookUsers (FacebookUserType) primary key id;
+

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/1cc3bd95/asterix-app/src/test/resources/runtimets/queries/aggregate/query-ASTERIXDB-923/query-ASTERIXDB-923.2.update.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/aggregate/query-ASTERIXDB-923/query-ASTERIXDB-923.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/aggregate/query-ASTERIXDB-923/query-ASTERIXDB-923.2.update.aql
new file mode 100644
index 0000000..ba7edb2
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/aggregate/query-ASTERIXDB-923/query-ASTERIXDB-923.2.update.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.
+ */
+
+use dataverse test;
+
+load dataset FacebookUsers using localfs
+(("path"="asterix_nc1://data/tinysocial/fbu.adm"),("format"="adm"));
+

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/1cc3bd95/asterix-app/src/test/resources/runtimets/queries/aggregate/query-ASTERIXDB-923/query-ASTERIXDB-923.3.query.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/aggregate/query-ASTERIXDB-923/query-ASTERIXDB-923.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/aggregate/query-ASTERIXDB-923/query-ASTERIXDB-923.3.query.aql
new file mode 100644
index 0000000..3faa9b6
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/aggregate/query-ASTERIXDB-923/query-ASTERIXDB-923.3.query.aql
@@ -0,0 +1,26 @@
+/*
+ * 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.
+ */
+
+/* This test verifies the fix for ASTERIXDB-923. */
+
+use dataverse test;
+
+for $g in
+(for $u in dataset FacebookUsers group by $u.id with $u return $u)
+return count(for $x in $g return $x)

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/1cc3bd95/asterix-app/src/test/resources/runtimets/queries/aggregate/query-ASTERIXDB-923/query-ASTERIXDB-923.4.query.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/aggregate/query-ASTERIXDB-923/query-ASTERIXDB-923.4.query.aql b/asterix-app/src/test/resources/runtimets/queries/aggregate/query-ASTERIXDB-923/query-ASTERIXDB-923.4.query.aql
new file mode 100644
index 0000000..689472f
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/aggregate/query-ASTERIXDB-923/query-ASTERIXDB-923.4.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.
+ */
+
+use dataverse test;
+
+for $g in
+(for $u in dataset FacebookUsers group by $u.id with $u return $u)
+return count($g)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/1cc3bd95/asterix-app/src/test/resources/runtimets/queries/aggregate/query-ASTERIXDB-923/query-ASTERIXDB-923.5.query.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/aggregate/query-ASTERIXDB-923/query-ASTERIXDB-923.5.query.aql b/asterix-app/src/test/resources/runtimets/queries/aggregate/query-ASTERIXDB-923/query-ASTERIXDB-923.5.query.aql
new file mode 100644
index 0000000..e1165b4
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/aggregate/query-ASTERIXDB-923/query-ASTERIXDB-923.5.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.
+ */
+
+use dataverse test;
+
+for $g in
+(for $u in dataset FacebookUsers group by $u.id with $u return $u)
+return count(for $x in (for $y in $g return $y) return $x)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/1cc3bd95/asterix-app/src/test/resources/runtimets/results/aggregate/query-ASTERIXDB-923/query-ASTERIXDB-923.1.adm
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/results/aggregate/query-ASTERIXDB-923/query-ASTERIXDB-923.1.adm b/asterix-app/src/test/resources/runtimets/results/aggregate/query-ASTERIXDB-923/query-ASTERIXDB-923.1.adm
new file mode 100644
index 0000000..d3d1712
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/aggregate/query-ASTERIXDB-923/query-ASTERIXDB-923.1.adm
@@ -0,0 +1,10 @@
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/1cc3bd95/asterix-app/src/test/resources/runtimets/results/aggregate/query-ASTERIXDB-923/query-ASTERIXDB-923.2.adm
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/results/aggregate/query-ASTERIXDB-923/query-ASTERIXDB-923.2.adm b/asterix-app/src/test/resources/runtimets/results/aggregate/query-ASTERIXDB-923/query-ASTERIXDB-923.2.adm
new file mode 100644
index 0000000..d3d1712
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/aggregate/query-ASTERIXDB-923/query-ASTERIXDB-923.2.adm
@@ -0,0 +1,10 @@
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/1cc3bd95/asterix-app/src/test/resources/runtimets/results/aggregate/query-ASTERIXDB-923/query-ASTERIXDB-923.3.adm
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/results/aggregate/query-ASTERIXDB-923/query-ASTERIXDB-923.3.adm b/asterix-app/src/test/resources/runtimets/results/aggregate/query-ASTERIXDB-923/query-ASTERIXDB-923.3.adm
new file mode 100644
index 0000000..d3d1712
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/aggregate/query-ASTERIXDB-923/query-ASTERIXDB-923.3.adm
@@ -0,0 +1,10 @@
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/1cc3bd95/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 67db6af..8411c5a 100644
--- a/asterix-app/src/test/resources/runtimets/testsuite.xml
+++ b/asterix-app/src/test/resources/runtimets/testsuite.xml
@@ -402,6 +402,11 @@
                 <output-dir compare="Text">count_null</output-dir>
             </compilation-unit>
         </test-case>
+         <test-case FilePath="aggregate">
+            <compilation-unit name="query-ASTERIXDB-923">
+                <output-dir compare="Text">query-ASTERIXDB-923</output-dir>
+            </compilation-unit>
+        </test-case>
         <!--
         <test-case FilePath="aggregate">
           <compilation-unit name="droptype">