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/07/28 16:06:54 UTC
asterixdb git commit: ASTERIXDB-769: adds a regression test.
Repository: asterixdb
Updated Branches:
refs/heads/master dbfd22ed0 -> a2a402afd
ASTERIXDB-769: adds a regression test.
Change-Id: Ifaa6a37de981c5f60a416db85d3485d042558f63
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1027
Reviewed-by: Michael Blow <mb...@apache.org>
Tested-by: Michael Blow <mb...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/asterixdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/asterixdb/commit/a2a402af
Tree: http://git-wip-us.apache.org/repos/asf/asterixdb/tree/a2a402af
Diff: http://git-wip-us.apache.org/repos/asf/asterixdb/diff/a2a402af
Branch: refs/heads/master
Commit: a2a402afdb78c152a185841ba60db1d4cbc52677
Parents: dbfd22e
Author: Yingyi Bu <yi...@couchbase.com>
Authored: Wed Jul 27 09:45:56 2016 -0700
Committer: Yingyi Bu <bu...@gmail.com>
Committed: Thu Jul 28 09:04:35 2016 -0700
----------------------------------------------------------------------
.../query-ASTERIXDB-769.1.ddl.aql | 35 +++++++++++++
.../query-ASTERIXDB-769.2.update.aql | 52 ++++++++++++++++++++
.../query-ASTERIXDB-769.3.query.aql | 32 ++++++++++++
.../query-ASTERIXDB-769.1.adm | 4 ++
.../src/test/resources/runtimets/testsuite.xml | 5 ++
5 files changed, 128 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/a2a402af/asterixdb/asterix-app/src/test/resources/runtimets/queries/leftouterjoin/query-ASTERIXDB-769/query-ASTERIXDB-769.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/leftouterjoin/query-ASTERIXDB-769/query-ASTERIXDB-769.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/leftouterjoin/query-ASTERIXDB-769/query-ASTERIXDB-769.1.ddl.aql
new file mode 100644
index 0000000..51460ff
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/leftouterjoin/query-ASTERIXDB-769/query-ASTERIXDB-769.1.ddl.aql
@@ -0,0 +1,35 @@
+/*
+ * 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 Type1 as closed {
+id: int32,
+items: [
+{ subid: string, value: int32 }
+]
+}
+create type Type2 as closed
+{ id: string, val: int32 }
+
+create dataset Dataset1(Type1) primary key id;
+
+create dataset Dataset2(Type2) primary key id;
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/a2a402af/asterixdb/asterix-app/src/test/resources/runtimets/queries/leftouterjoin/query-ASTERIXDB-769/query-ASTERIXDB-769.2.update.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/leftouterjoin/query-ASTERIXDB-769/query-ASTERIXDB-769.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/leftouterjoin/query-ASTERIXDB-769/query-ASTERIXDB-769.2.update.aql
new file mode 100644
index 0000000..2b82631
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/leftouterjoin/query-ASTERIXDB-769/query-ASTERIXDB-769.2.update.aql
@@ -0,0 +1,52 @@
+/*
+ * 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 Dataset1 (
+{ "id": 1, "items": [
+{ "subid": "2", "value": 1 }
+,
+{ "subid": "4", "value": 1111 }
+] }
+)
+insert into dataset Dataset1 (
+{ "id": 2, "items": [
+{ "subid": "0", "value": 1 }
+,
+{ "subid": "1", "value": 2222 }
+] }
+)
+insert into dataset Dataset2 (
+{ "id": "0", "val": 0 }
+)
+insert into dataset Dataset2 (
+{ "id": "1", "val": 1 }
+)
+insert into dataset Dataset2 (
+{ "id": "2", "val": 2 }
+)
+insert into dataset Dataset2 (
+{ "id": "3", "val": 3 }
+)
+insert into dataset Dataset2 (
+{ "id": "4", "val": 4 }
+)
+
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/a2a402af/asterixdb/asterix-app/src/test/resources/runtimets/queries/leftouterjoin/query-ASTERIXDB-769/query-ASTERIXDB-769.3.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/leftouterjoin/query-ASTERIXDB-769/query-ASTERIXDB-769.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/leftouterjoin/query-ASTERIXDB-769/query-ASTERIXDB-769.3.query.aql
new file mode 100644
index 0000000..2dd7673
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/leftouterjoin/query-ASTERIXDB-769/query-ASTERIXDB-769.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.
+ */
+
+use dataverse test;
+
+for $i in dataset Dataset1
+for $j in $i.items
+order by $i.id, $j.value
+return {
+ "id": $i.id,
+ "items":
+ for $k in dataset Dataset2
+ order by $k.id
+ return { "subid": $k.id, "value": switch-case($k.id = $j.subid, true, $j.value, false, $k.val) }
+}
+
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/a2a402af/asterixdb/asterix-app/src/test/resources/runtimets/results/leftouterjoin/query-ASTERIXDB-769/query-ASTERIXDB-769.1.adm
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/leftouterjoin/query-ASTERIXDB-769/query-ASTERIXDB-769.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/leftouterjoin/query-ASTERIXDB-769/query-ASTERIXDB-769.1.adm
new file mode 100644
index 0000000..595e05b
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/leftouterjoin/query-ASTERIXDB-769/query-ASTERIXDB-769.1.adm
@@ -0,0 +1,4 @@
+{ "id": 1, "items": [ { "subid": "0", "value": 0 }, { "subid": "1", "value": 1 }, { "subid": "2", "value": 1 }, { "subid": "3", "value": 3 }, { "subid": "4", "value": 4 } ] }
+{ "id": 1, "items": [ { "subid": "0", "value": 0 }, { "subid": "1", "value": 1 }, { "subid": "2", "value": 2 }, { "subid": "3", "value": 3 }, { "subid": "4", "value": 1111 } ] }
+{ "id": 2, "items": [ { "subid": "0", "value": 1 }, { "subid": "1", "value": 1 }, { "subid": "2", "value": 2 }, { "subid": "3", "value": 3 }, { "subid": "4", "value": 4 } ] }
+{ "id": 2, "items": [ { "subid": "0", "value": 0 }, { "subid": "1", "value": 2222 }, { "subid": "2", "value": 2 }, { "subid": "3", "value": 3 }, { "subid": "4", "value": 4 } ] }
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/a2a402af/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 deee18f..619b378 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite.xml
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite.xml
@@ -6774,6 +6774,11 @@
<output-dir compare="Text">query_issue849-2</output-dir>
</compilation-unit>
</test-case>
+ <test-case FilePath="leftouterjoin">
+ <compilation-unit name="query-ASTERIXDB-769">
+ <output-dir compare="Text">query-ASTERIXDB-769</output-dir>
+ </compilation-unit>
+ </test-case>
</test-group>
<test-group name="index-leftouterjoin">
<test-case FilePath="index-leftouterjoin">