blob: 9d4b90aa0793e5b4f16e4084f9f5f9203a403d58 [file] [log] [blame]
khfaraaz82@gmail.com6621b1d2012-05-25 07:26:35 +00001/*
2 * Testcase Name : c2c-wo-optional.aql
3 * Description : Insert data into target datase by doing a select on source dataset.
4 * : Here both source and target datasets are internal datasets
5 * : The schema includes one optional field named optnl_fld.
6 * : Note that the optional field in source dataset does not hold any data.
7 * Success : Yes
8 * Date : 23rd May 2012
9 */
10
11drop dataverse test if exists;
12create dataverse test;
13use dataverse test;
14
15create type TestType as closed {
16id:int32,
17description:string,
18name:string,
19optnl_fld:string?
20}
21
22create dataset T1(TestType) partitioned by key id;
23
24create dataset T2(TestType) partitioned by key id;
25
26insert into dataset T1({
27"id":1234,
28"description":"donut",
29"name":"Cake"
30}
31);
32
33insert into dataset T2(for $l in dataset("T1") return $l );
34
35for $d in dataset("T2")
36order by $d.id
37return $d