icetindil | 8937e6e | 2014-02-13 21:21:03 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Description : Tests that non-datascan unnests are pushed through join and |
| 3 | * : the query plan is rewritten as hybrid hash join. |
| 4 | * Success : Yes |
| 5 | */ |
| 6 | |
| 7 | drop dataverse test if exists; |
| 8 | create dataverse test; |
| 9 | use dataverse test; |
| 10 | |
| 11 | create type TestType as open { |
| 12 | id:int32, |
| 13 | name:string |
| 14 | } |
| 15 | |
| 16 | create dataset t1(TestType) primary key id; |
| 17 | create dataset t2(TestType) primary key id; |
| 18 | |
| 19 | write output to nc1:"rttest/hahsjoin-with-unnest.adm"; |
| 20 | |
| 21 | for $m in dataset('t1') |
| 22 | for $n in dataset('t2') |
| 23 | for $a in $m.hobbies |
| 24 | for $b in $n.hobbies |
| 25 | where $a = $b |
| 26 | return {"t1":$m, "t2":$n} |