| /* |
| * Description : Drop secondary index. |
| * Expected Result : Success |
| * Date : 12th July 2012 |
| * |
| */ |
| |
| drop dataverse test if exists; |
| create dataverse test; |
| use dataverse test; |
| |
| create type Schema as closed { |
| unique1: int32, |
| unique2: int32, |
| two: int32, |
| four: int32, |
| ten: int32, |
| twenty: int32, |
| onePercent: int32, |
| tenPercent: int32, |
| twentyPercent: int32, |
| fiftyPercent: int32, |
| unique3: int32, |
| evenOnePercent: int32, |
| oddOnePercent: int32, |
| stringu1: string, |
| stringu2: string, |
| string4: string |
| } |
| |
| create dataset t1(Schema) primary key unique2; |
| |
| // Load data |
| load dataset t1 |
| using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter" |
| (("path"="nc1://data/wisc/onektup.adm"),("format"="delimited-text"),("delimiter"="|")) pre-sorted; |
| |
| // create secondary indexes |
| create index idx_t1_str1 on t1(stringu1); |
| create index idx_t1_unique1 on t1(unique1); |
| |
| // drop secondary indexes |
| drop index t1.idx_t1_str1; |
| drop index t1.idx_t1_unique1; |
| |
| write output to nc1:"rttest/dml_drop-index.adm"; |
| |
| for $a in dataset('t1') |
| where $a.unique1 > 10 and $a.stringu1="DGAAAAXXXXXXXXXXXXXXXXXXX" |
| return $a |