khfaraaz82@gmail.com | a271613 | 2012-04-30 06:20:50 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Test case Name : open-closed-02.aql |
| 3 | * Description : This test is intended to test insertion of additional data into a dataset of closed type |
| 4 | * Expected Result : This test should fail because closed type internal datasets can not ingest additional data. |
| 5 | * |
| 6 | */ |
| 7 | |
| 8 | drop dataverse test if exists; |
| 9 | |
| 10 | create dataverse test; |
| 11 | |
| 12 | use dataverse test; |
| 13 | |
| 14 | // name field here is optional. |
| 15 | create type testType as closed { |
| 16 | id : int32, |
| 17 | name : string? |
| 18 | } |
| 19 | |
| 20 | create dataset testds(testType) partitioned by key id; |
| 21 | |
| 22 | insert into dataset testds({"id": 123, "name": "John Doe", "hobbies": {{ "scuba", "music" }} }); |
| 23 | |
| 24 | for $l in dataset("testds") return $l |