blob: a590cf14aea3ed1db35f767834eaaf9a1f9d2f2c [file] [log] [blame]
khfaraaz82@gmail.coma2716132012-04-30 06:20:50 +00001/*
2 * Testcase Name : open-closed-17.aql
3 * Description : Test open type dataset by inserting additional data along with inserting data for existing fields.
4 * Success : Yes
5 * Date : March 30th 2012
6 */
7
8drop dataverse test if exists;
9create dataverse test;
10use dataverse test;
11
12create type Schema as open{
13id_8: int8,
14id_16: int16,
15id_32: int32,
16id_64: int64,
17fp : float,
18name: string,
19dt: date,
20tm: time,
21dt_tm: datetime,
22lat_lon: point
23}
24
25create dataset tdtst(Schema) partitioned by key id_32;
26
27insert into dataset tdtst(
28let $f1:=time("10:50:56:200+05:00")
29let $f2:=datetime("2011-12-31T14:00:00-10:00")
30let $f3:=point("100.0,200.0")
31return {
32"id_8":100,
33"id_16":1011,
34"id_32":23455,
35"id_64":34567,
36"fp":87.61863f,
37"name":"John",
38"dt":"03-21-1982",
39"tm": $f1,
40"dt_tm": $f2,
41"lat_lon": $f3,
42"mydata":{{"this is my additional data"}}
43}
44);
45
buyingyidd53f292012-05-20 23:40:25 +000046write output to nc1:"rttest/open-closed_open-closed-17.adm";
khfaraaz82@gmail.coma2716132012-04-30 06:20:50 +000047for $l in dataset('tdtst')
48return $l