Changeset: 682dcdc49993 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=682dcdc49993
Modified Files:
clients/Tests/exports.stable.out
gdk/gdk.h
gdk/gdk_batop.c
monetdb5/modules/kernel/algebra.mx
Branch: default
Log Message:
Removed function BATnumber (and thus algebra.number).
The function is unused and unusable.
diffs (129 lines):
diff --git a/clients/Tests/exports.stable.out b/clients/Tests/exports.stable.out
--- a/clients/Tests/exports.stable.out
+++ b/clients/Tests/exports.stable.out
@@ -140,7 +140,6 @@ BAT *BATmode(BAT *b, int onoff);
int BATmultiprintf(stream *f, int argc, BAT *argv[], int printoid, int order,
int printorderby);
int BATname(BAT *b, const char *nme);
BAT *BATnew(int hdtype, int tltype, BUN capacity);
-BAT *BATnumber(BAT *b);
BAT *BATorder(BAT *b);
BAT *BATorder_rev(BAT *b);
int BATordered(BAT *b);
@@ -658,7 +657,6 @@ str ALGmin_lng(lng *res, int *bid);
str ALGmin_sht(sht *res, int *bid);
str ALGmin_wrd(wrd *res, int *bid);
str ALGminany(ptr result, int *bid);
-str ALGnumber(int *result, int *bid);
str ALGouterjoin(int *result, int *lid, int *rid);
str ALGouterjoinestimate(int *result, int *lid, int *rid, lng *estimate);
str ALGposition(wrd *retval, int *bid, ptr val);
diff --git a/gdk/gdk.h b/gdk/gdk.h
--- a/gdk/gdk.h
+++ b/gdk/gdk.h
@@ -1514,8 +1514,6 @@ gdk_export int BATgetaccess(BAT *b);
* @item BAT *
* @tab BATmark_grp (BAT *b, BAT *g, oid *s)
* @item BAT *
- * @tab BATnumber (BAT *b)
- * @item BAT *
* @tab BATmirror (BAT *b)
* @item BAT *
* @tab BATreset (BAT *b)
@@ -1527,10 +1525,7 @@ gdk_export int BATgetaccess(BAT *b);
* name. The routine BATmark creates a binary association that
* introduces a new tail column of fresh densely ascending OIDs. The
* base OID can be given explicitly, or if oid_nil is passed, is
- * chosen as a new unique range by the system. A similar routine is
- * BATnumber, which copies the heads and assigns an integer index to
- * the tail. It plays a crucial role in administration of query
- * results.
+ * chosen as a new unique range by the system.
*
* The routine BATmirror returns the mirror image BAT (where tail is
* head and head is tail) of that same BAT. This does not involve a
@@ -1541,7 +1536,6 @@ gdk_export BAT *BATclear(BAT *b, int for
gdk_export BAT *BATcopy(BAT *b, int ht, int tt, int writeable);
gdk_export BAT *BATmark(BAT *b, oid base);
gdk_export BAT *BATmark_grp(BAT *b, BAT *g, oid *base);
-gdk_export BAT *BATnumber(BAT *b);
gdk_export BAT *BATgroup(BAT *b, int start, int incr, int grpsize);
/*
diff --git a/gdk/gdk_batop.c b/gdk/gdk_batop.c
--- a/gdk/gdk_batop.c
+++ b/gdk/gdk_batop.c
@@ -1583,38 +1583,6 @@ BATsetprop_wrd(BAT *b, int idx, wrd val)
BATsetprop(b, idx, TYPE_wrd, &val);
}
-#define BUNnumber(bx,hx,tx) bunfastins_nocheck(bx, r, hx, (ptr)&i,
Hsize(bx), Tsize(bx)); r++; i++;
-/* returns a new bat with the same head as b and consecutively
- * numbered integers starting with 0 in the tail */
-BAT *
-BATnumber(BAT *b)
-{
-/* 64bit: BATnumber should return a [any,wrd] bat instead of [any,int] */
- int i = 0;
- BAT *bn;
- BUN r;
-
- BATcheck(b, "BATnumber");
- /* assert(BATcount(b) <= MAXINT); */
- bn = BATnew(b->htype, TYPE_int, BATcount(b));
- if (bn == NULL)
- return NULL;
- r = BUNfirst(bn);
- updateloop(bn, b, BUNnumber);
- ALIGNsetH(bn, b);
- BATsetprop_wrd(bn, GDK_AGGR_CARD, i); /* 64bit: no (wrd) cast to
remind us */
- bn->hsorted = BAThordered(b);
- bn->tsorted = 1;
- bn->hrevsorted = BAThrevordered(b);
- bn->trevsorted = BATcount(bn) <= 1;
- bn->H->nonil = b->H->nonil;
- bn->T->nonil = 1;
- return bn;
- bunins_failed:
- BBPreclaim(bn);
- return NULL;
-}
-
BAT *
BATgroup(BAT *b, int start, int incr, int grpsize)
{
diff --git a/monetdb5/modules/kernel/algebra.mx
b/monetdb5/modules/kernel/algebra.mx
--- a/monetdb5/modules/kernel/algebra.mx
+++ b/monetdb5/modules/kernel/algebra.mx
@@ -716,11 +716,6 @@ comment "\"grouped mark\": Produces a ne
from b's tail. The third argument (s) gives the base value for the new
OID sequence of each group.";
-command number( b:bat[:any_1,:any] ) :bat[:any_1,:int]
-address ALGnumber
-comment "Produces a new BAT with identical head column, and consecutively
- increasing integers (start at 0) in the tail column.";
-
command merge(b:bat[:oid,:oid]):bat[:lng,:oid]
address ALGmerge
comment "Merge head and tail into a single value";
@@ -1095,7 +1090,6 @@ algebra_export str ALG@1(int *result, in
@
@h
@:ALGunaryExport(histogram)@
-@:ALGunaryExport(number)@
@:ALGunaryExport(merge)@
@:ALGunaryExport(split)@
@:ALGunaryExport(copy)@
@@ -2667,12 +2661,6 @@ ALGhistogram(bat *result, bat *bid)
}
str
-ALGnumber(bat *result, bat *bid)
-{
- return ALGunary(result, bid, BATnumber, "algebra.number");
-}
-
-str
ALGmerge(bat *result, bat *bid)
{
return ALGunary(result, bid, BATmerge, "algebra.merge");
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list