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

Move setting some properties around.


diffs (89 lines):

diff --git a/gdk/gdk_align.c b/gdk/gdk_align.c
--- a/gdk/gdk_align.c
+++ b/gdk/gdk_align.c
@@ -206,9 +206,6 @@ VIEWcreate_(oid seq, BAT *b, int slice_v
        bn->batInserted = b->batInserted;
        bn->batCount = b->batCount;
        bn->batCapacity = b->batCapacity;
-       bn->H->width = 0;
-       bn->H->shift = 0;
-       bn->hvarsized = 1;
        *bn->T = *b->T;
        if (bn->batFirst > 0) {
                bn->T->heap.base += b->batFirst * b->T->width;
@@ -272,7 +269,6 @@ BATmaterialize(BAT *b)
        Heap tail;
        BUN p, q;
        oid t, *x;
-       bte hshift;
 
        BATcheck(b, "BATmaterialize", GDK_FAIL);
        assert(!isVIEW(b));
@@ -303,12 +299,7 @@ BATmaterialize(BAT *b)
 
        /* point of no return */
        b->ttype = tt;
-       hshift = b->H->shift;
        BATsetdims(b);
-       if (b->htype) {
-               b->H->shift = hshift;   /* restore in case it got changed */
-               b->H->width = 1 << hshift;
-       }
        b->batDirty = TRUE;
        b->batDirtydesc = TRUE;
        b->T->heap.dirty = TRUE;
diff --git a/gdk/gdk_bat.c b/gdk/gdk_bat.c
--- a/gdk/gdk_bat.c
+++ b/gdk/gdk_bat.c
@@ -100,25 +100,30 @@ BATcreatedesc(oid hseq, int tt, int heap
         * Fill in basic column info
         */
        bn->htype = TYPE_void;
+       bn->H->width = 0;
+       bn->H->shift = 0;
+       bn->H->varsized = 1;
+       bn->hseqbase = hseq;
+       bn->hkey = TRUE | BOUND2BTRUE;
+       bn->H->nonil = TRUE;
+       bn->H->nil = FALSE;
+       bn->hsorted = bn->hrevsorted = 1;
+       bn->hident = BATstring_h;
+       bn->halign = OIDnew(2);
+       bn->H->props = NULL;
+
        bn->ttype = tt;
-       bn->hkey = TRUE | BOUND2BTRUE;
        bn->tkey = FALSE;
-       bn->H->nonil = TRUE;
        bn->T->nonil = TRUE;
-       bn->H->nil = FALSE;
        bn->T->nil = FALSE;
-       bn->hsorted = bn->hrevsorted = 1;
        bn->tsorted = bn->trevsorted = ATOMlinear(tt) != 0;
+       bn->tident = BATstring_t;
+       bn->talign = bn->halign + 1;
+       bn->tseqbase = (tt == TYPE_void) ? oid_nil : 0;
+       bn->T->props = NULL;
 
-       bn->hident = BATstring_h;
-       bn->tident = BATstring_t;
-       bn->halign = OIDnew(2);
-       bn->talign = bn->halign + 1;
-       bn->hseqbase = hseq;
-       bn->tseqbase = (tt == TYPE_void) ? oid_nil : 0;
        bn->batRole = role;
        bn->batPersistence = TRANSIENT;
-       bn->H->props = bn->T->props = NULL;
        /*
         * add to BBP
         */
@@ -184,9 +189,6 @@ void
 BATsetdims(BAT *b)
 {
        assert(b->htype == TYPE_void);
-       b->H->width = 0;
-       b->H->shift = 0;
-       b->H->varsized = 1;
 
        b->T->width = b->ttype == TYPE_str ? 1 : ATOMsize(b->ttype);
        b->T->shift = ATOMelmshift(Tsize(b));
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to