added three new closed type tests

git-svn-id: https://asterixdb.googlecode.com/svn/branches/asterix_stabilization@350 eaa15691-b419-025a-1212-ee371bd00084
diff --git a/asterix-app/src/test/resources/runtimets/queries/open-closed/c2c-w-optional.aql b/asterix-app/src/test/resources/runtimets/queries/open-closed/c2c-w-optional.aql
new file mode 100644
index 0000000..354757d
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/open-closed/c2c-w-optional.aql
@@ -0,0 +1,37 @@
+/*
+ * Testcase Name  : c2c-w-optional.aql
+ * Description    : Insert data into target datase by doing a select on source dataset.
+ *                : Here both source and target datasets are internal datasets
+ *                : The schema includes one optional field named optnl_fld.
+ * Success        : Yes
+ * Date           : 23rd May 2012
+ */
+
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+create type TestType as closed {
+id:int32,
+description:string,
+name:string,
+optnl_fld:string?
+}
+
+create dataset T1(TestType) partitioned by key id;
+
+create dataset T2(TestType) partitioned by key id;
+
+insert into dataset T1({
+"id":1234,
+"description":"donut",
+"name":"Cake",
+"optnl_fld":"optional data goes here"
+}
+);
+
+insert into dataset T2(for $l in dataset("T1") return $l );
+
+for $d in dataset("T2")
+order by $d.id
+return $d
diff --git a/asterix-app/src/test/resources/runtimets/queries/open-closed/c2c-wo-optional.aql b/asterix-app/src/test/resources/runtimets/queries/open-closed/c2c-wo-optional.aql
new file mode 100644
index 0000000..9d4b90a
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/open-closed/c2c-wo-optional.aql
@@ -0,0 +1,37 @@
+/*
+ * Testcase Name  : c2c-wo-optional.aql
+ * Description    : Insert data into target datase by doing a select on source dataset.
+ *                : Here both source and target datasets are internal datasets
+ *                : The schema includes one optional field named optnl_fld.
+ *                : Note that the optional field in source dataset does not hold any data.
+ * Success        : Yes
+ * Date           : 23rd May 2012
+ */
+
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+create type TestType as closed {
+id:int32,
+description:string,
+name:string,
+optnl_fld:string?
+}
+
+create dataset T1(TestType) partitioned by key id;
+
+create dataset T2(TestType) partitioned by key id;
+
+insert into dataset T1({
+"id":1234,
+"description":"donut",
+"name":"Cake"
+}
+);
+
+insert into dataset T2(for $l in dataset("T1") return $l );
+
+for $d in dataset("T2")
+order by $d.id
+return $d
diff --git a/asterix-app/src/test/resources/runtimets/queries/open-closed/c2c.aql b/asterix-app/src/test/resources/runtimets/queries/open-closed/c2c.aql
new file mode 100644
index 0000000..83888f3
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/open-closed/c2c.aql
@@ -0,0 +1,36 @@
+/*
+ * Testcase Name  : c2c.aql
+ * Description    : Insert data into target datase by doing a select on source dataset.
+ *                : Here both source and target datasets are internal datasets
+ * Success        : Yes
+ * Date           : 23rd May 2012
+ */
+
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+create type TestType as closed {
+id:int32,
+description:string,
+name:string
+}
+
+// source dataset
+create dataset T1(TestType) partitioned by key id;
+
+// target dataset
+create dataset T2(TestType) partitioned by key id;
+
+insert into dataset T1({
+"id":1234,
+"description":"donut",
+"name":"Cake"
+}
+);
+
+insert into dataset T2(for $l in dataset("T1") return $l );
+
+for $d in dataset("T2")
+order by $d.id
+return $d