buyingyi | 71f06c7 | 2012-11-29 05:06:16 +0000 | [diff] [blame] | 1 | /* |
| 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 | |
| 8 | drop dataverse test if exists; |
| 9 | create dataverse test; |
| 10 | use dataverse test; |
| 11 | |
| 12 | create type EmployeeStat as open { |
| 13 | age: int32, |
| 14 | salary:int32 |
| 15 | } |
| 16 | |
| 17 | create type EmployeeType as closed { |
| 18 | id:string, |
| 19 | stat:EmployeeStat, |
| 20 | deptCode:int32 |
| 21 | } |
| 22 | |
| 23 | create dataset Employees(EmployeeType) |
ramangrover29 | 669d8f6 | 2013-02-11 06:03:32 +0000 | [diff] [blame] | 24 | primary key id; |
buyingyi | 71f06c7 | 2012-11-29 05:06:16 +0000 | [diff] [blame] | 25 | |
| 26 | insert into dataset Employees({"id":"1234", "stat":{ "age":50, "salary":120000}, "deptCode":32 }); |
| 27 | insert into dataset Employees({"id":"5678", "stat":{ "age":40, "salary":100000}, "deptCode":16 }); |
| 28 | |
| 29 | delete $l from dataset Employees where $l.id = "1234"; |
| 30 | |
| 31 | write output to nc1:"rttest/dml_query-issue205.adm"; |
| 32 | for $l in dataset('Employees') |
| 33 | return $l |