Changeset: cab2efb20eb0 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=cab2efb20eb0
Modified Files:
monetdb5/modules/mal/mosaic.c
sql/backends/monet5/sql.c
Branch: mosaic
Log Message:
Ignore non-compressible columns.
SQL calls MOScompress directly without checking the types.
diffs (47 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
@@ -188,8 +188,19 @@ MOScompressInternal(Client cntxt, int *r
if ((b = BATdescriptor(*bid)) == NULL)
throw(MAL, "mosaic.compress", INTERNAL_BAT_ACCESS);
- if ( b->ttype == TYPE_void){
- // void columns are already compressed
+ switch(ATOMstorage(b->ttype)){
+ case TYPE_bit:
+ case TYPE_bte:
+ case TYPE_sht:
+ case TYPE_int:
+ case TYPE_lng:
+ case TYPE_oid:
+ case TYPE_wrd:
+ case TYPE_flt:
+ case TYPE_dbl:
+ break;
+ default:
+ // don't compress them
BBPkeepref(*ret = b->batCacheid);
return msg;
}
@@ -213,7 +224,7 @@ MOScompressInternal(Client cntxt, int *r
// It should always take less space then the orginal column.
// But be prepared that a last block header may be stored
// use a size overshoot. Also be aware of possible dictionary headers
- bn = BATnew( TYPE_void, b->ttype, cnt + 3 * MosaicBlkSize +
MosaicHdrSize, TRANSIENT);
+ bn = BATnew( TYPE_void, b->ttype, cnt + 3 * MosaicBlkSize +
MosaicHdrSize, b->batPersistence);
if (bn == NULL) {
BBPreleaseref(b->batCacheid);
throw(MAL,"mosaic.compress", MAL_MALLOC_FAIL);
diff --git a/sql/backends/monet5/sql.c b/sql/backends/monet5/sql.c
--- a/sql/backends/monet5/sql.c
+++ b/sql/backends/monet5/sql.c
@@ -4555,8 +4555,7 @@ sql_storage(Client cntxt, MalBlkPtr mb,
}
atom =
BUNappend(atom, &w, FALSE);
- sz =
tailsize(bn, BATcount(bn));
- sz +=
headsize(bn, BATcount(bn));
+ sz =
bn->T->heap.free;
size =
BUNappend(size, &sz, FALSE);
sz =
bn->T->vheap ? bn->T->vheap->size : 0;
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list