blob: 087ca3680595c89f10ed4ff317bd62044038a009 [file] [log] [blame]
/*
* Test case name : open-closed-12.aql
* Description : Select from dataset two and insert into dataset one, both datasets are of open type.
* : In this case, both datasets are of same schema
* Success : Yes
* Date : 27 March 2012
*/
drop dataverse testdv2 if exists;
create dataverse testdv2;
use dataverse testdv2;
create type testtype01 as open {
id: string,
name: string
}
create type testtype02 as open {
id : string,
name : string
}
create dataset testds01(testtype01) primary key id;
create dataset testds02(testtype02) primary key id;
insert into dataset testds02 (
{ "id": "001", "name": "Person One", "hobbies": {{"scuba", "music"}}}
);
insert into dataset testds02 (
{ "id": "002", "name": "Person Two", "hobbies": {{"fishing", "dance"}}}
);
insert into dataset testds02 (
{ "id": "003", "name": "Person Three", "hobbies": {{"hiking", "surfing"}}}
);
insert into dataset testds01(
for $d in dataset("testds02")
return $d
);
write output to nc1:"rttest/open-closed_open-closed-12.adm";
for $d in dataset("testds01")
order by $d.id
return $d