salsubaiee | bb16791 | 2013-12-21 12:55:52 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Description : Notice the query hint to avoid using any secondary index to evaluate the predicate in the where clause |
| 3 | * Expected Res : Success |
| 4 | * Date : 21th December 2013 |
| 5 | */ |
| 6 | |
| 7 | drop dataverse test if exists; |
| 8 | create dataverse test; |
| 9 | |
| 10 | use dataverse test; |
| 11 | |
| 12 | create type AddressType as closed { |
| 13 | number: int32, |
| 14 | street: string, |
| 15 | city: string |
| 16 | } |
| 17 | |
| 18 | create 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 | |
| 27 | create dataset Customers(CustomerType) primary key cid; |
| 28 | |
| 29 | create index age_index on Customers(age); |
| 30 | |
salsubaiee | df89fbc | 2013-12-21 19:51:42 -0800 | [diff] [blame] | 31 | delete $c from dataset Customers where $c.age /*+ skip-index */ < 20; |
salsubaiee | bb16791 | 2013-12-21 12:55:52 -0800 | [diff] [blame] | 32 | |