Changeset: 09445ff9a94d for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=09445ff9a94d
Modified Files:
        monetdb5/extras/dvf/opt_dvf.c
Branch: DVframework
Log Message:

fixed bug. replaced unnecessary projectdelta that projects the delta of the 
sample_time column a second time. This only appears if there is also some 
metadata table column being projected.


diffs (48 lines):

diff --git a/monetdb5/extras/dvf/opt_dvf.c b/monetdb5/extras/dvf/opt_dvf.c
--- a/monetdb5/extras/dvf/opt_dvf.c
+++ b/monetdb5/extras/dvf/opt_dvf.c
@@ -122,6 +122,7 @@ OPTdvfImplementation(Client cntxt, MalBl
        int last_insert_bind_return_var_id = -1;
        int last_subselect_return_var_id = -1;
        int last_update_bind_second_return_var_id = -1;
+       int last_subdelta_return_var_id = -1;
 
        stk = stk; //to escape 'unused' parameter error.
        pci = pci; //to escape 'unused' parameter error.
@@ -545,7 +546,26 @@ OPTdvfImplementation(Client cntxt, MalBl
                        removeInstruction(mb, p);
                        
                        actions += 2;
-               }       
+               }
+               else if((state == 3) &&
+                       getModuleId(p) == sqlRef &&
+                       getFunctionId(p) == projectdeltaRef &&
+                       p->argc == 6 &&
+                       p->retc == 1 &&
+                       last_subdelta_return_var_id == getArg(p, 1))
+               {
+                       r = newInstruction(mb, ASSIGNsymbol);
+                       setModuleId(r, algebraRef);
+                       setFunctionId(r, leftfetchjoinRef);
+                       r = pushReturn(mb, r, getArg(p, 0));
+                       r = pushArgument(mb, r, getArg(p, 1));
+                       r = pushArgument(mb, r, getArg(p, 2));
+                       
+                       insertInstruction(mb, r, i+1);
+                       removeInstruction(mb, p);
+                       
+                       actions += 2;
+               }
                else if((state == 3) && 
                        getModuleId(p) == sqlRef &&
                        getFunctionId(p) == subdeltaRef &&
@@ -553,6 +573,8 @@ OPTdvfImplementation(Client cntxt, MalBl
                        p->retc == 1 &&
                        last_subselect_return_var_id == getArg(p, 1))
                {
+                       last_subdelta_return_var_id = getArg(p, 0);
+                       
                        r = newInstruction(mb, ASSIGNsymbol);
                        r = pushReturn(mb, r, getArg(p, 0));
                        r = pushArgument(mb, r, last_subselect_return_var_id);
_______________________________________________
checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to