Added tests for surrogate-based indexed NL fuzzy joins, where the top-level join is unecessary and optimized away.
git-svn-id: https://asterixdb.googlecode.com/svn/branches/asterix_fuzzy_perf@891 eaa15691-b419-025a-1212-ee371bd00084
diff --git a/asterix-app/src/test/resources/runtimets/queries/index-join/inverted-index-ngram-edit-distance-inline.aql b/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-edit-distance-inline.aql
similarity index 90%
rename from asterix-app/src/test/resources/runtimets/queries/index-join/inverted-index-ngram-edit-distance-inline.aql
rename to asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-edit-distance-inline.aql
index f061143..a602ca1 100644
--- a/asterix-app/src/test/resources/runtimets/queries/index-join/inverted-index-ngram-edit-distance-inline.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-edit-distance-inline.aql
@@ -38,11 +38,11 @@
create index ngram_index on Customers(name) type ngram(3);
-write output to nc1:"rttest/index-join_inverted-index-ngram-edit-distance-inline.adm";
+write output to nc1:"rttest/inverted-index-join_ngram-edit-distance-inline.adm";
for $a in dataset('Customers')
for $b in dataset('Customers2')
let $ed := edit-distance($a.name, $b.name)
where $ed <= 4 and $a.cid < $b.cid
order by $ed, $a.cid, $b.cid
-return { "aname": $a.name, "bname": $b.name, "ed": $ed }
\ No newline at end of file
+return { "arec": $a, "brec": $b, "ed": $ed }
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/queries/index-join/inverted-index-ngram-edit-distance.aql b/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-edit-distance.aql
similarity index 94%
rename from asterix-app/src/test/resources/runtimets/queries/index-join/inverted-index-ngram-edit-distance.aql
rename to asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-edit-distance.aql
index dfd86e3..1c88536 100644
--- a/asterix-app/src/test/resources/runtimets/queries/index-join/inverted-index-ngram-edit-distance.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-edit-distance.aql
@@ -37,7 +37,7 @@
create index ngram_index on Customers(name) type ngram(3);
-write output to nc1:"rttest/index-join_inverted-index-ngram-edit-distance.adm";
+write output to nc1:"rttest/inverted-index-join_ngram-edit-distance.adm";
for $a in dataset('Customers')
for $b in dataset('Customers2')
diff --git a/asterix-app/src/test/resources/runtimets/queries/index-join/inverted-index-ngram-jaccard-inline.aql b/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-jaccard-inline.aql
similarity index 91%
rename from asterix-app/src/test/resources/runtimets/queries/index-join/inverted-index-ngram-jaccard-inline.aql
rename to asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-jaccard-inline.aql
index fbe5a69..cd88072 100644
--- a/asterix-app/src/test/resources/runtimets/queries/index-join/inverted-index-ngram-jaccard-inline.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-jaccard-inline.aql
@@ -39,11 +39,11 @@
create index ngram_index on DBLP(title) type ngram(3);
-write output to nc1:"rttest/index-join_inverted-index-ngram-jaccard-inline.adm";
+write output to nc1:"rttest/inverted-index-join_ngram-jaccard-inline.adm";
for $a in dataset('DBLP')
for $b in dataset('CSX')
let $jacc := similarity-jaccard(gram-tokens($a.title, 3, false), gram-tokens($b.title, 3, false))
where $jacc >= 0.5f and $a.id < $b.id
order by $jacc, $a.id, $b.id
-return { "arec": $a.title, "brec": $b.title, "jacc": $jacc }
\ No newline at end of file
+return { "arec": $a, "brec": $b, "jacc": $jacc }
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/queries/index-join/inverted-index-ngram-jaccard.aql b/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-jaccard.aql
similarity index 91%
rename from asterix-app/src/test/resources/runtimets/queries/index-join/inverted-index-ngram-jaccard.aql
rename to asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-jaccard.aql
index 6f69866..abb5e33 100644
--- a/asterix-app/src/test/resources/runtimets/queries/index-join/inverted-index-ngram-jaccard.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-jaccard.aql
@@ -38,11 +38,11 @@
create index ngram_index on DBLP(title) type ngram(3);
-write output to nc1:"rttest/index-join_inverted-index-ngram-jaccard.adm";
+write output to nc1:"rttest/inverted-index-join_ngram-jaccard.adm";
for $a in dataset('DBLP')
for $b in dataset('CSX')
where similarity-jaccard(gram-tokens($a.title, 3, false), gram-tokens($b.title, 3, false)) >= 0.5f
and $a.id < $b.id
order by $a.id, $b.id
-return { "arec": $a.title, "brec": $b.title }
\ No newline at end of file
+return { "arec": $a, "brec": $b }
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/queries/index-join/inverted-index-olist-edit-distance-inline.aql b/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/olist-edit-distance-inline.aql
similarity index 90%
rename from asterix-app/src/test/resources/runtimets/queries/index-join/inverted-index-olist-edit-distance-inline.aql
rename to asterix-app/src/test/resources/runtimets/queries/inverted-index-join/olist-edit-distance-inline.aql
index 4db5161..bdac6f1 100644
--- a/asterix-app/src/test/resources/runtimets/queries/index-join/inverted-index-olist-edit-distance-inline.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/olist-edit-distance-inline.aql
@@ -38,11 +38,11 @@
create index interests_index on Customers(interests) type keyword;
-write output to nc1:"rttest/index-join_inverted-index-olist-edit-distance-inline.adm";
+write output to nc1:"rttest/inverted-index-join_olist-edit-distance-inline.adm";
for $a in dataset('Customers')
for $b in dataset('Customers2')
let $ed := edit-distance($a.interests, $b.interests)
where len($a.interests) > 2 and len($b.interests) > 2 and $ed <= 1 and $a.cid < $b.cid
order by $ed, $a.cid, $b.cid
-return { "arec": $a.interests, "brec": $b.interests, "ed": $ed }
\ No newline at end of file
+return { "arec": $a, "brec": $b, "ed": $ed }
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/queries/index-join/inverted-index-olist-edit-distance.aql b/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/olist-edit-distance.aql
similarity index 94%
rename from asterix-app/src/test/resources/runtimets/queries/index-join/inverted-index-olist-edit-distance.aql
rename to asterix-app/src/test/resources/runtimets/queries/inverted-index-join/olist-edit-distance.aql
index 601d1b8..5e679e4 100644
--- a/asterix-app/src/test/resources/runtimets/queries/index-join/inverted-index-olist-edit-distance.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/olist-edit-distance.aql
@@ -37,7 +37,7 @@
create index interests_index on Customers(interests) type keyword;
-write output to nc1:"rttest/index-join_inverted-index-olist-edit-distance.adm";
+write output to nc1:"rttest/inverted-index-join_olist-edit-distance.adm";
for $a in dataset('Customers')
for $b in dataset('Customers2')
diff --git a/asterix-app/src/test/resources/runtimets/queries/index-join/inverted-index-olist-jaccard-inline.aql b/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/olist-jaccard-inline.aql
similarity index 91%
rename from asterix-app/src/test/resources/runtimets/queries/index-join/inverted-index-olist-jaccard-inline.aql
rename to asterix-app/src/test/resources/runtimets/queries/inverted-index-join/olist-jaccard-inline.aql
index f5b0c5a..8fd8632 100644
--- a/asterix-app/src/test/resources/runtimets/queries/index-join/inverted-index-olist-jaccard-inline.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/olist-jaccard-inline.aql
@@ -38,11 +38,11 @@
create index interests_index on Customers(interests) type keyword;
-write output to nc1:"rttest/index-join_inverted-index-olist-jaccard-inline.adm";
+write output to nc1:"rttest/inverted-index-join_olist-jaccard-inline.adm";
for $a in dataset('Customers')
for $b in dataset('Customers2')
let $jacc := /*+ indexnl */similarity-jaccard($a.interests, $b.interests)
where $jacc >= 0.9f and $a.cid < $b.cid and len($a.interests) > 1 and len($b.interests) > 1
order by $jacc, $a.cid, $b.cid
-return { "a": $a.interests, "b": $b.interests, "jacc": $jacc }
\ No newline at end of file
+return { "a": $a, "b": $b, "jacc": $jacc }
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/queries/index-join/inverted-index-olist-jaccard.aql b/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/olist-jaccard.aql
similarity index 91%
rename from asterix-app/src/test/resources/runtimets/queries/index-join/inverted-index-olist-jaccard.aql
rename to asterix-app/src/test/resources/runtimets/queries/inverted-index-join/olist-jaccard.aql
index 43b27aa..50d13f1 100644
--- a/asterix-app/src/test/resources/runtimets/queries/index-join/inverted-index-olist-jaccard.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/olist-jaccard.aql
@@ -37,11 +37,11 @@
create index interests_index on Customers(interests) type keyword;
-write output to nc1:"rttest/index-join_inverted-index-olist-jaccard.adm";
+write output to nc1:"rttest/inverted-index-join_olist-jaccard.adm";
for $a in dataset('Customers')
for $b in dataset('Customers2')
where /*+ indexnl */ similarity-jaccard($a.interests, $b.interests) >= 0.9f
and $a.cid < $b.cid and len($a.interests) > 1 and len($b.interests) > 1
order by $a.cid, $b.cid
-return { "a": $a.interests, "b": $b.interests }
\ No newline at end of file
+return { "a": $a, "b": $b }
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/queries/index-join/inverted-index-ulist-jaccard-inline.aql b/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ulist-jaccard-inline.aql
similarity index 91%
rename from asterix-app/src/test/resources/runtimets/queries/index-join/inverted-index-ulist-jaccard-inline.aql
rename to asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ulist-jaccard-inline.aql
index 8eb173a..a62c66d 100644
--- a/asterix-app/src/test/resources/runtimets/queries/index-join/inverted-index-ulist-jaccard-inline.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ulist-jaccard-inline.aql
@@ -38,11 +38,11 @@
create index interests_index on Customers(interests) type keyword;
-write output to nc1:"rttest/index-join_inverted-index-ulist-jaccard-inline.adm";
+write output to nc1:"rttest/inverted-index-join_ulist-jaccard-inline.adm";
for $a in dataset('Customers')
for $b in dataset('Customers2')
let $jacc := /*+ indexnl */ similarity-jaccard($a.interests, $b.interests)
where $jacc >= 0.9f and $a.cid < $b.cid and len($a.interests) > 1 and len($b.interests) > 1
order by $jacc, $a.cid, $b.cid
-return { "a": $a.interests, "b": $b.interests, "jacc": $jacc }
\ No newline at end of file
+return { "a": $a, "b": $b, "jacc": $jacc }
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/queries/index-join/inverted-index-ulist-jaccard.aql b/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ulist-jaccard.aql
similarity index 91%
rename from asterix-app/src/test/resources/runtimets/queries/index-join/inverted-index-ulist-jaccard.aql
rename to asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ulist-jaccard.aql
index 4efb5ee..8c6570f 100644
--- a/asterix-app/src/test/resources/runtimets/queries/index-join/inverted-index-ulist-jaccard.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ulist-jaccard.aql
@@ -37,11 +37,11 @@
create index interests_index on Customers(interests) type keyword;
-write output to nc1:"rttest/index-join_inverted-index-ulist-jaccard.adm";
+write output to nc1:"rttest/inverted-index-join_ulist-jaccard.adm";
for $a in dataset('Customers')
for $b in dataset('Customers2')
where /*+ indexnl */ similarity-jaccard($a.interests, $b.interests) >= 0.9f
and $a.cid < $b.cid and len($a.interests) > 1 and len($b.interests) > 1
order by $a.cid, $b.cid
-return { "a": $a.interests, "b": $b.interests }
\ No newline at end of file
+return { "a": $a, "b": $b }
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/queries/index-join/inverted-index-word-jaccard-inline.aql b/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/word-jaccard-inline.aql
similarity index 91%
rename from asterix-app/src/test/resources/runtimets/queries/index-join/inverted-index-word-jaccard-inline.aql
rename to asterix-app/src/test/resources/runtimets/queries/inverted-index-join/word-jaccard-inline.aql
index 8696101..3ac3583 100644
--- a/asterix-app/src/test/resources/runtimets/queries/index-join/inverted-index-word-jaccard-inline.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/word-jaccard-inline.aql
@@ -39,11 +39,11 @@
create index keyword_index on DBLP(title) type keyword;
-write output to nc1:"rttest/index-join_inverted-index-word-jaccard-inline.adm";
+write output to nc1:"rttest/inverted-index-join_word-jaccard-inline.adm";
for $a in dataset('DBLP')
for $b in dataset('CSX')
let $jacc := similarity-jaccard(word-tokens($a.title), word-tokens($b.title))
where $jacc >= 0.5f and $a.id < $b.id
order by $jacc, $a.id, $b.id
-return { "arec": $a.title, "brec": $b.title, "jacc": $jacc }
\ No newline at end of file
+return { "arec": $a, "brec": $b, "jacc": $jacc }
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/queries/index-join/inverted-index-word-jaccard.aql b/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/word-jaccard.aql
similarity index 91%
rename from asterix-app/src/test/resources/runtimets/queries/index-join/inverted-index-word-jaccard.aql
rename to asterix-app/src/test/resources/runtimets/queries/inverted-index-join/word-jaccard.aql
index 228dfd2..7060fe6 100644
--- a/asterix-app/src/test/resources/runtimets/queries/index-join/inverted-index-word-jaccard.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/word-jaccard.aql
@@ -38,11 +38,11 @@
create index keyword_index on DBLP(title) type keyword;
-write output to nc1:"rttest/index-join_inverted-index-word-jaccard.adm";
+write output to nc1:"rttest/inverted-index-join_word-jaccard.adm";
for $a in dataset('DBLP')
for $b in dataset('CSX')
where similarity-jaccard(word-tokens($a.title), word-tokens($b.title)) >= 0.5f
and $a.id < $b.id
order by $a.id, $b.id
-return { "arec": $a.title, "brec": $b.title }
\ No newline at end of file
+return { "arec": $a, "brec": $b }
\ No newline at end of file