vinayakb | 38b7ca4 | 2012-03-05 05:44:15 +0000 | [diff] [blame] | 1 | drop dataverse test if exists; |
| 2 | |
| 3 | create dataverse test; |
| 4 | use dataverse test; |
| 5 | |
| 6 | create type MyRecord as closed { |
| 7 | id: int32, |
| 8 | tweetid: int64, |
| 9 | loc: point, |
| 10 | time: datetime, |
| 11 | text: string |
| 12 | } |
| 13 | |
| 14 | |
| 15 | create nodegroup group1 if not exists on nc1, nc2; |
| 16 | |
| 17 | create dataset MyData(MyRecord) |
| 18 | partitioned by key id on group1; |
| 19 | |
| 20 | load dataset MyData |
| 21 | using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter" |
| 22 | (("path"="nc1://data/twitter/smalltweets.txt"),("format"="adm")) pre-sorted; |
| 23 | |
| 24 | |
| 25 | delete $l from dataset MyData where $l.id>=50 die after 1500; |
| 26 | |
| 27 | write output to nc1:"rttest/failure_delete-rtree.adm"; |
| 28 | |
| 29 | for $o in dataset('MyData') |
| 30 | order by $o.id |
| 31 | return {"id":$o.id} |