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

Mounter: added semi-parallel mounts.


diffs (60 lines):

diff --git a/monetdb5/extras/dvf/dvf.c b/monetdb5/extras/dvf/dvf.c
--- a/monetdb5/extras/dvf/dvf.c
+++ b/monetdb5/extras/dvf/dvf.c
@@ -71,6 +71,7 @@ str plan_modifier(Client cntxt, MalBlkPt
 
        str *schema_name = (str*) getArgReference(stk,pci,1); /* arg 1: 
schema_name */
        int bat_fl = *(int*) getArgReference(stk,pci,2); /* arg 2: bat of 
file_locations */
+       int run_mergetable_opt = *(int*) getArgReference(stk,pci,3); /* arg 3: 
whether plan_modifier should integrate mergetable optimizer */
 
        BATiter fli;
        
@@ -269,8 +270,11 @@ str plan_modifier(Client cntxt, MalBlkPt
         * 
*optimizer.inline();optimizer.remap();optimizer.evaluate();optimizer.costModel();optimizer.coercions();optimizer.emptySet();optimizer.aliases();
 
optimizer.mergetable();optimizer.deadcode();optimizer.commonTerms();optimizer.groups();optimizer.joinPath();optimizer.reorder();optimizer.deadcode();optimizer.reduce();optimizer.history();optimizer.multiplex();optimizer.accumulators();optimizer.garbageCollector();
         */
 
-       o = newFcnCall(mb, "optimizer", "mergetable");
-       typeChecker(cntxt->fdout, cntxt->nspace, mb, o, FALSE);
+       if(run_mergetable_opt)
+       {
+               o = newFcnCall(mb, "optimizer", "mergetable");
+               typeChecker(cntxt->fdout, cntxt->nspace, mb, o, FALSE);
+       }
        
        if(run_dataflow_opt)
        {
@@ -278,7 +282,8 @@ str plan_modifier(Client cntxt, MalBlkPt
                typeChecker(cntxt->fdout, cntxt->nspace, mb, o, FALSE);
        }
 
-       optimizeMALBlock(cntxt, mb);
+       if(run_mergetable_opt || run_dataflow_opt)
+               optimizeMALBlock(cntxt, mb);
 
        /* New variables might have been created by the optimizers, so their 
values has to be copied into the stack. However, there might not be enough 
space in stack for them. We cannot reallocate the stack, but we may create our 
own enlarged stack, then run the rest of the plan with our own stack. */
 
diff --git a/monetdb5/extras/dvf/dvf.mal b/monetdb5/extras/dvf/dvf.mal
--- a/monetdb5/extras/dvf/dvf.mal
+++ b/monetdb5/extras/dvf/dvf.mal
@@ -1,5 +1,5 @@
 module dvf;
 
-pattern plan_modifier{unsafe}(schema_name:str, 
file_locations:bat[:oid,:str]):void
+pattern plan_modifier{unsafe}(schema_name:str, file_locations:bat[:oid,:str], 
run_mergetable_opt:int):void
 address plan_modifier
 comment "Modify the rest of the plan in the execution time according to the 
files to be mounted.";
\ No newline at end of file
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
@@ -379,6 +379,10 @@ OPTdvfImplementation(Client cntxt, MalBl
                                                q = pushReturn(mb, q, 
newTmpVariable(mb, TYPE_void));
                                                q = pushArgument(mb, q, 
getArg(p, 2));
                                                q = pushArgument(mb, q, 
getArg(t, 0));
+                                               if(mode == 2)
+                                                       q = pushInt(mb, q, 0);
+                                               else
+                                                       q = pushInt(mb, q, 1);
 
                                                /* insert the new instructions 
in pc i2+1 */
                                                insertInstruction(mb, q, i2+1);
_______________________________________________
checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to