Changeset: f82710a4941d for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f82710a4941d
Modified Files:
monetdb5/extras/bwd/operations.c
monetdb5/extras/bwd/opt_bwd.mal
Branch: bwd
Log Message:
* implemented a count as a wrapper around the basic mal counter (no
approximation)
Unterschiede (43 Zeilen):
diff --git a/monetdb5/extras/bwd/operations.c b/monetdb5/extras/bwd/operations.c
--- a/monetdb5/extras/bwd/operations.c
+++ b/monetdb5/extras/bwd/operations.c
@@ -1127,6 +1127,20 @@ str BWDSumRefine(lng* res, int *bid, lng
return ALGsum_int_lng(res, bid, (signed char[]){1});
}
+str BWDCountApproximate(lng* res, int *bid) {
+ //TODO: implement me (easy)
+ return MAL_SUCCEED;
+}
+
+str BWDCountRefine(lng* res, int *bid, lng* approx) {
+ //TODO: implement me (easy)
+ wrd resWrd;
+ str result = ALGcount_no_nil(&resWrd, bid);
+ *res = resWrd;
+ return result;
+}
+
+
str bwd_export_value_wrap(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr
pci){
//TODO: implement me (no idea how we do this)
return MAL_SUCCEED;
diff --git a/monetdb5/extras/bwd/opt_bwd.mal b/monetdb5/extras/bwd/opt_bwd.mal
--- a/monetdb5/extras/bwd/opt_bwd.mal
+++ b/monetdb5/extras/bwd/opt_bwd.mal
@@ -132,6 +132,15 @@ address BWDSelectNotNilRefine
comment "Select all not-nil values";
+command countapproximate (b:bat[:any_1,:int]) :int
+address BWDCountApproximate
+comment "Gives the count of all tail values.";
+
+command countrefine (b:bat[:any_1,:int], approximation:int) :int
+address BWDCountRefine
+comment "Gives the count of all tail values.";
+
+
command sumapproximate (b:bat[:any_1,:int]) :lng
address BWDSumApproximate
comment "Gives the sum of all tail values.";
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list