Changeset: adf60075edb3 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=adf60075edb3
Modified Files:
        monetdb5/modules/mosaic/mosaic.c
        monetdb5/modules/mosaic/mosaic.mal
Branch: mosaic
Log Message:

Fix the interface definition
The type check is done at runtime.


diffs (247 lines):

diff --git a/monetdb5/modules/mosaic/mosaic.c b/monetdb5/modules/mosaic/mosaic.c
--- a/monetdb5/modules/mosaic/mosaic.c
+++ b/monetdb5/modules/mosaic/mosaic.c
@@ -337,13 +337,12 @@ MOScompressInternal(Client cntxt, bat *b
                typewidth = ATOMsize(tpe) * 8; // size in bits
                break;
        default:
-               // don't compress it
                BBPunfix(bsrc->batCacheid);
-               return MAL_SUCCEED;
+               throw(MAL,"mosaic.compress","Compression type not supported");
        }
 
     if (BATcheckmosaic(bsrc)){
-               /* already compressed */
+               /* already compressed, silently ignore */
                BBPunfix(bsrc->batCacheid);
                return msg;
        }
diff --git a/monetdb5/modules/mosaic/mosaic.mal 
b/monetdb5/modules/mosaic/mosaic.mal
--- a/monetdb5/modules/mosaic/mosaic.mal
+++ b/monetdb5/modules/mosaic/mosaic.mal
@@ -38,13 +38,13 @@ comment "Perform a search thru the compr
 
 pattern optimize(bid:int)
 address MOSoptimizer
-comment "Perform a search thru the compression space using up to 2^ply
+comment "Perform a search thru the compression space of
 candidate combinations";
 
 pattern optimize(bid:int, blk:int)
 address MOSoptimizer
-comment "Perform a search thru the compression space using up to 2^ply
-candidate combinations and blk*1000 blocksize limits";
+comment "Perform a search thru the compression space of
+candidate combinations";
 
 pattern slice(bid:lng)(b0:bte,b1:bte,b2:bte,b3:bte,b4:bte,b5:bte,b6:bte,b7:bte)
 address MOSslice
@@ -54,201 +54,23 @@ pattern dump(b:bat[:any])
 address MOSdump
 comment "Dump the compressed structure";
 
