Changeset: 319a021a997d for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=319a021a997d
Modified Files:
monetdb5/modules/mosaic/Tests/mosaic_frame_lng_tmp.malC
monetdb5/modules/mosaic/mosaic.c
Branch: mosaic
Log Message:
Only do mosaic projection if left side is non-dense cl.
diffs (62 lines):
diff --git a/monetdb5/modules/mosaic/Tests/mosaic_frame_lng_tmp.malC
b/monetdb5/modules/mosaic/Tests/mosaic_frame_lng_tmp.malC
--- a/monetdb5/modules/mosaic/Tests/mosaic_frame_lng_tmp.malC
+++ b/monetdb5/modules/mosaic/Tests/mosaic_frame_lng_tmp.malC
@@ -649,3 +649,39 @@ io.print(sa, sc);
sa:= algebra.select(a,980:lng, 1020:lng,false,false,true);
sc:= mosaic.select (c,980:lng, 1020:lng,false,false,true);
io.print(sa, sc);
+
+b:= bat.new(:lng);
+bat.append(b,1000:lng);
+bat.append(b,1001:lng);
+bat.append(b,999:lng);
+bat.append(b,1003:lng);
+bat.append(b,997:lng);
+bat.append(b,1010:lng);
+bat.append(b,991:lng);
+bat.append(b,992:lng);
+bat.append(b,993:lng);
+bat.append(b,1000:lng);
+
+(l,r) := algebra.join(a,b,nil:bat,nil:bat, false, 0:lng);
+(r, p) := algebra.sort(r, false:bit, false:bit, false:bit);
+l := algebra.projection(p, l);
+
+(lc,rc) := mosaic.join (c,b,nil:bat,nil:bat, false, 0:lng);
+(rc, p) := algebra.sort(rc, false:bit, false:bit, false:bit);
+lc := algebra.projection(p, lc);
+io.print(l,lc);
+io.print(r,rc);
+
+tsa:= mosaic.thetaselect(a,900:lng, ">");
+tsap := algebra.projection(tsa, a);
+tsapc := mosaic.projection(tsa, c);
+io.print(tsap, tsapc);
+
+sa:= algebra.select(a,900:lng, nil:lng,false,false,false);
+sap := algebra.projection(tsa, a);
+sapc := mosaic.projection(tsa, c);
+io.print(sap, sapc);
+
+pl := algebra.projection(l, a);
+plc := mosaic.projection(l, c);
+io.print(pl, plc);
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
@@ -927,6 +927,15 @@ str MOSprojection(Client cntxt, MalBlkPt
throw(MAL,"mosaic.projection",RUNTIME_OBJECT_MISSING);
}
+ if (BATtdense(bl) || /*not a candidate list*/ !(bl->tkey && bl->tsorted
&& bl->tnonil)) {
+
+ msg = ALGprojection(ret, lid, rid);
+ BBPunfix(*lid);
+ BBPunfix(*rid);
+
+ return msg;
+ }
+
cnt = BATcount(bl);
bn = COLnew((oid)0,br->ttype, cnt, TRANSIENT);
if ( bn == NULL){
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list