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 | |
buyingyi | 617c8ae | 2012-05-15 09:40:40 +0000 | [diff] [blame] | 22 | insert into dataset testds({"id": 123}); |
khfaraaz82@gmail.com | a271613 | 2012-04-30 06:20:50 +0000 | [diff] [blame] | 23 | |
buyingyi | 68ba828 | 2012-05-11 23:30:19 +0000 | [diff] [blame] | 24 | write output to nc1:"rttest/open-closed_open-closed-02.adm"; |
khfaraaz82@gmail.com | a271613 | 2012-04-30 06:20:50 +0000 | [diff] [blame] | 25 | for $l in dataset("testds") return $l |