You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@asterixdb.apache.org by im...@apache.org on 2015/07/18 03:40:45 UTC

[8/9] incubator-asterixdb git commit: Adding introspection for getting record details.

Adding introspection for getting record details.

Change-Id: Iba15acff0f6830cffbc33d9dac3b5f0c417be844
Reviewed-on: https://asterix-gerrit.ics.uci.edu/313
Tested-by: Jenkins <je...@fulliautomatix.ics.uci.edu>
Reviewed-by: Steven Jacobs <sj...@ucr.edu>


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

Branch: refs/heads/master
Commit: 900bf1345410264e9b48469da93ccbd831920d2e
Parents: 032a178
Author: Preston Carman <pr...@apache.org>
Authored: Wed Jul 8 23:44:13 2015 -0700
Committer: Steven Jacobs <sj...@ucr.edu>
Committed: Mon Jul 13 10:43:48 2015 -0700

----------------------------------------------------------------------
 asterix-app/data/classifications/animals.adm    |   4 +
 asterix-app/pom.xml                             | 409 ++++++++++---------
 .../common/AsterixHyracksIntegrationUtil.java   |  86 ++--
 .../ics/asterix/test/metadata/MetadataTest.java |   4 +-
 .../asterix/test/optimizer/OptimizerTest.java   |   2 +-
 .../ics/asterix/test/runtime/ExecutionTest.java |  21 +-
 .../ics/asterix/test/runtime/RepeatedTest.java  | 105 +++++
 .../queries/records/RecordsQueries.xml          | 127 ++++++
 .../access-nested-fields.1.ddl.aql              |  60 +++
 .../access-nested-fields.10.query.aql           |  11 +
 .../access-nested-fields.11.query.aql           |  11 +
 .../access-nested-fields.12.query.aql           |  11 +
 .../access-nested-fields.2.update.aql           |  10 +
 .../access-nested-fields.3.query.aql            |  12 +
 .../access-nested-fields.4.query.aql            |  12 +
 .../access-nested-fields.5.query.aql            |  12 +
 .../access-nested-fields.6.query.aql            |  12 +
 .../access-nested-fields.7.query.aql            |  12 +
 .../access-nested-fields.8.query.aql            |  11 +
 .../access-nested-fields.9.query.aql            |  11 +
 .../documentation-example.1.query.aql           |  10 +
 .../documentation-example.2.query.aql           |  10 +
 .../documentation-example.3.query.aql           |  10 +
 .../highly-nested-open.1.ddl.aql                |  63 +++
 .../highly-nested-open.2.update.aql             |   9 +
 .../highly-nested-open.3.query.aql              |  11 +
 .../highly-nested-mixed.1.ddl.aql               |  59 +++
 .../highly-nested-mixed.2.update.aql            |   9 +
 .../highly-nested-mixed.3.query.aql             |  11 +
 .../highly-nested-open.1.ddl.aql                |  54 +++
 .../highly-nested-open.2.update.aql             |   9 +
 .../highly-nested-open.3.query.aql              |  11 +
 .../tiny-social-example.1.ddl.aql               |  49 +++
 .../tiny-social-example.2.ddl.aql               |  24 ++
 .../tiny-social-example.3.update.aql            |  18 +
 .../tiny-social-example.4.query.aql             |  13 +
 .../documentation-example.1.query.aql           |  10 +
 ...ny-social-example-no-complex-types.1.ddl.aql |  83 ++++
 ...ny-social-example-no-complex-types.2.ddl.aql |  38 ++
 ...social-example-no-complex-types.3.update.aql |  61 +++
 ...-social-example-no-complex-types.4.query.aql |  10 +
 ...-social-example-no-complex-types.5.query.aql |  10 +
 ...-social-example-no-complex-types.6.query.aql |  10 +
 ...-social-example-no-complex-types.7.query.aql |  10 +
 ...-social-example-no-complex-types.8.query.aql |  10 +
 ...-social-example-no-complex-types.9.query.aql |  13 +
 .../tiny-social-example-only-lists.1.ddl.aql    |  85 ++++
 .../tiny-social-example-only-lists.2.ddl.aql    |  38 ++
 .../tiny-social-example-only-lists.3.update.aql |  63 +++
 .../tiny-social-example-only-lists.4.query.aql  |  10 +
 .../tiny-social-example-only-lists.5.query.aql  |  10 +
 .../tiny-social-example-only-lists.6.query.aql  |  10 +
 .../tiny-social-example-only-lists.7.query.aql  |  10 +
 .../tiny-social-example-only-lists.8.query.aql  |  10 +
 .../tiny-social-example-only-lists.9.query.aql  |  13 +
 .../tiny-social-example-only-records.1.ddl.aql  |  85 ++++
 .../tiny-social-example-only-records.2.ddl.aql  |  38 ++
 ...iny-social-example-only-records.3.update.aql |  63 +++
 ...tiny-social-example-only-records.4.query.aql |  10 +
 ...tiny-social-example-only-records.5.query.aql |  10 +
 ...tiny-social-example-only-records.6.query.aql |  10 +
 ...tiny-social-example-only-records.7.query.aql |  10 +
 ...tiny-social-example-only-records.8.query.aql |  10 +
 ...tiny-social-example-only-records.9.query.aql |  13 +
 .../tiny-social-example.1.ddl.aql               |  47 +++
 .../tiny-social-example.2.ddl.aql               |  24 ++
 .../tiny-social-example.3.update.aql            |  18 +
 .../tiny-social-example.4.query.aql             |  10 +
 .../tiny-social-example.5.query.aql             |  10 +
 .../tiny-social-example.6.query.aql             |  10 +
 .../tiny-social-example.7.query.aql             |  10 +
 .../tiny-social-example.8.query.aql             |  10 +
 .../tiny-social-example.9.query.aql             |  13 +
 .../resources/runtimets/repeatedtestsuite.xml   |  31 ++
 .../access-nested-fields.10.adm                 |   5 +
 .../access-nested-fields.11.adm                 |   5 +
 .../access-nested-fields.12.adm                 |   5 +
 .../access-nested-fields.3.adm                  |   5 +
 .../access-nested-fields.4.adm                  |   5 +
 .../access-nested-fields.5.adm                  |   5 +
 .../access-nested-fields.6.adm                  |   5 +
 .../access-nested-fields.7.adm                  |   5 +
 .../access-nested-fields.8.adm                  |   5 +
 .../access-nested-fields.9.adm                  |   5 +
 .../documentation-example.1.adm                 |   2 +
 .../documentation-example.2.adm                 |   2 +
 .../documentation-example.3.adm                 |   2 +
 .../highly-nested-closed.3.adm                  |   5 +
 .../highly-nested-mixed.3.adm                   |   5 +
 .../highly-nested-open/highly-nested-open.3.adm |   5 +
 .../tiny-social-example.4.adm                   |  25 ++
 .../documentation-example.1.adm                 |   2 +
 .../tiny-social-example-no-complex-types.4.adm  |   2 +
 .../tiny-social-example-no-complex-types.5.adm  |  11 +
 .../tiny-social-example-no-complex-types.6.adm  |  16 +
 .../tiny-social-example-no-complex-types.7.adm  |   5 +
 .../tiny-social-example-no-complex-types.8.adm  |  13 +
 .../tiny-social-example-no-complex-types.9.adm  |   5 +
 .../tiny-social-example-only-lists.4.adm        |   2 +
 .../tiny-social-example-only-lists.5.adm        |  11 +
 .../tiny-social-example-only-lists.6.adm        |  16 +
 .../tiny-social-example-only-lists.7.adm        |   5 +
 .../tiny-social-example-only-lists.8.adm        |  13 +
 .../tiny-social-example-only-lists.9.adm        |   6 +
 .../tiny-social-example-only-records.4.adm      |   2 +
 .../tiny-social-example-only-records.5.adm      |  11 +
 .../tiny-social-example-only-records.6.adm      |  16 +
 .../tiny-social-example-only-records.7.adm      |   5 +
 .../tiny-social-example-only-records.8.adm      |  13 +
 .../tiny-social-example-only-records.9.adm      |   6 +
 .../tiny-social-example.4.adm                   |   2 +
 .../tiny-social-example.5.adm                   |  11 +
 .../tiny-social-example.6.adm                   |  16 +
 .../tiny-social-example.7.adm                   |   5 +
 .../tiny-social-example.8.adm                   |  13 +
 .../tiny-social-example.9.adm                   |   7 +
 .../src/test/resources/runtimets/testsuite.xml  |  65 +--
 .../src/main/resources/schema/asterix-conf.xsd  | 178 ++++----
 .../src/main/resources/schema/yarn_cluster.xsd  | 254 ++++++++----
 asterix-doc/src/site/markdown/aql/functions.md  |  61 +++
 .../indexing/input/AbstractHDFSReader.java      |  23 +-
 .../external/library/JavaFunctionHelper.java    |   8 +-
 .../external/library/java/IJListAccessor.java   |   4 +-
 .../external/library/java/IJRecordAccessor.java |   4 +-
 .../external/library/java/JObjectAccessors.java |  19 +-
 .../library/java/JObjectPointableVisitor.java   |   8 +-
 .../metadata/declared/PKGeneratingAdapter.java  |   6 +-
 .../asterix/builders/AbvsBuilderFactory.java    |  27 ++
 .../asterix/builders/ListBuilderFactory.java    |  29 ++
 .../asterix/builders/RecordBuilderFactory.java  |  25 ++
 .../data/nontagged/printers/ADatePrinter.java   |   8 +-
 .../nontagged/printers/ADateTimePrinter.java    |  10 +-
 .../printers/ADayTimeDurationPrinter.java       |   1 -
 .../data/nontagged/printers/AObjectPrinter.java |  19 +-
 .../data/nontagged/printers/ATimePrinter.java   |  10 +-
 .../data/nontagged/printers/PrintTools.java     |   5 +-
 .../nontagged/printers/csv/ADatePrinter.java    |   1 -
 .../printers/csv/ADateTimePrinter.java          |   1 -
 .../printers/csv/AIntervalPrinter.java          |   2 -
 .../nontagged/printers/csv/AObjectPrinter.java  |  25 +-
 .../printers/json/ADayTimeDurationPrinter.java  |   1 -
 .../printers/json/ADurationPrinter.java         |   2 +-
 .../nontagged/printers/json/AObjectPrinter.java |  26 +-
 .../nontagged/AqlCSVPrinterFactoryProvider.java |  19 +-
 .../AqlJSONPrinterFactoryProvider.java          |  19 +-
 .../nontagged/AqlPrinterFactoryProvider.java    |  21 +-
 .../om/functions/AsterixBuiltinFunctions.java   | 115 ++----
 .../asterix/om/pointables/AListPointable.java   | 181 --------
 .../om/pointables/AListVisitablePointable.java  | 181 ++++++++
 .../asterix/om/pointables/ARecordPointable.java | 288 -------------
 .../pointables/ARecordVisitablePointable.java   | 288 +++++++++++++
 .../om/pointables/PointableAllocator.java       |   4 +-
 .../om/pointables/cast/ACastVisitor.java        |   8 +-
 .../asterix/om/pointables/cast/AListCaster.java |   4 +-
 .../om/pointables/cast/ARecordCaster.java       |   4 +-
 .../pointables/nonvisitor/AListPointable.java   | 193 +++++++++
 .../pointables/nonvisitor/ARecordPointable.java | 335 +++++++++++++++
 .../om/pointables/printer/AListPrinter.java     |   4 +-
 .../om/pointables/printer/APrintVisitor.java    |   8 +-
 .../om/pointables/printer/ARecordPrinter.java   |   4 +-
 .../pointables/printer/csv/APrintVisitor.java   |   8 +-
 .../pointables/printer/csv/ARecordPrinter.java  |   4 +-
 .../pointables/printer/json/AListPrinter.java   |   4 +-
 .../pointables/printer/json/APrintVisitor.java  |   8 +-
 .../pointables/printer/json/ARecordPrinter.java |   4 +-
 .../visitor/IVisitablePointableVisitor.java     |   8 +-
 .../om/typecomputer/impl/AnyTypeComputer.java   |  38 ++
 .../impl/FieldAccessNestedResultType.java       |  23 +-
 .../impl/SubsetCollectionTypeComputer.java      |  71 ++++
 .../asterix/om/util/NonTaggedFormatUtil.java    |   1 +
 .../common/FieldAccessByIndexEvalFactory.java   | 138 -------
 .../common/FieldAccessNestedEvalFactory.java    | 231 -----------
 .../ClosedRecordConstructorDescriptor.java      |  52 +++
 .../OpenRecordConstructorDescriptor.java        | 113 +++++
 .../ClosedRecordConstructorDescriptor.java      |  52 ---
 .../functions/FieldAccessByIndexDescriptor.java |  51 ---
 .../functions/FieldAccessByNameDescriptor.java  | 137 -------
 .../functions/FieldAccessNestedDescriptor.java  |  55 ---
 .../OpenRecordConstructorDescriptor.java        | 113 -----
 .../functions/RecordMergeDescriptor.java        | 262 ------------
 .../records/FieldAccessByIndexDescriptor.java   |  50 +++
 .../records/FieldAccessByIndexEvalFactory.java  | 138 +++++++
 .../records/FieldAccessByNameDescriptor.java    |  43 ++
 .../records/FieldAccessByNameEvalFactory.java   | 111 +++++
 .../records/FieldAccessNestedDescriptor.java    |  54 +++
 .../records/FieldAccessNestedEvalFactory.java   |  68 +++
 .../functions/records/FieldAccessUtil.java      | 194 +++++++++
 .../records/GetRecordFieldValueDescriptor.java  |  50 +++
 .../records/GetRecordFieldValueEvalFactory.java |  98 +++++
 .../records/GetRecordFieldsDescriptor.java      |  50 +++
 .../records/GetRecordFieldsEvalFactory.java     | 101 +++++
 .../functions/records/RecordFieldsUtil.java     | 303 ++++++++++++++
 .../records/RecordMergeDescriptor.java          | 257 ++++++++++++
 .../runtime/formats/NonTaggedDataFormat.java    |  51 ++-
 .../runtime/operators/file/ADMDataParser.java   |  70 +---
 .../testframework/context/TestCaseContext.java  |   1 +
 pom.xml                                         | 126 +++---
 197 files changed, 5855 insertions(+), 2340 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/900bf134/asterix-app/data/classifications/animals.adm
