blob: 0c8773406de986219d9c0c5189df33afcdaabad9 [file] [log] [blame]
khfaraaz82@gmail.com1be1f1b2012-07-13 00:05:22 +00001/*
2 * Description : Drop secondary index.
3 * Expected Result : Success
4 * Date : 12th July 2012
5 *
6 */
7
8drop dataverse test if exists;
9create dataverse test;
10use dataverse test;
11
12create type Schema as closed {
13unique1: int32,
14unique2: int32,
15two: int32,
16four: int32,
17ten: int32,
18twenty: int32,
19onePercent: int32,
20tenPercent: int32,
21twentyPercent: int32,
22fiftyPercent: int32,
23unique3: int32,
24evenOnePercent: int32,
25oddOnePercent: int32,
26stringu1: string,
27stringu2: string,
28string4: string
29}
30
31create dataset t1(Schema) partitioned by key unique2;
32
33// Load data
34load dataset t1
35using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
36(("path"="nc1://data/wisc/onektup.adm"),("format"="delimited-text"),("delimiter"="|")) pre-sorted;
37
38// create secondary indexes
39create index idx_t1_str1 on t1(stringu1);
40create index idx_t1_unique1 on t1(unique1);
41
42// drop secondary indexes
43drop index t1.idx_t1_str1;
44drop index t1.idx_t1_unique1;
45
46write output to nc1:"rttest/dml_drop-index.adm";
47
48for $a in dataset('t1')
49where $a.unique1 > 10 and $a.stringu1="DGAAAAXXXXXXXXXXXXXXXXXXX"
50return $a