| use dataverse demo1112; |
| |
| declare type ExampleType as open { |
| id: int32, |
| name: string, |
| age: float, |
| salary: double, |
| married: boolean, |
| interests: {{string}}, |
| children: [string], |
| address: AddressType, |
| dob: date, |
| time: time, |
| datetime: datetime, |
| duration: duration, |
| location2d: point, |
| location3d: point3d, |
| line: line, |
| polygon: polygon |
| |
| // ? |
| |
| // binary |
| // union |
| } |
| |
| declare type AddressType as open { |
| number: int32, |
| street: string, |
| city: string |
| } |
| |
| |
| declare nodegroup group1 on nc1, nc2; |
| |
| set format "edu.uci.ics.asterix.runtime.formats.nontagged.NonTaggedDataFormat"; |
| |
| declare dataset All(ExampleType) |
| primary key id on group1; |
| |
| write output to nc1:"/home/yasser/Dropbox/Research/data/results/result_all_3.adm"; |
| |
| |
| for $o in dataset('All') |
| return $o |
| |
| |
| /* |
| for $o in dataset('Orders') |
| let $c1 := int8("80") |
| let $c2 := int16("160") |
| let $c3 := int32("320") |
| let $c4 := int64("640") |
| return {"int8": $c1,"int16": $c2,"int32": $c3, "int8co": $o.int8co, "int64": $c4} |
| */ |