salsubaiee | bb16791 | 2013-12-21 12:55:52 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Description : The hint to skip secondary indexes don't apply to the primary index |
| 3 | * : This test is intended to verify that the primary index is still used instead of a scan |
| 4 | * Expected Result : Success |
| 5 | * Date : 21th December 2013 |
| 6 | */ |
| 7 | |
| 8 | drop dataverse test if exists; |
| 9 | create dataverse test; |
| 10 | |
| 11 | use dataverse test; |
| 12 | |
| 13 | create type AddressType as closed { |
| 14 | number: int32, |
| 15 | street: string, |
| 16 | city: string |
| 17 | } |
| 18 | |
| 19 | create type CustomerType as closed { |
| 20 | cid: int32, |
| 21 | name: string, |
| 22 | age: int32?, |
| 23 | address: AddressType?, |
| 24 | interests: {{string}}, |
| 25 | children: [ { name: string, age: int32? } ] |
| 26 | } |
| 27 | |
| 28 | create dataset Customers(CustomerType) primary key cid; |
| 29 | |
salsubaiee | df89fbc | 2013-12-21 19:51:42 -0800 | [diff] [blame] | 30 | delete $c from dataset Customers where $c.cid /*+ skip-index */ < 10; |
salsubaiee | bb16791 | 2013-12-21 12:55:52 -0800 | [diff] [blame] | 31 | |