Changeset: 7b8f8ae07e4b for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7b8f8ae07e4b
Modified Files:
monetdb5/optimizer/opt_pushselect.c
Branch: default
Log Message:
batalgebra.like + [theta]select -> likeselect can only happen if the output
variable from batalgebra.like is the input one for [theta]select of course
diffs (14 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
@@ -326,8 +326,8 @@ OPTpushselectImplementation(Client cntxt
if (isLikeOp(q) &&
!isaBatType(getArgType(mb, q,
2)) && /* pattern is a value */
- (q->argc != 4 ||
!isaBatType(getArgType(mb, q, 3))) /* escape is a value */
- ) {
+ (q->argc != 4 ||
!isaBatType(getArgType(mb, q, 3))) && /* escape 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 */) {
bool selectok = true;
int has_cand = (getArgType(mb, p, 2) ==
newBatType(TYPE_oid)), offset = 0;
int a, anti = (getFunctionId(q)[0] ==
'n'), ignore_case = (getFunctionId(q)[anti?4:0] == 'i');
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list