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/10/19 02:32:19 UTC

[21/24] asterixdb git commit: Documentation cleanup.

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example/tiny-social-example.9.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example/tiny-social-example.9.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example/tiny-social-example.9.query.aql
new file mode 100644
index 0000000..aa9b8e2
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example/tiny-social-example.9.query.aql
@@ -0,0 +1,31 @@
+/*
+ * 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  : Testing get-object-fields under different queries.
+* Expected Res : Success
+* Date         : 04 Jun 2015
+*/
+use dataverse TinySocial;
+
+for $r in dataset TweetMessages
+for $f in get-object-fields($r)
+group by $n:=$f.field-name, $t:=$f.field-type with $r
+let $count:=count($r)
+order by $n, $t
+return {"field-name":$n, "field-type":$t, "count":$count};

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-add-fields/documentation-example/documentation-example.1.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-add-fields/documentation-example/documentation-example.1.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-add-fields/documentation-example/documentation-example.1.query.aql
new file mode 100644
index 0000000..b61eb95
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-add-fields/documentation-example/documentation-example.1.query.aql
@@ -0,0 +1,28 @@
+/*
+ * 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  : Testing object-add-fields under different queries.
+* Expected Res : Success
+* Date         : 04 Aug 2015
+*/
+        let $r1 := {"id":1,
+            "project":"AsterixDB",
+            "address":{"city":"Irvine", "state":"CA"},
+            "related":["Hivestrix", "Preglix", "Apache VXQuery"] }
+        return object-add-fields($r1, [{"field-name":"employment-location", "field-value":create-point(30.0,70.0)}])

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-add-fields/documentation-example/documentation-example.2.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-add-fields/documentation-example/documentation-example.2.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-add-fields/documentation-example/documentation-example.2.query.aql
new file mode 100644
index 0000000..a42c7da
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-add-fields/documentation-example/documentation-example.2.query.aql
@@ -0,0 +1,28 @@
+/*
+ * 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  : Testing object-add-fields under different queries.
+* Expected Res : Success
+* Date         : 04 Aug 2015
+*/
+        let $r1 := {"id":1,
+            "project":"AsterixDB",
+            "address":{"city":"Irvine", "state":"CA"},
+            "related":["Hivestrix", "Preglix", "Apache VXQuery"] }
+        return object-add-fields($r1, [{"field-name":"employment-type", "field-value":"visitor"}])
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-add-fields/documentation-example/documentation-example.3.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-add-fields/documentation-example/documentation-example.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-add-fields/documentation-example/documentation-example.3.query.aql
new file mode 100644
index 0000000..c28d00b
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-add-fields/documentation-example/documentation-example.3.query.aql
@@ -0,0 +1,28 @@
+/*
+ * 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  : Testing object-add-fields under different queries.
+* Expected Res : Success
+* Date         : 04 Aug 2015
+*/
+        let $r1 := {"id":1,
+            "project":"AsterixDB",
+            "address":{"city":"Irvine", "state":"CA"},
+            "related":["Hivestrix", "Preglix", "Apache VXQuery"] }
+        return object-add-fields($r1, [{"field-name":"employment-years", "field-value":2}])

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-add-fields/highly-nested-open/highly-nested-open.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-add-fields/highly-nested-open/highly-nested-open.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-add-fields/highly-nested-open/highly-nested-open.1.ddl.aql
new file mode 100644
index 0000000..6d6a7ae
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-add-fields/highly-nested-open/highly-nested-open.1.ddl.aql
@@ -0,0 +1,72 @@
+/*
+ * 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  : Testing object-add-fields under different queries.
+* Expected Res : Success
+* Date         : 04 Aug 2015
+*/
+drop dataverse test if exists;
+create dataverse test;
+
+use dataverse test;
+
+create type S as open{
+    id: int64
+}
+
+create type GS as open{
+    id: int64,
+    Genus: string
+}
+
+create type FGS as open{
+    id: int64,
+    Family: string
+}
+
+create type OFGS as open{
+    id: int64,
+    Order: string
+}
+
+create type COFGS as open{
+    id: int64,
+    Class: string
+}
+
+create type PCOFGS as open{
+    id: int64,
+    Phylum: string
+}
+
+create type KPCOFGS as open{
+    id: int64,
+    Kingdom: string
+}
+
+create type Classification as open{
+    id: int64
+}
+
+create type Animal as open{
+    id: int64
+}
+
+create dataset Animals(Animal)
+primary key id;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-add-fields/highly-nested-open/highly-nested-open.2.update.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-add-fields/highly-nested-open/highly-nested-open.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-add-fields/highly-nested-open/highly-nested-open.2.update.aql
new file mode 100644
index 0000000..c4b6997
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-add-fields/highly-nested-open/highly-nested-open.2.update.aql
@@ -0,0 +1,27 @@
+/*
+ * 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  : Testing object-add-fields under different queries.
+* Expected Res : Success
+* Date         : 04 Aug 2015
+*/
+use dataverse test;
+
+load dataset Animals using localfs
+(("path"="asterix_nc1://data/classifications/animals.adm"),("format"="adm"));

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-add-fields/highly-nested-open/highly-nested-open.3.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-add-fields/highly-nested-open/highly-nested-open.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-add-fields/highly-nested-open/highly-nested-open.3.query.aql
new file mode 100644
index 0000000..e117716
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-add-fields/highly-nested-open/highly-nested-open.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  : Testing object-add-fields under different queries.
+* Expected Res : Success
+* Date         : 04 Aug 2015
+*/
+use dataverse test;
+
+let $rec:=[{"field-name":"animal-info", "field-value":"Test information"}]
+for $test in dataset Animals
+let $result := object-add-fields($test, $rec)
+order by $result.id
+return $result;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-add-fields/tiny-social-example/tiny-social-example.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-add-fields/tiny-social-example/tiny-social-example.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-add-fields/tiny-social-example/tiny-social-example.1.ddl.aql
new file mode 100644
index 0000000..3f4ef83
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-add-fields/tiny-social-example/tiny-social-example.1.ddl.aql
@@ -0,0 +1,68 @@
+/*
+ * 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  : Testing object-add-fields under different queries.
+* Expected Res : Success
+* Date         : 04 Aug 2015
+*/
+
+drop dataverse TinySocial if exists;
+create dataverse TinySocial;
+use dataverse TinySocial;
+
+create type TwitterUserType as open {
+        screen-name: string,
+        lang: string,
+        friends_count: int64,
+        statuses_count: int64,
+        name: string,
+        followers_count: int64
+}
+
+create type TweetMessageType as closed {
+        tweetid: string,
+        user: TwitterUserType,
+        sender-location: point?,
+        send-time: datetime,
+        referred-topics: {{ string }},
+        message-text: string
+}
+
+create type EmploymentType as open {
+        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 type FacebookMessageType as closed {
+        message-id: int64,
+        author-id: int64,
+        in-response-to: int64?,
+        sender-location: point?,
+        message: string
+}

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-add-fields/tiny-social-example/tiny-social-example.2.ddl.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-add-fields/tiny-social-example/tiny-social-example.2.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-add-fields/tiny-social-example/tiny-social-example.2.ddl.aql
new file mode 100644
index 0000000..ca2ceee
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-add-fields/tiny-social-example/tiny-social-example.2.ddl.aql
@@ -0,0 +1,43 @@
+/*
+ * 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  : Testing object-add-fields under different queries.
+* Expected Res : Success
+* Date         : 04 Aug 2015
+*/
+
+use dataverse TinySocial;
+
+create dataset FacebookUsers(FacebookUserType)
+primary key id;
+
+create dataset FacebookMessages(FacebookMessageType)
+primary key message-id;
+
+create dataset TwitterUsers(TwitterUserType)
+primary key screen-name;
+
+create dataset TweetMessages(TweetMessageType)
+primary key tweetid
+hints(cardinality=100);
+
+create index fbUserSinceIdx on FacebookUsers(user-since);
+create index fbAuthorIdx on FacebookMessages(author-id) type btree;
+create index fbSenderLocIndex on FacebookMessages(sender-location) type rtree;
+create index fbMessageIdx on FacebookMessages(message) type keyword;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-add-fields/tiny-social-example/tiny-social-example.3.update.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-add-fields/tiny-social-example/tiny-social-example.3.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-add-fields/tiny-social-example/tiny-social-example.3.update.aql
new file mode 100644
index 0000000..9e1d3e7
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-add-fields/tiny-social-example/tiny-social-example.3.update.aql
@@ -0,0 +1,36 @@
+/*
+ * 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  : Testing object-add-fields under different queries.
+* Expected Res : Success
+* Date         : 04 Aug 2015
+*/
+use dataverse TinySocial;
+
+load dataset FacebookUsers using localfs
+(("path"="nc1://data/tinysocial/fbu.adm"),("format"="adm"));
+
+load dataset FacebookMessages using localfs
+(("path"="nc1://data/tinysocial/fbm.adm"),("format"="adm"));
+
+load dataset TwitterUsers using localfs
+(("path"="nc1://data/tinysocial/twu.adm"),("format"="adm"));
+
+load dataset TweetMessages using localfs
+(("path"="nc1://data/tinysocial/twm.adm"),("format"="adm"));

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-add-fields/tiny-social-example/tiny-social-example.4.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-add-fields/tiny-social-example/tiny-social-example.4.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-add-fields/tiny-social-example/tiny-social-example.4.query.aql
new file mode 100644
index 0000000..321aded
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-add-fields/tiny-social-example/tiny-social-example.4.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  : Testing object-add-fields under different queries.
+* Expected Res : Success
+* Date         : 04 Aug 2015
+*/
+use dataverse TinySocial;
+
+for $r in dataset TweetMessages
+for $f in dataset FacebookMessages
+let $result := object-add-fields($r, [{"field-name":"fb-author-id", "field-value":$f.author-id}])
+order by $result
+return $result

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-merge/documentation-example/documentation-example.1.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-merge/documentation-example/documentation-example.1.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-merge/documentation-example/documentation-example.1.query.aql
new file mode 100644
index 0000000..43cdf47
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-merge/documentation-example/documentation-example.1.query.aql
@@ -0,0 +1,28 @@
+/*
+ * 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  : object-merge under different queries.
+* Expected Res : Success
+* Date         : 04 Aug 2015
+*/
+let $r1 := {"id":1, "project":"AsterixDB",
+"address":{"city":"Irvine", "state":"CA"}, "related":["Hivestrix", "Preglix", "Apache VXQuery"]}
+let $r2 := {"user_id": 22, "employer": "UC Irvine", "employment-type": "visitor" }
+let $result := object-merge($r1, $r2)
+return $result

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-merge/documentation-example/documentation-example.2.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-merge/documentation-example/documentation-example.2.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-merge/documentation-example/documentation-example.2.query.aql
new file mode 100644
index 0000000..f147e68
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-merge/documentation-example/documentation-example.2.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.
+ */
+/*
+* Description  : object-merge under different queries.
+* Expected Res : Success
+* Date         : 04 Aug 2015
+*/
+        let $r1 := {"id":1,
+              "project":"AsterixDB",
+              "address":{"city":"Irvine", "state":"CA"},
+              "related":["Hivestrix", "Preglix", "Apache VXQuery"] }
+
+        let $r2 := {"user_id": 22,
+              "employer": "UC Irvine",
+              "employment-location": create-point(30.0,70.0) }
+        return  object-merge($r1, $r2)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-merge/documentation-example/documentation-example.3.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-merge/documentation-example/documentation-example.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-merge/documentation-example/documentation-example.3.query.aql
new file mode 100644
index 0000000..a46c9de
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-merge/documentation-example/documentation-example.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.
+ */
+/*
+* Description  : object-merge under different queries.
+* Expected Res : Success
+* Date         : 04 Aug 2015
+*/
+        let $r1 := {"id":1,
+              "project":"AsterixDB",
+              "address":{"city":"Irvine", "state":"CA"},
+              "related":["Hivestrix", "Preglix", "Apache VXQuery"] }
+
+        let $r2 := {"user_id": 22,
+              "employer": "UC Irvine",
+              "address":{"city":"Irvine", "state":"CA"} }
+        return  object-merge($r1, $r2)

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-merge/highly-nested-open/highly-nested-open.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-merge/highly-nested-open/highly-nested-open.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-merge/highly-nested-open/highly-nested-open.1.ddl.aql
new file mode 100644
index 0000000..c543402
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-merge/highly-nested-open/highly-nested-open.1.ddl.aql
@@ -0,0 +1,72 @@
+/*
+ * 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  : Testing object-merge under different queries.
+* Expected Res : Success
+* Date         : 04 Aug 2015
+*/
+drop dataverse test if exists;
+create dataverse test;
+
+use dataverse test;
+
+create type S as open{
+    id: int64
+}
+
+create type GS as open{
+    id: int64,
+    Genus: string
+}
+
+create type FGS as open{
+    id: int64,
+    Family: string
+}
+
+create type OFGS as open{
+    id: int64,
+    Order: string
+}
+
+create type COFGS as open{
+    id: int64,
+    Class: string
+}
+
+create type PCOFGS as open{
+    id: int64,
+    Phylum: string
+}
+
+create type KPCOFGS as open{
+    id: int64,
+    Kingdom: string
+}
+
+create type Classification as open{
+    id: int64
+}
+
+create type Animal as open{
+    id: int64
+}
+
+create dataset Animals(Animal)
+primary key id;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-merge/highly-nested-open/highly-nested-open.2.update.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-merge/highly-nested-open/highly-nested-open.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-merge/highly-nested-open/highly-nested-open.2.update.aql
new file mode 100644
index 0000000..130d17f
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-merge/highly-nested-open/highly-nested-open.2.update.aql
@@ -0,0 +1,27 @@
+/*
+ * 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  : Testing object-merge under different queries.
+* Expected Res : Success
+* Date         : 04 Aug 2015
+*/
+use dataverse test;
+
+load dataset Animals using localfs
+(("path"="asterix_nc1://data/classifications/animals.adm"),("format"="adm"));

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-merge/highly-nested-open/highly-nested-open.3.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-merge/highly-nested-open/highly-nested-open.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-merge/highly-nested-open/highly-nested-open.3.query.aql
new file mode 100644
index 0000000..73ad03f
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-merge/highly-nested-open/highly-nested-open.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  : Testing object-merge under different queries.
+* Expected Res : Success
+* Date         : 04 Aug 2015
+*/
+use dataverse test;
+
+let $rec:={"animal-info": "Test information"}
+for $test in dataset Animals
+let $result := object-merge($test, $rec)
+order by $result.id
+return $result;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-merge/tiny-social-example/tiny-social-example.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-merge/tiny-social-example/tiny-social-example.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-merge/tiny-social-example/tiny-social-example.1.ddl.aql
new file mode 100644
index 0000000..c25a27d
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-merge/tiny-social-example/tiny-social-example.1.ddl.aql
@@ -0,0 +1,67 @@
+/*
+ * 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  : Testing object-merge under different queries.
+* Expected Res : Success
+* Date         : 04 Aug 2015
+*/
+drop dataverse TinySocial if exists;
+create dataverse TinySocial;
+use dataverse TinySocial;
+
+create type TwitterUserType as open {
+        screen-name: string,
+        lang: string,
+        friends_count: int64,
+        statuses_count: int64,
+        name: string,
+        followers_count: int64
+}
+
+create type TweetMessageType as closed {
+        tweetid: string,
+        user: TwitterUserType,
+        sender-location: point?,
+        send-time: datetime,
+        referred-topics: {{ string }},
+        message-text: string
+}
+
+create type EmploymentType as open {
+        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 type FacebookMessageType as closed {
+        message-id: int64,
+        author-id: int64,
+        in-response-to: int64?,
+        sender-location: point?,
+        message: string
+}

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-merge/tiny-social-example/tiny-social-example.2.ddl.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-merge/tiny-social-example/tiny-social-example.2.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-merge/tiny-social-example/tiny-social-example.2.ddl.aql
new file mode 100644
index 0000000..eb50feb
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-merge/tiny-social-example/tiny-social-example.2.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.
+ */
+/*
+* Description  : Testing object-merge under different queries.
+* Expected Res : Success
+* Date         : 04 Aug 2015
+*/
+use dataverse TinySocial;
+
+create dataset FacebookUsers(FacebookUserType)
+primary key id;
+
+create dataset FacebookMessages(FacebookMessageType)
+primary key message-id;
+
+create dataset TwitterUsers(TwitterUserType)
+primary key screen-name;
+
+create dataset TweetMessages(TweetMessageType)
+primary key tweetid
+hints(cardinality=100);
+
+create index fbUserSinceIdx on FacebookUsers(user-since);
+create index fbAuthorIdx on FacebookMessages(author-id) type btree;
+create index fbSenderLocIndex on FacebookMessages(sender-location) type rtree;
+create index fbMessageIdx on FacebookMessages(message) type keyword;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-merge/tiny-social-example/tiny-social-example.3.update.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-merge/tiny-social-example/tiny-social-example.3.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-merge/tiny-social-example/tiny-social-example.3.update.aql
new file mode 100644
index 0000000..cc1d457
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-merge/tiny-social-example/tiny-social-example.3.update.aql
@@ -0,0 +1,36 @@
+/*
+ * 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  : Testing object-merge under different queries.
+* Expected Res : Success
+* Date         : 04 Aug 2015
+*/
+use dataverse TinySocial;
+
+load dataset FacebookUsers using localfs
+(("path"="nc1://data/tinysocial/fbu.adm"),("format"="adm"));
+
+load dataset FacebookMessages using localfs
+(("path"="nc1://data/tinysocial/fbm.adm"),("format"="adm"));
+
+load dataset TwitterUsers using localfs
+(("path"="nc1://data/tinysocial/twu.adm"),("format"="adm"));
+
+load dataset TweetMessages using localfs
+(("path"="nc1://data/tinysocial/twm.adm"),("format"="adm"));

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-merge/tiny-social-example/tiny-social-example.4.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-merge/tiny-social-example/tiny-social-example.4.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-merge/tiny-social-example/tiny-social-example.4.query.aql
new file mode 100644
index 0000000..d47df97
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-merge/tiny-social-example/tiny-social-example.4.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  : Testing object-merge under different queries.
+* Expected Res : Success
+* Date         : 04 Aug 2015
+*/
+use dataverse TinySocial;
+
+for $r in dataset TweetMessages
+for $f in dataset FacebookMessages
+let $result := object-merge($r, $f)
+order by $result
+return $result

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-remove-fields/documentation-example/documentation-example.1.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-remove-fields/documentation-example/documentation-example.1.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-remove-fields/documentation-example/documentation-example.1.query.aql
new file mode 100644
index 0000000..6a995c2
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-remove-fields/documentation-example/documentation-example.1.query.aql
@@ -0,0 +1,28 @@
+/*
+ * 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  : object-remove-fields under different queries.
+* Expected Res : Success
+* Date         : 04 Aug 2015
+*/
+        let $r1 := {"id":1,
+            "project":"AsterixDB",
+            "address":{"city":"Irvine", "state":"CA"},
+            "related":["Hivestrix", "Preglix", "Apache VXQuery"] }
+        return object-remove-fields($r1, ["project"])

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-remove-fields/documentation-example/documentation-example.2.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-remove-fields/documentation-example/documentation-example.2.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-remove-fields/documentation-example/documentation-example.2.query.aql
new file mode 100644
index 0000000..d8e0a17
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-remove-fields/documentation-example/documentation-example.2.query.aql
@@ -0,0 +1,28 @@
+/*
+ * 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  : object-remove-fields under different queries.
+* Expected Res : Success
+* Date         : 04 Aug 2015
+*/
+        let $r1 := {"id":1,
+            "project":"AsterixDB",
+            "address":{"city":"Irvine", "state":"CA"},
+            "related":["Hivestrix", "Preglix", "Apache VXQuery"] }
+        return object-remove-fields($r1, [["address", "city"]])
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-remove-fields/documentation-example/documentation-example.3.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-remove-fields/documentation-example/documentation-example.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-remove-fields/documentation-example/documentation-example.3.query.aql
new file mode 100644
index 0000000..d53f56f
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-remove-fields/documentation-example/documentation-example.3.query.aql
@@ -0,0 +1,28 @@
+/*
+ * 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  : object-remove-fields under different queries.
+* Expected Res : Success
+* Date         : 04 Aug 2015
+*/
+        let $r1 := {"id":1,
+            "project":"AsterixDB",
+            "address":{"city":"Irvine", "state":"CA"},
+            "related":["Hivestrix", "Preglix", "Apache VXQuery"] }
+        return object-remove-fields($r1, [["address", "state"], ["address", "city"]])
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-remove-fields/highly-nested-open/highly-nested-open.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-remove-fields/highly-nested-open/highly-nested-open.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-remove-fields/highly-nested-open/highly-nested-open.1.ddl.aql
new file mode 100644
index 0000000..c56a332
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-remove-fields/highly-nested-open/highly-nested-open.1.ddl.aql
@@ -0,0 +1,72 @@
+/*
+ * 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  : Testing object-remove-fields under different queries.
+* Expected Res : Success
+* Date         : 04 Aug 2015
+*/
+drop dataverse test if exists;
+create dataverse test;
+
+use dataverse test;
+
+create type S as open{
+    id: int64
+}
+
+create type GS as open{
+    id: int64,
+    Genus: string
+}
+
+create type FGS as open{
+    id: int64,
+    Family: string
+}
+
+create type OFGS as open{
+    id: int64,
+    Order: string
+}
+
+create type COFGS as open{
+    id: int64,
+    Class: string
+}
+
+create type PCOFGS as open{
+    id: int64,
+    Phylum: string
+}
+
+create type KPCOFGS as open{
+    id: int64,
+    Kingdom: string
+}
+
+create type Classification as open{
+    id: int64
+}
+
+create type Animal as open{
+    id: int64
+}
+
+create dataset Animals(Animal)
+primary key id;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-remove-fields/highly-nested-open/highly-nested-open.2.update.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-remove-fields/highly-nested-open/highly-nested-open.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-remove-fields/highly-nested-open/highly-nested-open.2.update.aql
new file mode 100644
index 0000000..d1d0466
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-remove-fields/highly-nested-open/highly-nested-open.2.update.aql
@@ -0,0 +1,27 @@
+/*
+ * 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  : Testing object-remove-fields under different queries.
+* Expected Res : Success
+* Date         : 04 Aug 2015
+*/
+use dataverse test;
+
+load dataset Animals using localfs
+(("path"="asterix_nc1://data/classifications/animals.adm"),("format"="adm"));

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-remove-fields/highly-nested-open/highly-nested-open.3.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-remove-fields/highly-nested-open/highly-nested-open.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-remove-fields/highly-nested-open/highly-nested-open.3.query.aql
new file mode 100644
index 0000000..b319b81
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-remove-fields/highly-nested-open/highly-nested-open.3.query.aql
@@ -0,0 +1,29 @@
+/*
+ * 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  : Testing object-remove-fields under different queries.
+* Expected Res : Success
+* Date         : 04 Aug 2015
+*/
+use dataverse test;
+
+for $test in dataset Animals
+let $result := object-remove-fields($test, [["class", "fullClassification"]])
+order by $result.id
+return $result;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-remove-fields/tiny-social-example/tiny-social-example.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-remove-fields/tiny-social-example/tiny-social-example.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-remove-fields/tiny-social-example/tiny-social-example.1.ddl.aql
new file mode 100644
index 0000000..8a9981e
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-remove-fields/tiny-social-example/tiny-social-example.1.ddl.aql
@@ -0,0 +1,67 @@
+/*
+ * 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  : Testing object-remove-fields under different queries.
+* Expected Res : Success
+* Date         : 04 Aug 2015
+*/
+drop dataverse TinySocial if exists;
+create dataverse TinySocial;
+use dataverse TinySocial;
+
+create type TwitterUserType as open {
+        screen-name: string,
+        lang: string,
+        friends_count: int64,
+        statuses_count: int64,
+        name: string,
+        followers_count: int64
+}
+
+create type TweetMessageType as closed {
+        tweetid: string,
+        user: TwitterUserType,
+        sender-location: point?,
+        send-time: datetime,
+        referred-topics: {{ string }},
+        message-text: string
+}
+
+create type EmploymentType as open {
+        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 type FacebookMessageType as closed {
+        message-id: int64,
+        author-id: int64,
+        in-response-to: int64?,
+        sender-location: point?,
+        message: string
+}

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-remove-fields/tiny-social-example/tiny-social-example.2.ddl.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-remove-fields/tiny-social-example/tiny-social-example.2.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-remove-fields/tiny-social-example/tiny-social-example.2.ddl.aql
new file mode 100644
index 0000000..8bebdd9
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-remove-fields/tiny-social-example/tiny-social-example.2.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.
+ */
+/*
+* Description  : Testing object-remove-fields under different queries.
+* Expected Res : Success
+* Date         : 04 Jun 2015
+*/
+use dataverse TinySocial;
+
+create dataset FacebookUsers(FacebookUserType)
+primary key id;
+
+create dataset FacebookMessages(FacebookMessageType)
+primary key message-id;
+
+create dataset TwitterUsers(TwitterUserType)
+primary key screen-name;
+
+create dataset TweetMessages(TweetMessageType)
+primary key tweetid
+hints(cardinality=100);
+
+create index fbUserSinceIdx on FacebookUsers(user-since);
+create index fbAuthorIdx on FacebookMessages(author-id) type btree;
+create index fbSenderLocIndex on FacebookMessages(sender-location) type rtree;
+create index fbMessageIdx on FacebookMessages(message) type keyword;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-remove-fields/tiny-social-example/tiny-social-example.3.update.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-remove-fields/tiny-social-example/tiny-social-example.3.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-remove-fields/tiny-social-example/tiny-social-example.3.update.aql
new file mode 100644
index 0000000..515288f
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-remove-fields/tiny-social-example/tiny-social-example.3.update.aql
@@ -0,0 +1,36 @@
+/*
+ * 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  : Testing object-remove-fields under different queries.
+* Expected Res : Success
+* Date         : 04 Jun 2015
+*/
+use dataverse TinySocial;
+
+load dataset FacebookUsers using localfs
+(("path"="nc1://data/tinysocial/fbu.adm"),("format"="adm"));
+
+load dataset FacebookMessages using localfs
+(("path"="nc1://data/tinysocial/fbm.adm"),("format"="adm"));
+
+load dataset TwitterUsers using localfs
+(("path"="nc1://data/tinysocial/twu.adm"),("format"="adm"));
+
+load dataset TweetMessages using localfs
+(("path"="nc1://data/tinysocial/twm.adm"),("format"="adm"));

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-remove-fields/tiny-social-example/tiny-social-example.4.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-remove-fields/tiny-social-example/tiny-social-example.4.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-remove-fields/tiny-social-example/tiny-social-example.4.query.aql
new file mode 100644
index 0000000..d3a4118
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/object-remove-fields/tiny-social-example/tiny-social-example.4.query.aql
@@ -0,0 +1,29 @@
+/*
+ * 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  : Testing object-remove-fields under different queries.
+* Expected Res : Success
+* Date         : 04 Aug 2015
+*/
+use dataverse TinySocial;
+
+for $r in dataset TweetMessages
+let $result := object-remove-fields($r, ["sender-location", ["user", "screen-name"]])
+order by $result
+return $result

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/open-closed-fieldname-conflict_issue173/open-closed-fieldname-conflict_issue173.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/open-closed-fieldname-conflict_issue173/open-closed-fieldname-conflict_issue173.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/open-closed-fieldname-conflict_issue173/open-closed-fieldname-conflict_issue173.1.ddl.aql
new file mode 100644
index 0000000..f5890e3
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/open-closed-fieldname-conflict_issue173/open-closed-fieldname-conflict_issue173.1.ddl.aql
@@ -0,0 +1,34 @@
+/*
+ * 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    : Tests whether a conflict between an open and closed field name are detected
+ * Expected Result: An error reporting that there is a duplicate field name "name"
+ * Author: zheilbron
+ */
+ 
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+create type opentype as open {
+id:int32,
+fname:string
+}
+
+create dataset testds(opentype) primary key id; 

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/open-closed-fieldname-conflict_issue173/open-closed-fieldname-conflict_issue173.2.update.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/open-closed-fieldname-conflict_issue173/open-closed-fieldname-conflict_issue173.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/open-closed-fieldname-conflict_issue173/open-closed-fieldname-conflict_issue173.2.update.aql
new file mode 100644
index 0000000..6fcf620
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/open-closed-fieldname-conflict_issue173/open-closed-fieldname-conflict_issue173.2.update.aql
@@ -0,0 +1,28 @@
+/*
+ * 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    : Tests whether a conflict between an open and closed field name are detected
+ * Expected Result: An error reporting that there is a duplicate field name "name"
+ * Author: zheilbron
+ */
+ 
+use dataverse test;
+
+insert into dataset testds({'id': 1, 'fname': "name"});
+

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/open-closed-fieldname-conflict_issue173/open-closed-fieldname-conflict_issue173.3.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/open-closed-fieldname-conflict_issue173/open-closed-fieldname-conflict_issue173.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/open-closed-fieldname-conflict_issue173/open-closed-fieldname-conflict_issue173.3.query.aql
new file mode 100644
index 0000000..074cd9b
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/open-closed-fieldname-conflict_issue173/open-closed-fieldname-conflict_issue173.3.query.aql
@@ -0,0 +1,28 @@
+/*
+ * 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    : Tests whether a conflict between an open and closed field name are detected
+ * Expected Result: An error reporting that there is a duplicate field name "name"
+ * Author: zheilbron
+ */
+ 
+use dataverse test;
+
+for $x in dataset('testds')
+return {$x.fname: "smith", lowercase("NAME"): "john"}

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/open-object-constructor_01/open-record-constructor_01.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/open-object-constructor_01/open-record-constructor_01.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/open-object-constructor_01/open-record-constructor_01.1.ddl.aql
new file mode 100644
index 0000000..cbc5458
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/open-object-constructor_01/open-record-constructor_01.1.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 if exists;
+create dataverse test;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/open-object-constructor_01/open-record-constructor_01.2.update.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/open-object-constructor_01/open-record-constructor_01.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/open-object-constructor_01/open-record-constructor_01.2.update.aql
new file mode 100644
index 0000000..042f3ce
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/open-object-constructor_01/open-record-constructor_01.2.update.aql
@@ -0,0 +1,18 @@
+/*
+ * 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.
+ */

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/open-object-constructor_01/open-record-constructor_01.3.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/open-object-constructor_01/open-record-constructor_01.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/open-object-constructor_01/open-record-constructor_01.3.query.aql
new file mode 100644
index 0000000..04fdde1
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/open-object-constructor_01/open-record-constructor_01.3.query.aql
@@ -0,0 +1,22 @@
+/*
+ * 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;
+set import-private-functions 'true';
+
+open-object-constructor("foo1", 10, "bar1", 20, "foo2", 30, "bar2", 40)

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/open-object-constructor_02/open-record-constructor_02.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/open-object-constructor_02/open-record-constructor_02.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/open-object-constructor_02/open-record-constructor_02.1.ddl.aql
new file mode 100644
index 0000000..d17ea60
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/open-object-constructor_02/open-record-constructor_02.1.ddl.aql
@@ -0,0 +1,21 @@
+/*
+ * 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;
+

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/open-object-constructor_02/open-record-constructor_02.2.update.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/open-object-constructor_02/open-record-constructor_02.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/open-object-constructor_02/open-record-constructor_02.2.update.aql
new file mode 100644
index 0000000..042f3ce
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/open-object-constructor_02/open-record-constructor_02.2.update.aql
@@ -0,0 +1,18 @@
+/*
+ * 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.
+ */

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/open-object-constructor_02/open-record-constructor_02.3.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/open-object-constructor_02/open-record-constructor_02.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/open-object-constructor_02/open-record-constructor_02.3.query.aql
new file mode 100644
index 0000000..6205fe0
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/open-object-constructor_02/open-record-constructor_02.3.query.aql
@@ -0,0 +1,22 @@
+/*
+ * 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;
+set import-private-functions 'true';
+
+open-object-constructor("foo1", 10, "bar1", closed-object-constructor("bar1.1", 10, "bar1.2", 20, "bar1.3", 30, "bar1.4", closed-object-constructor("bar1.4.1", 10, "bar1.4.2", 20, "bar1.4.3", 30, "bar1.4.4", 40), "foo2", 30, "bar2", 40), "foo2", 30, "bar2", 40)

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/open-open-fieldname-conflict_issue173/open-open-fieldname-conflict_issue173.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/open-open-fieldname-conflict_issue173/open-open-fieldname-conflict_issue173.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/open-open-fieldname-conflict_issue173/open-open-fieldname-conflict_issue173.1.ddl.aql
new file mode 100644
index 0000000..6a4e4c9
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/open-open-fieldname-conflict_issue173/open-open-fieldname-conflict_issue173.1.ddl.aql
@@ -0,0 +1,34 @@
+/*
+ * 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    : Tests whether a conflict between two open field names are detected
+ * Expected Result: An error reporting that there is a duplicate field name "name"
+ * Author: zheilbron
+ */
+ 
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+create type opentype as open {
+fname1: string,
+fname2: string
+}
+
+create dataset testds(opentype) primary key fname1; 

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/open-open-fieldname-conflict_issue173/open-open-fieldname-conflict_issue173.2.update.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/open-open-fieldname-conflict_issue173/open-open-fieldname-conflict_issue173.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/open-open-fieldname-conflict_issue173/open-open-fieldname-conflict_issue173.2.update.aql
new file mode 100644
index 0000000..9eba6d9
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/open-open-fieldname-conflict_issue173/open-open-fieldname-conflict_issue173.2.update.aql
@@ -0,0 +1,27 @@
+/*
+ * 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    : Tests whether a conflict between two open field names are detected
+ * Expected Result: An error reporting that there is a duplicate field name "name"
+ * Author: zheilbron
+ */
+ 
+use dataverse test;
+
+insert into dataset testds({'fname1': "name", 'fname2': "name"});

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/open-open-fieldname-conflict_issue173/open-open-fieldname-conflict_issue173.3.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/open-open-fieldname-conflict_issue173/open-open-fieldname-conflict_issue173.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/open-open-fieldname-conflict_issue173/open-open-fieldname-conflict_issue173.3.query.aql
new file mode 100644
index 0000000..376a7fa
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/open-open-fieldname-conflict_issue173/open-open-fieldname-conflict_issue173.3.query.aql
@@ -0,0 +1,28 @@
+/*
+ * 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    : Tests whether a conflict between two open field names are detected
+ * Expected Result: An error reporting that there is a duplicate field name "name"
+ * Author: zheilbron
+ */
+ 
+use dataverse test;
+
+for $x in dataset('testds')
+return {$x.fname1: "john", $x.fname2: "smith"}