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

fixed bug. Case that uses that uses thetasubselect for single sample_time 
selection predicate is now being handled.


diffs (36 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
@@ -510,8 +510,30 @@ OPTdvfImplementation(Client cntxt, MalBl
                }
                else if((state == 2 || state == 3) &&
                        getModuleId(p) == algebraRef &&
-                       getFunctionId(p) == subselectRef &&
-                       (p->argc == 7 || p->argc == 8) &&
+                       getFunctionId(p) == thetasubselectRef &&
+                       p->argc == 5 &&
+                       p->retc == 1 &&
+                       getArg(p, 1) == last_bind_return_var_id)
+               {
+                       last_subselect_return_var_id = getArg(p, 0);
+                       
+                       r = newInstruction(mb, ASSIGNsymbol);
+                       setModuleId(r, algebraRef);
+                       setFunctionId(r, thetasubselectRef);
+                       r = pushReturn(mb, r, getArg(p, 0));
+                       r = pushArgument(mb, r, getArg(p, 1));
+                       r = pushArgument(mb, r, getArg(p, 3));
+                       r = pushArgument(mb, r, getArg(p, 4));
+                       
+                       insertInstruction(mb, r, i+1);
+                       removeInstruction(mb, p);
+                       
+                       actions += 2;
+               }
+               else if((state == 2 || state == 3) &&
+                       getModuleId(p) == algebraRef &&
+                       ((getFunctionId(p) == subselectRef && (p->argc == 7 || 
p->argc == 8)) || 
+                       (getFunctionId(p) == thetasubselectRef && (p->argc == 5 
|| p->argc == 4))) &&
                        p->retc == 1 &&
                        (getArg(p, 1) == last_update_bind_second_return_var_id 
|| getArg(p, 1) == last_insert_bind_return_var_id))
                {
_______________________________________________
checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to