Changeset: b0a97a62eacd for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b0a97a62eacd
Modified Files:
monetdb5/optimizer/opt_mergetable.c
Branch: default
Log Message:
don't use mat after they got packed.
diffs (52 lines):
diff --git a/monetdb5/optimizer/opt_mergetable.c
b/monetdb5/optimizer/opt_mergetable.c
--- a/monetdb5/optimizer/opt_mergetable.c
+++ b/monetdb5/optimizer/opt_mergetable.c
@@ -53,7 +53,7 @@ static int
is_a_mat(int idx, matlist_t *ml){
int i;
for(i =0; i<ml->top; i++)
- if (ml->v[i].mv == idx)
+ if (!ml->v[i].packed && ml->v[i].mv == idx)
return i;
return -1;
}
@@ -1444,7 +1444,8 @@ mat_topn(MalBlkPtr mb, InstrPtr p, matli
pushInstruction(mb,r);
q = copyInstruction(p);
- setFunctionId(q, subsliceRef);
+ //setFunctionId(q, subsliceRef);
+ setFunctionId(q, sliceRef);
if (ml->v[m].type != mat_tpn || is_slice)
getArg(q,1) = getArg(r,0);
pushInstruction(mb,q);
@@ -1491,7 +1492,7 @@ OPTmergetableImplementation(Client cntxt
{
InstrPtr *old;
matlist_t ml;
- int oldtop, fm, fn, fo, fe, i, k, m, n, o, e, slimit;
+ int oldtop, fm, fn, fo, fe, i, k, m, n, o, e, slimit, bailout = 0;
int size=0, match, actions=0, distinct_topn = 0, /*topn_res = 0,*/
groupdone = 0, *vars;
char buf[256];
lng usec = GDKusec();
@@ -1523,7 +1524,9 @@ OPTmergetableImplementation(Client cntxt
if (getModuleId(q) == groupRef && getFunctionId(q) ==
subgroupdoneRef)
groupdone = 1;
}
-
+ if (getModuleId(p) == algebraRef &&
+ getFunctionId(p) == selectNotNilRef )
+ bailout = 1;
/*
if (isTopn(p))
topn_res = getArg(p, 0);
@@ -1533,6 +1536,9 @@ OPTmergetableImplementation(Client cntxt
}
GDKfree(vars);
+ if (bailout)
+ goto cleanup;
+
/* the number of MATs is limited to the variable stack*/
ml.size = mb->vtop;
ml.top = 0;
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list