Update of /cvsroot/monetdb/MonetDB/src/gdk
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv2508/src/gdk

Modified Files:
        gdk_align.mx gdk_batop.mx gdk_relop.mx gdk_setop.mx 
        gdk_storage.mx 
Log Message:
more consistent use of BAThkey/BATtkey instead of direct ->H->key etc


Index: gdk_storage.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB/src/gdk/gdk_storage.mx,v
retrieving revision 1.129
retrieving revision 1.130
diff -u -d -r1.129 -r1.130
--- gdk_storage.mx      4 Oct 2007 10:33:44 -0000       1.129
+++ gdk_storage.mx      14 Nov 2007 12:40:55 -0000      1.130
@@ -1088,7 +1088,7 @@
                }
                MULTIJOIN_LEAD(ret) = 1;
                MULTIJOIN_SORTED(ret) = (BAThordered(b) & 1);
-               MULTIJOIN_KEY(ret) = b->hkey;
+               MULTIJOIN_KEY(ret) = BAThkey(b);
                MULTIJOIN_SYNCED(ret) = 1;
        } else {
                ret = BATmultijoin(argc, argv, (RowFcn) print_line, (void *) s, 
value_fcn, (void **) cp, order);

Index: gdk_relop.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB/src/gdk/gdk_relop.mx,v
retrieving revision 1.136
retrieving revision 1.137
diff -u -d -r1.136 -r1.137
--- gdk_relop.mx        4 Oct 2007 10:33:42 -0000       1.136
+++ gdk_relop.mx        14 Nov 2007 12:40:55 -0000      1.137
@@ -2345,8 +2345,8 @@
                bn->tsorted = (lc == 1 ? r->tsorted : FALSE);
                bn->hdense = (rc == 1 ? l->hdense : FALSE);
                bn->tdense = (lc == 1 ? r->tdense : FALSE);
-               BATkey(bn, (rc == 1 ? l->hkey : FALSE));
-               BATkey(BATmirror(bn), (lc == 1 ? r->tkey : FALSE));
+               BATkey(bn, (rc == 1 ? BAThkey(l) : FALSE));
+               BATkey(BATmirror(bn), (lc == 1 ? BATtkey(r) : FALSE));
                if (!bn->batDirty)
                        bn->batDirty = TRUE;
        }
@@ -2514,8 +2514,8 @@
                bn->tsorted = (lc == 1 ? r->tsorted : FALSE);
                bn->hdense = (rc == 1 ? l->hdense : FALSE);
                bn->tdense = (lc == 1 ? r->tdense : FALSE);
-               BATkey(bn, (rc == 1 ? l->hkey : FALSE));
-               BATkey(BATmirror(bn), (lc == 1 ? r->tkey : FALSE));
+               BATkey(bn, (rc == 1 ? BAThkey(l) : FALSE));
+               BATkey(BATmirror(bn), (lc == 1 ? BATtkey(r) : FALSE));
                if (!bn->batDirty)
                        bn->batDirty = TRUE;
        }

Index: gdk_align.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB/src/gdk/gdk_align.mx,v
retrieving revision 1.85
retrieving revision 1.86
diff -u -d -r1.85 -r1.86
--- gdk_align.mx        8 Nov 2007 19:14:54 -0000       1.85
+++ gdk_align.mx        14 Nov 2007 12:40:54 -0000      1.86
@@ -126,7 +126,7 @@
                b1->hdense = FALSE;
                BATseqbase(b1, oid_nil);
        }
-       BATkey(b1, b2->hkey != FALSE);
+       BATkey(b1, BAThkey(b2));
        b1->hsorted = BAThordered(b2);
        b1->halign = b2->halign;
        b1->batDirtydesc = TRUE;
@@ -404,6 +404,7 @@
        BUN p = BUNfirst(b), q = BUNlast(b);
        oid h, *x;
 
+       assert(!isVIEW(b));
        assert(cnt >= q - p);
        BATcheck(b, "BATmaterialize: bat required");
        ALGODEBUG THRprintf(GDKout, "#BATmaterialize(%d);\n", (int) 
b->batCacheid);
@@ -590,6 +591,10 @@
                n->batRestricted = BAT_WRITE;
                n->GDKversion = GDKLIBRARY;
 
+               /* reset BOUND2KEY */
+               n->H->key = BAThkey(v);
+               n->T->key = BATtkey(v);
+
                /* copy the heaps */
                n->H->heap = head;
                n->T->heap = tail;

Index: gdk_setop.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB/src/gdk/gdk_setop.mx,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -d -r1.56 -r1.57
--- gdk_setop.mx        4 Oct 2007 10:33:43 -0000       1.56
+++ gdk_setop.mx        14 Nov 2007 12:40:55 -0000      1.57
@@ -307,7 +307,7 @@
                b->halign = OIDnew(1);
        }
        BATkey(bn, TRUE);       /* this we accomplished */