----------------------------------------------------------------------
diff --git a/asterix-app/data/classifications/animals.adm b/asterix-app/data/classifications/animals.adm
new file mode 100644
index 0000000..953f083
--- /dev/null
+++ b/asterix-app/data/classifications/animals.adm
@@ -0,0 +1,4 @@
+{ "id": 1, "class": { "id": 1, "fullClassification": { "id": 1, "Kingdom": "Animalia", "lower": { "id": 1, "Phylum": "Chordata", "lower": { "id": 1, "Class": "Mammalia", "lower": { "id": 1, "Order": "Carnivora", "lower": { "id": 1, "Family": "Mustelinae", "lower": { "id": 1, "Genus": "Gulo", "lower": { "id": 1, "Species": "Gulo" } } } } } } } } }
+{ "id": 2, "class": { "id": 2, "fullClassification": { "id": 2, "Kingdom": "Animalia", "lower": { "id": 2, "Phylum": "Chordata", "lower": { "id": 2, "Class": "Mammalia", "lower": { "id": 2, "Order": "Artiodactyla", "lower": { "id": 2, "Family": "Giraffidae", "lower": { "id": 2, "Genus": "Okapia", "lower": { "id": 2, "Species": "Johnstoni" } } } } } } } } }
+{ "id": 3, "class": { "id": 3, "fullClassification": { "id": 3, "Kingdom": "Animalia", "lower": { "id": 3, "Phylum": "Chordata", "lower": { "id": 3, "Class": "Mammalia", "lower": { "id": 3, "Order": "Atlantogenata", "lower": { "id": 3, "Family": "Afrotheria", "lower": { "id": 3, "Genus": "Paenungulata", "lower": { "id": 3, "Species": "Hyracoidea" } } } } } } } } }
+{ "id": 4, "class": { "id": 4, "fullClassification": { "id": 4, "Kingdom": "Animalia", "lower": { "id": 4, "Phylum": "Chordata", "lower": { "id": 4, "Class": "Aves", "lower": { "id": 4, "Order": "Accipitriformes", "lower": { "id": 4, "Family": "Accipitridae", "lower": { "id": 4, "Genus": "Buteo", "lower": { "id": 4, "Species": "Jamaicensis" } } } } } } } } }

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/900bf134/asterix-app/pom.xml
----------------------------------------------------------------------
diff --git a/asterix-app/pom.xml b/asterix-app/pom.xml
index 2db0974..cad13ce 100644
--- a/asterix-app/pom.xml
+++ b/asterix-app/pom.xml
@@ -7,221 +7,224 @@
 	WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ! See the 
 	License for the specific language governing permissions and ! limitations 
 	under the License. ! -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-  <parent>
