Changeset: f7970a6cabf2 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f7970a6cabf2
Modified Files:
        monetdb5/optimizer/opt_garbageCollector.c
        monetdb5/optimizer/opt_prelude.c
        monetdb5/optimizer/opt_prelude.h
        monetdb5/optimizer/opt_profiler.c
Branch: Jul2017
Log Message:

Profiler references to schema-table-column fixes
Use the proper module to match delta() and subdelta()
Add inheritence for selectNotNil and packIncrement


diffs (82 lines):

diff --git a/monetdb5/optimizer/opt_garbageCollector.c 
b/monetdb5/optimizer/opt_garbageCollector.c
--- a/monetdb5/optimizer/opt_garbageCollector.c
+++ b/monetdb5/optimizer/opt_garbageCollector.c
@@ -154,11 +154,9 @@ OPTgarbageCollectorImplementation(Client
        /* leave a consistent scope admin behind */
        setVariableScope(mb);
        /* Defense line against incorrect plans */
-       if (actions > 0) {
-               chkTypes(cntxt->fdout, cntxt->nspace, mb, FALSE);
-               chkFlow(cntxt->fdout, mb);
-               chkDeclarations(cntxt->fdout, mb);
-       }
+       chkTypes(cntxt->fdout, cntxt->nspace, mb, FALSE);
+       chkFlow(cntxt->fdout, mb);
+       chkDeclarations(cntxt->fdout, mb);
        /* keep all actions taken as a post block comment */
        usec = GDKusec()- usec;
        snprintf(buf,256,"%-20s actions=%2d time=" LLFMT " 
usec","garbagecollector",actions, usec);
diff --git a/monetdb5/optimizer/opt_prelude.c b/monetdb5/optimizer/opt_prelude.c
--- a/monetdb5/optimizer/opt_prelude.c
+++ b/monetdb5/optimizer/opt_prelude.c
@@ -201,6 +201,7 @@ str optimizerRef;
 str parametersRef;
 str packRef;
 str pack2Ref;
+str packIncrementRef;
 str passRef;
 str partitionRef;
 str pcreRef;
@@ -482,6 +483,7 @@ void optimizerInit(void)
        parametersRef = putName("parameters");
        packRef = putName("pack");
        pack2Ref = putName("pack2");
+       packIncrementRef = putName("packIncrement");
        passRef = putName("pass");
        partitionRef = putName("partition");
        pcreRef = putName("pcre");
diff --git a/monetdb5/optimizer/opt_prelude.h b/monetdb5/optimizer/opt_prelude.h
--- a/monetdb5/optimizer/opt_prelude.h
+++ b/monetdb5/optimizer/opt_prelude.h
@@ -195,6 +195,7 @@ mal_export  str optimizerRef;
 mal_export  str parametersRef;
 mal_export  str packRef;
 mal_export  str pack2Ref;
+mal_export  str packIncrementRef;
 mal_export  str passRef;
 mal_export  str partitionRef;
 mal_export  str pcreRef;
diff --git a/monetdb5/optimizer/opt_profiler.c 
b/monetdb5/optimizer/opt_profiler.c
--- a/monetdb5/optimizer/opt_profiler.c
+++ b/monetdb5/optimizer/opt_profiler.c
@@ -72,7 +72,7 @@ OPTprofilerImplementation(Client cntxt, 
                if( getModuleId(p)== sqlRef && getFunctionId(p)== tidRef){
                        getVarSTC(mb,getArg(p,0)) = i;
                } else
-               if( getModuleId(p)== batRef && (getFunctionId(p)== deltaRef || 
getFunctionId(p) == subdeltaRef)){
+               if( getModuleId(p)== sqlRef && (getFunctionId(p)== deltaRef || 
getFunctionId(p) == subdeltaRef)){
                        // inherit property of first argument
                        getVarSTC(mb,getArg(p,0)) = getVarSTC(mb,getArg(p,1));
                } else
@@ -82,7 +82,10 @@ OPTprofilerImplementation(Client cntxt, 
                if( getModuleId(p)== algebraRef && getFunctionId(p)== 
projectionRef){
                        getVarSTC(mb,getArg(p,0)) = 
getVarSTC(mb,getArg(p,p->argc-1));
                } else
-               if( getModuleId(p)== algebraRef && (getFunctionId(p)== 
selectRef || getFunctionId(p) == thetaselectRef)){
+               if( getModuleId(p)== algebraRef && 
+                       (getFunctionId(p)== selectRef || 
+                        getFunctionId(p) == thetaselectRef ||
+                        getFunctionId(p) == selectNotNilRef) ){
                        getVarSTC(mb,getArg(p,0)) = 
getVarSTC(mb,getArg(p,p->retc));
                } else
                if( getModuleId(p)== algebraRef && (getFunctionId(p)== 
likeselectRef || getFunctionId(p) == ilikeselectRef)){
@@ -97,6 +100,9 @@ OPTprofilerImplementation(Client cntxt, 
                          getFunctionId(p) == rangejoinRef )){
                                getVarSTC(mb,getArg(p,0)) = 
getVarSTC(mb,getArg(p,p->retc));
                                getVarSTC(mb,getArg(p,1)) = 
getVarSTC(mb,getArg(p,p->retc +1));
+               } else 
+               if( getModuleId(p)== matRef && getFunctionId(p)== 
packIncrementRef){
+                       getVarSTC(mb,getArg(p,0)) = getVarSTC(mb,getArg(p,1));
                } 
        }
     /* Defense line against incorrect plans */
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to