blob: 3a2ad408e067b5ea0f3d6a464b19c31d7eea91d6 [file] [log] [blame]
buyingyi71f06c72012-11-29 05:06:16 +00001/*
2 * Description : This test case is to verify the fix for issue205
3 : https://code.google.com/p/asterixdb/issues/detail?id=205
4 * Expected Res : Success
5 * Date : 26th November 2012
6 */
7
8drop dataverse test if exists;
9create dataverse test;
10use dataverse test;
11
12create type EmployeeStat as open {
13 age: int32,
14 salary:int32
15}
16
17create type EmployeeType as closed {
18 id:string,
19 stat:EmployeeStat,
20 deptCode:int32
21}
22
23create dataset Employees(EmployeeType)
ramangrover29669d8f62013-02-11 06:03:32 +000024 primary key id;
buyingyi71f06c72012-11-29 05:06:16 +000025
26insert into dataset Employees({"id":"1234", "stat":{ "age":50, "salary":120000}, "deptCode":32 });
27insert into dataset Employees({"id":"5678", "stat":{ "age":40, "salary":100000}, "deptCode":16 });
28
29delete $l from dataset Employees where $l.id = "1234";
30
31write output to nc1:"rttest/dml_query-issue205.adm";
32for $l in dataset('Employees')
33return $l