-pattern select(b:bat[:bte], low:bte, high:bte, li:bit, hi:bit, anti:bit) 
:bat[:oid]
-address MOSselect;
-
-pattern select(b:bat[:bit], low:bit, high:bit, li:bit, hi:bit, anti:bit) 
:bat[:oid]
-address MOSselect;
-
-pattern select(b:bat[:sht], low:sht, high:sht, li:bit, hi:bit, anti:bit) 
:bat[:oid]
-address MOSselect;
-
-pattern select(b:bat[:int], low:int, high:int, li:bit, hi:bit, anti:bit) 
:bat[:oid]
-address MOSselect;
-
-pattern select(b:bat[:lng], low:lng, high:lng, li:bit, hi:bit, anti:bit) 
:bat[:oid]
-address MOSselect;
-
-pattern select(b:bat[:oid], low:oid, high:oid, li:bit, hi:bit, anti:bit) 
:bat[:oid]
-address MOSselect;
-
-pattern select(b:bat[:flt], low:flt, high:flt, li:bit, hi:bit, anti:bit) 
:bat[:oid]
-address MOSselect;
-
-pattern select(b:bat[:dbl], low:dbl, high:dbl, li:bit, hi:bit, anti:bit) 
:bat[:oid]
-address MOSselect;
-
-pattern select(b:bat[:str], low:str, high:str, li:bit, hi:bit, anti:bit) 
:bat[:oid]
-address MOSselect;
-
-pattern select(b:bat[:timestamp], low:timestamp, high:timestamp, li:bit, 
hi:bit, anti:bit) :bat[:oid]
-address MOSselect
-comment "Overloaded selection routine";
-
-pattern select(b:bat[:date], low:date, high:date, li:bit, hi:bit, anti:bit) 
:bat[:oid]
-address MOSselect
-comment "Overloaded selection routine";
-
-pattern select(b:bat[:daytime], low:daytime, high:daytime, li:bit, hi:bit, 
anti:bit) :bat[:oid]
-address MOSselect
-comment "Overloaded selection routine";
-
-pattern select(b:bat[:bte], cand:bat[:oid], low:bte, high:bte, li:bit, hi:bit, 
anti:bit) :bat[:oid]
-address MOSselect;
-
-pattern select(b:bat[:bit], cand:bat[:oid], low:bit, high:bit, li:bit, hi:bit, 
anti:bit) :bat[:oid]
-address MOSselect;
-
-pattern select(b:bat[:sht], cand:bat[:oid], low:sht, high:sht, li:bit, hi:bit, 
anti:bit) :bat[:oid]
-address MOSselect;
-
-pattern select(b:bat[:int], cand:bat[:oid], low:int, high:int, li:bit, hi:bit, 
anti:bit) :bat[:oid]
-address MOSselect;
-
-pattern select(b:bat[:lng], cand:bat[:oid], low:lng, high:lng, li:bit, hi:bit, 
anti:bit) :bat[:oid]
-address MOSselect;
-
-pattern select(b:bat[:oid], cand:bat[:oid], low:oid, high:oid, li:bit, hi:bit, 
anti:bit) :bat[:oid]
-address MOSselect;
-
-pattern select(b:bat[:flt], cand:bat[:oid], low:flt, high:flt, li:bit, hi:bit, 
anti:bit) :bat[:oid]
-address MOSselect;
-
-pattern select(b:bat[:dbl], cand:bat[:oid], low:dbl, high:dbl, li:bit, hi:bit, 
anti:bit) :bat[:oid]
-address MOSselect;
-
-pattern select(b:bat[:str], cand:bat[:oid], low:str, high:str, li:bit, hi:bit, 
anti:bit) :bat[:oid]
-address MOSselect;
-
-pattern select(b:bat[:timestamp], cand:bat[:oid], low:timestamp, 
high:timestamp, li:bit, hi:bit, anti:bit) :bat[:oid]
-address MOSselect
-comment "Overloaded selection routine";
-
-pattern select(b:bat[:date], cand:bat[:oid], low:date, high:date, li:bit, 
hi:bit, anti:bit) :bat[:oid]
-address MOSselect
-comment "Overloaded selection routine";
-
-pattern select(b:bat[:daytime], cand:bat[:oid], low:daytime, high:daytime, 
li:bit, hi:bit, anti:bit) :bat[:oid]
+pattern select(b:bat[:any_1], low:any_1, high:any_1, li:bit, hi:bit, anti:bit) 
:bat[:oid]
 address MOSselect
 comment "Overloaded selection routine";
 
-pattern thetaselect(b:bat[:bte], low:bte, oper:str) :bat[:oid]
-address MOSthetaselect;
-
-pattern thetaselect(b:bat[:bit], low:bit, oper:str) :bat[:oid]
-address MOSthetaselect;
-
-pattern thetaselect(b:bat[:sht], low:sht, oper:str) :bat[:oid]
-address MOSthetaselect;
-
-pattern thetaselect(b:bat[:int], low:int, oper:str) :bat[:oid]
-address MOSthetaselect;
-
-pattern thetaselect(b:bat[:lng], low:lng, oper:str) :bat[:oid]
-address MOSthetaselect;
-
-pattern thetaselect(b:bat[:oid], low:oid, oper:str) :bat[:oid]
-address MOSthetaselect;
-
-pattern thetaselect(b:bat[:flt], low:flt, oper:str) :bat[:oid]
-address MOSthetaselect;
-
-pattern thetaselect(b:bat[:dbl], low:dbl, oper:str) :bat[:oid]
-address MOSthetaselect;
-
-pattern thetaselect(b:bat[:str], low:str, oper:str) :bat[:oid]
-address MOSthetaselect;
-
-pattern thetaselect(b:bat[:timestamp], low:timestamp, oper:str) :bat[:oid]
-address MOSthetaselect
+pattern select(b:bat[:any_1], cand:bat[:oid], low:any_1, high:any_1, li:bit, 
hi:bit, anti:bit) :bat[:oid]
+address MOSselect
 comment "Overloaded selection routine";
 
