| /* |
| * Description : Tests whether a field access on an open field (statically of type ANY) succeeds. |
| * Guards against regression to issue 207. |
| * Success : Yes |
| */ |
| |
| 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; |
| |
| insert into dataset testds({"id": 123, "name": "John Doe", "address": { "zip": 92617} }); |
| |
| write output to nc1:"rttest/records_field-access-on-open-field.adm"; |
| |
| for $l in dataset("testds") |
| let $a := $l.address |
| return $a.zip |