Changeset: 6b971e517bf9 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/6b971e517bf9
Modified Files:
        monetdb5/optimizer/opt_pushselect.c
Branch: Jul2021
Log Message:

Defensive line, no bat arguments for patterns


diffs (12 lines):

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
                                InstrPtr q = mb->stmt[vars[var]]; /* BEWARE: 
the optimizer may not add or remove statements ! */
 
                                if (isLikeOp(q) &&
-                                       isVarConstant(mb, getArg(q, 2)) && /* 
pattern is a value */
+                                       !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 */) {
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to