Changeset: cb26ead1129d for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=cb26ead1129d
Modified Files:
monetdb5/modules/mal/mosaic.c
monetdb5/modules/mal/mosaic.h
monetdb5/modules/mal/mosaic.mal
monetdb5/modules/mal/mosaic_hdr.c
Branch: mosaic
Log Message:
Enable block control over mosaics.
diffs (76 lines):
diff --git a/monetdb5/modules/mal/mosaic.c b/monetdb5/modules/mal/mosaic.c
--- a/monetdb5/modules/mal/mosaic.c
+++ b/monetdb5/modules/mal/mosaic.c
@@ -35,6 +35,7 @@
#include "mosaic_prefix.h"
char
*MOSfiltername[]={"literal","runlength","dictionary","delta","linear","frame","prefix","EOL"};
+BUN MOSblocklimit = 100000;
static void
MOSinit(MOStask task, BAT *b){
@@ -1437,8 +1438,11 @@ MOSoptimize(Client cntxt, MalBlkPtr mb,
throw(MAL, "mosaic.mosaic", MAL_MALLOC_FAIL);
bid = *getArgReference_int(stk,pci,1);
- if( pci->argc > 1)
+ if( pci->argc > 2)
ply = *getArgReference_int(stk,pci,2);
+ MOSblocklimit = 100000;
+ if( pci->argc > 3)
+ MOSblocklimit = *getArgReference_int(stk,pci,3) * 1000;
cases = STEP;
for ( i=ply-1; i > 0 && cases * STEP < 1024; i--)
diff --git a/monetdb5/modules/mal/mosaic.h b/monetdb5/modules/mal/mosaic.h
--- a/monetdb5/modules/mal/mosaic.h
+++ b/monetdb5/modules/mal/mosaic.h
@@ -188,6 +188,7 @@ if ( task->cl && task->n){\
#endif
mosaic_export char *MOSfiltername[];
+mosaic_export BUN MOSblocklimit;
mosaic_export str MOScompress(Client cntxt, MalBlkPtr mb, MalStkPtr stk,
InstrPtr pci);
mosaic_export str MOScompressInternal(Client cntxt, int *ret, int *bid,
MOStask task,int inplace,int flg);
mosaic_export str MOSdecompress(Client cntxt, MalBlkPtr mb, MalStkPtr stk,
InstrPtr pci);
diff --git a/monetdb5/modules/mal/mosaic.mal b/monetdb5/modules/mal/mosaic.mal
--- a/monetdb5/modules/mal/mosaic.mal
+++ b/monetdb5/modules/mal/mosaic.mal
@@ -32,9 +32,20 @@ pattern analyse(b:int)
address MOSanalyse
comment "Apply default heap compression on a specific column";
+pattern optimize(bid:int)
+address MOSoptimize
+comment "Perform a search thru the compression space using depth 1";
+
pattern optimize(bid:int, ply:int)
address MOSoptimize
-comment "Perform a search thru the compression space";
+comment "Perform a search thru the compression space using up to 2^ply
+candidate combinations";
+
+pattern optimize(bid:int, ply:int, blk:int)
+address MOSoptimize
+comment "Perform a search thru the compression space using up to 2^ply
+candidate combinations and blk*1000 blocksize limits";
+
pattern dump(b:bat[:oid,:any])
address MOSdump
diff --git a/monetdb5/modules/mal/mosaic_hdr.c
b/monetdb5/modules/mal/mosaic_hdr.c
--- a/monetdb5/modules/mal/mosaic_hdr.c
+++ b/monetdb5/modules/mal/mosaic_hdr.c
@@ -119,11 +119,9 @@ MOSinitializeScan(Client cntxt, MOStask
/* limit the number of elements to consider in a block
* It should always be smaller then: ~(0377<<MOSshift)
*/
-static BUN blocksize = 100000;
-
BUN
MOSlimit(void) {
- return blocksize;
+ return MOSblocklimit;
//return (BUN) ~(0377<<MOSshift);
}
/* allow for experiementation using different block sizes */
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list