http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example-only-lists/tiny-social-example-only-lists.4.query.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example-only-lists/tiny-social-example-only-lists.4.query.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example-only-lists/tiny-social-example-only-lists.4.query.sqlpp
new file mode 100644
index 0000000..ff388d5
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example-only-lists/tiny-social-example-only-lists.4.query.sqlpp
@@ -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 TinySocial;
+
+
+select element TinySocial.`get-object-fields`(user)
+from  FacebookUsersAlternate as user
+where (user.id = 8)
+;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example-only-lists/tiny-social-example-only-lists.5.query.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example-only-lists/tiny-social-example-only-lists.5.query.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example-only-lists/tiny-social-example-only-lists.5.query.sqlpp
new file mode 100644
index 0000000..c9dda20
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example-only-lists/tiny-social-example-only-lists.5.query.sqlpp
@@ -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 TinySocial;
+
+
+select element TinySocial.`get-object-fields`(r)
+from  FacebookUsersAlternate as r
+order by r.id
+;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example-only-lists/tiny-social-example-only-lists.6.query.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example-only-lists/tiny-social-example-only-lists.6.query.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example-only-lists/tiny-social-example-only-lists.6.query.sqlpp
new file mode 100644
index 0000000..3e99bce
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example-only-lists/tiny-social-example-only-lists.6.query.sqlpp
@@ -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 TinySocial;
+
+
+select element TinySocial.`get-object-fields`(r)
+from  FacebookMessagesAlternate as r
+order by r.`message-id`
+;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example-only-lists/tiny-social-example-only-lists.7.query.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example-only-lists/tiny-social-example-only-lists.7.query.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example-only-lists/tiny-social-example-only-lists.7.query.sqlpp
new file mode 100644
index 0000000..50e8f0d
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example-only-lists/tiny-social-example-only-lists.7.query.sqlpp
@@ -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 TinySocial;
+
+
+select element TinySocial.`get-object-fields`(r)
+from  TwitterUsersAlternate as r
+order by r.`screen-name`
+;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example-only-lists/tiny-social-example-only-lists.8.query.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example-only-lists/tiny-social-example-only-lists.8.query.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example-only-lists/tiny-social-example-only-lists.8.query.sqlpp
new file mode 100644
index 0000000..b62332c
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example-only-lists/tiny-social-example-only-lists.8.query.sqlpp
@@ -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 TinySocial;
+
+
+select element TinySocial.`get-object-fields`(r)
+from  TweetMessagesAlternate as r
+order by r.tweetid
+;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example-only-lists/tiny-social-example-only-lists.9.query.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example-only-lists/tiny-social-example-only-lists.9.query.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example-only-lists/tiny-social-example-only-lists.9.query.sqlpp
new file mode 100644
index 0000000..36265da
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example-only-lists/tiny-social-example-only-lists.9.query.sqlpp
@@ -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  : Testing get-object-fields under different queries.
+* Expected Res : Success
+* Date         : 04 Jun 2015
+*/
+
+use TinySocial;
+
+
+select element {'field-name':n,'field-type':t,'count':count}
+from  TweetMessagesAlternate as r,
+      TinySocial.`get-object-fields`(r) as f
+group by f.`field-name` as n,f.`field-type` as t
+with  count as TinySocial.count(r)
+order by n,t
+;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example-only-records/tiny-social-example-only-records.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example-only-records/tiny-social-example-only-records.1.ddl.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example-only-records/tiny-social-example-only-records.1.ddl.sqlpp
new file mode 100644
index 0000000..825ff4b
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example-only-records/tiny-social-example-only-records.1.ddl.sqlpp
@@ -0,0 +1,116 @@
+/*
+ * 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 TinySocial;
+
+
+create type TinySocial.TwitterUserType as
+{
+  `screen-name` : string,
+  lang : string,
+  friends_count : bigint,
+  statuses_count : bigint
+}
+
+create type TinySocial.TweetMessageType as
+ closed {
+  tweetid : string,
+  user : TwitterUserType,
+  `sender-location` : point?,
+  `send-time` : datetime,
+  `referred-topics` : {{string}},
+  `message-text` : string
+}
+
+create type TinySocial.EmploymentType as
+{
+  `organization-name` : string,
+  `start-date` : date,
+  `end-date` : date?
+}
+
+create type TinySocial.FacebookUserType as
+ closed {
+  id : bigint,
+  alias : string,
+  name : string,
+  `user-since` : datetime,
+  `friend-ids` : {{bigint}},
+  employment : [EmploymentType]
+}
+
+create type TinySocial.FacebookMessageType as
+ closed {
+  `message-id` : bigint,
+  `author-id` : bigint,
+  `in-response-to` : bigint?,
+  `sender-location` : point?,
+  message : string
+}
+
+create type TinySocial.TwitterUserAlternateType as
+{
+  `screen-name` : string,
+  lang : string,
+  friends_count : bigint,
+  statuses_count : bigint
+}
+
+create type TinySocial.TweetMessageAlternateType as
+ closed {
+  tweetid : string,
+  user : TwitterUserAlternateType,
+  `sender-location` : point?,
+  `send-time` : datetime,
+  `message-text` : string
+}
+
+create type TinySocial.EmploymentAlternateType as
+{
+  `organization-name` : string,
+  `start-date` : date,
+  `end-date` : date?
+}
+
+create type TinySocial.FacebookUserAlternateType as
+ closed {
+  id : bigint,
+  alias : string,
+  name : string,
+  `user-since` : datetime,
+  employment : EmploymentAlternateType
+}
+
+create type TinySocial.FacebookMessageAlternateType as
+ closed {
+  `message-id` : bigint,
+  `author-id` : bigint,
+  `in-response-to` : bigint?,
+  `sender-location` : point?,
+  message : string
+}
+

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example-only-records/tiny-social-example-only-records.2.ddl.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example-only-records/tiny-social-example-only-records.2.ddl.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example-only-records/tiny-social-example-only-records.2.ddl.sqlpp
new file mode 100644
index 0000000..ef32bf9
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example-only-records/tiny-social-example-only-records.2.ddl.sqlpp
@@ -0,0 +1,51 @@
+/*
+ * 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 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`) type btree;
+
+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;
+
+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_sqlpp/objects/get-object-fields/tiny-social-example-only-records/tiny-social-example-only-records.3.update.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example-only-records/tiny-social-example-only-records.3.update.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example-only-records/tiny-social-example-only-records.3.update.sqlpp
new file mode 100644
index 0000000..7d73a99
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example-only-records/tiny-social-example-only-records.3.update.sqlpp
@@ -0,0 +1,51 @@
+/*
+ * 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 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`));
+
+insert into TwitterUsersAlternate
+select element 
{'screen-name':r.`screen-name`,'lang':r.lang,'friends_count':r.friends_count,'statuses_count':r.statuses_count}
+from  TwitterUsers as r
+;
+insert into TweetMessagesAlternate
+select element 
{'tweetid':r.tweetid,'user':r.user,'sender-location':r.`sender-location`,'send-time':r.`send-time`,'message-text':r.`message-text`}
+from  TweetMessages as r
+;
+insert into FacebookUsersAlternate
+select element 
{'id':r.id,'alias':r.alias,'name':r.name,'user-since':r.`user-since`,'employment':r.employment[0]}
+from  FacebookUsers as r
+;
+insert into FacebookMessagesAlternate
+select element 
{'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}
+from  FacebookMessages as r
+;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example-only-records/tiny-social-example-only-records.4.query.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example-only-records/tiny-social-example-only-records.4.query.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example-only-records/tiny-social-example-only-records.4.query.sqlpp
new file mode 100644
index 0000000..ff388d5
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example-only-records/tiny-social-example-only-records.4.query.sqlpp
@@ -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 TinySocial;
+
+
+select element TinySocial.`get-object-fields`(user)
+from  FacebookUsersAlternate as user
+where (user.id = 8)
+;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example-only-records/tiny-social-example-only-records.5.query.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example-only-records/tiny-social-example-only-records.5.query.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example-only-records/tiny-social-example-only-records.5.query.sqlpp
new file mode 100644
index 0000000..c9dda20
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example-only-records/tiny-social-example-only-records.5.query.sqlpp
@@ -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 TinySocial;
+
+
+select element TinySocial.`get-object-fields`(r)
+from  FacebookUsersAlternate as r
+order by r.id
+;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example-only-records/tiny-social-example-only-records.6.query.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example-only-records/tiny-social-example-only-records.6.query.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example-only-records/tiny-social-example-only-records.6.query.sqlpp
new file mode 100644
index 0000000..3e99bce
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example-only-records/tiny-social-example-only-records.6.query.sqlpp
@@ -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 TinySocial;
+
+
+select element TinySocial.`get-object-fields`(r)
+from  FacebookMessagesAlternate as r
+order by r.`message-id`
+;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example-only-records/tiny-social-example-only-records.7.query.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example-only-records/tiny-social-example-only-records.7.query.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example-only-records/tiny-social-example-only-records.7.query.sqlpp
new file mode 100644
index 0000000..50e8f0d
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example-only-records/tiny-social-example-only-records.7.query.sqlpp
@@ -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 TinySocial;
+
+
+select element TinySocial.`get-object-fields`(r)
+from  TwitterUsersAlternate as r
+order by r.`screen-name`
+;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example-only-records/tiny-social-example-only-records.8.query.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example-only-records/tiny-social-example-only-records.8.query.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example-only-records/tiny-social-example-only-records.8.query.sqlpp
new file mode 100644
index 0000000..b62332c
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example-only-records/tiny-social-example-only-records.8.query.sqlpp
@@ -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 TinySocial;
+
+
+select element TinySocial.`get-object-fields`(r)
+from  TweetMessagesAlternate as r
+order by r.tweetid
+;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example-only-records/tiny-social-example-only-records.9.query.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example-only-records/tiny-social-example-only-records.9.query.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example-only-records/tiny-social-example-only-records.9.query.sqlpp
new file mode 100644
index 0000000..36265da
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example-only-records/tiny-social-example-only-records.9.query.sqlpp
@@ -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  : Testing get-object-fields under different queries.
+* Expected Res : Success
+* Date         : 04 Jun 2015
+*/
+
+use TinySocial;
+
+
+select element {'field-name':n,'field-type':t,'count':count}
+from  TweetMessagesAlternate as r,
+      TinySocial.`get-object-fields`(r) as f
+group by f.`field-name` as n,f.`field-type` as t
+with  count as TinySocial.count(r)
+order by n,t
+;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example/tiny-social-example.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example/tiny-social-example.1.ddl.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example/tiny-social-example.1.ddl.sqlpp
new file mode 100644
index 0000000..9c61cd1
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example/tiny-social-example.1.ddl.sqlpp
@@ -0,0 +1,74 @@
+/*
+ * 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 TinySocial;
+
+
+create type TinySocial.TwitterUserType as
+{
+  `screen-name` : string,
+  lang : string,
+  friends_count : bigint,
+  statuses_count : bigint
+}
+
+create type TinySocial.TweetMessageType as
+ closed {
+  tweetid : string,
+  user : TwitterUserType,
+  `sender-location` : point?,
+  `send-time` : datetime,
+  `referred-topics` : {{string}},
+  `message-text` : string
+}
+
+create type TinySocial.EmploymentType as
+{
+  `organization-name` : string,
+  `start-date` : date,
+  `end-date` : date?
+}
+
+create type TinySocial.FacebookUserType as
+ closed {
+  id : bigint,
+  alias : string,
+  name : string,
+  `user-since` : datetime,
+  `friend-ids` : {{bigint}},
+  employment : [EmploymentType]
+}
+
+create type TinySocial.FacebookMessageType as
+ closed {
+  `message-id` : bigint,
+  `author-id` : bigint,
+  `in-response-to` : bigint?,
+  `sender-location` : point?,
+  message : string
+}
+

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example/tiny-social-example.2.ddl.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example/tiny-social-example.2.ddl.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example/tiny-social-example.2.ddl.sqlpp
new file mode 100644
index 0000000..42d3a1c
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example/tiny-social-example.2.ddl.sqlpp
@@ -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 get-object-fields under different queries.
+* Expected Res : Success
+* Date         : 04 Jun 2015
+*/
+
+use 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`) type btree;
+
+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_sqlpp/objects/get-object-fields/tiny-social-example/tiny-social-example.3.update.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example/tiny-social-example.3.update.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example/tiny-social-example.3.update.sqlpp
new file mode 100644
index 0000000..62775bf
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example/tiny-social-example.3.update.sqlpp
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+* Description  : Testing get-object-fields under different queries.
+* Expected Res : Success
+* Date         : 04 Jun 2015
+*/
+
+use 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_sqlpp/objects/get-object-fields/tiny-social-example/tiny-social-example.4.query.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example/tiny-social-example.4.query.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example/tiny-social-example.4.query.sqlpp
new file mode 100644
index 0000000..d4acbf6
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example/tiny-social-example.4.query.sqlpp
@@ -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 TinySocial;
+
+
+select element TinySocial.`get-object-fields`(user)
+from  FacebookUsers as user
+where (user.id = 8)
+;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example/tiny-social-example.5.query.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example/tiny-social-example.5.query.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example/tiny-social-example.5.query.sqlpp
new file mode 100644
index 0000000..7bac952
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example/tiny-social-example.5.query.sqlpp
@@ -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 TinySocial;
+
+
+select element TinySocial.`get-object-fields`(r)
+from  FacebookUsers as r
+order by r.id
+;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example/tiny-social-example.6.query.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example/tiny-social-example.6.query.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example/tiny-social-example.6.query.sqlpp
new file mode 100644
index 0000000..080e2c7
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example/tiny-social-example.6.query.sqlpp
@@ -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 TinySocial;
+
+
+select element TinySocial.`get-object-fields`(r)
+from  FacebookMessages as r
+order by r.`message-id`
+;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example/tiny-social-example.7.query.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example/tiny-social-example.7.query.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example/tiny-social-example.7.query.sqlpp
new file mode 100644
index 0000000..1ae85a3
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example/tiny-social-example.7.query.sqlpp
@@ -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 TinySocial;
+
+
+select element TinySocial.`get-object-fields`(r)
+from  TwitterUsers as r
+order by r.`screen-name`
+;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example/tiny-social-example.8.query.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example/tiny-social-example.8.query.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example/tiny-social-example.8.query.sqlpp
new file mode 100644
index 0000000..47e1660
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example/tiny-social-example.8.query.sqlpp
@@ -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 TinySocial;
+
+
+select element TinySocial.`get-object-fields`(r)
+from  TweetMessages as r
+order by r.tweetid
+;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example/tiny-social-example.9.query.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example/tiny-social-example.9.query.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example/tiny-social-example.9.query.sqlpp
new file mode 100644
index 0000000..13ccad3
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/tiny-social-example/tiny-social-example.9.query.sqlpp
@@ -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  : Testing get-object-fields under different queries.
+* Expected Res : Success
+* Date         : 04 Jun 2015
+*/
+
+use TinySocial;
+
+
+select element {'field-name':n,'field-type':t,'count':count}
+from  TweetMessages as r,
+      TinySocial.`get-object-fields`(r) as f
+group by f.`field-name` as n,f.`field-type` as t
+with  count as TinySocial.count(r)
+order by n,t
+;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/object_pairs-2/object_pairs.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/object_pairs-2/object_pairs.1.ddl.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/object_pairs-2/object_pairs.1.ddl.sqlpp
new file mode 100644
index 0000000..96752bf
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/object_pairs-2/object_pairs.1.ddl.sqlpp
@@ -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.
+ */
+
+drop  dataverse TinySocial if exists;
+create  dataverse TinySocial;
+
+use TinySocial;
+
+create type FacebookUserType as
+ open {
+  id : bigint
+}
+
+create  dataset FacebookUsers(FacebookUserType) primary key id;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/object_pairs-2/object_pairs.2.update.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/object_pairs-2/object_pairs.2.update.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/object_pairs-2/object_pairs.2.update.sqlpp
new file mode 100644
index 0000000..cdb516e
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/object_pairs-2/object_pairs.2.update.sqlpp
@@ -0,0 +1,23 @@
+/*
+ * 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 TinySocial;
+
+load  dataset FacebookUsers using localfs 
((`path`=`asterix_nc1://data/tinysocial/fbu.adm`),(`format`=`adm`));

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/object_pairs-2/object_pairs.3.query.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/object_pairs-2/object_pairs.3.query.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/object_pairs-2/object_pairs.3.query.sqlpp
new file mode 100644
index 0000000..39edbac
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/object_pairs-2/object_pairs.3.query.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * 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 TinySocial;
+
+SELECT kv.name, COUNT(*) values
+FROM FacebookUsers fu, fu.employment emp, OBJECT_PAIRS(emp) kv
+GROUP BY kv.name
+ORDER BY values, kv.name;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/object_pairs/object_pairs.1.query.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/object_pairs/object_pairs.1.query.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/object_pairs/object_pairs.1.query.sqlpp
new file mode 100644
index 0000000..d7ea115
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/object_pairs/object_pairs.1.query.sqlpp
@@ -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.
+ */
+
+SELECT name, `value` FROM
+object_pairs({"a":1, "b": "c", "d":[1, "e"]}) t;
\ 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_sqlpp/objects/open-closed-fieldname-conflict_issue173/open-closed-fieldname-conflict_issue173.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/open-closed-fieldname-conflict_issue173/open-closed-fieldname-conflict_issue173.1.ddl.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/open-closed-fieldname-conflict_issue173/open-closed-fieldname-conflict_issue173.1.ddl.sqlpp
new file mode 100644
index 0000000..caeb821
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/open-closed-fieldname-conflict_issue173/open-closed-fieldname-conflict_issue173.1.ddl.sqlpp
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Description    : 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 test;
+
+
+create type test.opentype as
+{
+  id : integer,
+  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_sqlpp/objects/open-closed-fieldname-conflict_issue173/open-closed-fieldname-conflict_issue173.2.update.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/open-closed-fieldname-conflict_issue173/open-closed-fieldname-conflict_issue173.2.update.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/open-closed-fieldname-conflict_issue173/open-closed-fieldname-conflict_issue173.2.update.sqlpp
new file mode 100644
index 0000000..9d49950
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/open-closed-fieldname-conflict_issue173/open-closed-fieldname-conflict_issue173.2.update.sqlpp
@@ -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    : 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 test;
+
+
+insert into testds
+select element {'id':1,'fname':'name'};

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/open-closed-fieldname-conflict_issue173/open-closed-fieldname-conflict_issue173.3.query.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/open-closed-fieldname-conflict_issue173/open-closed-fieldname-conflict_issue173.3.query.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/open-closed-fieldname-conflict_issue173/open-closed-fieldname-conflict_issue173.3.query.sqlpp
new file mode 100644
index 0000000..f15d2d1
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/open-closed-fieldname-conflict_issue173/open-closed-fieldname-conflict_issue173.3.query.sqlpp
@@ -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    : 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 test;
+
+
+select element {x.fname:'smith',test.lowercase('NAME'):'john'}
+from  testds as x
+;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/open-object-constructor_01/open-record-constructor_01.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/open-object-constructor_01/open-record-constructor_01.1.ddl.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/open-object-constructor_01/open-record-constructor_01.1.ddl.sqlpp
new file mode 100644
index 0000000..21479a2
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/open-object-constructor_01/open-record-constructor_01.1.ddl.sqlpp
@@ -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.
+ */
+
+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_sqlpp/objects/open-object-constructor_01/open-record-constructor_01.2.update.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/open-object-constructor_01/open-record-constructor_01.2.update.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/open-object-constructor_01/open-record-constructor_01.2.update.sqlpp
new file mode 100644
index 0000000..bd244d0
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/open-object-constructor_01/open-record-constructor_01.2.update.sqlpp
@@ -0,0 +1,19 @@
+/*
+ * 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_sqlpp/objects/open-object-constructor_01/open-record-constructor_01.3.query.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/open-object-constructor_01/open-record-constructor_01.3.query.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/open-object-constructor_01/open-record-constructor_01.3.query.sqlpp
new file mode 100644
index 0000000..194a9ec
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/open-object-constructor_01/open-record-constructor_01.3.query.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * 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 test;
+
+
+set `import-private-functions` `true`;
+
+select element 
test.`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_sqlpp/objects/open-object-constructor_02/open-record-constructor_02.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/open-object-constructor_02/open-record-constructor_02.1.ddl.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/open-object-constructor_02/open-record-constructor_02.1.ddl.sqlpp
new file mode 100644
index 0000000..21479a2
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/open-object-constructor_02/open-record-constructor_02.1.ddl.sqlpp
@@ -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.
+ */
+
+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_sqlpp/objects/open-object-constructor_02/open-record-constructor_02.2.update.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/open-object-constructor_02/open-record-constructor_02.2.update.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/open-object-constructor_02/open-record-constructor_02.2.update.sqlpp
new file mode 100644
index 0000000..bd244d0
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/open-object-constructor_02/open-record-constructor_02.2.update.sqlpp
@@ -0,0 +1,19 @@
+/*
+ * 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_sqlpp/objects/open-object-constructor_02/open-record-constructor_02.3.query.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/open-object-constructor_02/open-record-constructor_02.3.query.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/open-object-constructor_02/open-record-constructor_02.3.query.sqlpp
new file mode 100644
index 0000000..c997019
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/open-object-constructor_02/open-record-constructor_02.3.query.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * 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 test;
+
+
+set `import-private-functions` `true`;
+
+select element 
test.`open-object-constructor`('foo1',10,'bar1',test.`closed-object-constructor`('bar1.1',10,'bar1.2',20,'bar1.3',30,'bar1.4',test.`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_sqlpp/objects/open-open-fieldname-conflict_issue173/open-open-fieldname-conflict_issue173.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/open-open-fieldname-conflict_issue173/open-open-fieldname-conflict_issue173.1.ddl.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/open-open-fieldname-conflict_issue173/open-open-fieldname-conflict_issue173.1.ddl.sqlpp
new file mode 100644
index 0000000..0551c84
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/open-open-fieldname-conflict_issue173/open-open-fieldname-conflict_issue173.1.ddl.sqlpp
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Description    : 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 test;
+
+
+create type test.opentype as
+{
+  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_sqlpp/objects/open-open-fieldname-conflict_issue173/open-open-fieldname-conflict_issue173.2.update.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/open-open-fieldname-conflict_issue173/open-open-fieldname-conflict_issue173.2.update.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/open-open-fieldname-conflict_issue173/open-open-fieldname-conflict_issue173.2.update.sqlpp
new file mode 100644
index 0000000..28cf025
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/open-open-fieldname-conflict_issue173/open-open-fieldname-conflict_issue173.2.update.sqlpp
@@ -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    : 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 test;
+
+
+insert into testds
+select element {'fname1':'name','fname2':'name'};

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/open-open-fieldname-conflict_issue173/open-open-fieldname-conflict_issue173.3.query.sqlpp
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/open-open-fieldname-conflict_issue173/open-open-fieldname-conflict_issue173.3.query.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/open-open-fieldname-conflict_issue173/open-open-fieldname-conflict_issue173.3.query.sqlpp
new file mode 100644
index 0000000..b83b673
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/open-open-fieldname-conflict_issue173/open-open-fieldname-conflict_issue173.3.query.sqlpp
@@ -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    : 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 test;
+
+
+select element {x.fname1:'john',x.fname2:'smith'}
+from  testds as x
+;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10351a74/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/records/RecordsQueries.xml
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/records/RecordsQueries.xml
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/records/RecordsQueries.xml
deleted file mode 100644
index 10a8702..0000000
--- 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/records/RecordsQueries.xml
+++ /dev/null
@@ -1,143 +0,0 @@
-<!--
- ! 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.
- !-->
-<test-group name="records">
-  <test-case FilePath="records">
-    <compilation-unit name="access-nested-fields">
-      <output-dir compare="Text">access-nested-fields</output-dir>
-    </compilation-unit>
-  </test-case>
-  <test-case FilePath="records">
-    <compilation-unit name="closed-record-constructor_01">
-      <output-dir compare="Text">closed-record-constructor_01</output-dir>
-    </compilation-unit>
-  </test-case>
-  <test-case FilePath="records">
-    <compilation-unit name="closed-record-constructor_02">
-      <output-dir compare="Text">closed-record-constructor_02</output-dir>
-    </compilation-unit>
-  </test-case>
-  <test-case FilePath="records">
-    <compilation-unit name="closed-record-constructor_03">
-      <output-dir compare="Text">closed-record-constructor_03</output-dir>
-    </compilation-unit>
-  </test-case>
-  <test-case FilePath="records">
-    <compilation-unit name="expFieldName">
-      <output-dir compare="Text">expFieldName</output-dir>
-    </compilation-unit>
-  </test-case>
-  <test-case FilePath="records">
-    <compilation-unit name="field-access-by-index_01">
-      <output-dir compare="Text">field-access-by-index_01</output-dir>
-    </compilation-unit>
-  </test-case>
-  <test-case FilePath="records">
-    <compilation-unit name="field-access-on-open-field">
-      <output-dir compare="Text">field-access-on-open-field</output-dir>
-    </compilation-unit>
-  </test-case>
-  <test-case FilePath="records/get-record-fields">
-    <compilation-unit name="documentation-example">
-      <output-dir compare="Text">documentation-example</output-dir>
-    </compilation-unit>
-  </test-case>
-  <!--test-case FilePath="records/get-record-fields">
-      <compilation-unit name="tiny-social-example">
-          <output-dir compare="Text">tiny-social-example</output-dir>
-      </compilation-unit>
-  </test-case!-->
-  <test-case FilePath="records/get-record-fields">
-    <compilation-unit name="tiny-social-example-no-complex-types">
-      <output-dir 
compare="Text">tiny-social-example-no-complex-types</output-dir>
-    </compilation-unit>
-  </test-case>
-  <test-case FilePath="records/get-record-fields">
-    <compilation-unit name="tiny-social-example-only-lists">
-      <output-dir compare="Text">tiny-social-example-only-lists</output-dir>
-    </compilation-unit>
-  </test-case>
-  <test-case FilePath="records/get-record-fields">
-    <compilation-unit name="tiny-social-example-only-records">
-      <output-dir compare="Text">tiny-social-example-only-records</output-dir>
-    </compilation-unit>
-  </test-case>
-  <test-case FilePath="records/get-record-field-value">
-    <compilation-unit name="documentation-example">
-      <output-dir compare="Text">documentation-example</output-dir>
-    </compilation-unit>
-  </test-case>
-  <test-case FilePath="records/get-record-field-value">
-    <compilation-unit name="highly-nested-closed">
-      <output-dir compare="Text">highly-nested-closed</output-dir>
-    </compilation-unit>
-  </test-case>
-  <test-case FilePath="records/get-record-field-value">
-    <compilation-unit name="highly-nested-mixed">
-      <output-dir compare="Text">highly-nested-mixed</output-dir>
-    </compilation-unit>
-  </test-case>
-  <test-case FilePath="records/get-record-field-value">
-    <compilation-unit name="highly-nested-open">
-      <output-dir compare="Text">highly-nested-open</output-dir>
-    </compilation-unit>
-  </test-case>
-  <test-case FilePath="records/get-record-field-value">
-    <compilation-unit name="tiny-social-example">
-      <output-dir compare="Text">tiny-social-example</output-dir>
-    </compilation-unit>
-  </test-case>
-  <test-case FilePath="records">
-    <compilation-unit name="object_pairs">
-      <output-dir compare="Text">object_pairs</output-dir>
-    </compilation-unit>
-  </test-case>
-  <test-case FilePath="records">
-    <compilation-unit name="object_pairs-2">
-      <output-dir compare="Text">object_pairs-2</output-dir>
-    </compilation-unit>
-  </test-case>
-  <test-case FilePath="records">
-    <compilation-unit name="open-record-constructor_01">
-      <output-dir compare="Text">open-record-constructor_01</output-dir>
-    </compilation-unit>
-  </test-case>
-  <test-case FilePath="records">
-    <compilation-unit name="open-record-constructor_02">
-      <output-dir compare="Text">open-record-constructor_02</output-dir>
-    </compilation-unit>
-  </test-case>
-  <test-case FilePath="records">
-    <compilation-unit name="closed-closed-fieldname-conflict_issue173">
-      <output-dir 
compare="Text">closed-closed-fieldname-conflict_issue173</output-dir>
-      <expected-error>Closed fields 0 and 1 have the same field name 
"name"</expected-error>
-    </compilation-unit>
-  </test-case>
-  <test-case FilePath="records">
-    <compilation-unit name="open-closed-fieldname-conflict_issue173">
-      <output-dir 
compare="Text">open-closed-fieldname-conflict_issue173</output-dir>
-      <expected-error>Open field "name" has the same field name as closed 
field at index 0</expected-error>
-    </compilation-unit>
-  </test-case>
-  <test-case FilePath="records">
-    <compilation-unit name="open-open-fieldname-conflict_issue173">
-      <output-dir 
compare="Text">open-open-fieldname-conflict_issue173</output-dir>
-      <expected-error>Open fields 0 and 1 have the same field name 
"name"</expected-error>
-    </compilation-unit>
-  </test-case>
-</test-group>

Reply via email to