vinayakb | 38b7ca4 | 2012-03-05 05:44:15 +0000 | [diff] [blame] | 1 | use dataverse demo_aql; |
| 2 | |
| 3 | declare type DBLPType as open { |
| 4 | id: int32, |
| 5 | dblpid: string, |
| 6 | title: string, |
| 7 | authors: string, |
| 8 | misc: string |
| 9 | } |
| 10 | |
| 11 | declare nodegroup group1 on rainbow-01, rainbow-02, rainbow-03, rainbow-04, rainbow-05; |
| 12 | |
| 13 | declare dataset DBLP(DBLPType) |
ramangrover29 | 669d8f6 | 2013-02-11 06:03:32 +0000 | [diff] [blame] | 14 | primary key id on group1; |
vinayakb | 38b7ca4 | 2012-03-05 05:44:15 +0000 | [diff] [blame] | 15 | |
| 16 | write output to rainbow-01:"/home/onose/hyracks-rainbow/results/110-self-join-dblp.adm"; |
| 17 | |
| 18 | set simthreshold '.8f'; |
| 19 | |
| 20 | for $k in ( |
| 21 | for $i in dataset('DBLP') |
| 22 | for $j in dataset('DBLP') |
| 23 | where $i.title ~= $j.title |
| 24 | order by $i.id, $j.id |
| 25 | return {'dblp1': $i, 'dblp2': $j} |
| 26 | ) |
| 27 | where $k.dblp1.id < $k.dblp2.id |
| 28 | return $k |