blob: 85616e4bfc7eefa697f1b1c405fc1715459e466d [file] [log] [blame]
drop dataverse test if exists;
create dataverse test;
use dataverse test;
create type MyRecord as closed {
id: int32,
tweetid: int64,
loc: point,
time: datetime,
text: string
}
create dataset MyData(MyRecord)
primary key id;
create index rtree_index on MyData(loc) type rtree;
load dataset MyData
using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
(("path"="nc1://data/twitter/smalltweets.txt"),("format"="adm")) pre-sorted;
delete $l from dataset MyData where spatial-intersect($l.loc, create-rectangle(create-point(0.0,-100.0), create-point(55.5,50.0))) die after 1000;
write output to nc1:"rttest/failure_delete-rtree.adm";
for $o in dataset('MyData')
where spatial-intersect($o.loc, create-rectangle(create-point(0.0,-100.0), create-point(55.5,50.0)))
order by $o.id
return {"id":$o.id}