Changeset: dbc4a344c5b1 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=dbc4a344c5b1
Modified Files:
monetdb5/optimizer/opt_remap.c
Branch: noce
Log Message:
add protection for -(x) vs -(x,y) with candidates in opt_remap.
diffs (32 lines):
diff --git a/monetdb5/optimizer/opt_remap.c b/monetdb5/optimizer/opt_remap.c
--- a/monetdb5/optimizer/opt_remap.c
+++ b/monetdb5/optimizer/opt_remap.c
@@ -56,27 +56,12 @@ OPTremapDirect(Client cntxt, MalBlkPtr m
if (p->argc == 3 &&
/* these two filter out unary batcalc.- with a
candidate list */
getBatType(getArgType(mb, p, 1)) != TYPE_oid &&
- getBatType(getArgType(mb, p, 2)) != TYPE_oid &&
- getBatType(getArgType(mb, p, 2)) != TYPE_bit) {
+ (getBatType(getArgType(mb, p, 2)) != TYPE_oid &&
!(isVarConstant(mb, getArg(p, 2)) && getArgType(mb, p, 2) == TYPE_bat))) {
/* add candidate lists */
if (isaBatType(getArgType(mb, p, 1)))
p = pushNil(mb, p, TYPE_bat);
if (isaBatType(getArgType(mb, p, 2)))
p = pushNil(mb, p, TYPE_bat);
- } else if (p->argc == 4 &&
- getBatType(getArgType(mb, p, 3)) == TYPE_bit
&&
- /* these two filter out unary batcalc.- with
a
- * candidate list */
- getBatType(getArgType(mb, p, 1)) != TYPE_oid
&&
- getBatType(getArgType(mb, p, 2)) !=
TYPE_oid) {
- int a = getArg(p, 3);
- p->argc--;
- /* add candidate lists */
- if (isaBatType(getArgType(mb, p, 1)))
- p = pushNil(mb, p, TYPE_bat);
- if (isaBatType(getArgType(mb, p, 2)))
- p = pushNil(mb, p, TYPE_bat);
- p = pushArgument(mb, p, a);
}
}
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list