Changeset: 97a9345fa8e6 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=97a9345fa8e6
Modified Files:
        monetdb5/optimizer/opt_postfix.c
Branch: default
Log Message:

Cannot swap parameters for a single cross product. Also I had mistaken the 
outer join case


diffs (22 lines):

diff --git a/monetdb5/optimizer/opt_postfix.c b/monetdb5/optimizer/opt_postfix.c
--- a/monetdb5/optimizer/opt_postfix.c
+++ b/monetdb5/optimizer/opt_postfix.c
@@ -33,7 +33,7 @@ OPTpostfixImplementation(Client cntxt, M
 /* POSTFIX ACTION FOR THE JOIN CASE  */
                p= getInstrPtr(mb, i);
                if ( getModuleId(p) == algebraRef) {
-                       if ( getFunctionId(p) == leftjoinRef ||
+                       if ( getFunctionId(p) == leftjoinRef || 
getFunctionId(p) == outerjoinRef ||
                                 getFunctionId(p) == bandjoinRef || 
getFunctionId(p) == rangejoinRef ||
                                 getFunctionId(p) == likejoinRef || 
getFunctionId(p) == ilikejoinRef ) {
                                if ( getVarEolife(mb, getArg(p, p->retc -1)) == 
i) {
@@ -61,7 +61,8 @@ OPTpostfixImplementation(Client cntxt, M
                                        actions++;
                                        continue;
                                } else if (is_first_ret_not_used && 
(getFunctionId(p) == joinRef || (getFunctionId(p) == thetajoinRef && 
isVarConstant(mb, getArg(p, 6))) ||
-                                                  getFunctionId(p) == 
outerjoinRef || getFunctionId(p) == crossRef)) {
+                                                  (getFunctionId(p) == 
crossRef && isVarConstant(mb, getArg(p, 4)) && getVarConstant(mb, getArg(p, 
4)).val.btval != 1))) {
+                                       /* Can't swap arguments on single cross 
products */
                                        /* swap join inputs */
                                        getArg(p, 2) ^= getArg(p, 3);
                                        getArg(p, 3) ^= getArg(p, 2);
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to