| /* |
| * Test case Name : open-closed-04.aql |
| * Description : This test is intended to test type in the Metdata for the dataset. |
| * : Verify if the type is open. |
| * Expected Result : Success - This should be allowed! |
| * Issue number : Issue 73 |
| */ |
| |
| drop dataverse test if exists; |
| |
| create dataverse test; |
| |
| use dataverse test; |
| |
| create type TestType as open { |
| id : int32, |
| name : string |
| } |
| |
| create dataset testds(TestType) partitioned by key id; |
| |
| /* |
| * Connect to the Metadata dataverse and run the following commands. |
| */ |
| |
| use dataverse Metadata; |
| |
| for $l in dataset('Datatype') |
| let $x := $l.Derived |
| where $l.DatatypeName="TestType" |
| return $x.Record |