Changeset: ce285c612f74 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ce285c612f74
Modified Files:
        gdk/gdk_batop.c
Branch: default
Log Message:

Set properties in BATslice when we copy a BAT.


diffs (29 lines):

diff --git a/gdk/gdk_batop.c b/gdk/gdk_batop.c
--- a/gdk/gdk_batop.c
+++ b/gdk/gdk_batop.c
@@ -805,8 +805,8 @@ BATslice(BAT *b, BUN l, BUN h)
         * We have to do it: create a new BAT and put everything into it.
         */
        } else {
-               BUN p = (BUN) l;
-               BUN q = (BUN) h;
+               BUN p = l;
+               BUN q = h;
 
                bn = BATnew((BAThdense(b)?TYPE_void:b->htype), b->ttype, h - l);
                if (bn == NULL) {
@@ -823,6 +823,14 @@ BATslice(BAT *b, BUN l, BUN h)
                } else {
                        BATsetcount(bn, h - l);
                }
+               bn->hsorted = b->hsorted;
+               bn->hrevsorted = b->hrevsorted;
+               bn->hkey = b->hkey & 1;
+               bn->H->nonil = b->H->nonil;
+               bn->tsorted = b->tsorted;
+               bn->trevsorted = b->trevsorted;
+               bn->tkey = b->tkey & 1;
+               bn->T->nonil = b->T->nonil;
        }
        bni = bat_iterator(bn);
        if (BAThdense(b)) {
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to