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