blob: 6201ca249a29536c14fc76a53c252f7e9bb6f533 [file] [log] [blame]
vinayakb38b7ca42012-03-05 05:44:15 +00001drop dataverse test if exists;
2create dataverse test;
3use dataverse test;
4
5create type MyRecord as closed {
6 id: int32,
7 point: point,
8 kwds: string,
9 line1: line,
10 line2: line,
11 poly1: polygon,
12 poly2: polygon,
13 rec: rectangle
14}
15
vinayakb38b7ca42012-03-05 05:44:15 +000016create dataset MyData(MyRecord)
khfaraaz82@gmail.com502731f2012-05-02 20:38:16 +000017 partitioned by key id;
vinayakb38b7ca42012-03-05 05:44:15 +000018
19load dataset MyData
20using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
21(("path"="nc1://data/spatial/spatialData.json"),("format"="adm")) pre-sorted;
22
23create index rtree_index_point on MyData(point) type rtree;
24
25delete $m from dataset MyData where $m.id>10;
26
27write output to nc1:"rttest/dml_scan-delete-rtree-secondary-index.adm";
28
29for $o in dataset('MyData')
30where spatial-intersect($o.point, create-polygon(create-point(0.0,1.0), create-point(0.0,4.0), create-point(12.0,4.0), create-point(12.0,1.0)))
31order by $o.id
32return {"id":$o.id}