Changeset: 3250f0ff5393 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3250f0ff5393 Modified Files: monetdb5/optimizer/opt_pushselect.c Branch: default Log Message:
push subslice under projectdelta diffs (30 lines): diff --git a/monetdb5/optimizer/opt_pushselect.c b/monetdb5/optimizer/opt_pushselect.c --- a/monetdb5/optimizer/opt_pushselect.c +++ b/monetdb5/optimizer/opt_pushselect.c @@ -457,6 +457,26 @@ OPTpushselectImplementation(Client cntxt vars[res] = i; } + /* push subslice under projectdelta */ + if (isSlice(p) && p->retc == 1) { + int var = getArg(p, 1); + InstrPtr q = old[vars[var]]; + if (getModuleId(q) == sqlRef && getFunctionId(q) == projectdeltaRef) { + InstrPtr r = copyInstruction(p); + InstrPtr s = copyInstruction(q); + + /* subslice the candidates */ + getArg(r, 0) = newTmpVariable(mb, newBatType(TYPE_oid, TYPE_oid)); + getArg(r, 1) = getArg(s, 1); + pushInstruction(mb,r); + + /* dummy result for the old q, will be removed by deadcode optimizer */ + getArg(q, 0) = newTmpVariable(mb, getArgType(mb, q, 0)); + + getArg(s, 1) = getArg(r, 0); /* use result of subslice */ + pushInstruction(mb, s); + } + } /* c = delta(b, uid, uvl, ins) * s = subselect(c, C1..) * _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list