Changeset: 9a28d1dbc53f for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9a28d1dbc53f
Modified Files:
        monetdb5/modules/mal/mosaic.c
        sql/scripts/76_compression.sql
        sql/test/mosaic/Tests/compression.stable.err
        sql/test/mosaic/Tests/compression.stable.out
Branch: mosaic
Log Message:

Also compress the strings


diffs (92 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
@@ -210,8 +210,8 @@ MOScompressInternal(Client cntxt, bat *r
        case TYPE_wrd:
        case TYPE_flt:
        case TYPE_dbl:
+       case TYPE_str:
                break;
-       case TYPE_str:
        default:
                // don't compress them
                BBPkeepref(*ret = bcompress->batCacheid);
@@ -1305,6 +1305,7 @@ MOSanalyseInternal(Client cntxt, int thr
 #ifdef HAVE_HGE
        case TYPE_hge:
 #endif
+       case TYPE_str:
                mnstr_printf(cntxt->fdout,"#%d\t%-8s\t%s\t"BUNFMT"\t", bid, 
BBP_physical(bid), type, BATcount(b));
                MOScompressInternal(cntxt, &ret, &bid, task,0,TRUE);
                if( ret != b->batCacheid) 
@@ -1318,7 +1319,6 @@ MOSanalyseInternal(Client cntxt, int thr
                                BBPdecref(ret, TRUE);
                } else
                        mnstr_printf(cntxt->fdout,"#%d\t%-8s\t%s\t"BUNFMT"\t 
illegal compression type %s\n", bid, BBP_logical(bid), type, BATcount(b), 
getTypeName(b->ttype));
-       case TYPE_str:
                ;
        }
        GDKfree(type);
diff --git a/sql/scripts/76_compression.sql b/sql/scripts/76_compression.sql
--- a/sql/scripts/76_compression.sql
+++ b/sql/scripts/76_compression.sql
@@ -35,3 +35,4 @@ returns table (
 external name sql."compression";
 
 create view sys."compression" as select * from sys."compression"();
+
diff --git a/sql/test/mosaic/Tests/compression.stable.err 
b/sql/test/mosaic/Tests/compression.stable.err
--- a/sql/test/mosaic/Tests/compression.stable.err
+++ b/sql/test/mosaic/Tests/compression.stable.err
@@ -30,7 +30,7 @@ stderr of test 'compression` in director
 # 14:00:27 >  "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-19726" "--port=38313"
 # 14:00:27 >  
 
-MAPI  = (monetdb) /var/tmp/mtest-30987/.s.monetdb.36867
+MAPI  = (monetdb) /var/tmp/mtest-28059/.s.monetdb.37934
 QUERY = drop table tmp3;
 ERROR = !DROP TABLE: no such table 'tmp3'
 
diff --git a/sql/test/mosaic/Tests/compression.stable.out 
b/sql/test/mosaic/Tests/compression.stable.out
--- a/sql/test/mosaic/Tests/compression.stable.out
+++ b/sql/test/mosaic/Tests/compression.stable.out
@@ -275,6 +275,21 @@ end s10_1;
 [ 8,   false,  0.317000002,    2014-08-23 11:34:54.000000      ]
 [ 9,   false,  0.317000002,    2014-08-23 11:34:54.000000      ]
 [ 10,  false,  0.317000002,    2014-08-23 11:34:54.000000      ]
+#select * from storage where "table" = 'tmp3';
+% .storage,    .storage,       .storage,       .storage,       .storage,       
.storage,       .storage,       .storage,       .storage,       .storage,       
.storage,       .storage,       .storage,       .storage # table_name
+% schema,      table,  column, type,   mode,   location,       count,  
typewidth,      columnsize,     heapsize,       hashes, imprints,       sorted, 
compress # name
+% clob,        clob,   clob,   clob,   clob,   clob,   bigint, int,    bigint, 
bigint, bigint, bigint, boolean,        boolean # type
+% 3,   4,      1,      9,      8,      6,      2,      1,      3,      1,      
1,      1,      5,      5 # length
+[ "sys",       "tmp3", "i",    "int",  "readonly",     "04/411",       86,     
4,      344,    0,      0,      0,      false,  false   ]
+[ "sys",       "tmp3", "b",    "boolean",      "readonly",     "04/470",       
86,     1,      86,     0,      0,      0,      false,  false   ]
+[ "sys",       "tmp3", "f",    "real", "readonly",     "04/471",       86,     
4,      344,    0,      0,      0,      false,  false   ]
+[ "sys",       "tmp3", "t",    "timestamp",    "readonly",     "05/511",       
86,     8,      688,    0,      0,      0,      true,   false   ]
+#select count(*) from tmp3;
+% sys.L1 # table_name
+% L1 # name
+% wrd # type
+% 2 # length
+[ 86   ]
 #alter table tmp3 alter column i set storage NULL;
 #alter table tmp3 alter column b set storage NULL;
 #alter table tmp3 alter column f set storage NULL;
@@ -283,7 +298,7 @@ end s10_1;
 % mal # name
 % clob # type
 % 67 # length
-function user.s14_1{autoCommit=true}():void;
+function user.s16_1{autoCommit=true}():void;
     X_2 := sql.mvc();
     X_3:bat[:oid,:oid]  := sql.tid(X_2,"sys","tmp3");
     X_6:bat[:oid,:int]  := sql.bind(X_2,"sys","tmp3","i",0);
@@ -301,7 +316,7 @@ function user.s14_1{autoCommit=true}():v
     sql.rsColumn(X_19,"sys.tmp3","t","timestamp",7,0,X_18);
     X_34 := io.stdout();
     sql.exportResult(X_34,X_19);
-end s14_1;
+end s16_1;
 # querylog.define("explain select * from tmp3;","sequential_pipe")
 #select * from tmp3;
 % sys.tmp3,    sys.tmp3,       sys.tmp3,       sys.tmp3 # table_name
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to