blob: 36df10a2b8d289351156c30914c1525eb1cfa97a [file] [log] [blame]
alexander.behm812d3ae2012-05-13 07:07:02 +00001/*
2 * Test case Name : scan-delete-btree-secondary-index-nullable.aql
3 * Description : This test is intended to test deletion from secondary btree 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 AddressType as closed {
13 number: int32,
14 street: string,
15 city: string
16}
17
18create type CustomerType as closed {
19 cid: int32,
20 name: string,
21 age: int32?,
22 address: AddressType?,
23 interests: {{string}},
24 children: [ { name: string, age: int32? } ]
25}
26
ramangrover29669d8f62013-02-11 06:03:32 +000027create dataset Customers(CustomerType) primary key cid;
alexander.behm812d3ae2012-05-13 07:07:02 +000028
29load dataset Customers
30using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
31(("path"="nc1://data/semistructured/co1k/customer.adm"),("format"="adm"));
32
33create index age_index on Customers(age);
34
35delete $c from dataset Customers where $c.cid>=200;
36
37write output to nc1:"rttest/dml_scan-delete-btree-secondary-index-nullable.adm";
38
39for $c in dataset('Customers')
40where $c.age < 20
41order by $c.cid
42return $c