-       BATkey(BATmirror(bn), b->tkey);
+       BATkey(BATmirror(bn), BATtkey(b));
        bn->hsorted = BAThordered(b);
        bn->tsorted = BATtordered(b);
        if (BATcount(bn) == BATcount(b)) {
@@ -360,8 +360,8 @@
 
        /* property management */
        BATset(bn, TRUE);       /* this we accomplished */
-       BATkey(bn, b->hkey);
-       BATkey(BATmirror(bn), b->tkey);
+       BATkey(bn, BAThkey(b));
+       BATkey(BATmirror(bn), BATtkey(b));
        bn->hsorted = BAThordered(b);
        bn->tsorted = BATtordered(b);
        if (BATcount(bn) == BATcount(b)) {
@@ -662,8 +662,8 @@
        bn->hsorted = BAThordered(l);
        bn->tsorted = BATtordered(l);
        if (BATcount(bn)) {
-               BATkey(bn, l->hkey);
-               BATkey(BATmirror(bn), l->tkey);
+               BATkey(bn, BAThkey(l));
+               BATkey(BATmirror(bn), BATtkey(l));
        } else {
                BATkey(bn, TRUE);
                BATkey(BATmirror(bn), TRUE);
@@ -820,7 +820,7 @@
        if (bn->hkey && hdisjunct == FALSE)
                BATkey(bn, FALSE);
 #endif
-       BATkey(BATmirror(bn), tdisjunct ? l->tkey && r->tkey : 0);
+       BATkey(BATmirror(bn), tdisjunct ? BATtkey(l) && BATtkey(r) : 0);
 
        return bn;
   bunins_failed:

Index: gdk_batop.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB/src/gdk/gdk_batop.mx,v
retrieving revision 1.143
retrieving revision 1.144
diff -u -d -r1.143 -r1.144
--- gdk_batop.mx        26 Oct 2007 13:59:38 -0000      1.143
+++ gdk_batop.mx        14 Nov 2007 12:40:55 -0000      1.144
@@ -911,8 +911,8 @@
 Hash changes the order; IDX yields ordered tail; scan respects original order.
 @c
        if (BATcount(bn)) {
-               BATkey(bn, b->hkey);
-               BATkey(BATmirror(bn), b->tkey);
+               BATkey(bn, BAThkey(b));
+               BATkey(BATmirror(bn), BATtkey(b));
        } else {
                BATkey(bn, TRUE);
                BATkey(BATmirror(bn), TRUE);
@@ -1083,8 +1083,8 @@
        /* set sorted flags by hand, because we used BUNfastins() */
        bn->hsorted = BAThordered(b);
        bn->tsorted = BATtordered(b);
-       BATkey(bn, b->hkey);
-       BATkey(BATmirror(bn), b->tkey);
+       BATkey(bn, BAThkey(b));
+       BATkey(BATmirror(bn), BATtkey(b));
        return bn;
       bunins_failed:
        BBPreclaim(bn);
@@ -1185,8 +1185,8 @@
        if (bn == NULL) {
                return NULL;
        }
-       BATkey(bn, b->hkey);
-       BATkey(BATmirror(bn), b->tkey);
+       BATkey(bn, BAThkey(b));
+       BATkey(BATmirror(bn), BATtkey(b));
        bn->hsorted = BAThordered(b);
        bn->tsorted = BATtordered(b);
 
@@ -1717,8 +1717,8 @@
        BAT *bn = BATnew(ht, tt, (size_t) ((double) expected_size * BATMARGIN));
 
        if (bn) {
-               BATkey(bn, b->hkey);
-               BATkey(BATmirror(bn), b->tkey);
+               BATkey(bn, BAThkey(b));
+               BATkey(BATmirror(bn), BATtkey(b));
                bn->hsorted = (respect_order && (BAThordered(b) & 1)) ? 
GDK_SORTED : 0;
                bn->tsorted = (respect_order && (BATtordered(b) & 1)) ? 
GDK_SORTED : 0;
        }
@@ -2295,7 +2295,7 @@
        if (BAThdense(bn)) {
                BATseqbase(bn, b->hseqbase);
        }
-       BATkey(bn, (bn->hdense || b->hkey != 0));
+       BATkey(bn, (bn->hdense || b->hkey != FALSE));
        bn->tsorted = (trivprop ? GDK_SORTED : FALSE);
        bn->tdense = trivprop;
        if (BATtdense(bn)) {


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Monetdb-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins

Reply via email to