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