I just wanted to leave it a bit longer around to be sure that everything works correctly. Although the old BATsample (now BATsample_deprecated) was invoked to a couple of place only, I am just playing on the safe side. Once the tests show no errors and the performance is (according to my calculations) a bit better, then we can remove the deprecated one.
That was more or less what I had in my mind On Fri, Mar 16, 2012 at 1:32 PM, Stefan Manegold <stefan.maneg...@cwi.nl> wrote: > lsidir, > (;-)) > > since it now seems to be dead code (correct me if I'm wrong), > is there any reason to keep the "deprecated" implementation of BATsample > around, or shouldn't we better clean up our code and remove the old > BATsample (now BATsample_deprecated) entirely? > > Thanks, > Stefan > > On Fri, Mar 16, 2012 at 12:51:52PM +0100, lsidir wrote: >> Changeset: 6985c995bf66 for MonetDB >> URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6985c995bf66 >> Modified Files: >> gdk/gdk.h >> gdk/gdk_batop.mx >> gdk/gdk_sample.c >> monetdb5/modules/mal/sample.c >> Branch: default >> Log Message: >> >> Activating the new implementation of BATsample. >> >> >> diffs (57 lines): >> >> diff --git a/gdk/gdk.h b/gdk/gdk.h >> --- a/gdk/gdk.h >> +++ b/gdk/gdk.h >> @@ -3129,7 +3129,7 @@ gdk_export int ALIGNsetH(BAT *b1, BAT *b >> gdk_export void PROPdestroy(PROPrec *p); >> gdk_export PROPrec * BATgetprop(BAT *b, int idx); >> gdk_export void BATsetprop(BAT *b, int idx, int type, void *v); >> -gdk_export BAT *BATsample(BAT *b, BUN n); >> +gdk_export BAT *BATsample_deprecated(BAT *b, BUN n); >> gdk_export BAT *BAThistogram(BAT *b); >> gdk_export int BATtopN(BAT *b, BUN topN); /* used in >> monet5/src/modules/kernel/algebra.mx */ >> >> @@ -3368,7 +3368,7 @@ gdk_export int BATcalcavg(BAT *b, dbl *a >> * @tab BATsample (BAT *b, n) >> * @end multitable >> */ >> -gdk_export BAT *BATsample1(BAT *b, BUN n); >> +gdk_export BAT *BATsample(BAT *b, BUN n); >> >> /* generic n-ary multijoin beast, with defines to interpret retval */ >> #define MULTIJOIN_SORTED(r) ((char*) &r)[0] >> diff --git a/gdk/gdk_batop.mx b/gdk/gdk_batop.mx >> --- a/gdk/gdk_batop.mx >> +++ b/gdk/gdk_batop.mx >> @@ -1374,7 +1374,7 @@ BATtopN(BAT *b, BUN topN) >> * @- Random Selections >> */ >> BAT * >> -BATsample(BAT *b, BUN size) >> +BATsample_deprecated(BAT *b, BUN size) >> { >> BUN cnt, i, r = 0, n, j; >> BUN *choice = NULL, *dst; >> diff --git a/gdk/gdk_sample.c b/gdk/gdk_sample.c >> --- a/gdk/gdk_sample.c >> +++ b/gdk/gdk_sample.c >> @@ -47,7 +47,7 @@ >> */ >> >> BAT * >> -BATsample1(BAT *b, BUN n) >> +BATsample(BAT *b, BUN n) >> { >> BAT *bn; >> BUN cnt; >> diff --git a/monetdb5/modules/mal/sample.c b/monetdb5/modules/mal/sample.c >> --- a/monetdb5/modules/mal/sample.c >> +++ b/monetdb5/modules/mal/sample.c >> @@ -85,7 +85,7 @@ SAMPLEuniform(bat *r, bat *b, ptr s) { >> if ((bb = BATdescriptor(*b)) == NULL) { >> throw(MAL, "sample.uniform", INTERNAL_BAT_ACCESS); >> } >> - br = BATsample1(bb,*(BUN *)s); >> + br = BATsample(bb,*(BUN *)s); >> if (br == NULL) >> throw(MAL, "sample.uniform", OPERATION_FAILED); >> >> _______________________________________________ >> Checkin-list mailing list >> checkin-l...@monetdb.org >> http://mail.monetdb.org/mailman/listinfo/checkin-list >> >> > > -- > | Stefan.Manegold @ CWI.nl | DB Architectures (INS1) | > | http://CWI.nl/~manegold/ | Science Park 123 (L321) | > | Tel.: +31 (0)20 592-4212 | 1098 XG Amsterdam (NL) | > _______________________________________________ > Checkin-list mailing list > checkin-l...@monetdb.org > http://mail.monetdb.org/mailman/listinfo/checkin-list ------------------------------------------------------------------------------ This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure _______________________________________________ Monetdb-developers mailing list Monetdb-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-developers