| /* |
| * Description : Left-outer joins two datasets, DBLP and CSX, based on their title. |
| * DBLP has a secondary btree index on title, and given the 'indexnl' hint |
| * we expect the join to be transformed into an indexed nested-loop join. |
| * |
| * TODO(@Sattam): given the 'indexnl' hint |
| * we expect the join to be transformed into an indexed nested-loop join. |
| * |
| * regression test 2 for issue 285--having an order by and limit for the outer loop relation |
| * |
| * Success : Yes |
| */ |
| |
| use dataverse test; |
| |
| for $a in dataset('DBLP') |
| order by $a.id |
| limit 10 |
| return { |
| "aid": $a.id, |
| "bids": for $b in dataset('CSX') |
| where $a.authors = $b.authors |
| order by $b.id |
| return $b.id |
| } |