Changeset: 8993582f037b for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/8993582f037b
Modified Files:
        monetdb5/modules/mal/pcre.c
Branch: string_imprints
Log Message:

For now only use strimps for like queries


diffs (19 lines):

diff --git a/monetdb5/modules/mal/pcre.c b/monetdb5/modules/mal/pcre.c
--- a/monetdb5/modules/mal/pcre.c
+++ b/monetdb5/modules/mal/pcre.c
@@ -1886,7 +1886,14 @@ PCRElikeselect(bat *ret, const bat *bid,
 
        assert(ATOMstorage(b->ttype) == TYPE_str);
 
-       if (use_strimps && BATcount(b) >= STRIMP_CREATION_THRESHOLD) {
+       /* Since the strimp pre-filtering of a LIKE query produces a superset of
+        * the actual result the complement of that set will necessarily reject
+        * some of the matching entries in the NOT LIKE query.
+        *
+        * A better solution is to run the PCRElikeselect as a LIKE query with
+        * strimps and return the complement of the result.
+        */
+       if (use_strimps && BATcount(b) >= STRIMP_CREATION_THRESHOLD && !*anti) {
                if (STRMPcreate(b, NULL) == GDK_SUCCEED) {
                        BAT *tmp_s;
                        tmp_s = STRMPfilter(b, s, *pat);
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to