Changeset: bc10b7b503a3 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=bc10b7b503a3
Modified Files:
        clients/Tests/MAL-signatures.stable.out
        clients/Tests/MAL-signatures.stable.out.int128
        monetdb5/ChangeLog
        monetdb5/modules/kernel/algebra.c
        monetdb5/modules/kernel/algebra.mal
Branch: default
Log Message:

Removed algebra.sample.


diffs (98 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
@@ -2487,10 +2487,6 @@ command algebra.subsort(b:bat[:oid,:any_
 address ALGsubsort11;
 comment Returns a copy of the BAT sorted on tail values.         The input and 
output are (must be) dense headed.         The order is descending if the 
reverse bit is set.            This is a stable sort if the stable bit is set.
 
-command algebra.sample(b:bat[:oid,:any_1],num:int):bat[:oid,:oid] 
-address ALGsample;
-comment Returns the oids of a random selection of size 'num' from the input 
BAT.
-
 command algebra.selectNotNil(b:bat[:oid,:any_2]):bat[:oid,:any_2] 
 address ALGselectNotNil;
 comment Select all not-nil values
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
@@ -2998,10 +2998,6 @@ command algebra.subsort(b:bat[:oid,:any_
 address ALGsubsort11;
 comment Returns a copy of the BAT sorted on tail values.         The input and 
output are (must be) dense headed.         The order is descending if the 
reverse bit is set.            This is a stable sort if the stable bit is set.
 
-command algebra.sample(b:bat[:oid,:any_1],num:int):bat[:oid,:oid] 
-address ALGsample;
-comment Returns the oids of a random selection of size 'num' from the input 
BAT.
-
 command algebra.selectNotNil(b:bat[:oid,:any_2]):bat[:oid,:any_2] 
 address ALGselectNotNil;
 comment Select all not-nil values
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
 
+* Mon Sep 14 2015 Sjoerd Mullender <[email protected]>
+- Removed algebra.sample.  Use sampe.subuniform instead.
+
 * Fri Sep 11 2015 Sjoerd Mullender <[email protected]>
 - Removed algebra.select.  Use algebra.subselect instead.
 
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
@@ -690,25 +690,6 @@ ALGbinary(bat *result, const bat *lid, c
 }
 
 static str
-ALGbinaryint(bat *result, const bat *bid, const int *param, BAT *(*func)(BAT 
*, BUN), const char *name)
-{
-       BAT *b, *bn = NULL;
-
-       if ((b = BATdescriptor(*bid)) == NULL) {
-               throw(MAL, name, RUNTIME_OBJECT_MISSING);
-       }
-       bn = (*func)(b, *param);
-       BBPunfix(b->batCacheid);
-       if (bn == NULL)
-               throw(MAL, name, GDK_EXCEPTION);
-       if (!(bn->batDirty & 2))
-               BATsetaccess(bn, BAT_READ);
-       *result = bn->batCacheid;
-       BBPkeepref(*result);
-       return MAL_SUCCEED;
-}
-
-static str
 ALGbinaryestimate(bat *result, const bat *lid, const bat *rid, const lng 
*estimate,
                                  BAT *(*func)(BAT *, BAT *, BUN), const char 
*name)
 {
@@ -913,12 +894,6 @@ ALGsemijoin(bat *result, const bat *lid,
        return ALGbinary(result, lid, rid, BATsemijoin, "algebra.semijoin");
 }
 
-str
-ALGsample(bat *result, const bat *bid, const int *param)
-{
-       return ALGbinaryint(result, bid, param, BATsample, "algebra.sample");
-}
-
 /* add items missing in the kernel */
 str
 ALGtdiff(bat *result, const bat *bid, const bat *bid2)
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
@@ -102,11 +102,6 @@ command like(b:bat[:oid,:str], substr:st
 address ALGlike
 comment "Selects all elements that have 'substr' as in the tail.";
 
-# Sampling
-command sample ( b:bat[:oid,:any_1], num:int ) :bat[:oid,:oid]
-address ALGsample
-comment "Returns the oids of a random selection of size 'num' from the input 
BAT.";
-
 command subsort(b:bat[:oid,:any_1], reverse:bit, stable:bit) :bat[:oid,:any_1]
 address ALGsubsort11
 comment "Returns a copy of the BAT sorted on tail values.
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to