Changeset: 6add061e2d82 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/6add061e2d82
Added Files:
sql/test/strings/Tests/contains_join_2.test.in
Modified Files:
monetdb5/modules/atoms/bigram.h
sql/test/strings/Tests/All
sql/test/strings/Tests/contains_join.test
Branch: strimps_v3
Log Message:
Add creative work contains test
diffs (67 lines):
diff --git a/monetdb5/modules/atoms/bigram.h b/monetdb5/modules/atoms/bigram.h
--- a/monetdb5/modules/atoms/bigram.h
+++ b/monetdb5/modules/atoms/bigram.h
@@ -159,7 +159,7 @@ init_bigram_idx(Ngrams *ng, BATiter *bi,
int done = (h[bigram] > 0 &&
rids[lists[bigram] + h[bigram] - 1] == ob - bbase);
if (!done) {
- rids[lists[bigram] + h[bigram]]
= ob - bbase;
+ rids[lists[bigram] + h[bigram]]
= (unsigned)(ob - bbase);
h[bigram]++;
}
}
diff --git a/sql/test/strings/Tests/All b/sql/test/strings/Tests/All
--- a/sql/test/strings/Tests/All
+++ b/sql/test/strings/Tests/All
@@ -5,6 +5,7 @@ asciify
startswith_join
endswith_join
contains_join
+HAVE_DATA_PATH?contains_join_2
ts_and_tstz_to_str_bug
diff --git a/sql/test/strings/Tests/contains_join.test
b/sql/test/strings/Tests/contains_join.test
--- a/sql/test/strings/Tests/contains_join.test
+++ b/sql/test/strings/Tests/contains_join.test
@@ -43,7 +43,7 @@ TRUNCATE TABLE foo
statement ok
TRUNCATE TABLE bar
--- TRIGGERS SORT BASED JOIN
+-- TRIGGERS BIGRAM JOIN
statement ok
INSERT INTO foo VALUES ('Καλή'),('Frühlingsrauschen'),('Das grüne
Monokel'),('Καλή Χρονιά'),('Olá, bom dia'),('Risør'),('Wenn der Ölhahn
versiegt'),('Punch-Out!! WITH LYRICS'),('Super Mario Bros. 3 WITH
LYRICS'),('Δεν καταλαβαίνω'),('Adeus, boa tarde')
@@ -97,4 +97,3 @@ DROP TABLE foo
statement ok
DROP TABLE bar
-
diff --git a/sql/test/strings/Tests/contains_join_2.test.in
b/sql/test/strings/Tests/contains_join_2.test.in
new file mode 100644
--- /dev/null
+++ b/sql/test/strings/Tests/contains_join_2.test.in
@@ -0,0 +1,22 @@
+statement ok
+create table creative_work_title(s string)
+
+statement ok
+create table wo2_thesaurus(s string)
+
+statement ok
+COPY 992001 RECORDS INTO creative_work_title FROM
E'$QTSTDATAPATH/spinque/creative_work_title_cleaned.txt' NULL AS ''
+
+statement ok
+COPY 5490 RECORDS INTO wo2_thesaurus FROM
E'$QTSTDATAPATH/spinque/wo2_thesaurus.txt' NULL AS ''
+
+query I
+select count(*) from creative_work_title c, wo2_thesaurus w where [c.s]
contains [w.s]
+----
+142819
+
+statement ok
+drop table creative_work_title
+
+statement ok
+drop table wo2_thesaurus
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]