Changeset: b9636f9deb8d for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/b9636f9deb8d
Modified Files:
        monetdb5/mal/mal_instruction.c
        monetdb5/optimizer/opt_pushselect.c
Branch: default
Log Message:

Compare variables by number instead of name; slight improvement in test.


diffs (26 lines):

diff --git a/monetdb5/mal/mal_instruction.c b/monetdb5/mal/mal_instruction.c
--- a/monetdb5/mal/mal_instruction.c
+++ b/monetdb5/mal/mal_instruction.c
@@ -810,9 +810,7 @@ getVarName(MalBlkPtr mb, int idx)
        if( getVarKind(mb,idx) == 0)
                setVarKind(mb,idx, REFMARKER);
 
-       if( *s &&  s[1] != '_' && (s[0] != 'X' && s[0] != 'C'))
-               return s;
-       if ( *s == 0)
+       if (*s == 0)
                (void) snprintf(s, IDLENGTH,"%c_%d", getVarKind(mb, idx), 
mb->vid++);
        return s;
 }
diff --git a/monetdb5/optimizer/opt_pushselect.c 
b/monetdb5/optimizer/opt_pushselect.c
--- a/monetdb5/optimizer/opt_pushselect.c
+++ b/monetdb5/optimizer/opt_pushselect.c
@@ -325,7 +325,7 @@ OPTpushselectImplementation(Client cntxt
                                        !isaBatType(getArgType(mb, q, 2)) && 
isVarConstant(mb, getArg(q, 2)) && /* pattern is a value */
                                        isVarConstant(mb, getArg(q, 3)) && /* 
escape is a value */
                                        isVarConstant(mb, getArg(q, 4)) && /* 
isensitive flag is a value */
-                                       strcmp(getVarName(mb, getArg(q,0)), 
getVarName(mb, getArg(p,1))) == 0 /* the output variable from batalgebra.like 
is the input one for [theta]select */) {
+                                       getArg(q,0) == getArg(p,1) /* the 
output variable from batalgebra.like is the input one for [theta]select */) {
                                        int has_cand = (getArgType(mb, p, 2) == 
newBatType(TYPE_oid)), offset = 0, anti = (getFunctionId(q)[0] == 'n');
                                        bit ignore_case = 
*(bit*)getVarValue(mb, getArg(q, 4)), selectok = TRUE;
 
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to