-    <artifactId>asterix</artifactId>
-    <groupId>edu.uci.ics.asterix</groupId>
-    <version>0.8.7-SNAPSHOT</version>
-  </parent>
-  <artifactId>asterix-app</artifactId>
- 
-  <licenses>
-    <license>
-      <name>Apache License, Version 2.0</name>
-      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
-      <distribution>repo</distribution>
-      <comments>A business-friendly OSS license</comments>
-    </license>
-  </licenses>
- 
-	<build>
-		<plugins>
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-compiler-plugin</artifactId>
-				<version>2.3.2</version>
-				<configuration>
-					<source>1.7</source>
-					<target>1.7</target>
-					<fork>true</fork>
-				</configuration>
-			</plugin>
-			<plugin>
-				<groupId>org.codehaus.mojo</groupId>
-				<artifactId>appassembler-maven-plugin</artifactId>
-				<version>1.0</version>
-				<executions>
-					<execution>
-						<configuration>
-							<programs>
-								<program>
-									<mainClass>edu.uci.ics.asterix.drivers.AsterixWebServer</mainClass>
-									<name>asterix-web</name>
-								</program>
-								<program>
-									<mainClass>edu.uci.ics.asterix.drivers.AsterixClientDriver</mainClass>
-									<name>asterix-cmd</name>
-								</program>
-								<program>
-									<mainClass>edu.uci.ics.asterix.drivers.AsterixCLI</mainClass>
-									<name>asterix-cli</name>
-								</program>
-							</programs>
-							<repositoryLayout>flat</repositoryLayout>
-							<repositoryName>lib</repositoryName>
-						</configuration>
-						<phase>package</phase>
-						<goals>
-							<goal>assemble</goal>
-						</goals>
-					</execution>
-				</executions>
-			</plugin>
-			<plugin>
-				<artifactId>maven-assembly-plugin</artifactId>
-				<version>2.2-beta-5</version>
-				<executions>
-					<execution>
-						<configuration>
-							<descriptors>
-								<descriptor>src/main/assembly/binary-assembly.xml</descriptor>
-							</descriptors>
-						</configuration>
-						<phase>package</phase>
-						<goals>
-							<goal>attached</goal>
-						</goals>
-					</execution>
-				</executions>
-			</plugin>
-		</plugins>
-	</build>
+<project
+    xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <artifactId>asterix</artifactId>
+        <groupId>edu.uci.ics.asterix</groupId>
+        <version>0.8.7-SNAPSHOT</version>
+    </parent>
+    <artifactId>asterix-app</artifactId>
 
-	<dependencies>
-		<dependency>
-			<groupId>javax.servlet</groupId>
-			<artifactId>servlet-api</artifactId>
-			<type>jar</type>
-		</dependency>
-		<dependency>
-			<groupId>org.eclipse.jetty</groupId>
-			<artifactId>jetty-server</artifactId>
-			<version>8.0.0.M2</version>
-			<type>jar</type>
-			<scope>compile</scope>
-		</dependency>
-		<dependency>
-			<groupId>org.eclipse.jetty</groupId>
-			<artifactId>jetty-servlet</artifactId>
-			<version>8.0.0.M2</version>
-			<type>jar</type>
-			<scope>compile</scope>
-		</dependency>
-		<dependency>
-			<groupId>edu.uci.ics.hyracks</groupId>
-			<artifactId>hyracks-control-cc</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>edu.uci.ics.hyracks</groupId>
-			<artifactId>hyracks-control-nc</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>edu.uci.ics.hyracks</groupId>
-			<artifactId>algebricks-compiler</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>edu.uci.ics.hyracks</groupId>
-			<artifactId>hyracks-client</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>edu.uci.ics.asterix</groupId>
-			<artifactId>asterix-algebra</artifactId>
-			<version>0.8.7-SNAPSHOT</version>
-			<scope>compile</scope>
-		</dependency>
-		<dependency>
-			<groupId>edu.uci.ics.asterix</groupId>
-			<artifactId>asterix-aql</artifactId>
-			<version>0.8.7-SNAPSHOT</version>
-			<type>jar</type>
-			<scope>compile</scope>
-		</dependency>
-		<dependency>
-			<groupId>edu.uci.ics.asterix</groupId>
-			<artifactId>asterix-om</artifactId>
-			<version>0.8.7-SNAPSHOT</version>
-			<type>jar</type>
-			<scope>compile</scope>
-		</dependency>
-		<dependency>
-			<groupId>edu.uci.ics.asterix</groupId>
-			<artifactId>asterix-metadata</artifactId>
-			<version>0.8.7-SNAPSHOT</version>
-			<type>jar</type>
-			<scope>compile</scope>
-		</dependency>
-		<dependency>
-			<groupId>edu.uci.ics.asterix</groupId>
-			<artifactId>asterix-tools</artifactId>
-			<version>0.8.7-SNAPSHOT</version>
-			<type>jar</type>
-			<scope>compile</scope>
-		</dependency>
-		<dependency>
-			<groupId>edu.uci.ics.asterix</groupId>
-			<artifactId>asterix-common</artifactId>
-			<version>0.8.7-SNAPSHOT</version>
-			<type>jar</type>
-			<scope>compile</scope>
-		</dependency>
-		<dependency>
-			<groupId>edu.uci.ics.asterix</groupId>
-			<artifactId>asterix-common</artifactId>
-			<version>0.8.7-SNAPSHOT</version>
-			<type>test-jar</type>
-			<scope>test</scope>
-		</dependency>
+    <licenses>
+        <license>
+            <name>Apache License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+            <comments>A business-friendly OSS license</comments>
+        </license>
+    </licenses>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <version>2.3.2</version>
+                <configuration>
+                    <source>1.7</source>
+                    <target>1.7</target>
+                    <fork>true</fork>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>appassembler-maven-plugin</artifactId>
+                <version>1.0</version>
+                <executions>
+                    <execution>
+                        <configuration>
+                            <programs>
+                                <program>
+                                    <mainClass>edu.uci.ics.asterix.drivers.AsterixWebServer</mainClass>
+                                    <name>asterix-web</name>
+                                </program>
+                                <program>
+                                    <mainClass>edu.uci.ics.asterix.drivers.AsterixClientDriver</mainClass>
+                                    <name>asterix-cmd</name>
+                                </program>
+                                <program>
+                                    <mainClass>edu.uci.ics.asterix.drivers.AsterixCLI</mainClass>
+                                    <name>asterix-cli</name>
+                                </program>
+                            </programs>
+                            <repositoryLayout>flat</repositoryLayout>
+                            <repositoryName>lib</repositoryName>
+                        </configuration>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>assemble</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <artifactId>maven-assembly-plugin</artifactId>
+                <version>2.2-beta-5</version>
+                <executions>
+                    <execution>
+                        <configuration>
+                            <descriptors>
+                                <descriptor>src/main/assembly/binary-assembly.xml</descriptor>
+                            </descriptors>
+                        </configuration>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>attached</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+    <dependencies>
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>servlet-api</artifactId>
+            <type>jar</type>
+        </dependency>
+        <dependency>
+            <groupId>org.eclipse.jetty</groupId>
+            <artifactId>jetty-server</artifactId>
+            <version>8.0.0.M2</version>
+            <type>jar</type>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.eclipse.jetty</groupId>
+            <artifactId>jetty-servlet</artifactId>
+            <version>8.0.0.M2</version>
+            <type>jar</type>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>edu.uci.ics.hyracks</groupId>
+            <artifactId>hyracks-control-cc</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>edu.uci.ics.hyracks</groupId>
+            <artifactId>hyracks-control-nc</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>edu.uci.ics.hyracks</groupId>
+            <artifactId>algebricks-compiler</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>edu.uci.ics.hyracks</groupId>
+            <artifactId>hyracks-client</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>edu.uci.ics.asterix</groupId>
+            <artifactId>asterix-algebra</artifactId>
+            <version>0.8.7-SNAPSHOT</version>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>edu.uci.ics.asterix</groupId>
+            <artifactId>asterix-aql</artifactId>
+            <version>0.8.7-SNAPSHOT</version>
+            <type>jar</type>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>edu.uci.ics.asterix</groupId>
+            <artifactId>asterix-om</artifactId>
+            <version>0.8.7-SNAPSHOT</version>
+            <type>jar</type>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>edu.uci.ics.asterix</groupId>
+            <artifactId>asterix-metadata</artifactId>
+            <version>0.8.7-SNAPSHOT</version>
+            <type>jar</type>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>edu.uci.ics.asterix</groupId>
+            <artifactId>asterix-tools</artifactId>
+            <version>0.8.7-SNAPSHOT</version>
+            <type>jar</type>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>edu.uci.ics.asterix</groupId>
+            <artifactId>asterix-common</artifactId>
+            <version>0.8.7-SNAPSHOT</version>
+            <type>jar</type>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>edu.uci.ics.asterix</groupId>
+            <artifactId>asterix-common</artifactId>
+            <version>0.8.7-SNAPSHOT</version>
+            <type>test-jar</type>
+            <scope>test</scope>
+        </dependency>
 		<!-- posssible remove this <dependency> <groupId>com.kenai.nbpwr</groupId> 
 			<artifactId>org-apache-commons-io</artifactId> <version>1.3.1-201002241208</version> 
 			<scope>test</scope> </dependency> -->
