asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sjaco...@apache.org
Subject asterixdb git commit: ASTERIXDB-1587 Test upsert when using foreign datatype
Date Fri, 19 Aug 2016 01:52:44 GMT
Repository: asterixdb
Updated Branches:
  refs/heads/master 7cb2f9aef -> 15217bb8c


ASTERIXDB-1587 Test upsert when using foreign datatype

Change-Id: I4c374a44389af5916c8398afb3be8628b7872389
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1091
Sonar-Qube: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Till Westmann <tillw@apache.org>


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

Branch: refs/heads/master
Commit: 15217bb8c03631b506a8f4b33f1061bc5de2cbd5
Parents: 7cb2f9a
Author: Steven Glenn Jacobs <sjaco002@ucr.edu>
Authored: Thu Aug 18 17:44:51 2016 -0700
Committer: Steven Jacobs <sjaco002@ucr.edu>
Committed: Thu Aug 18 18:52:17 2016 -0700

----------------------------------------------------------------------
 .../drop-dataverse/drop-dataverse.1.ddl.aql     |  2 +-
 .../issue1587-foreignDataType.1.ddl.aql         | 38 ++++++++++++++++++++
 .../issue1587-foreignDataType.2.update.aql      | 38 ++++++++++++++++++++
 .../issue1587-foreignDataType.3.query.aql       | 30 ++++++++++++++++
 .../issue1587-foreignDataType.1.adm             |  2 ++
 .../src/test/resources/runtimets/testsuite.xml  |  5 +++
 6 files changed, 114 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/asterixdb/blob/15217bb8/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/drop-dataverse/drop-dataverse.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/drop-dataverse/drop-dataverse.1.ddl.aql
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/drop-dataverse/drop-dataverse.1.ddl.aql
index b9b280c..c71bc9b 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/drop-dataverse/drop-dataverse.1.ddl.aql
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/drop-dataverse/drop-dataverse.1.ddl.aql
@@ -25,8 +25,8 @@
  */
 
 
-drop dataverse a if exists;
 drop dataverse b if exists;
+drop dataverse a if exists;
 create dataverse a;
 create dataverse b;
 

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/15217bb8/asterixdb/asterix-app/src/test/resources/runtimets/queries/upsert/issue1587-foreignDataType/issue1587-foreignDataType.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/upsert/issue1587-foreignDataType/issue1587-foreignDataType.1.ddl.aql
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/upsert/issue1587-foreignDataType/issue1587-foreignDataType.1.ddl.aql
new file mode 100644
index 0000000..e64f67c
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/upsert/issue1587-foreignDataType/issue1587-foreignDataType.1.ddl.aql
@@ -0,0 +1,38 @@
+/*
+ * 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  : Upsert into a dataset which has a foreign datatype
+ * Expected Res : Success
+ * Date         : Aug 18th 2016
+ */
+
+drop dataverse b if exists;
+drop dataverse a if exists;
+create dataverse a;
+create dataverse b;
+use dataverse a;
+
+create type TypeA as closed{
+id:int32,
+age:int32
+};
+
+use dataverse b;
+
+create dataset UpsertTo(a.TypeA) primary key id;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/15217bb8/asterixdb/asterix-app/src/test/resources/runtimets/queries/upsert/issue1587-foreignDataType/issue1587-foreignDataType.2.update.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/upsert/issue1587-foreignDataType/issue1587-foreignDataType.2.update.aql
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/upsert/issue1587-foreignDataType/issue1587-foreignDataType.2.update.aql
new file mode 100644
index 0000000..6c3f6b4
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/upsert/issue1587-foreignDataType/issue1587-foreignDataType.2.update.aql
@@ -0,0 +1,38 @@
+/*
+ * 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  : Upsert into a dataset which has a foreign datatype
+ * Expected Res : Success
+ * Date         : Aug 18th 2016
+ */
+
+// upsert UpsertFrom into UpsertTo
+use dataverse b;
+
+upsert into dataset UpsertTo(
+{"id":1,"age":7}
+);
+
+upsert into dataset UpsertTo(
+{"id":2,"age":8}
+);
+
+upsert into dataset UpsertTo(
+{"id":1,"age":9}
+);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/15217bb8/asterixdb/asterix-app/src/test/resources/runtimets/queries/upsert/issue1587-foreignDataType/issue1587-foreignDataType.3.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/upsert/issue1587-foreignDataType/issue1587-foreignDataType.3.query.aql
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/upsert/issue1587-foreignDataType/issue1587-foreignDataType.3.query.aql
new file mode 100644
index 0000000..1f85348
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/upsert/issue1587-foreignDataType/issue1587-foreignDataType.3.query.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.
+ */
+/*
+ * Description  : Upsert into a dataset which has a foreign datatype
+ * Expected Res : Success
+ * Date         : Aug 18th 2016
+ */
+
+use dataverse b;
+
+for $x in dataset UpsertTo
+order by $x.id
+return $x;
+

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/15217bb8/asterixdb/asterix-app/src/test/resources/runtimets/results/upsert/issue1587-foreignDataType/issue1587-foreignDataType.1.adm
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/upsert/issue1587-foreignDataType/issue1587-foreignDataType.1.adm
b/asterixdb/asterix-app/src/test/resources/runtimets/results/upsert/issue1587-foreignDataType/issue1587-foreignDataType.1.adm
new file mode 100644
index 0000000..ab1f6f2
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/upsert/issue1587-foreignDataType/issue1587-foreignDataType.1.adm
@@ -0,0 +1,2 @@
+{ "id": 1, "age": 9 }
+{ "id": 2, "age": 8 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/15217bb8/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 749965e..6b63ff0 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite.xml
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite.xml
@@ -257,6 +257,11 @@
       </compilation-unit>
     </test-case>
     <test-case FilePath="upsert">
+      <compilation-unit name="issue1587-foreignDataType">
+        <output-dir compare="Text">issue1587-foreignDataType</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="upsert">
       <compilation-unit name="nested-index">
         <output-dir compare="Text">nested-index</output-dir>
       </compilation-unit>


Mime
View raw message