Changeset: 82382ffcd6ea for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=82382ffcd6ea
Modified Files:
        monetdb5/optimizer/opt_geospatial.c
Branch: geo
Log Message:

optimiser handles thetasubselect needed for distance


diffs (22 lines):

diff --git a/monetdb5/optimizer/opt_geospatial.c 
b/monetdb5/optimizer/opt_geospatial.c
--- a/monetdb5/optimizer/opt_geospatial.c
+++ b/monetdb5/optimizer/opt_geospatial.c
@@ -96,7 +96,7 @@ static void fixSubselect(MalBlkPtr mb, I
        //create the new subselect command that does not use any candidates
        subselectReturnId = newTmpVariable(mb, newBatType(TYPE_oid, TYPE_oid));
        setReturnArgument(oldInstrPtr[instructionNum], subselectReturnId);
-       if(oldInstrPtr[instructionNum]->argc == 8) {
+       if((!idcmp(getFunctionId(oldInstrPtr[instructionNum]), "subselect") && 
oldInstrPtr[instructionNum]->argc == 8) || 
!idcmp(getFunctionId(oldInstrPtr[instructionNum]), "thetasubselect")) {
 //             fprintf(stderr, "secondArg %d\n", 
getArg(oldInstrPtr[instructionNum], 2));
 
                //check if the second argument to this subselect is something 
coming from another subselect
@@ -168,7 +168,8 @@ int OPTgeospatialImplementation(Client c
        //iterate over the instructions
        for(i=0; i<nextFreeSlot; i++) { 
                //chech the module and function name
-               if(getModuleId(oldInstrPtr[i]) && 
!idcmp(getModuleId(oldInstrPtr[i]),"algebra") && 
!idcmp(getFunctionId(oldInstrPtr[i]), "subselect")) {
+               if(getModuleId(oldInstrPtr[i]) && 
!idcmp(getModuleId(oldInstrPtr[i]),"algebra") &&
+                               (!idcmp(getFunctionId(oldInstrPtr[i]), 
"subselect") || !idcmp(getFunctionId(oldInstrPtr[i]), "thetasubselect"))) {
                        int filterReturnId = 0;
                        pushInstruction(mb, oldInstrPtr[i]);
 
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to