http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-field-value/tiny-social-example/tiny-social-example.3.update.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-field-value/tiny-social-example/tiny-social-example.3.update.aql
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-field-value/tiny-social-example/tiny-social-example.3.update.aql
new file mode 100644
index 0000000..905a815
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-field-value/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 get-object-field-value under different queries.
+* Expected Res : Success
+* Date         : 04 Jun 2015
+*/
+use dataverse TinySocial;
+
+load dataset FacebookUsers using localfs
+(("path"="asterix_nc1://data/tinysocial/fbu.adm"),("format"="adm"));
+
+load dataset FacebookMessages using localfs
+(("path"="asterix_nc1://data/tinysocial/fbm.adm"),("format"="adm"));
+
+load dataset TwitterUsers using localfs
+(("path"="asterix_nc1://data/tinysocial/twu.adm"),("format"="adm"));
+
+load dataset TweetMessages using localfs
+(("path"="asterix_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/get-object-field-value/tiny-social-example/tiny-social-example.4.query.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-field-value/tiny-social-example/tiny-social-example.4.query.aql
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-field-value/tiny-social-example/tiny-social-example.4.query.aql
new file mode 100644
index 0000000..d8dd0a2
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-field-value/tiny-social-example/tiny-social-example.4.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-field-value 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)
+where $f.field-type = "STRING"
+let $result := get-object-field-value($r, $f.field-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/get-object-fields/documentation-example/documentation-example.1.query.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/documentation-example/documentation-example.1.query.aql
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/documentation-example/documentation-example.1.query.aql
new file mode 100644
index 0000000..d742a23
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-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 get-object-fields under different queries.
+* Expected Res : Success
+* Date         : 04 Jun 2015
+*/
+        let $r1 := {"id":1, 
+            "project":"AsterixDB", 
+            "address":{"city":"Irvine", "state":"CA"}, 
+            "related":["Hivestrix", "Preglix", "Apache VXQuery"] }
+        return get-object-fields($r1)

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-no-complex-types/tiny-social-example-no-complex-types.1.ddl.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-no-complex-types/tiny-social-example-no-complex-types.1.ddl.aql
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-no-complex-types/tiny-social-example-no-complex-types.1.ddl.aql
new file mode 100644
index 0000000..0f81011
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-no-complex-types/tiny-social-example-no-complex-types.1.ddl.aql
@@ -0,0 +1,101 @@
+/*
+ * 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
+*/
+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
+}
+
+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
+}
+
+// Alternate datasets
+create type TwitterUserAlternateType as open {
+        screen-name: string,
+        lang: string,
+        friends_count: int64,
+        statuses_count: int64
+}
+
+create type TweetMessageAlternateType as closed {
+        tweetid: string,
+        sender-location: point?,
+        send-time: datetime,
+        message-text: string
+}
+
+create type EmploymentAlternateType as open {
+        organization-name: string,
+        start-date: date,
+        end-date: date?
+}
+
+create type FacebookUserAlternateType as closed {
+        id: int64,
+        alias: string,
+        name: string,
+        user-since: datetime
+}
+
+create type FacebookMessageAlternateType 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/get-object-fields/tiny-social-example-no-complex-types/tiny-social-example-no-complex-types.2.ddl.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-no-complex-types/tiny-social-example-no-complex-types.2.ddl.aql
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-no-complex-types/tiny-social-example-no-complex-types.2.ddl.aql
new file mode 100644
index 0000000..4a07802
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-no-complex-types/tiny-social-example-no-complex-types.2.ddl.aql
@@ -0,0 +1,56 @@
+/*
+ * 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;
+
+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;
+
+
+// Alternate datasets
+create dataset FacebookUsersAlternate(FacebookUserAlternateType)
+primary key id;
+
+create dataset FacebookMessagesAlternate(FacebookMessageAlternateType)
+primary key message-id;
+
+create dataset TwitterUsersAlternate(TwitterUserAlternateType)
+primary key screen-name;
+
+create dataset TweetMessagesAlternate(TweetMessageAlternateType)
+primary key tweetid; 

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-no-complex-types/tiny-social-example-no-complex-types.3.update.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-no-complex-types/tiny-social-example-no-complex-types.3.update.aql
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-no-complex-types/tiny-social-example-no-complex-types.3.update.aql
new file mode 100644
index 0000000..9500273
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-no-complex-types/tiny-social-example-no-complex-types.3.update.aql
@@ -0,0 +1,79 @@
+/*
+ * 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;
+
+load dataset FacebookUsers using localfs
+(("path"="asterix_nc1://data/tinysocial/fbu.adm"),("format"="adm"));
+
+load dataset FacebookMessages using localfs
+(("path"="asterix_nc1://data/tinysocial/fbm.adm"),("format"="adm"));
+
+load dataset TwitterUsers using localfs
+(("path"="asterix_nc1://data/tinysocial/twu.adm"),("format"="adm"));
+
+load dataset TweetMessages using localfs
+(("path"="asterix_nc1://data/tinysocial/twm.adm"),("format"="adm"));
+
+
+// Alternate datasets
+insert into dataset TwitterUsersAlternate(
+    for $r in dataset TwitterUsers
+    return {
+        "screen-name" : $r.screen-name,
+        "lang" : $r.lang,
+        "friends_count" : $r.friends_count,
+        "statuses_count" : $r.statuses_count
+    }
+);
+
+insert into dataset TweetMessagesAlternate(
+    for $r in dataset TweetMessages
+    return {
+        "tweetid" : $r.tweetid,
+        "sender-location" : $r.sender-location,
+        "send-time" : $r.send-time,
+        "message-text" : $r.message-text
+    }
+);
+
+insert into dataset FacebookUsersAlternate(
+    for $r in dataset FacebookUsers
+    return {
+        "id" : $r.id,
+        "alias" : $r.alias,
+        "name" : $r.name,
+        "user-since" : $r.user-since
+    }
+);
+
+insert into dataset FacebookMessagesAlternate(
+    for $r in dataset FacebookMessages
+    return {
+        "message-id" : $r.message-id,
+        "author-id" : $r.author-id,
+        "in-response-to" : $r.in-response-to,
+        "sender-location" : $r.sender-location,
+        "message" : $r.message
+    }
+);

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-no-complex-types/tiny-social-example-no-complex-types.4.query.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-no-complex-types/tiny-social-example-no-complex-types.4.query.aql
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-no-complex-types/tiny-social-example-no-complex-types.4.query.aql
new file mode 100644
index 0000000..0e983af
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-no-complex-types/tiny-social-example-no-complex-types.4.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 get-object-fields under different queries.
+* Expected Res : Success
+* Date         : 04 Jun 2015
+*/
+use dataverse TinySocial;
+
+for $user in dataset FacebookUsersAlternate
+where $user.id = 8
+return get-object-fields($user);

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-no-complex-types/tiny-social-example-no-complex-types.5.query.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-no-complex-types/tiny-social-example-no-complex-types.5.query.aql
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-no-complex-types/tiny-social-example-no-complex-types.5.query.aql
new file mode 100644
index 0000000..7cc3e77
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-no-complex-types/tiny-social-example-no-complex-types.5.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 get-object-fields under different queries.
+* Expected Res : Success
+* Date         : 04 Jun 2015
+*/
+use dataverse TinySocial;
+
+for $r in dataset FacebookUsersAlternate
+order by $r.id
+return get-object-fields($r);

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-no-complex-types/tiny-social-example-no-complex-types.6.query.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-no-complex-types/tiny-social-example-no-complex-types.6.query.aql
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-no-complex-types/tiny-social-example-no-complex-types.6.query.aql
new file mode 100644
index 0000000..48af631
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-no-complex-types/tiny-social-example-no-complex-types.6.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 get-object-fields under different queries.
+* Expected Res : Success
+* Date         : 04 Jun 2015
+*/
+use dataverse TinySocial;
+
+for $r in dataset FacebookMessagesAlternate
+order by $r.message-id
+return get-object-fields($r);

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-no-complex-types/tiny-social-example-no-complex-types.7.query.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-no-complex-types/tiny-social-example-no-complex-types.7.query.aql
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-no-complex-types/tiny-social-example-no-complex-types.7.query.aql
new file mode 100644
index 0000000..fe35a9c
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-no-complex-types/tiny-social-example-no-complex-types.7.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 get-object-fields under different queries.
+* Expected Res : Success
+* Date         : 04 Jun 2015
+*/
+use dataverse TinySocial;
+
+for $r in dataset TwitterUsersAlternate
+order by $r.screen-name
+return get-object-fields($r);

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-no-complex-types/tiny-social-example-no-complex-types.8.query.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-no-complex-types/tiny-social-example-no-complex-types.8.query.aql
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-no-complex-types/tiny-social-example-no-complex-types.8.query.aql
new file mode 100644
index 0000000..fe44f88
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-no-complex-types/tiny-social-example-no-complex-types.8.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 get-object-fields under different queries.
+* Expected Res : Success
+* Date         : 04 Jun 2015
+*/
+use dataverse TinySocial;
+
+for $r in dataset TweetMessagesAlternate
+order by $r.tweetid
+return get-object-fields($r);

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-no-complex-types/tiny-social-example-no-complex-types.9.query.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-no-complex-types/tiny-social-example-no-complex-types.9.query.aql
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-no-complex-types/tiny-social-example-no-complex-types.9.query.aql
new file mode 100644
index 0000000..5254a61
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-no-complex-types/tiny-social-example-no-complex-types.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 TweetMessagesAlternate
+  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/get-object-fields/tiny-social-example-only-lists/tiny-social-example-only-lists.1.ddl.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-only-lists/tiny-social-example-only-lists.1.ddl.aql
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-only-lists/tiny-social-example-only-lists.1.ddl.aql
new file mode 100644
index 0000000..c04cdb4
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-only-lists/tiny-social-example-only-lists.1.ddl.aql
@@ -0,0 +1,103 @@
+/*
+ * 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
+*/
+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
+}
+
+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
+}
+
+// Alternate datasets
+create type TwitterUserAlternateType as open {
+        screen-name: string,
+        lang: string,
+        friends_count: int64,
+        statuses_count: int64
+}
+
+create type TweetMessageAlternateType as closed {
+        tweetid: string,
+        sender-location: point?,
+        send-time: datetime,
+        referred-topics: {{ string }},
+        message-text: string
+}
+
+create type EmploymentAlternateType as open {
+        organization-name: string,
+        start-date: date,
+        end-date: date?
+}
+
+create type FacebookUserAlternateType as closed {
+        id: int64,
+        alias: string,
+        name: string,
+        friend-ids: {{ int64 }},
+        user-since: datetime
+}
+
+create type FacebookMessageAlternateType 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/get-object-fields/tiny-social-example-only-lists/tiny-social-example-only-lists.2.ddl.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-only-lists/tiny-social-example-only-lists.2.ddl.aql
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-only-lists/tiny-social-example-only-lists.2.ddl.aql
new file mode 100644
index 0000000..4a07802
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-only-lists/tiny-social-example-only-lists.2.ddl.aql
@@ -0,0 +1,56 @@
+/*
+ * 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;
+
+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;
+
+
+// Alternate datasets
+create dataset FacebookUsersAlternate(FacebookUserAlternateType)
+primary key id;
+
+create dataset FacebookMessagesAlternate(FacebookMessageAlternateType)
+primary key message-id;
+
+create dataset TwitterUsersAlternate(TwitterUserAlternateType)
+primary key screen-name;
+
+create dataset TweetMessagesAlternate(TweetMessageAlternateType)
+primary key tweetid; 

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-only-lists/tiny-social-example-only-lists.3.update.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-only-lists/tiny-social-example-only-lists.3.update.aql
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-only-lists/tiny-social-example-only-lists.3.update.aql
new file mode 100644
index 0000000..da0549b
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-only-lists/tiny-social-example-only-lists.3.update.aql
@@ -0,0 +1,81 @@
+/*
+ * 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;
+
+load dataset FacebookUsers using localfs
+(("path"="asterix_nc1://data/tinysocial/fbu.adm"),("format"="adm"));
+
+load dataset FacebookMessages using localfs
+(("path"="asterix_nc1://data/tinysocial/fbm.adm"),("format"="adm"));
+
+load dataset TwitterUsers using localfs
+(("path"="asterix_nc1://data/tinysocial/twu.adm"),("format"="adm"));
+
+load dataset TweetMessages using localfs
+(("path"="asterix_nc1://data/tinysocial/twm.adm"),("format"="adm"));
+
+
+// Alternate datasets
+insert into dataset TwitterUsersAlternate(
+    for $r in dataset TwitterUsers
+    return {
+        "screen-name" : $r.screen-name,
+        "lang" : $r.lang,
+        "friends_count" : $r.friends_count,
+        "statuses_count" : $r.statuses_count
+    }
+);
+
+insert into dataset TweetMessagesAlternate(
+    for $r in dataset TweetMessages
+    return {
+        "tweetid" : $r.tweetid,
+        "sender-location" : $r.sender-location,
+        "send-time" : $r.send-time,
+        "message-text" : $r.message-text,
+        "referred-topics" : $r.referred-topics
+    }
+);
+
+insert into dataset FacebookUsersAlternate(
+    for $r in dataset FacebookUsers
+    return {
+        "id" : $r.id,
+        "alias" : $r.alias,
+        "name" : $r.name,
+        "friend-ids" : $r.friend-ids,
+        "user-since" : $r.user-since
+    }
+);
+
+insert into dataset FacebookMessagesAlternate(
+    for $r in dataset FacebookMessages
+    return {
+        "message-id" : $r.message-id,
+        "author-id" : $r.author-id,
+        "in-response-to" : $r.in-response-to,
+        "sender-location" : $r.sender-location,
+        "message" : $r.message
+    }
+);

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-only-lists/tiny-social-example-only-lists.4.query.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-only-lists/tiny-social-example-only-lists.4.query.aql
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-only-lists/tiny-social-example-only-lists.4.query.aql
new file mode 100644
index 0000000..0e983af
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-only-lists/tiny-social-example-only-lists.4.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 get-object-fields under different queries.
+* Expected Res : Success
+* Date         : 04 Jun 2015
+*/
+use dataverse TinySocial;
+
+for $user in dataset FacebookUsersAlternate
+where $user.id = 8
+return get-object-fields($user);

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-only-lists/tiny-social-example-only-lists.5.query.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-only-lists/tiny-social-example-only-lists.5.query.aql
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-only-lists/tiny-social-example-only-lists.5.query.aql
new file mode 100644
index 0000000..7cc3e77
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-only-lists/tiny-social-example-only-lists.5.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 get-object-fields under different queries.
+* Expected Res : Success
+* Date         : 04 Jun 2015
+*/
+use dataverse TinySocial;
+
+for $r in dataset FacebookUsersAlternate
+order by $r.id
+return get-object-fields($r);

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-only-lists/tiny-social-example-only-lists.6.query.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-only-lists/tiny-social-example-only-lists.6.query.aql
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-only-lists/tiny-social-example-only-lists.6.query.aql
new file mode 100644
index 0000000..48af631
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-only-lists/tiny-social-example-only-lists.6.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 get-object-fields under different queries.
+* Expected Res : Success
+* Date         : 04 Jun 2015
+*/
+use dataverse TinySocial;
+
+for $r in dataset FacebookMessagesAlternate
+order by $r.message-id
+return get-object-fields($r);

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-only-lists/tiny-social-example-only-lists.7.query.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-only-lists/tiny-social-example-only-lists.7.query.aql
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-only-lists/tiny-social-example-only-lists.7.query.aql
new file mode 100644
index 0000000..fe35a9c
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-only-lists/tiny-social-example-only-lists.7.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 get-object-fields under different queries.
+* Expected Res : Success
+* Date         : 04 Jun 2015
+*/
+use dataverse TinySocial;
+
+for $r in dataset TwitterUsersAlternate
+order by $r.screen-name
+return get-object-fields($r);

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-only-lists/tiny-social-example-only-lists.8.query.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-only-lists/tiny-social-example-only-lists.8.query.aql
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-only-lists/tiny-social-example-only-lists.8.query.aql
new file mode 100644
index 0000000..fe44f88
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-only-lists/tiny-social-example-only-lists.8.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 get-object-fields under different queries.
+* Expected Res : Success
+* Date         : 04 Jun 2015
+*/
+use dataverse TinySocial;
+
+for $r in dataset TweetMessagesAlternate
+order by $r.tweetid
+return get-object-fields($r);

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-only-lists/tiny-social-example-only-lists.9.query.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-only-lists/tiny-social-example-only-lists.9.query.aql
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-only-lists/tiny-social-example-only-lists.9.query.aql
new file mode 100644
index 0000000..1cd6b77
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-only-lists/tiny-social-example-only-lists.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 TweetMessagesAlternate
+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/get-object-fields/tiny-social-example-only-records/tiny-social-example-only-records.1.ddl.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-only-records/tiny-social-example-only-records.1.ddl.aql
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-only-records/tiny-social-example-only-records.1.ddl.aql
new file mode 100644
index 0000000..d1755e1
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-only-records/tiny-social-example-only-records.1.ddl.aql
@@ -0,0 +1,103 @@
+/*
+ * 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
+*/
+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
+}
+
+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
+}
+
+// Alternate datasets
+create type TwitterUserAlternateType as open {
+        screen-name: string,
+        lang: string,
+        friends_count: int64,
+        statuses_count: int64
+}
+
+create type TweetMessageAlternateType as closed {
+        tweetid: string,
+        user: TwitterUserAlternateType,
+        sender-location: point?,
+        send-time: datetime,
+        message-text: string
+}
+
+create type EmploymentAlternateType as open {
+        organization-name: string,
+        start-date: date,
+        end-date: date?
+}
+
+create type FacebookUserAlternateType as closed {
+        id: int64,
+        alias: string,
+        name: string,
+        user-since: datetime,
+        employment: EmploymentAlternateType
+}
+
+create type FacebookMessageAlternateType 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/get-object-fields/tiny-social-example-only-records/tiny-social-example-only-records.2.ddl.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-only-records/tiny-social-example-only-records.2.ddl.aql
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-only-records/tiny-social-example-only-records.2.ddl.aql
new file mode 100644
index 0000000..4a07802
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-only-records/tiny-social-example-only-records.2.ddl.aql
@@ -0,0 +1,56 @@
+/*
+ * 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;
+
+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;
+
+
+// Alternate datasets
+create dataset FacebookUsersAlternate(FacebookUserAlternateType)
+primary key id;
+
+create dataset FacebookMessagesAlternate(FacebookMessageAlternateType)
+primary key message-id;
+
+create dataset TwitterUsersAlternate(TwitterUserAlternateType)
+primary key screen-name;
+
+create dataset TweetMessagesAlternate(TweetMessageAlternateType)
+primary key tweetid; 

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-only-records/tiny-social-example-only-records.3.update.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-only-records/tiny-social-example-only-records.3.update.aql
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-only-records/tiny-social-example-only-records.3.update.aql
new file mode 100644
index 0000000..71e5abe
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-only-records/tiny-social-example-only-records.3.update.aql
@@ -0,0 +1,81 @@
+/*
+ * 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;
+
+load dataset FacebookUsers using localfs
+(("path"="asterix_nc1://data/tinysocial/fbu.adm"),("format"="adm"));
+
+load dataset FacebookMessages using localfs
+(("path"="asterix_nc1://data/tinysocial/fbm.adm"),("format"="adm"));
+
+load dataset TwitterUsers using localfs
+(("path"="asterix_nc1://data/tinysocial/twu.adm"),("format"="adm"));
+
+load dataset TweetMessages using localfs
+(("path"="asterix_nc1://data/tinysocial/twm.adm"),("format"="adm"));
+
+
+// Alternate datasets
+insert into dataset TwitterUsersAlternate(
+    for $r in dataset TwitterUsers
+    return {
+        "screen-name" : $r.screen-name,
+        "lang" : $r.lang,
+        "friends_count" : $r.friends_count,
+        "statuses_count" : $r.statuses_count
+    }
+);
+
+insert into dataset TweetMessagesAlternate(
+    for $r in dataset TweetMessages
+    return {
+        "tweetid" : $r.tweetid,
+        "user" : $r.user,
+        "sender-location" : $r.sender-location,
+        "send-time" : $r.send-time,
+        "message-text" : $r.message-text
+    }
+);
+
+insert into dataset FacebookUsersAlternate(
+    for $r in dataset FacebookUsers
+    return {
+        "id" : $r.id,
+        "alias" : $r.alias,
+        "name" : $r.name,
+        "user-since" : $r.user-since,
+        "employment" : $r.employment[0]
+    }
+);
+
+insert into dataset FacebookMessagesAlternate(
+    for $r in dataset FacebookMessages
+    return {
+        "message-id" : $r.message-id,
+        "author-id" : $r.author-id,
+        "in-response-to" : $r.in-response-to,
+        "sender-location" : $r.sender-location,
+        "message" : $r.message
+    }
+);

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-only-records/tiny-social-example-only-records.4.query.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-only-records/tiny-social-example-only-records.4.query.aql
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-only-records/tiny-social-example-only-records.4.query.aql
new file mode 100644
index 0000000..0e983af
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-only-records/tiny-social-example-only-records.4.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 get-object-fields under different queries.
+* Expected Res : Success
+* Date         : 04 Jun 2015
+*/
+use dataverse TinySocial;
+
+for $user in dataset FacebookUsersAlternate
+where $user.id = 8
+return get-object-fields($user);

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-only-records/tiny-social-example-only-records.5.query.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-only-records/tiny-social-example-only-records.5.query.aql
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-only-records/tiny-social-example-only-records.5.query.aql
new file mode 100644
index 0000000..7cc3e77
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-only-records/tiny-social-example-only-records.5.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 get-object-fields under different queries.
+* Expected Res : Success
+* Date         : 04 Jun 2015
+*/
+use dataverse TinySocial;
+
+for $r in dataset FacebookUsersAlternate
+order by $r.id
+return get-object-fields($r);

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-only-records/tiny-social-example-only-records.6.query.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-only-records/tiny-social-example-only-records.6.query.aql
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-only-records/tiny-social-example-only-records.6.query.aql
new file mode 100644
index 0000000..48af631
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-only-records/tiny-social-example-only-records.6.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 get-object-fields under different queries.
+* Expected Res : Success
+* Date         : 04 Jun 2015
+*/
+use dataverse TinySocial;
+
+for $r in dataset FacebookMessagesAlternate
+order by $r.message-id
+return get-object-fields($r);

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-only-records/tiny-social-example-only-records.7.query.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-only-records/tiny-social-example-only-records.7.query.aql
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-only-records/tiny-social-example-only-records.7.query.aql
new file mode 100644
index 0000000..fe35a9c
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-only-records/tiny-social-example-only-records.7.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 get-object-fields under different queries.
+* Expected Res : Success
+* Date         : 04 Jun 2015
+*/
+use dataverse TinySocial;
+
+for $r in dataset TwitterUsersAlternate
+order by $r.screen-name
+return get-object-fields($r);

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-only-records/tiny-social-example-only-records.8.query.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-only-records/tiny-social-example-only-records.8.query.aql
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-only-records/tiny-social-example-only-records.8.query.aql
new file mode 100644
index 0000000..fe44f88
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-only-records/tiny-social-example-only-records.8.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 get-object-fields under different queries.
+* Expected Res : Success
+* Date         : 04 Jun 2015
+*/
+use dataverse TinySocial;
+
+for $r in dataset TweetMessagesAlternate
+order by $r.tweetid
+return get-object-fields($r);

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-only-records/tiny-social-example-only-records.9.query.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-only-records/tiny-social-example-only-records.9.query.aql
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-only-records/tiny-social-example-only-records.9.query.aql
new file mode 100644
index 0000000..1cd6b77
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example-only-records/tiny-social-example-only-records.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 TweetMessagesAlternate
+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/get-object-fields/tiny-social-example/tiny-social-example.1.ddl.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example/tiny-social-example.1.ddl.aql
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example/tiny-social-example.1.ddl.aql
new file mode 100644
index 0000000..ddae183
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example/tiny-social-example.1.ddl.aql
@@ -0,0 +1,65 @@
+/*
+ * 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
+*/
+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
+}
+
+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/get-object-fields/tiny-social-example/tiny-social-example.2.ddl.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example/tiny-social-example.2.ddl.aql
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example/tiny-social-example.2.ddl.aql
new file mode 100644
index 0000000..c3d40c2
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-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 get-object-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/get-object-fields/tiny-social-example/tiny-social-example.3.update.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example/tiny-social-example.3.update.aql
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example/tiny-social-example.3.update.aql
new file mode 100644
index 0000000..b220f4f
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-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 get-object-fields under different queries.
+* Expected Res : Success
+* Date         : 04 Jun 2015
+*/
+use dataverse TinySocial;
+
+load dataset FacebookUsers using localfs
+(("path"="asterix_nc1://data/tinysocial/fbu.adm"),("format"="adm"));
+
+load dataset FacebookMessages using localfs
+(("path"="asterix_nc1://data/tinysocial/fbm.adm"),("format"="adm"));
+
+load dataset TwitterUsers using localfs
+(("path"="asterix_nc1://data/tinysocial/twu.adm"),("format"="adm"));
+
+load dataset TweetMessages using localfs
+(("path"="asterix_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/get-object-fields/tiny-social-example/tiny-social-example.4.query.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example/tiny-social-example.4.query.aql
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example/tiny-social-example.4.query.aql
new file mode 100644
index 0000000..b219997
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example/tiny-social-example.4.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 get-object-fields under different queries.
+* Expected Res : Success
+* Date         : 04 Jun 2015
+*/
+use dataverse TinySocial;
+
+for $user in dataset FacebookUsers
+where $user.id = 8
+return get-object-fields($user);

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.5.query.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example/tiny-social-example.5.query.aql
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example/tiny-social-example.5.query.aql
new file mode 100644
index 0000000..e9a5e57
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example/tiny-social-example.5.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 get-object-fields under different queries.
+* Expected Res : Success
+* Date         : 04 Jun 2015
+*/
+use dataverse TinySocial;
+
+for $r in dataset FacebookUsers
+order by $r.id
+return get-object-fields($r);

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.6.query.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example/tiny-social-example.6.query.aql
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example/tiny-social-example.6.query.aql
new file mode 100644
index 0000000..ec50113
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example/tiny-social-example.6.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 get-object-fields under different queries.
+* Expected Res : Success
+* Date         : 04 Jun 2015
+*/
+use dataverse TinySocial;
+
+for $r in dataset FacebookMessages
+order by $r.message-id
+return get-object-fields($r);

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.7.query.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example/tiny-social-example.7.query.aql
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example/tiny-social-example.7.query.aql
new file mode 100644
index 0000000..f015455
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example/tiny-social-example.7.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 get-object-fields under different queries.
+* Expected Res : Success
+* Date         : 04 Jun 2015
+*/
+use dataverse TinySocial;
+
+for $r in dataset TwitterUsers
+order by $r.screen-name
+return get-object-fields($r);

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.8.query.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example/tiny-social-example.8.query.aql
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example/tiny-social-example.8.query.aql
new file mode 100644
index 0000000..d2e3955
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/objects/get-object-fields/tiny-social-example/tiny-social-example.8.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 get-object-fields under different queries.
+* Expected Res : Success
+* Date         : 04 Jun 2015
+*/
+use dataverse TinySocial;
+
+for $r in dataset TweetMessages
+order by $r.tweetid
+return get-object-fields($r);

Reply via email to