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

coercionOptimizerCalcStep(): various code fixes

mostly consistency

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


diffs (37 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
@@ -70,18 +70,18 @@ coercionOptimizerCalcStep(Client cntxt, 
        if ( a == r && coerce[varid].src && coerce[varid].fromtype < r ) 
        {
 #ifdef _DEBUG_COERCION_
-               mnstr_printf(cntxt->fdout,"#remove upcast on first argument 
%d\n", getArg(p,1));
+               mnstr_printf(cntxt->fdout,"#remove upcast on first argument 
%d\n", varid);
                printInstruction(cntxt->fdout, mb, 0, p, LIST_MAL_ALL);
 #endif
                getArg(p,1) = coerce[varid].src;
                if ( chkInstruction(NULL, cntxt->nspace, mb, p) || p->typechk 
== TYPE_UNKNOWN)
-                       getArg(p,1)= varid;
+                       getArg(p,1) = varid;
        }
        varid = getArg(p,2);
        if ( b == r && coerce[varid].src &&  coerce[varid].fromtype < r ) 
        {
 #ifdef _DEBUG_COERCION_
-               mnstr_printf(cntxt->fdout,"#remove upcast on second argument 
%d\n", getArg(p,2));
+               mnstr_printf(cntxt->fdout,"#remove upcast on second argument 
%d\n", varid);
                printInstruction(cntxt->fdout, mb, 0, p, LIST_MAL_ALL);
 #endif
                getArg(p,2) = coerce[varid].src;
@@ -110,9 +110,9 @@ coercionOptimizerAggrStep(Client cntxt, 
        r = getColumnType(getVarType(mb, getArg(p,0)));
        k = getArg(p,1);
        if( r == TYPE_dbl &&  coerce[k].src ){
-               getArg(p,1) = coerce[getArg(p,1)].src;
+               getArg(p,1) = coerce[k].src;
                if ( chkInstruction(NULL, cntxt->nspace, mb, p) || p->typechk 
== TYPE_UNKNOWN)
-                       getArg(p,1)= k;
+                       getArg(p,1) = k;
        }
        return;
 }
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to