Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 1BCA8200B78 for ; Fri, 19 Aug 2016 03:52:46 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 19F89160AB7; Fri, 19 Aug 2016 01:52:46 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 3AB65160AAE for ; Fri, 19 Aug 2016 03:52:45 +0200 (CEST) Received: (qmail 3303 invoked by uid 500); 19 Aug 2016 01:52:44 -0000 Mailing-List: contact commits-help@asterixdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@asterixdb.apache.org Delivered-To: mailing list commits@asterixdb.apache.org Received: (qmail 3294 invoked by uid 99); 19 Aug 2016 01:52:44 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Aug 2016 01:52:44 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 579A8E040F; Fri, 19 Aug 2016 01:52:44 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sjaco002@apache.org To: commits@asterixdb.apache.org Message-Id: <015c844bd7f842aab6649410e93e3772@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: asterixdb git commit: ASTERIXDB-1587 Test upsert when using foreign datatype Date: Fri, 19 Aug 2016 01:52:44 +0000 (UTC) archived-at: Fri, 19 Aug 2016 01:52:46 -0000 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 Tested-by: Jenkins Reviewed-by: Till Westmann 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 Authored: Thu Aug 18 17:44:51 2016 -0700 Committer: Steven Jacobs 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 @@ + + issue1587-foreignDataType + + + nested-index