khfaraaz82@gmail.com | ca3d41f | 2013-02-04 22:10:44 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Description : This is a negative test, mis-spelt/incorrect HINT should result in error |
| 3 | * Expected Res : Success |
| 4 | * Date : 29th November 2012 |
| 5 | */ |
| 6 | |
| 7 | drop dataverse test1 if exists; |
| 8 | create dataverse test1; |
| 9 | |
| 10 | create type test1.TestType as open { |
| 11 | key1: int32, |
| 12 | key2: int32, |
| 13 | fname : string, |
| 14 | lname : string |
| 15 | } |
| 16 | |
| 17 | create dataset test1.DsOne(TestType) partitioned by key key1; |
| 18 | create dataset test1.DsTwo(TestType) partitioned by key key1; |
| 19 | |
| 20 | // Please note content enclosed in the comment in the predicate is the HINT to the optimizer |
| 21 | |
| 22 | for $x in dataset('test1.DsOne') |
| 23 | for $y in dataset('test1.DsTwo') |
| 24 | where $x.key2 /*+ index */ = $y.key1 |
| 25 | return $x |
| 26 | |