Changeset: 9782c46e607f for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9782c46e607f Modified Files: monetdb5/optimizer/opt_support.c Branch: malparsing Log Message:
Refine defense line in MALoptimizer, ignore signature only procs diffs (45 lines): diff --git a/monetdb5/optimizer/opt_support.c b/monetdb5/optimizer/opt_support.c --- a/monetdb5/optimizer/opt_support.c +++ b/monetdb5/optimizer/opt_support.c @@ -97,10 +97,11 @@ optimizeMALBlock(Client cntxt, MalBlkPtr if ( mb->inlineProp) return 0; - /* force at least once a complete type check by resetting the type check flag */ + if (mb->errors) + throw(MAL, "optimizer.MALoptimizer", "Start with inconsistent MAL plan"); // strong defense line, assure that MAL plan is initially correct - if( mb->errors == 0){ + if( mb->errors == 0 && mb->stop > 1){ resetMalBlk(mb, mb->stop); msg = chkTypes(cntxt->nspace, mb, FALSE); if( msg) @@ -112,8 +113,6 @@ optimizeMALBlock(Client cntxt, MalBlkPtr if( msg) return msg; } - if (mb->errors) - throw(MAL, "optimizer.MALoptimizer", "Start with inconsistent MAL plan"); /* Optimizers may massage the plan in such a way that a new pass is needed. * When no optimzer call is found, then terminate. */ @@ -173,6 +172,9 @@ MALoptimizer(Client c) if ( c->curprg->def->inlineProp) return MAL_SUCCEED; + // only a signature statement can be skipped + if (c ->curprg->def->stop == 1) + return MAL_SUCCEED; msg= optimizeMALBlock(c, c->curprg->def); if( msg == MAL_SUCCEED) OPTmultiplexSimple(c, c->curprg->def); @@ -621,7 +623,7 @@ int isSubJoin(InstrPtr p) int isMultiplex(InstrPtr p) { - return ((getModuleId(p) == malRef || getModuleId(p) == batmalRef) && + return (malRef && (getModuleId(p) == malRef || getModuleId(p) == batmalRef) && getFunctionId(p) == multiplexRef); } _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list