Changeset: 7a8ff9eb8de9 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7a8ff9eb8de9
Modified Files:
monetdb5/optimizer/opt_pushselect.c
Branch: default
Log Message:
fixed new push down slice code. Shouldn't push down a subslice and only start
from zero.
diffs (20 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
@@ -464,10 +464,15 @@ OPTpushselectImplementation(Client cntxt
if (getModuleId(q) == sqlRef && getFunctionId(q) ==
projectdeltaRef) {
InstrPtr r = copyInstruction(p);
InstrPtr s = copyInstruction(q);
+ ValRecord cst;
- /* subslice the candidates */
+ /* slice the candidates */
+ setFunctionId(r, sliceRef);
getArg(r, 0) = newTmpVariable(mb,
newBatType(TYPE_oid, TYPE_oid));
getArg(r, 1) = getArg(s, 1);
+ cst.vtype = getArgType(mb, r, 2);
+ cst.val.wval = 0;
+ getArg(r, 2) = defConstant(mb, cst.vtype,
&cst); /* start from zero */
pushInstruction(mb,r);
/* dummy result for the old q, will be removed
by deadcode optimizer */
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list