Changeset: 7389eb4412b5 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7389eb4412b5
Modified Files:
MonetDB5/src/optimizer/opt_mitosis.mx
Branch: default
Log Message:
Propagate properties to partitions.
For subsequent processing by the tarantula we need the file property.
The rows property may come in handy as well.
diffs (42 lines):
diff -r 394b87baf3e7 -r 7389eb4412b5 MonetDB5/src/optimizer/opt_mitosis.mx
--- a/MonetDB5/src/optimizer/opt_mitosis.mx Sun Oct 03 20:20:51 2010 +0200
+++ b/MonetDB5/src/optimizer/opt_mitosis.mx Sun Oct 03 20:22:13 2010 +0200
@@ -97,6 +97,8 @@
wrd r = 0, rowcnt=0; /* table should be sizeable to consider
parallel execution*/
InstrPtr q,*old, target= 0, matq;
size_t typewidth= 3 *sizeof(lng); /* 2 arguments and a result */
+ VarPtr loc= 0, rows = 0;
+ ValRecord vr;
(void)cntxt;
(void) stk;
@@ -215,12 +217,28 @@
if (j+1 < pieces){
hgh.value.val.oval= low.value.val.oval+slice;
q= pushOid(mb,q,hgh.value.val.oval);
- } else
+ } else{
+ hgh.value.val.oval= oid_nil;
q= pushNil(mb,q, TYPE_oid);
+ }
k= getArg(q,0)= newTmpVariable(mb,tpe);
setVarUDFtype(mb,k);
setVarUsed(mb,k);
+...@-
+The target variable should inherit file location and row count for the
tarantula.
+...@c
+ loc = varGetProp(mb, getArg(p,0), fileProp);
+ if ( loc ){
+ memset((char*) &vr, 0, sizeof(vr));
+ varSetProp(mb, k, fileProp, op_eq, VALset(&vr,
TYPE_str, GDKstrdup(loc->value.val.sval)));
+ }
+ rows = varGetProp(mb, getArg(p,0), rowsProp);
+ if ( rows){
+ memset((char*) &vr, 0, sizeof(vr));
+ varSetProp(mb, k, rowsProp, op_eq, VALset(&vr,
TYPE_wrd, &rows->value.val.wval));
+ }
+
if (getFunctionId(p) == binddbatRef) {
varSetProp(mb, k, PropertyIndex("tlb"), op_gte,
(ptr) &low.value);
varSetProp(mb, k, PropertyIndex("tub"), op_lt,
(ptr) &hgh.value);
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list