-pattern thetaselect(b:bat[:date], low:date, oper:str) :bat[:oid]
-address MOSthetaselect
-comment "Overloaded selection routine";
-
-pattern thetaselect(b:bat[:daytime], low:daytime, oper:str) :bat[:oid]
+pattern thetaselect(b:bat[:any_1], low:any_1, oper:str) :bat[:oid]
 address MOSthetaselect
 comment "Overloaded selection routine";
 
-pattern thetaselect(b:bat[:bte], c:bat[:oid], low:bte, oper:str) :bat[:oid]
-address MOSthetaselect;
-
-pattern thetaselect(b:bat[:bit], c:bat[:oid], low:bit, oper:str) :bat[:oid]
-address MOSthetaselect;
-
-pattern thetaselect(b:bat[:sht], c:bat[:oid], low:sht, oper:str) :bat[:oid]
-address MOSthetaselect;
-
-pattern thetaselect(b:bat[:int], c:bat[:oid], low:int, oper:str) :bat[:oid]
-address MOSthetaselect;
-
-pattern thetaselect(b:bat[:lng], c:bat[:oid], low:lng, oper:str) :bat[:oid]
-address MOSthetaselect;
-
-pattern thetaselect(b:bat[:oid], c:bat[:oid], low:oid, oper:str) :bat[:oid]
-address MOSthetaselect;
-
-pattern thetaselect(b:bat[:flt], c:bat[:oid], low:flt, oper:str) :bat[:oid]
-address MOSthetaselect;
-
-pattern thetaselect(b:bat[:dbl], c:bat[:oid], low:dbl, oper:str) :bat[:oid]
-address MOSthetaselect;
-
-pattern thetaselect(b:bat[:str], c:bat[:oid], low:str, oper:str) :bat[:oid]
-address MOSthetaselect;
-
-pattern thetaselect(b:bat[:timestamp], c:bat[:oid], low:timestamp, oper:str) 
:bat[:oid]
-address MOSthetaselect
-comment "Overloaded selection routine";
-
-pattern thetaselect(b:bat[:date], c:bat[:oid], low:date, oper:str) :bat[:oid]
-address MOSthetaselect
-comment "Overloaded selection routine";
-
-pattern thetaselect(b:bat[:daytime], c:bat[:oid], low:daytime, oper:str) 
:bat[:oid]
+pattern thetaselect(b:bat[:any_1], c:bat[:oid], low:any_1, oper:str) :bat[:oid]
 address MOSthetaselect
 comment "Overloaded selection routine";
 
-pattern projection(b:bat[:oid], cand:bat[:bte]) :bat[:bte]
-address MOSprojection;
-
-pattern projection(b:bat[:oid], cand:bat[:bit]) :bat[:bit]
-address MOSprojection;
-
-pattern projection(b:bat[:oid], cand:bat[:sht]) :bat[:sht]
-address MOSprojection;
-
-pattern projection(b:bat[:oid], cand:bat[:int]) :bat[:int]
-address MOSprojection;
-
-pattern projection(b:bat[:oid], cand:bat[:lng]) :bat[:lng]
-address MOSprojection;
-
-pattern projection(b:bat[:oid], cand:bat[:hge]) :bat[:hge]
-address MOSprojection;
-
-pattern projection(b:bat[:oid], cand:bat[:oid]) :bat[:oid]
-address MOSprojection;
-
-pattern projection(b:bat[:oid], cand:bat[:flt]) :bat[:flt]
-address MOSprojection;
-
-pattern projection(b:bat[:oid], cand:bat[:dbl]) :bat[:dbl]
-address MOSprojection;
-
-pattern projection(b:bat[:oid], cand:bat[:str]) :bat[:str]
-address MOSprojection;
-
-pattern projection(b:bat[:oid], cand:bat[:timestamp]) :bat[:timestamp]
-address MOSprojection
-comment "Overloaded projection operation";
-
-pattern projection(b:bat[:oid], cand:bat[:date]) :bat[:date]
-address MOSprojection
-comment "Overloaded projection operation";
-
-pattern projection(b:bat[:oid], cand:bat[:daytime]) :bat[:daytime]
+pattern projection(b:bat[:oid], cand:bat[:any_1]) :bat[:any_1]
 address MOSprojection
 comment "Overloaded projection operation";
 
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to