Changeset: 3a77428848d7 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3a77428848d7
Modified Files:
        gdk/gdk_select.c
        monetdb5/modules/mal/pcre.c
Branch: cand
Log Message:

handle like select with delete lists


diffs (61 lines):

diff --git a/gdk/gdk_select.c b/gdk/gdk_select.c
--- a/gdk/gdk_select.c
+++ b/gdk/gdk_select.c
@@ -1935,9 +1935,12 @@ BATselect(BAT *b, BAT *s, const void *tl
             int li, int hi, int anti)
 {
        if (s && s->S->cand == CAND_NEG) {
-               BAT *p = BATselect_pos(b, NULL, tl, th, li, hi, anti);
-               BAT *x = BATminuscand(p, s);
-               BBPunfix(p->batCacheid); 
+               BAT *p = BATselect_pos(b, NULL, tl, th, li, hi, anti), *x = 
NULL;
+
+               if (p) {
+                       x = BATminuscand(p, s);
+                       BBPunfix(p->batCacheid); 
+               }
                return x;
        } else {
                return BATselect_pos(b, s, tl, th, li, hi, anti);
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
@@ -1314,8 +1314,17 @@ PCRElikesubselect2(bat *ret, const bat *
                }
        }
 
-       if (use_re) {
-               res = re_likesubselect(&bn, b, s, *pat, *caseignore, *anti);
+       if (use_re) { 
+               if (s && s->S->cand == CAND_NEG) {
+                       res = re_likesubselect(&bn, b, NULL, *pat, *caseignore, 
*anti);
+                       if (bn) {
+                               BAT *x = bn;
+                               bn = BATminuscand(x, s);
+                               BBPunfix(x->batCacheid); 
+                       }
+               } else {
+                       res = re_likesubselect(&bn, b, s, *pat, *caseignore, 
*anti);
+               }
        } else if (ppat == NULL) {
                /* no pattern and no special characters: can use normal select 
*/
                bn = BATselect(b, s, *pat, NULL, 1, 1, *anti);
@@ -1324,7 +1333,17 @@ PCRElikesubselect2(bat *ret, const bat *
                else
                        res = MAL_SUCCEED;
        } else {
-               res = pcre_likesubselect(&bn, b, s, ppat, *caseignore, *anti);
+               if (s && s->S->cand == CAND_NEG) {
+
+                       res = pcre_likesubselect(&bn, b, NULL, ppat, 
*caseignore, *anti);
+                       if (bn) {
+                               BAT *x = bn;
+                               bn = BATminuscand(x, s);
+                               BBPunfix(x->batCacheid); 
+                       }
+               } else {
+                       res = pcre_likesubselect(&bn, b, s, ppat, *caseignore, 
*anti);
+               }
        }
        BBPunfix(b->batCacheid);
        if (s)
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to