added & updated open-closed type tests
git-svn-id: https://asterixdb.googlecode.com/svn/branches/asterix_stabilization@177 eaa15691-b419-025a-1212-ee371bd00084
diff --git a/asterix-app/src/test/resources/runtimets/queries/open-closed/open-closed-21.aql b/asterix-app/src/test/resources/runtimets/queries/open-closed/open-closed-21.aql
index c1c7ab2..71ce585 100644
--- a/asterix-app/src/test/resources/runtimets/queries/open-closed/open-closed-21.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/open-closed/open-closed-21.aql
@@ -1,12 +1,11 @@
/*
* Test case name : open-closed-21.aql
- * Description : Insert into open type internal dataset by querying another closed type internal dataset
- * : In this case source dataset has (n+n) fields and the target dataset has only n fields, but has no intial records in it.
+ * Description : Insert into open type internal dataset by querying another open type internal dataset
+ * : In this case source dataset has (n+n) fields and the target dataset has only 1 field, but has no intial records in it.
* Success : Yes
* Date : 29 April 2012
*/
-
drop dataverse test if exists;
create dataverse test;
use dataverse test;
@@ -17,7 +16,7 @@
create dataset dtst01(TestType) partitioned by key id;
-create type Emp as closed {
+create type Emp as open {
id:int32,
name:string,
age:int8,
@@ -27,19 +26,17 @@
create dataset employee(Emp) partitioned by key id;
-insert into dataset employee({"id":201,"name":"John Doe","age":32,"sex":"M","dob":"1-1-82"});
-insert into dataset employee({"id":202,"name":"John Smith","age":30,"sex":"M","dob":"1-1-82"});
-insert into dataset employee({"id":201,"name":"John Wayne","age":62,"sex":"M","dob":"1-1-82"});
-insert into dataset employee({"id":203,"name":"Roger Sanders","age":48,"sex":"M","dob":"1-1-82"});
-insert into dataset employee({"id":204,"name":"Raj Singh","age":37,"sex":"M","dob":"1-1-82"});
-insert into dataset employee({"id":205,"name":"Mike Tyson","age":44,"sex":"M","dob":"1-1-82"});
-insert into dataset employee({"id":206,"name":"Brett Lee","age":35,"sex":"M","dob":"1-1-82"});
-insert into dataset employee({"id":207,"name":"Chen Li","age":39,"sex":"M","dob":"1-1-82"});
-insert into dataset employee({"id":208,"name":"Mike Carey","age":42,"sex":"M","dob":"1-1-82"});
-insert into dataset employee({"id":209,"name":"Abdullah","age":29,"sex":"M","dob":"1-1-82"});
-insert into dataset employee({"id":221,"name":"Mariam","age":25,"sex":"F","dob":"1-1-82"});
+insert into dataset employee({"id":201,"name":"John Doe","age":32,"sex":"M","dob":date("1975-01-11")});
+insert into dataset employee({"id":202,"name":"John Smith","age":30,"sex":"M","dob":date("1982-07-12")});
+insert into dataset employee({"id":203,"name":"John Wayne","age":62,"sex":"M","dob":date("1950-01-08")});
+insert into dataset employee({"id":204,"name":"Roger Sanders","age":48,"sex":"M","dob":date("1972-11-12")});
+insert into dataset employee({"id":205,"name":"Raj Singh","age":37,"sex":"M","dob":date("1978-05-06")});
+insert into dataset employee({"id":206,"name":"Mike Tyson","age":44,"sex":"M","dob":date("1965-09-03")});
+insert into dataset employee({"id":227,"name":"Mariam","age":30,"sex":"F","dob":date("1982-11-01")});
-insert into dataset dtst01({for $l in dataset('employee') return $l});
+insert into dataset employee({"id":228,"name":"Cathy","age":35,"sex":"F","dob":date("1976-06-11"),"desgination":{{"Department Manager"}}});
+
+insert into dataset dtst01(for $l in dataset('employee') return $l);
for $l in dataset('dtst01')
-retunr $l
+return $l