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

pmv: rearrange the subselect when pushselect optimizer fails to push down a 
subselect.


diffs (35 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
@@ -575,6 +575,31 @@ OPTdvfImplementation(Client cntxt, MalBl
                }
                else if((state == 2 || state == 3) &&
                        getModuleId(p) == algebraRef &&
+                       getFunctionId(p) == subselectRef &&
+                       p->argc == 8 &&
+                       p->retc == 1 &&
+                       getArg(p, 2) == last_data_tid_return_var_id)
+               {
+                       last_subselect_return_var_id = getArg(p, 0);
+                       
+                       r = newInstruction(mb, ASSIGNsymbol);
+                       setModuleId(r, algebraRef);
+                       setFunctionId(r, subselectRef);
+                       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));
+                       r = pushArgument(mb, r, getArg(p, 5));
+                       r = pushArgument(mb, r, getArg(p, 6));
+                       r = pushArgument(mb, r, getArg(p, 7));
+                       
+                       insertInstruction(mb, r, i+1);
+                       removeInstruction(mb, p);
+                       
+                       actions += 2;
+               }
+               else if((state == 2 || state == 3) &&
+                       getModuleId(p) == algebraRef &&
                        getFunctionId(p) == thetasubselectRef &&
                        p->argc == 5 &&
                        p->retc == 1 &&
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to