-		<dependency>
-			<groupId>edu.uci.ics.asterix</groupId>
-			<artifactId>asterix-transactions</artifactId>
-			<version>0.8.7-SNAPSHOT</version>
-			<scope>compile</scope>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.hadoop</groupId>
-			<artifactId>hadoop-client</artifactId>
-			<type>jar</type>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.hadoop</groupId>
-			<artifactId>hadoop-hdfs</artifactId>
-			<type>jar</type>
-			<scope>test</scope>
-		</dependency>
-		<dependency>
-			<groupId>xerces</groupId>
-			<artifactId>xercesImpl</artifactId>
-			<version>2.9.1</version>
-			<type>jar</type>
-			<scope>compile</scope>
-		</dependency>
-		<dependency>
-			<groupId>xalan</groupId>
-			<artifactId>xalan</artifactId>
-			<version>2.7.1</version>
-			<type>jar</type>
-			<scope>test</scope>
-		</dependency>
-		<dependency>
-			<groupId>edu.uci.ics.asterix</groupId>
-			<artifactId>asterix-test-framework</artifactId>
-			<version>0.8.7-SNAPSHOT</version>
-			<scope>test</scope>
-		</dependency>
+        <dependency>
+            <groupId>edu.uci.ics.asterix</groupId>
+            <artifactId>asterix-transactions</artifactId>
+            <version>0.8.7-SNAPSHOT</version>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.hadoop</groupId>
+            <artifactId>hadoop-client</artifactId>
+            <type>jar</type>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.hadoop</groupId>
+            <artifactId>hadoop-hdfs</artifactId>
+            <type>jar</type>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>xerces</groupId>
+            <artifactId>xercesImpl</artifactId>
+            <version>2.9.1</version>
+            <type>jar</type>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>xalan</groupId>
+            <artifactId>xalan</artifactId>
+            <version>2.7.1</version>
+            <type>jar</type>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>edu.uci.ics.asterix</groupId>
+            <artifactId>asterix-test-framework</artifactId>
+            <version>0.8.7-SNAPSHOT</version>
+            <scope>test</scope>
+        </dependency>
         <dependency>
             <groupId>org.mockito</groupId>
             <artifactId>mockito-all</artifactId>
             <version>1.10.19</version>
         </dependency>
         <dependency>
-        <groupId>com.e-movimento.tinytools</groupId>
+            <groupId>com.e-movimento.tinytools</groupId>
             <artifactId>privilegedaccessor</artifactId>
             <version>1.2.2</version>
         </dependency>
