Changeset: 783c46449688 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=783c46449688
Modified Files:
        clients/Tests/MAL-signatures_all.stable.out
        clients/Tests/MAL-signatures_fits_geom.stable.out
        clients/Tests/MAL-signatures_geom.stable.out
        clients/Tests/MAL-signatures_none.stable.out
        monetdb5/modules/mal/sample.c
        monetdb5/modules/mal/sample.mal
        monetdb5/tests/BugReports/Tests/no.016.mal
        monetdb5/tests/BugReports/Tests/no.016.stable.out
Branch: Oct2014
Log Message:

Removed sample.uniform interface: it's not used in generated code.


diffs (138 lines):

diff --git a/clients/Tests/MAL-signatures_all.stable.out 
b/clients/Tests/MAL-signatures_all.stable.out
--- a/clients/Tests/MAL-signatures_all.stable.out
+++ b/clients/Tests/MAL-signatures_all.stable.out
@@ -41300,14 +41300,6 @@ command sample.subuniform(b:bat[:oid,:an
 address SAMPLEuniform;
 comment Returns the oids of a uniform sample of size s
 
-command sample.uniform(b:bat[:oid,:any],p:dbl):bat[:oid,:oid] 
-address SAMPLEuniform_dbl;
-comment Returns the oids of a uniform sample of size = (p x count(b)), where 0 
<= p <= 1.0
-
-command sample.uniform(b:bat[:oid,:any],s:wrd):bat[:oid,:oid] 
-address SAMPLEuniform;
-comment Returns the oids of a uniform sample of size s
-
 command sabaoth.epilogue():void 
 address SABepilogue;
 comment Release the resources held by the sabaoth module
diff --git a/clients/Tests/MAL-signatures_fits_geom.stable.out 
b/clients/Tests/MAL-signatures_fits_geom.stable.out
--- a/clients/Tests/MAL-signatures_fits_geom.stable.out
+++ b/clients/Tests/MAL-signatures_fits_geom.stable.out
@@ -41199,14 +41199,6 @@ command sample.subuniform(b:bat[:oid,:an
 address SAMPLEuniform;
 comment Returns the oids of a uniform sample of size s
 
-command sample.uniform(b:bat[:oid,:any],p:dbl):bat[:oid,:oid] 
-address SAMPLEuniform_dbl;
-comment Returns the oids of a uniform sample of size = (p x count(b)), where 0 
<= p <= 1.0
-
-command sample.uniform(b:bat[:oid,:any],s:wrd):bat[:oid,:oid] 
-address SAMPLEuniform;
-comment Returns the oids of a uniform sample of size s
-
 command sabaoth.epilogue():void 
 address SABepilogue;
 comment Release the resources held by the sabaoth module
diff --git a/clients/Tests/MAL-signatures_geom.stable.out 
b/clients/Tests/MAL-signatures_geom.stable.out
--- a/clients/Tests/MAL-signatures_geom.stable.out
+++ b/clients/Tests/MAL-signatures_geom.stable.out
@@ -41175,14 +41175,6 @@ command sample.subuniform(b:bat[:oid,:an
 address SAMPLEuniform;
 comment Returns the oids of a uniform sample of size s
 
-command sample.uniform(b:bat[:oid,:any],p:dbl):bat[:oid,:oid] 
-address SAMPLEuniform_dbl;
-comment Returns the oids of a uniform sample of size = (p x count(b)), where 0 
<= p <= 1.0
-
-command sample.uniform(b:bat[:oid,:any],s:wrd):bat[:oid,:oid] 
-address SAMPLEuniform;
-comment Returns the oids of a uniform sample of size s
-
 command sabaoth.epilogue():void 
 address SABepilogue;
 comment Release the resources held by the sabaoth module
diff --git a/clients/Tests/MAL-signatures_none.stable.out 
b/clients/Tests/MAL-signatures_none.stable.out
--- a/clients/Tests/MAL-signatures_none.stable.out
+++ b/clients/Tests/MAL-signatures_none.stable.out
@@ -40988,14 +40988,6 @@ command sample.subuniform(b:bat[:oid,:an
 address SAMPLEuniform;
 comment Returns the oids of a uniform sample of size s
 
-command sample.uniform(b:bat[:oid,:any],p:dbl):bat[:oid,:oid] 
-address SAMPLEuniform_dbl;
-comment Returns the oids of a uniform sample of size = (p x count(b)), where 0 
<= p <= 1.0
-
-command sample.uniform(b:bat[:oid,:any],s:wrd):bat[:oid,:oid] 
-address SAMPLEuniform;
-comment Returns the oids of a uniform sample of size s
-
 command sabaoth.epilogue():void 
 address SABepilogue;
 comment Release the resources held by the sabaoth module
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
@@ -102,14 +102,14 @@ SAMPLEuniform_dbl(bat *r, bat *b, dbl *p
        wrd s;
 
        if ( pr < 0.0 || pr > 1.0 ) {
-               throw(MAL, "sample.uniform", ILLEGAL_ARGUMENT
+               throw(MAL, "sample.subuniform", ILLEGAL_ARGUMENT
                                " p should be between 0 and 1.0" );
        } else if (pr == 0) {/* special case */
                s = 0;
                return SAMPLEuniform(r, b, &s);
        }
        if ((bb = BATdescriptor(*b)) == NULL) {
-               throw(MAL, "sample.uniform", INTERNAL_BAT_ACCESS);
+               throw(MAL, "sample.subuniform", INTERNAL_BAT_ACCESS);
        }
        s = (wrd) (pr*(double)BATcount(bb));
        BBPunfix(bb->batCacheid);
diff --git a/monetdb5/modules/mal/sample.mal b/monetdb5/modules/mal/sample.mal
--- a/monetdb5/modules/mal/sample.mal
+++ b/monetdb5/modules/mal/sample.mal
@@ -23,18 +23,10 @@
 
 module sample;
 
-command uniform(b:bat[:oid,:any],s:wrd):bat[:oid,:oid]
-address SAMPLEuniform
-comment "Returns the oids of a uniform sample of size s";
-
 command subuniform(b:bat[:oid,:any],s:wrd):bat[:oid,:oid]
 address SAMPLEuniform
 comment "Returns the oids of a uniform sample of size s";
 
-command uniform(b:bat[:oid,:any],p:dbl):bat[:oid,:oid]
-address SAMPLEuniform_dbl
-comment "Returns the oids of a uniform sample of size = (p x count(b)), where 
0 <= p <= 1.0";
-
 command subuniform(b:bat[:oid,:any],p:dbl):bat[:oid,:oid]
 address SAMPLEuniform_dbl
 comment "Returns the oids of a uniform sample of size = (p x count(b)), where 
0 <= p <= 1.0";
diff --git a/monetdb5/tests/BugReports/Tests/no.016.mal 
b/monetdb5/tests/BugReports/Tests/no.016.mal
--- a/monetdb5/tests/BugReports/Tests/no.016.mal
+++ b/monetdb5/tests/BugReports/Tests/no.016.mal
@@ -31,7 +31,7 @@
 #      io.print("var a := bat.new(int, int);");
        a := bat.new(nil:oid,nil:int);
 #      io.print("a.sample(1).print();");
-       aa_a := sample.uniform(a,1:wrd);
+       aa_a := sample.subuniform(a,1:wrd);
        ba_a := io.print(aa_a);
 #      io.print("quit();");
        ca_a := clients.quit();
diff --git a/monetdb5/tests/BugReports/Tests/no.016.stable.out 
b/monetdb5/tests/BugReports/Tests/no.016.stable.out
--- a/monetdb5/tests/BugReports/Tests/no.016.stable.out
+++ b/monetdb5/tests/BugReports/Tests/no.016.stable.out
@@ -45,7 +45,7 @@ function user.main():void;
 #      io.print("var a := bat.new(int, int);"); 
     a := bat.new(nil:oid,nil:int);
 #      io.print("a.sample(1).print();"); 
-    aa_a := sample.uniform(a,1:wrd);
+    aa_a := sample.subuniform(a,1:wrd);
     ba_a := io.print(aa_a);
 #      io.print("quit();"); 
     ca_a := clients.quit();
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to