Changeset: 2d1109f9c079 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2d1109f9c079 Modified Files: clients/Tests/MAL-signatures.stable.out clients/Tests/MAL-signatures.stable.out.int128 clients/Tests/exports.stable.out gdk/ChangeLog gdk/gdk.h gdk/gdk_batop.c gdk/gdk_join.c monetdb5/ChangeLog monetdb5/modules/kernel/algebra.c monetdb5/modules/kernel/algebra.h monetdb5/modules/kernel/algebra.mal monetdb5/modules/kernel/bat5.c monetdb5/modules/kernel/bat5.h sql/backends/monet5/sql.c sql/test/BugTracker/Tests/jdbc_no_debug.SF-1739356.stable.out sql/test/BugTracker/Tests/jdbc_no_debug.SF-1739356.stable.out.32bit Branch: leftmart Log Message:
Merge with default branch. diffs (truncated from 400 to 300 lines): diff --git a/clients/Tests/MAL-signatures.stable.out b/clients/Tests/MAL-signatures.stable.out --- a/clients/Tests/MAL-signatures.stable.out +++ b/clients/Tests/MAL-signatures.stable.out @@ -2382,10 +2382,6 @@ command algebra.reuse(b:bat[:oid,:any_1] address ALGreuse; comment Reuse a temporary BAT if you can. Otherwise, allocate enough storage to accept result of an operation (not involving the heap) -command algebra.revert(b:bat[:oid,:any_1]):bat[:oid,:any_1] -address ALGrevert; -comment Returns a BAT copy with buns in reverse order - pattern algebra.semijoinPath(l:bat[:any,:any]...):bat[:any,:any] address ALGjoinPath; comment Routine to handle join paths. The type analysis is rather tricky. diff --git a/clients/Tests/MAL-signatures.stable.out.int128 b/clients/Tests/MAL-signatures.stable.out.int128 --- a/clients/Tests/MAL-signatures.stable.out.int128 +++ b/clients/Tests/MAL-signatures.stable.out.int128 @@ -2893,10 +2893,6 @@ command algebra.reuse(b:bat[:oid,:any_1] address ALGreuse; comment Reuse a temporary BAT if you can. Otherwise, allocate enough storage to accept result of an operation (not involving the heap) -command algebra.revert(b:bat[:oid,:any_1]):bat[:oid,:any_1] -address ALGrevert; -comment Returns a BAT copy with buns in reverse order - pattern algebra.semijoinPath(l:bat[:any,:any]...):bat[:any,:any] address ALGjoinPath; comment Routine to handle join paths. The type analysis is rather tricky. 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 @@ -166,7 +166,6 @@ gdk_return BATprod(void *res, int tp, BA BAT *BATproject(BAT *l, BAT *r); BAT *BATrangejoin(BAT *l, BAT *rl, BAT *rh, bit li, bit hi); gdk_return BATreplace(BAT *b, BAT *p, BAT *n, bit force); -gdk_return BATrevert(BAT *b); void BATroles(BAT *b, const char *hnme, const char *tnme); BAT *BATsample(BAT *b, BUN n); gdk_return BATsave(BAT *b); @@ -741,7 +740,6 @@ str ALGjoin(bat *result, const bat *lid, str ALGjoin2(bat *l, bat *r, const bat *lid, const bat *rid); str ALGjoinPath(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); str ALGjoinestimate(bat *result, const bat *lid, const bat *rid, const lng *estimate); -str ALGkdiff(bat *result, const bat *lid, const bat *rid); str ALGleftfetchjoin(bat *result, const bat *lid, const bat *rid); str ALGleftjoin(bat *result, const bat *lid, const bat *rid); str ALGleftjoinestimate(bat *result, const bat *lid, const bat *rid, const lng *estimate); @@ -754,7 +752,6 @@ str ALGprojecttail(Client cntxt, MalBlkP str ALGrangejoin(bat *result, const bat *lid, const bat *rlid, const bat *rhid, const bit *li, const bit *hi); str ALGrangejoin2(bat *l, bat *r, const bat *lid, const bat *rlid, const bat *rhid, const bit *li, const bit *hi); str ALGreuse(bat *ret, const bat *bid); -str ALGrevert(bat *result, const bat *bid); str ALGsample(bat *result, const bat *bid, const int *param); str ALGselect(bat *result, const bat *bid, ptr low, ptr high); str ALGselect1(bat *result, const bat *bid, ptr value); @@ -880,7 +877,6 @@ str BKCpersists(void *r, const bat *bid, str BKCreuseBAT(bat *ret, const bat *bid, const bat *did); str BKCreuseBATmap(bat *ret, const bat *bid, const bat *did); str BKCreverse(bat *ret, const bat *bid); -str BKCrevert(bat *ret, const bat *bid); str BKCsave(bit *res, const char *const *input); str BKCsave2(void *r, const bat *bid); str BKCsetAccess(bat *res, const bat *bid, const char *const *param); diff --git a/gdk/ChangeLog b/gdk/ChangeLog --- a/gdk/ChangeLog +++ b/gdk/ChangeLog @@ -2,6 +2,7 @@ # This file is updated with Maddlog * Wed Sep 9 2015 Sjoerd Mullender <[email protected]> +- Removed function BATrevert. - BATordered now works on the TAIL column. * Tue Sep 8 2015 Sjoerd Mullender <[email protected]> diff --git a/gdk/gdk.h b/gdk/gdk.h --- a/gdk/gdk.h +++ b/gdk/gdk.h @@ -1606,8 +1606,6 @@ gdk_export gdk_return BATprintf(stream * /* * @- BAT clustering * @multitable @columnfractions 0.08 0.7 - * @item BAT * - * @tab BATrevert (BAT *b) * @item int * @tab BATordered (BAT *b) * @end multitable @@ -1623,11 +1621,8 @@ gdk_export gdk_return BATprintf(stream * * * BATordered starts a check on the tail values to see if they are * ordered. The result is returned and stored in the tsorted field of - * the BAT. The BATrevert puts all the live BUNs of a BAT in reverse - * order. It just reverses the sequence, so this does not necessarily - * mean that they are sorted in reverse order! + * the BAT. */ -gdk_export gdk_return BATrevert(BAT *b); gdk_export int BATordered(BAT *b); gdk_export int BATordered_rev(BAT *b); gdk_export gdk_return BATsubsort(BAT **sorted, BAT **order, BAT **groups, BAT *b, BAT *o, BAT *g, int reverse, int stable); diff --git a/gdk/gdk_batop.c b/gdk/gdk_batop.c --- a/gdk/gdk_batop.c +++ b/gdk/gdk_batop.c @@ -1396,72 +1396,6 @@ BATsubsort(BAT **sorted, BAT **order, BA } /* - * Reverse a BAT - * BATrevert rearranges a BAT in reverse order. - */ -gdk_return -BATrevert(BAT *b) -{ - char *h, *t; - BUN p, q; - BATiter bi = bat_iterator(b); - size_t s; - int x; - - BATcheck(b, "BATrevert", GDK_FAIL); - if ((b->htype == TYPE_void && b->hseqbase != oid_nil) || (b->ttype == TYPE_void && b->tseqbase != oid_nil)) { - /* materialize void columns in-place */ - if (BATmaterialize(b) != GDK_SUCCEED) - return GDK_FAIL; - } - ALIGNdel(b, "BATrevert", FALSE, GDK_FAIL); - s = Hsize(b); - if (s > 0) { - h = (char *) GDKmalloc(s); - if (!h) { - return GDK_FAIL; - } - for (p = BUNlast(b) ? BUNlast(b) - 1 : 0, q = BUNfirst(b); p > q; p--, q++) { - char *ph = BUNhloc(bi, p); - char *qh = BUNhloc(bi, q); - - memcpy(h, ph, s); - memcpy(ph, qh, s); - memcpy(qh, h, s); - } - GDKfree(h); - } - s = Tsize(b); - if (s > 0) { - t = (char *) GDKmalloc(s); - if (!t) { - return GDK_FAIL; - } - for (p = BUNlast(b) ? BUNlast(b) - 1 : 0, q = BUNfirst(b); p > q; p--, q++) { - char *pt = BUNtloc(bi, p); - char *qt = BUNtloc(bi, q); - - memcpy(t, pt, s); - memcpy(pt, qt, s); - memcpy(qt, t, s); - } - GDKfree(t); - } - HASHdestroy(b); - IMPSdestroy(b); - /* interchange sorted and revsorted */ - x = b->hrevsorted; - b->hrevsorted = b->hsorted; - b->hsorted = x; - x = b->trevsorted; - b->trevsorted = b->tsorted; - b->tsorted = x; - b->hdense = FALSE; - b->tdense = FALSE; - return GDK_SUCCEED; -} - -/* * return a view on b consisting of the head of b and a new dense tail * starting at oid_base. */ diff --git a/gdk/gdk_join.c b/gdk/gdk_join.c --- a/gdk/gdk_join.c +++ b/gdk/gdk_join.c @@ -1286,7 +1286,7 @@ mergejoin(BAT *r1, BAT *r2, BAT *l, BAT if (only_misses) { if (lcand) { while (nlx > 0) { - APPEND(r1, lcand[-nlx]); + APPEND(r1, lcand[-(ssize_t)nlx]); nlx--; } } else { @@ -1309,7 +1309,7 @@ mergejoin(BAT *r1, BAT *r2, BAT *l, BAT } if (lcand) { while (nlx > 0) { - APPEND(r1, lcand[-nlx]); + APPEND(r1, lcand[-(ssize_t)nlx]); APPEND(r2, oid_nil); nlx--; } diff --git a/monetdb5/ChangeLog b/monetdb5/ChangeLog --- a/monetdb5/ChangeLog +++ b/monetdb5/ChangeLog @@ -1,6 +1,9 @@ # ChangeLog file for MonetDB5 # This file is updated with Maddlog +* Wed Sep 9 2015 Sjoerd Mullender <[email protected]> +- Removed algebra.revert. + * Tue Sep 8 2015 Sjoerd Mullender <[email protected]> - Removed bat.order and bat.orderReverse functions. diff --git a/monetdb5/modules/kernel/algebra.c b/monetdb5/modules/kernel/algebra.c --- a/monetdb5/modules/kernel/algebra.c +++ b/monetdb5/modules/kernel/algebra.c @@ -1189,12 +1189,6 @@ ALGsemijoin(bat *result, const bat *lid, } str -ALGkdiff(bat *result, const bat *lid, const bat *rid) -{ - return ALGbinary(result, lid, rid, BATkdiff, "algebra.kdiff"); -} - -str ALGsample(bat *result, const bat *bid, const int *param) { return ALGbinaryint(result, bid, param, BATsample, "algebra.sample"); @@ -1349,22 +1343,6 @@ ALGsubsort11(bat *result, const bat *bid } str -ALGrevert(bat *result, const bat *bid) -{ - BAT *b, *bn; - - if ((b = BATdescriptor(*bid)) == NULL) { - throw(MAL, "algebra.revert", RUNTIME_OBJECT_MISSING); - } - bn = BATcopy(b, b->htype, b->ttype, TRUE, TRANSIENT); - BATrevert(bn); - *result= bn->batCacheid; - BBPkeepref(bn->batCacheid); - BBPunfix(b->batCacheid); - return MAL_SUCCEED; -} - -str ALGcount_bat(wrd *result, const bat *bid) { BAT *b; diff --git a/monetdb5/modules/kernel/algebra.h b/monetdb5/modules/kernel/algebra.h --- a/monetdb5/modules/kernel/algebra.h +++ b/monetdb5/modules/kernel/algebra.h @@ -79,7 +79,6 @@ algebra_export str ALGouterjoinestimate( algebra_export str ALGouterjoin(bat *result, const bat *lid, const bat *rid); algebra_export str ALGsemijoin(bat *result, const bat *lid, const bat *rid); algebra_export str ALGtinter(bat *result, const bat *lid, const bat *rid); -algebra_export str ALGkdiff(bat *result, const bat *lid, const bat *rid); algebra_export str ALGtdiff(bat *result, const bat *lid, const bat *rid); algebra_export str ALGsample(bat *result, const bat *bid, const int *param); @@ -92,7 +91,6 @@ algebra_export str ALGsubsort23(bat *res algebra_export str ALGsubsort31(bat *result, const bat *bid, const bat *order, const bat *group, const bit *reverse, const bit *stable); algebra_export str ALGsubsort32(bat *result, bat *norder, const bat *bid, const bat *order, const bat *group, const bit *reverse, const bit *stable); algebra_export str ALGsubsort33(bat *result, bat *norder, bat *ngroup, const bat *bid, const bat *order, const bat *group, const bit *reverse, const bit *stable); -algebra_export str ALGrevert(bat *result, const bat *bid); algebra_export str ALGcount_bat(wrd *result, const bat *bid); algebra_export str ALGcount_nil(wrd *result, const bat *bid, const bit *ignore_nils); algebra_export str ALGcount_no_nil(wrd *result, const bat *bid); diff --git a/monetdb5/modules/kernel/algebra.mal b/monetdb5/modules/kernel/algebra.mal --- a/monetdb5/modules/kernel/algebra.mal +++ b/monetdb5/modules/kernel/algebra.mal @@ -32,10 +32,6 @@ command leftfetchjoin ( left:bat[:oid,:o address ALGleftfetchjoin comment "Hook directly into the left fetch join implementation."; -command revert( b:bat[:oid,:any_1]) :bat[:oid,:any_1] -address ALGrevert -comment "Returns a BAT copy with buns in reverse order"; - # BAT copying command copy( b:bat[:oid,:any_1]) :bat[:oid,:any_1] address ALGcopy diff --git a/monetdb5/modules/kernel/bat5.c b/monetdb5/modules/kernel/bat5.c --- a/monetdb5/modules/kernel/bat5.c +++ b/monetdb5/modules/kernel/bat5.c @@ -483,23 +483,6 @@ BKCmirror(bat *ret, const bat *bid) } str -BKCrevert(bat *r, const bat *bid) -{ - BAT *b; - - if ((b = BATdescriptor(*bid)) == NULL) - throw(MAL, "bat.revert", RUNTIME_OBJECT_MISSING); - if ((b = setaccess(b, BAT_WRITE)) == NULL) - throw(MAL, "bat.revert", OPERATION_FAILED); - if (BATrevert(b) != GDK_SUCCEED) { - BBPunfix(b->batCacheid); - throw(MAL, "bat.revert", GDK_EXCEPTION); - } _______________________________________________ checkin-list mailing list [email protected] https://www.monetdb.org/mailman/listinfo/checkin-list
