blob: 2459fccdbb97b5069863bedd9e02d91b111a8134 [file] [log] [blame]
khfaraaz82@gmail.coma2716132012-04-30 06:20:50 +00001/*
2 * Test case name : open-closed-12.aql
3 * Description : Select from dataset two and insert into dataset one, both datasets are of open type.
4 * : In this case, both datasets are of same schema
5 * Success : Yes
6 * Date : 27 March 2012
7 */
8
9drop dataverse testdv2 if exists;
10
11create dataverse testdv2;
12
13use dataverse testdv2;
14
15create type testtype01 as open {
16 id: string,
17 name: string
18}
19
20create type testtype02 as open {
21id : string,
22name : string
23}
24
25create dataset testds01(testtype01) partitioned by key id;
26
27create dataset testds02(testtype02) partitioned by key id;
28
29insert into dataset testds02 (
30{ "id": "001", "name": "Person One", "hobbies": {{"scuba", "music"}}}
31);
32
33insert into dataset testds02 (
34{ "id": "002", "name": "Person Two", "hobbies": {{"fishing", "dance"}}}
35);
36
37insert into dataset testds02 (
38{ "id": "003", "name": "Person Three", "hobbies": {{"hiking", "surfing"}}}
39);
40
41insert into dataset testds01(
42for $d in dataset("testds02")
43return $d
44);
45
46for $d in dataset("testds01")
47return $d
48