-	</dependencies>
+    </dependencies>
 
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/900bf134/asterix-app/src/main/java/edu/uci/ics/asterix/api/common/AsterixHyracksIntegrationUtil.java
----------------------------------------------------------------------
diff --git a/asterix-app/src/main/java/edu/uci/ics/asterix/api/common/AsterixHyracksIntegrationUtil.java b/asterix-app/src/main/java/edu/uci/ics/asterix/api/common/AsterixHyracksIntegrationUtil.java
index a1c5348..91aa897 100644
--- a/asterix-app/src/main/java/edu/uci/ics/asterix/api/common/AsterixHyracksIntegrationUtil.java
+++ b/asterix-app/src/main/java/edu/uci/ics/asterix/api/common/AsterixHyracksIntegrationUtil.java
@@ -32,16 +32,15 @@ import edu.uci.ics.hyracks.control.nc.NodeControllerService;
 
 public class AsterixHyracksIntegrationUtil {
 
-    public static final String[] NC_IDS = { "nc1", "nc2" };
-    public static final String[] ASTERIX_DATA_DIRS = new String[] { "nc1data", "nc2data" };
+    public static final int NODES = 2;
+    public static final int PARTITONS = 2;
 
     public static final int DEFAULT_HYRACKS_CC_CLIENT_PORT = 1098;
 
     public static final int DEFAULT_HYRACKS_CC_CLUSTER_PORT = 1099;
 
     private static ClusterControllerService cc;
-    private static NodeControllerService nc1;
-    private static NodeControllerService nc2;
+    private static NodeControllerService[] ncs = new NodeControllerService[NODES];
     private static IHyracksClientConnection hcc;
 
     public static void init() throws Exception {
@@ -58,48 +57,61 @@ public class AsterixHyracksIntegrationUtil {
         cc = new ClusterControllerService(ccConfig);
         cc.start();
 
-        NCConfig ncConfig1 = new NCConfig();
-        ncConfig1.ccHost = "localhost";
-        ncConfig1.ccPort = DEFAULT_HYRACKS_CC_CLUSTER_PORT;
-        ncConfig1.clusterNetIPAddress = "127.0.0.1";
-        ncConfig1.dataIPAddress = "127.0.0.1";
-        ncConfig1.resultIPAddress = "127.0.0.1";
-        ncConfig1.nodeId = NC_IDS[0];
-        ncConfig1.resultTTL = 30000;
-        ncConfig1.resultSweepThreshold = 1000;
-        ncConfig1.ioDevices = System.getProperty("java.io.tmpdir") + File.separator + "nc1/iodevice0" + ","
-                + System.getProperty("java.io.tmpdir") + File.separator + "nc1/iodevice1";
-        ncConfig1.appNCMainClass = NCApplicationEntryPoint.class.getName();
-        nc1 = new NodeControllerService(ncConfig1);
-        nc1.start();
-
-        NCConfig ncConfig2 = new NCConfig();
-        ncConfig2.ccHost = "localhost";
-        ncConfig2.ccPort = DEFAULT_HYRACKS_CC_CLUSTER_PORT;
-        ncConfig2.clusterNetIPAddress = "127.0.0.1";
-        ncConfig2.dataIPAddress = "127.0.0.1";
-        ncConfig2.resultIPAddress = "127.0.0.1";
-        ncConfig2.nodeId = NC_IDS[1];
-        ncConfig2.resultTTL = 30000;
-        ncConfig2.resultSweepThreshold = 1000;
-        ncConfig2.ioDevices = System.getProperty("java.io.tmpdir") + File.separator + "nc2/iodevice0" + ","
-                + System.getProperty("java.io.tmpdir") + File.separator + "nc2/iodevice1";
-        ncConfig2.appNCMainClass = NCApplicationEntryPoint.class.getName();
-        nc2 = new NodeControllerService(ncConfig2);
-        nc2.start();
+        int n = 0;
+        for (String ncName : getNcNames()) {
+            NCConfig ncConfig1 = new NCConfig();
+            ncConfig1.ccHost = "localhost";
+            ncConfig1.ccPort = DEFAULT_HYRACKS_CC_CLUSTER_PORT;
+            ncConfig1.clusterNetIPAddress = "127.0.0.1";
+            ncConfig1.dataIPAddress = "127.0.0.1";
+            ncConfig1.resultIPAddress = "127.0.0.1";
+            ncConfig1.nodeId = ncName;
+            ncConfig1.resultTTL = 30000;
+            ncConfig1.resultSweepThreshold = 1000;
+            for (int p = 0; p < PARTITONS; ++p) {
+                if (p == 0) {
+                    ncConfig1.ioDevices = System.getProperty("java.io.tmpdir") + File.separator + ncConfig1.nodeId
+                            + "/iodevice" + p;
+                } else {
+                    ncConfig1.ioDevices += "," + System.getProperty("java.io.tmpdir") + File.separator
+                            + ncConfig1.nodeId + "/iodevice" + p;
+                }
+            }
+            ncConfig1.appNCMainClass = NCApplicationEntryPoint.class.getName();
+            ncs[n] = new NodeControllerService(ncConfig1);
+            ncs[n].start();
+            ++n;
+        }
 
         hcc = new HyracksConnection(cc.getConfig().clientNetIpAddress, cc.getConfig().clientNetPort);
     }
 
+    public static String[] getNcNames() {
+        String[] names = new String[NODES];
+        for (int n = 0; n < NODES; ++n) {
+            names[n] = "nc" + (n + 1);
+        }
+        return names;
+    }
+
+    public static String[] getDataDirs() {
+        String[] names = new String[NODES];
+        for (int n = 0; n < NODES; ++n) {
+            names[n] = "nc" + (n + 1) + "data";
+        }
+        return names;
+    }
+
     public static IHyracksClientConnection getHyracksClientConnection() {
         return hcc;
     }
 
     public static void deinit() throws Exception {
-        if (nc2 != null)
-            nc2.stop();
-        if (nc1 != null)
-            nc1.stop();
+        for (int n = 0; n < ncs.length; ++n) {
+            if (ncs[n] != null)
+                ncs[n].stop();
+
+        }
         if (cc != null)
             cc.stop();
     }

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/900bf134/asterix-app/src/test/java/edu/uci/ics/asterix/test/metadata/MetadataTest.java
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/java/edu/uci/ics/asterix/test/metadata/MetadataTest.java b/asterix-app/src/test/java/edu/uci/ics/asterix/test/metadata/MetadataTest.java
index 0197d4a..069c5aa 100644
--- a/asterix-app/src/test/java/edu/uci/ics/asterix/test/metadata/MetadataTest.java
+++ b/asterix-app/src/test/java/edu/uci/ics/asterix/test/metadata/MetadataTest.java
@@ -73,13 +73,13 @@ public class MetadataTest {
         }
 
         // clean up the files written by the ASTERIX storage manager
-        for (String d : AsterixHyracksIntegrationUtil.ASTERIX_DATA_DIRS) {
+        for (String d : AsterixHyracksIntegrationUtil.getDataDirs()) {
             TestsUtils.deleteRec(new File(d));
         }
     }
 
     private static void deleteTransactionLogs() throws Exception {
-        for (String ncId : AsterixHyracksIntegrationUtil.NC_IDS) {
+        for (String ncId : AsterixHyracksIntegrationUtil.getNcNames()) {
             File log = new File(txnProperties.getLogDirectory(ncId));
             if (log.exists()) {
                 FileUtils.deleteDirectory(log);

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/900bf134/asterix-app/src/test/java/edu/uci/ics/asterix/test/optimizer/OptimizerTest.java
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/java/edu/uci/ics/asterix/test/optimizer/OptimizerTest.java b/asterix-app/src/test/java/edu/uci/ics/asterix/test/optimizer/OptimizerTest.java
index 7171642..58531aa 100644
--- a/asterix-app/src/test/java/edu/uci/ics/asterix/test/optimizer/OptimizerTest.java
+++ b/asterix-app/src/test/java/edu/uci/ics/asterix/test/optimizer/OptimizerTest.java
@@ -89,7 +89,7 @@ public class OptimizerTest {
     }
 
     private static void deleteTransactionLogs() throws Exception {
-        for (String ncId : AsterixHyracksIntegrationUtil.NC_IDS) {
+        for (String ncId : AsterixHyracksIntegrationUtil.getNcNames()) {
             File log = new File(txnProperties.getLogDirectory(ncId));
             if (log.exists()) {
                 FileUtils.deleteDirectory(log);

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/900bf134/asterix-app/src/test/java/edu/uci/ics/asterix/test/runtime/ExecutionTest.java
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/java/edu/uci/ics/asterix/test/runtime/ExecutionTest.java b/asterix-app/src/test/java/edu/uci/ics/asterix/test/runtime/ExecutionTest.java
index 3e5b734..8547eb0 100644
--- a/asterix-app/src/test/java/edu/uci/ics/asterix/test/runtime/ExecutionTest.java
+++ b/asterix-app/src/test/java/edu/uci/ics/asterix/test/runtime/ExecutionTest.java
@@ -44,16 +44,15 @@ import edu.uci.ics.asterix.testframework.context.TestCaseContext;
 @RunWith(Parameterized.class)
 public class ExecutionTest {
 
-    private static final Logger LOGGER = Logger.getLogger(ExecutionTest.class.getName());
+    protected static final Logger LOGGER = Logger.getLogger(ExecutionTest.class.getName());
 
-    private static final String PATH_ACTUAL = "rttest" + File.separator;
-    private static final String PATH_BASE = StringUtils.join(new String[] { "src", "test", "resources", "runtimets" },
-            File.separator);
+    protected static final String PATH_ACTUAL = "rttest" + File.separator;
+    protected static final String PATH_BASE = StringUtils.join(
+            new String[] { "src", "test", "resources", "runtimets" }, File.separator);
 
-    private static final String TEST_CONFIG_FILE_NAME = "asterix-build-configuration.xml";
-    private static final String[] ASTERIX_DATA_DIRS = new String[] { "nc1data", "nc2data" };
+    protected static final String TEST_CONFIG_FILE_NAME = "asterix-build-configuration.xml";
 
-    private static AsterixTransactionProperties txnProperties;
+    protected static AsterixTransactionProperties txnProperties;
 
     @BeforeClass
     public static void setUp() throws Exception {
@@ -96,14 +95,14 @@ public class ExecutionTest {
             outdir.delete();
         }
         // clean up the files written by the ASTERIX storage manager
-        for (String d : ASTERIX_DATA_DIRS) {
+        for (String d : AsterixHyracksIntegrationUtil.getDataDirs()) {
             TestsUtils.deleteRec(new File(d));
         }
         HDFSCluster.getInstance().cleanup();
     }
 
     private static void deleteTransactionLogs() throws Exception {
-        for (String ncId : AsterixHyracksIntegrationUtil.NC_IDS) {
+        for (String ncId : AsterixHyracksIntegrationUtil.getNcNames()) {
             File log = new File(txnProperties.getLogDirectory(ncId));
             if (log.exists()) {
                 FileUtils.deleteDirectory(log);
@@ -120,7 +119,7 @@ public class ExecutionTest {
         return testArgs;
     }
 
-    private static Collection<Object[]> buildTestsInXml(String xmlfile) throws Exception {
+    protected static Collection<Object[]> buildTestsInXml(String xmlfile) throws Exception {
         Collection<Object[]> testArgs = new ArrayList<Object[]>();
         TestCaseContext.Builder b = new TestCaseContext.Builder();
         for (TestCaseContext ctx : b.build(new File(PATH_BASE), xmlfile)) {
@@ -130,7 +129,7 @@ public class ExecutionTest {
 
     }
 
-    private TestCaseContext tcCtx;
+    protected TestCaseContext tcCtx;
 
     public ExecutionTest(TestCaseContext tcCtx) {
         this.tcCtx = tcCtx;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/900bf134/asterix-app/src/test/java/edu/uci/ics/asterix/test/runtime/RepeatedTest.java
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/java/edu/uci/ics/asterix/test/runtime/RepeatedTest.java b/asterix-app/src/test/java/edu/uci/ics/asterix/test/runtime/RepeatedTest.java
new file mode 100644
index 0000000..faeb688
--- /dev/null
+++ b/asterix-app/src/test/java/edu/uci/ics/asterix/test/runtime/RepeatedTest.java
@@ -0,0 +1,105 @@
+/*
+ * Copyright 2009-2013 by The Regents of the University of California
+ * Licensed 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 from
+ *
+ *     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.
+ */
+package edu.uci.ics.asterix.test.runtime;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.util.Collection;
+
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.MethodRule;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.junit.runners.Parameterized.Parameters;
+import org.junit.runners.model.FrameworkMethod;
+import org.junit.runners.model.Statement;
+
+import edu.uci.ics.asterix.test.aql.TestsUtils;
+import edu.uci.ics.asterix.test.runtime.RepeatRule.Repeat;
+import edu.uci.ics.asterix.testframework.context.TestCaseContext;
+
+/**
+ * Runs runtime test cases that have been identified in the repeatedtestsuite.xml.
+ * 
+ * Each test is run 10000 times.
+ */
+class RepeatRule implements MethodRule {
+
+    @Retention(RetentionPolicy.RUNTIME)
+    @Target({ java.lang.annotation.ElementType.METHOD })
+    public @interface Repeat {
+        public abstract int times();
+
+    }
+
+    private static class RepeatStatement extends Statement {
+
+        private final int times;
+        private final Statement statement;
+
+        private RepeatStatement(int times, Statement statement) {
+            this.times = times;
+            this.statement = statement;
+        }
+
+        @Override
+        public void evaluate() throws Throwable {
+            for (int i = 0; i < times; i++) {
+                statement.evaluate();
+            }
+        }
+    }
+
+    @Override
+    public Statement apply(Statement statement, FrameworkMethod method, Object target) {
+        Statement result = statement;
+        Repeat repeat = method.getAnnotation(Repeat.class);
+        if (repeat != null) {
+            int times = repeat.times();
+            result = new RepeatStatement(times, statement);
+        }
+        return result;
+
+    }
+}
+
+@RunWith(Parameterized.class)
+public class RepeatedTest extends ExecutionTest {
+
+    private int count;
+    
+    @Parameters
+    public static Collection<Object[]> tests() throws Exception {
+        Collection<Object[]> testArgs = buildTestsInXml(TestCaseContext.DEFAULT_REPEADED_TESTSUITE_XML_NAME);
+        return testArgs;
+    }
+
+    public RepeatedTest(TestCaseContext tcCtx) {
+        super(tcCtx);
+        count = 0;
+    }
+
+    @Rule
+    public RepeatRule repeatRule = new RepeatRule();
+
+    @Test
+    @Repeat(times = 10000)
+    public void test() throws Exception {
+        System.err.println("***** Test Count: " + (++count) + " ******");
+        TestsUtils.executeTest(PATH_ACTUAL, tcCtx, null, false);
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/900bf134/asterix-app/src/test/resources/runtimets/queries/records/RecordsQueries.xml
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/records/RecordsQueries.xml b/asterix-app/src/test/resources/runtimets/queries/records/RecordsQueries.xml
new file mode 100644
index 0000000..283cdea
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/records/RecordsQueries.xml
@@ -0,0 +1,127 @@
+<!--
+ ! Copyright 2009-2013 by The Regents of the University of California
+ ! Licensed 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 from
+ !
+ !     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-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="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>edu.uci.ics.asterix.common.exceptions.AsterixException</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>edu.uci.ics.asterix.common.exceptions.AsterixException</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>edu.uci.ics.asterix.common.exceptions.AsterixException</expected-error>
+            </compilation-unit>
+        </test-case>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/900bf134/asterix-app/src/test/resources/runtimets/queries/records/access-nested-fields/access-nested-fields.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/records/access-nested-fields/access-nested-fields.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/records/access-nested-fields/access-nested-fields.1.ddl.aql
new file mode 100644
index 0000000..6681a75
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/records/access-nested-fields/access-nested-fields.1.ddl.aql
@@ -0,0 +1,60 @@
+/*
+* Description  : Access a records nested records at each level.
+* Expected Res : Success
+* Date         : 04 Jun 2015
+*/
+drop dataverse test if exists;
+create dataverse test;
+
+use dataverse test;
+
+create type S as open{
+	id: int64
+}
+
+create type GS as closed{
+	id: int64,
+	Genus: string,
+	lower: S
+}
+
+create type FGS as open{
+	id: int64,
+	Family: string
+}
+
+create type OFGS as closed{
+	id: int64,
+	Order: string,
+	lower: FGS
+}
+
+create type COFGS as closed{
+	id: int64,
+	Class: string,
+	lower: OFGS
+}
+
+create type PCOFGS as closed{
+	id: int64,
+	Phylum: string,
+	lower: COFGS
+}
+
+create type KPCOFGS as open{
+	id: int64,
+	Kingdom: string
+}
+
+create type Classification as closed{
+	id: int64,
+	fullClassification:KPCOFGS
+}
+
+create type Animal as open{
+	id: int64
+}
+
+create dataset Animals(Animal)
+primary key id;
+

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/900bf134/asterix-app/src/test/resources/runtimets/queries/records/access-nested-fields/access-nested-fields.10.query.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/records/access-nested-fields/access-nested-fields.10.query.aql b/asterix-app/src/test/resources/runtimets/queries/records/access-nested-fields/access-nested-fields.10.query.aql
new file mode 100644
index 0000000..f7198ce
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/records/access-nested-fields/access-nested-fields.10.query.aql
@@ -0,0 +1,11 @@
+/*
+* Description  : Access a records nested records at each level.
+* Expected Res : Success
+* Date         : 04 Jun 2015
+*/
+use dataverse test;
+
+for $test in dataset Animals
+let $result := $test.class.fullClassification
+order by $result.id
+return $result;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/900bf134/asterix-app/src/test/resources/runtimets/queries/records/access-nested-fields/access-nested-fields.11.query.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/records/access-nested-fields/access-nested-fields.11.query.aql b/asterix-app/src/test/resources/runtimets/queries/records/access-nested-fields/access-nested-fields.11.query.aql
new file mode 100644
index 0000000..262bee1
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/records/access-nested-fields/access-nested-fields.11.query.aql
@@ -0,0 +1,11 @@
+/*
+* Description  : Access a records nested records at each level.
+* Expected Res : Success
+* Date         : 04 Jun 2015
+*/
+use dataverse test;
+
+for $test in dataset Animals
+let $result := $test.class
+order by $result.id
+return $result;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/900bf134/asterix-app/src/test/resources/runtimets/queries/records/access-nested-fields/access-nested-fields.12.query.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/records/access-nested-fields/access-nested-fields.12.query.aql b/asterix-app/src/test/resources/runtimets/queries/records/access-nested-fields/access-nested-fields.12.query.aql
new file mode 100644
index 0000000..2b28594
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/records/access-nested-fields/access-nested-fields.12.query.aql
@@ -0,0 +1,11 @@
+/*
+* Description  : Access a records nested records at each level.
+* Expected Res : Success
+* Date         : 04 Jun 2015
+*/
+use dataverse test;
+
+for $test in dataset Animals
+let $result := $test
+order by $result.id
+return $result;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/900bf134/asterix-app/src/test/resources/runtimets/queries/records/access-nested-fields/access-nested-fields.2.update.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/records/access-nested-fields/access-nested-fields.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/records/access-nested-fields/access-nested-fields.2.update.aql
new file mode 100644
index 0000000..73ce6f5
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/records/access-nested-fields/access-nested-fields.2.update.aql
@@ -0,0 +1,10 @@
+/*
+* Description  : Access a records nested records at each level.
+* Expected Res : Success
+* Date         : 04 Jun 2015
+*/
+
+use dataverse test;
+
+load dataset Animals using localfs
+(("path"="nc1://data/classifications/animals.adm"),("format"="adm"));

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/900bf134/asterix-app/src/test/resources/runtimets/queries/records/access-nested-fields/access-nested-fields.3.query.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/records/access-nested-fields/access-nested-fields.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/records/access-nested-fields/access-nested-fields.3.query.aql
new file mode 100644
index 0000000..e92f44e
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/records/access-nested-fields/access-nested-fields.3.query.aql
@@ -0,0 +1,12 @@
+/*
+* Description  : Access a records nested records at each level.
+* Expected Res : Success
+* Date         : 04 Jun 2015
+*/
+
+use dataverse test;
+
+for $test in dataset Animals
+let $result := $test.class.fullClassification.lower.lower.lower.lower.lower.lower.Species
+order by $result
+return $result;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/900bf134/asterix-app/src/test/resources/runtimets/queries/records/access-nested-fields/access-nested-fields.4.query.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/records/access-nested-fields/access-nested-fields.4.query.aql b/asterix-app/src/test/resources/runtimets/queries/records/access-nested-fields/access-nested-fields.4.query.aql
new file mode 100644
index 0000000..6e8e9c8
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/records/access-nested-fields/access-nested-fields.4.query.aql
@@ -0,0 +1,12 @@
+/*
+* Description  : Access a records nested records at each level.
+* Expected Res : Success
+* Date         : 04 Jun 2015
+*/
+
+use dataverse test;
+
+for $test in dataset Animals
+let $result := $test.class.fullClassification.lower.lower.lower.lower.lower.lower
+order by $result.id
+return $result;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/900bf134/asterix-app/src/test/resources/runtimets/queries/records/access-nested-fields/access-nested-fields.5.query.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/records/access-nested-fields/access-nested-fields.5.query.aql b/asterix-app/src/test/resources/runtimets/queries/records/access-nested-fields/access-nested-fields.5.query.aql
new file mode 100644
index 0000000..718129a
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/records/access-nested-fields/access-nested-fields.5.query.aql
@@ -0,0 +1,12 @@
+/*
+* Description  : Access a records nested records at each level.
+* Expected Res : Success
+* Date         : 04 Jun 2015
+*/
+
+use dataverse test;
+
+for $test in dataset Animals
+let $result := $test.class.fullClassification.lower.lower.lower.lower.lower
+order by $result.id
+return $result;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/900bf134/asterix-app/src/test/resources/runtimets/queries/records/access-nested-fields/access-nested-fields.6.query.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/records/access-nested-fields/access-nested-fields.6.query.aql b/asterix-app/src/test/resources/runtimets/queries/records/access-nested-fields/access-nested-fields.6.query.aql
new file mode 100644
index 0000000..5ee7ad6
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/records/access-nested-fields/access-nested-fields.6.query.aql
@@ -0,0 +1,12 @@
+/*
+* Description  : Access a records nested records at each level.
+* Expected Res : Success
+* Date         : 04 Jun 2015
+*/
+
+use dataverse test;
+
+for $test in dataset Animals
+let $result := $test.class.fullClassification.lower.lower.lower.lower
+order by $result.id
+return $result;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/900bf134/asterix-app/src/test/resources/runtimets/queries/records/access-nested-fields/access-nested-fields.7.query.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/records/access-nested-fields/access-nested-fields.7.query.aql b/asterix-app/src/test/resources/runtimets/queries/records/access-nested-fields/access-nested-fields.7.query.aql
new file mode 100644
index 0000000..30d6496
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/records/access-nested-fields/access-nested-fields.7.query.aql
@@ -0,0 +1,12 @@
+/*
+* Description  : Access a records nested records at each level.
+* Expected Res : Success
+* Date         : 04 Jun 2015
+*/
+
+use dataverse test;
+
+for $test in dataset Animals
+let $result := $test.class.fullClassification.lower.lower.lower
+order by $result.id
+return $result;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/900bf134/asterix-app/src/test/resources/runtimets/queries/records/access-nested-fields/access-nested-fields.8.query.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/records/access-nested-fields/access-nested-fields.8.query.aql b/asterix-app/src/test/resources/runtimets/queries/records/access-nested-fields/access-nested-fields.8.query.aql
new file mode 100644
index 0000000..fd9c55d
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/records/access-nested-fields/access-nested-fields.8.query.aql
@@ -0,0 +1,11 @@
+/*
+* Description  : Access a records nested records at each level.
+* Expected Res : Success
+* Date         : 04 Jun 2015
+*/
+use dataverse test;
+
+for $test in dataset Animals
+let $result := $test.class.fullClassification.lower.lower
+order by $result.id
+return $result;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/900bf134/asterix-app/src/test/resources/runtimets/queries/records/access-nested-fields/access-nested-fields.9.query.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/records/access-nested-fields/access-nested-fields.9.query.aql b/asterix-app/src/test/resources/runtimets/queries/records/access-nested-fields/access-nested-fields.9.query.aql
new file mode 100644
index 0000000..a4fff3d
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/records/access-nested-fields/access-nested-fields.9.query.aql
@@ -0,0 +1,11 @@
+/*
+* Description  : Access a records nested records at each level.
+* Expected Res : Success
+* Date         : 04 Jun 2015
+*/
+use dataverse test;
+
+for $test in dataset Animals
+let $result := $test.class.fullClassification.lower
+order by $result.id
+return $result;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/900bf134/asterix-app/src/test/resources/runtimets/queries/records/get-record-field-value/documentation-example/documentation-example.1.query.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/records/get-record-field-value/documentation-example/documentation-example.1.query.aql b/asterix-app/src/test/resources/runtimets/queries/records/get-record-field-value/documentation-example/documentation-example.1.query.aql
new file mode 100644
index 0000000..2876ebf
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/records/get-record-field-value/documentation-example/documentation-example.1.query.aql
@@ -0,0 +1,10 @@
+/*
+* Description  : Testing get-record-field-value 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-record-field-value($r1, "project")

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/900bf134/asterix-app/src/test/resources/runtimets/queries/records/get-record-field-value/documentation-example/documentation-example.2.query.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/records/get-record-field-value/documentation-example/documentation-example.2.query.aql b/asterix-app/src/test/resources/runtimets/queries/records/get-record-field-value/documentation-example/documentation-example.2.query.aql
new file mode 100644
index 0000000..c1d2b5d
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/records/get-record-field-value/documentation-example/documentation-example.2.query.aql
@@ -0,0 +1,10 @@
+/*
+* Description  : Testing get-record-field-value 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-record-field-value($r1, "address")

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/900bf134/asterix-app/src/test/resources/runtimets/queries/records/get-record-field-value/documentation-example/documentation-example.3.query.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/records/get-record-field-value/documentation-example/documentation-example.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/records/get-record-field-value/documentation-example/documentation-example.3.query.aql
new file mode 100644
index 0000000..6be3409
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/records/get-record-field-value/documentation-example/documentation-example.3.query.aql
@@ -0,0 +1,10 @@
+/*
+* Description  : Testing get-record-field-value 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-record-field-value($r1, "related")

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/900bf134/asterix-app/src/test/resources/runtimets/queries/records/get-record-field-value/highly-nested-closed/highly-nested-open.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/records/get-record-field-value/highly-nested-closed/highly-nested-open.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/records/get-record-field-value/highly-nested-closed/highly-nested-open.1.ddl.aql
new file mode 100644
index 0000000..f36f1bc
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/records/get-record-field-value/highly-nested-closed/highly-nested-open.1.ddl.aql
@@ -0,0 +1,63 @@
+/*
+* Description  : Testing get-record-field-value under different queries.
+* Expected Res : Success
+* Date         : 04 Jun 2015
+*/
+drop dataverse test if exists;
+create dataverse test;
+
+use dataverse test;
+
+create type S as closed{
+    id: int64,
+    Species: string
+}
+
+create type GS as closed{
+    id: int64,
+    Genus: string,
+    lower: S
+}
+
+create type FGS as closed{
+    id: int64,
+    Family: string,
+    lower:GS
+}
+
+create type OFGS as closed{
+    id: int64,
+    Order: string,
+    lower: FGS
+}
+
+create type COFGS as closed{
+    id: int64,
+    Class: string,
+    lower: OFGS
+}
+
+create type PCOFGS as closed{
+    id: int64,
+    Phylum: string,
+    lower: COFGS
+}
+
+create type KPCOFGS as closed{
+    id: int64,
+    Kingdom: string,
+    lower: PCOFGS
+}
+
+create type Classification as closed{
+    id: int64,
+    fullClassification:KPCOFGS
+}
+
+create type Animal as closed{
+    id: int64,
+    class: Classification
+}
+
+create dataset Animals(Animal)
+primary key id;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/900bf134/asterix-app/src/test/resources/runtimets/queries/records/get-record-field-value/highly-nested-closed/highly-nested-open.2.update.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/records/get-record-field-value/highly-nested-closed/highly-nested-open.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/records/get-record-field-value/highly-nested-closed/highly-nested-open.2.update.aql
new file mode 100644
index 0000000..7b270b9
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/records/get-record-field-value/highly-nested-closed/highly-nested-open.2.update.aql
@@ -0,0 +1,9 @@
+/*
+* Description  : Testing get-record-field-value under different queries.
+* Expected Res : Success
+* Date         : 04 Jun 2015
+*/
+use dataverse test;
+
+load dataset Animals using localfs
+(("path"="nc1://data/classifications/animals.adm"),("format"="adm"));

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/900bf134/asterix-app/src/test/resources/runtimets/queries/records/get-record-field-value/highly-nested-closed/highly-nested-open.3.query.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/records/get-record-field-value/highly-nested-closed/highly-nested-open.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/records/get-record-field-value/highly-nested-closed/highly-nested-open.3.query.aql
new file mode 100644
index 0000000..8634bde
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/records/get-record-field-value/highly-nested-closed/highly-nested-open.3.query.aql
@@ -0,0 +1,11 @@
+/*
+* Description  : Testing get-record-field-value under different queries.
+* Expected Res : Success
+* Date         : 04 Jun 2015
+*/
+use dataverse test;
+
+for $test in dataset Animals
+let $result := get-record-field-value($test, "class")
+order by $result.id
+return $result;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/900bf134/asterix-app/src/test/resources/runtimets/queries/records/get-record-field-value/highly-nested-mixed/highly-nested-mixed.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/records/get-record-field-value/highly-nested-mixed/highly-nested-mixed.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/records/get-record-field-value/highly-nested-mixed/highly-nested-mixed.1.ddl.aql
new file mode 100644
index 0000000..eff94c8
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/records/get-record-field-value/highly-nested-mixed/highly-nested-mixed.1.ddl.aql
@@ -0,0 +1,59 @@
+/*
+* Description  : Testing get-record-field-value under different queries.
+* Expected Res : Success
+* Date         : 04 Jun 2015
+*/
+drop dataverse test if exists;
+create dataverse test;
+
+use dataverse test;
+
+create type S as open{
+    id: int64
+}
+
+create type GS as closed{
+    id: int64,
+    Genus: string,
+    lower: S
+}
+
+create type FGS as open{
+    id: int64,
+    Family: string
+}
+
+create type OFGS as closed{
+    id: int64,
+    Order: string,
+    lower: FGS
+}
+
+create type COFGS as open{
+    id: int64,
+    Class: string,
+    lower: OFGS
+}
+
+create type PCOFGS as closed{
+    id: int64,
+    Phylum: string,
+    lower: COFGS
+}
+
+create type KPCOFGS as open{
+    id: int64,
+    Kingdom: string
+}
+
+create type Classification as closed{
+    id: int64,
+    fullClassification:KPCOFGS
+}
+
+create type Animal as open{
+    id: int64
+}
+
+create dataset Animals(Animal)
+primary key id;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/900bf134/asterix-app/src/test/resources/runtimets/queries/records/get-record-field-value/highly-nested-mixed/highly-nested-mixed.2.update.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/records/get-record-field-value/highly-nested-mixed/highly-nested-mixed.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/records/get-record-field-value/highly-nested-mixed/highly-nested-mixed.2.update.aql
new file mode 100644
index 0000000..7b270b9
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/records/get-record-field-value/highly-nested-mixed/highly-nested-mixed.2.update.aql
@@ -0,0 +1,9 @@
+/*
+* Description  : Testing get-record-field-value under different queries.
+* Expected Res : Success
+* Date         : 04 Jun 2015
+*/
+use dataverse test;
+
+load dataset Animals using localfs
+(("path"="nc1://data/classifications/animals.adm"),("format"="adm"));

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/900bf134/asterix-app/src/test/resources/runtimets/queries/records/get-record-field-value/highly-nested-mixed/highly-nested-mixed.3.query.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/records/get-record-field-value/highly-nested-mixed/highly-nested-mixed.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/records/get-record-field-value/highly-nested-mixed/highly-nested-mixed.3.query.aql
new file mode 100644
index 0000000..8634bde
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/records/get-record-field-value/highly-nested-mixed/highly-nested-mixed.3.query.aql
@@ -0,0 +1,11 @@
+/*
+* Description  : Testing get-record-field-value under different queries.
+* Expected Res : Success
+* Date         : 04 Jun 2015
+*/
+use dataverse test;
+
+for $test in dataset Animals
+let $result := get-record-field-value($test, "class")
+order by $result.id
+return $result;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/900bf134/asterix-app/src/test/resources/runtimets/queries/records/get-record-field-value/highly-nested-open/highly-nested-open.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/records/get-record-field-value/highly-nested-open/highly-nested-open.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/records/get-record-field-value/highly-nested-open/highly-nested-open.1.ddl.aql
new file mode 100644
index 0000000..32a8aaa
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/records/get-record-field-value/highly-nested-open/highly-nested-open.1.ddl.aql
@@ -0,0 +1,54 @@
+/*
+* Description  : Testing get-record-field-value under different queries.
+* Expected Res : Success
+* Date         : 04 Jun 2015
+*/
+drop dataverse test if exists;
+create dataverse test;
+
+use dataverse test;
+
+create type S as open{
+    id: int64
+}
+
+create type GS as open{
+    id: int64,
+    Genus: string
+}
+
+create type FGS as open{
+    id: int64,
+    Family: string
+}
+
+create type OFGS as open{
+    id: int64,
+    Order: string
+}
+
+create type COFGS as open{
+    id: int64,
+    Class: string
+}
+
+create type PCOFGS as open{
+    id: int64,
+    Phylum: string
+}
+
+create type KPCOFGS as open{
+    id: int64,
+    Kingdom: string
+}
+
+create type Classification as open{
+    id: int64
+}
+
+create type Animal as open{
+    id: int64
+}
+
+create dataset Animals(Animal)
+primary key id;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/900bf134/asterix-app/src/test/resources/runtimets/queries/records/get-record-field-value/highly-nested-open/highly-nested-open.2.update.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/records/get-record-field-value/highly-nested-open/highly-nested-open.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/records/get-record-field-value/highly-nested-open/highly-nested-open.2.update.aql
new file mode 100644
index 0000000..7b270b9
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/records/get-record-field-value/highly-nested-open/highly-nested-open.2.update.aql
@@ -0,0 +1,9 @@
+/*
+* Description  : Testing get-record-field-value under different queries.
+* Expected Res : Success
+* Date         : 04 Jun 2015
+*/
+use dataverse test;
+
+load dataset Animals using localfs
+(("path"="nc1://data/classifications/animals.adm"),("format"="adm"));

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/900bf134/asterix-app/src/test/resources/runtimets/queries/records/get-record-field-value/highly-nested-open/highly-nested-open.3.query.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/records/get-record-field-value/highly-nested-open/highly-nested-open.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/records/get-record-field-value/highly-nested-open/highly-nested-open.3.query.aql
new file mode 100644
index 0000000..8634bde
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/records/get-record-field-value/highly-nested-open/highly-nested-open.3.query.aql
@@ -0,0 +1,11 @@
+/*
+* Description  : Testing get-record-field-value under different queries.
+* Expected Res : Success
+* Date         : 04 Jun 2015
+*/
+use dataverse test;
+
+for $test in dataset Animals
+let $result := get-record-field-value($test, "class")
+order by $result.id
+return $result;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/900bf134/asterix-app/src/test/resources/runtimets/queries/records/get-record-field-value/tiny-social-example/tiny-social-example.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/records/get-record-field-value/tiny-social-example/tiny-social-example.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/records/get-record-field-value/tiny-social-example/tiny-social-example.1.ddl.aql
new file mode 100644
index 0000000..b167657
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/records/get-record-field-value/tiny-social-example/tiny-social-example.1.ddl.aql
@@ -0,0 +1,49 @@
+/*
+* Description  : Testing get-record-field-value 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,
+        name: string,
+        followers_count: int64
+}
+
+create type TweetMessageType as closed {
+        tweetid: string,
+        user: TwitterUserType,
+        sender-location: point?,
+        send-time: datetime,
+        referred-topics: {{ string }},
+        message-text: string
+}
+
+create type EmploymentType as open {
+        organization-name: string,
+        start-date: date,
+        end-date: date?
+}
+
+create type FacebookUserType as closed {
+        id: int64,
+        alias: string,
+        name: string,
+        user-since: datetime,
+        friend-ids: {{ int64 }},
+        employment: [EmploymentType]
+}
+
+create type FacebookMessageType as closed {
+        message-id: int64,
+        author-id: int64,
+        in-response-to: int64?,
+        sender-location: point?,
+        message: string
+}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/900bf134/asterix-app/src/test/resources/runtimets/queries/records/get-record-field-value/tiny-social-example/tiny-social-example.2.ddl.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/records/get-record-field-value/tiny-social-example/tiny-social-example.2.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/records/get-record-field-value/tiny-social-example/tiny-social-example.2.ddl.aql
new file mode 100644
index 0000000..dfc09cc
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/records/get-record-field-value/tiny-social-example/tiny-social-example.2.ddl.aql
@@ -0,0 +1,24 @@
+/*
+* Description  : Testing get-record-field-value 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/incubator-asterixdb/blob/900bf134/asterix-app/src/test/resources/runtimets/queries/records/get-record-field-value/tiny-social-example/tiny-social-example.3.update.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/records/get-record-field-value/tiny-social-example/tiny-social-example.3.update.aql b/asterix-app/src/test/resources/runtimets/queries/records/get-record-field-value/tiny-social-example/tiny-social-example.3.update.aql
new file mode 100644
index 0000000..f45cfa7
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/records/get-record-field-value/tiny-social-example/tiny-social-example.3.update.aql
@@ -0,0 +1,18 @@
+/*
+* Description  : Testing get-record-field-value under different queries.
+* Expected Res : Success
+* Date         : 04 Jun 2015
+*/
+use dataverse TinySocial;
+
+load dataset FacebookUsers using localfs
+(("path"="nc1://data/tinysocial/fbu.adm"),("format"="adm"));
+
+load dataset FacebookMessages using localfs
+(("path"="nc1://data/tinysocial/fbm.adm"),("format"="adm"));
+
+load dataset TwitterUsers using localfs
+(("path"="nc1://data/tinysocial/twu.adm"),("format"="adm"));
+
+load dataset TweetMessages using localfs
+(("path"="nc1://data/tinysocial/twm.adm"),("format"="adm"));

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/900bf134/asterix-app/src/test/resources/runtimets/queries/records/get-record-field-value/tiny-social-example/tiny-social-example.4.query.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/records/get-record-field-value/tiny-social-example/tiny-social-example.4.query.aql b/asterix-app/src/test/resources/runtimets/queries/records/get-record-field-value/tiny-social-example/tiny-social-example.4.query.aql
new file mode 100644
index 0000000..1a560e5
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/records/get-record-field-value/tiny-social-example/tiny-social-example.4.query.aql
@@ -0,0 +1,13 @@
+/*
+* Description  : Testing get-record-field-value under different queries.
+* Expected Res : Success
+* Date         : 04 Jun 2015
+*/
+use dataverse TinySocial;
+
+for $r in dataset TweetMessages
+for $f in get-record-fields($r)
+where $f.field-type = "STRING"
+let $result := get-record-field-value($r, $f.field-name)
+order by $result
+return $result

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/900bf134/asterix-app/src/test/resources/runtimets/queries/records/get-record-fields/documentation-example/documentation-example.1.query.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/records/get-record-fields/documentation-example/documentation-example.1.query.aql b/asterix-app/src/test/resources/runtimets/queries/records/get-record-fields/documentation-example/documentation-example.1.query.aql
new file mode 100644
index 0000000..84df51e
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/records/get-record-fields/documentation-example/documentation-example.1.query.aql
@@ -0,0 +1,10 @@
+/*
+* Description  : Testing get-record-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-record-fields($r1)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/900bf134/asterix-app/src/test/resources/runtimets/queries/records/get-record-fields/tiny-social-example-no-complex-types/tiny-social-example-no-complex-types.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/records/get-record-fields/tiny-social-example-no-complex-types/tiny-social-example-no-complex-types.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/records/get-record-fields/tiny-social-example-no-complex-types/tiny-social-example-no-complex-types.1.ddl.aql
new file mode 100644
index 0000000..4ae62c8
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/records/get-record-fields/tiny-social-example-no-complex-types/tiny-social-example-no-complex-types.1.ddl.aql
@@ -0,0 +1,83 @@
+/*
+* Description  : Testing get-record-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
+}