Changeset: f9ddbe15a6fb for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f9ddbe15a6fb
Modified Files:
        monetdb5/optimizer/opt_coercion.c
Branch: notepad
Log Message:

coercionOptimizerCalcStep(): fixed check for non-existing signatures:

chkInstruction() appears to return 0, also if the checked instruction
requests a missing signature. This seems to be due to calling
typeChecker() with silent==TRUE (which is what we want, here)
and typeChecker() not increasing the error count when called with
silent==TRUE. However, typeChecker() sets p->typechk=TYPE_UNKNOWN,
in case the requested signature is not found. Hence, we now (also)
check whether p->typechk == TYPE_UNKNOWN after calling chkInstruction().

This fixes test clients/R/tests/survey.R without harming any other test.

See also
https://www.monetdb.org/pipermail/developers-list/2015-March/004399.html


[Just collecting my code ideas;
 feel free to graft or merge into the default branch
 as applicable or desired.]


diffs (21 lines):

diff --git a/monetdb5/optimizer/opt_coercion.c 
b/monetdb5/optimizer/opt_coercion.c
--- a/monetdb5/optimizer/opt_coercion.c
+++ b/monetdb5/optimizer/opt_coercion.c
@@ -79,7 +79,7 @@ coercionOptimizerCalcStep(Client cntxt, 
 #endif
                varid = getArg(p,1);
                getArg(p,1) = coerce[getArg(p,1)].src;
-               if ( chkInstruction(NULL, cntxt->nspace, mb, p))
+               if ( chkInstruction(NULL, cntxt->nspace, mb, p) || p->typechk 
== TYPE_UNKNOWN )
                        getArg(p,1) = varid;
        }
        if ( b == r && coerce[getArg(p,2)].src &&  coerce[getArg(p,2)].fromtype 
< r ) 
@@ -90,7 +90,7 @@ coercionOptimizerCalcStep(Client cntxt, 
 #endif
                varid = getArg(p,2);
                getArg(p,2) = coerce[getArg(p,2)].src;
-               if ( chkInstruction(NULL, cntxt->nspace, mb, p))
+               if ( chkInstruction(NULL, cntxt->nspace, mb, p) || p->typechk 
== TYPE_UNKNOWN )
                        getArg(p,2) = varid;
        }
 #ifdef _DEBUG_COERCION_
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to