khfaraaz82@gmail.com | a271613 | 2012-04-30 06:20:50 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Test case Name : open-closed-05.aql |
| 3 | * Description : Create internal dataset and verify if the type is marked as closed in metadata. |
| 4 | * Expected Result : Success |
| 5 | */ |
| 6 | |
| 7 | drop dataverse test if exists; |
| 8 | |
| 9 | create dataverse test; |
| 10 | |
| 11 | use dataverse test; |
| 12 | |
| 13 | create type testType as closed { |
| 14 | id : int32, |
| 15 | name : string |
| 16 | } |
| 17 | |
| 18 | create dataset testds(testType) partitioned by key id; |
| 19 | |
| 20 | /* |
| 21 | * Connect to the Metadata dataverse and run the following commands. |
| 22 | * Verify if the type is closed by querying Metadata. |
| 23 | */ |
| 24 | |
| 25 | use dataverse Metadata; |
| 26 | |
| 27 | for $l in dataset('Datatype') |
| 28 | let $x := $l.Derived |
| 29 | where $l.DatatypeName="TestType" |
| 30 | return $x.Record |