blob: c44c3e8df93c357bfb57487541a4de87ee1bcbbb [file] [log] [blame]
alexander.behm812d3ae2012-05-13 07:07:02 +00001/*
2 * Test case Name : scan-delete-rtree-secondary-index-nullable.aql
3 * Description : This test is intended to test deletion from secondary rtree indexes that are built on nullable fields
4 * Expected Result : Success
5 * Date : May 12 2012
6 */
7
8drop dataverse test if exists;
9create dataverse test;
10use dataverse test;
11
12create type MyRecord as closed {
13 id: int32,
14 point: point?,
15 kwds: string,
16 line1: line,
17 line2: line,
18 poly1: polygon,
19 poly2: polygon,
20 rec: rectangle
21}
22
23create dataset MyData(MyRecord)
ramangrover29669d8f62013-02-11 06:03:32 +000024 primary key id;
alexander.behm812d3ae2012-05-13 07:07:02 +000025
26load dataset MyData
27using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
28(("path"="nc1://data/spatial/spatialDataNulls.json"),("format"="adm")) pre-sorted;
29
30create index rtree_index_point on MyData(point) type rtree;
31
32delete $m from dataset MyData where $m.id>10;
33
34write output to nc1:"rttest/dml_scan-delete-rtree-secondary-index-nullable.adm";
35
36for $o in dataset('MyData')
37where 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)))
38order by $o.id
39return {"id":$o.id}