Changeset: fd04fef4285f for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=fd04fef4285f
Modified Files:
monetdb5/optimizer/opt_coercion.c
Branch: default
Log Message:
OPTcoercionImplementation(): ensure we do not remove scale-changing casts
diffs (14 lines):
diff --git a/monetdb5/optimizer/opt_coercion.c
b/monetdb5/optimizer/opt_coercion.c
--- a/monetdb5/optimizer/opt_coercion.c
+++ b/monetdb5/optimizer/opt_coercion.c
@@ -134,7 +134,9 @@ OPTcoercionImplementation(Client cntxt,M
&& isVarConstant(mb,getArg(p,3))
&& getArgType(mb,p,3) == TYPE_int
&& isVarConstant(mb,getArg(p,4))
- && getArgType(mb,p,4) == TYPE_int ){
+ && getArgType(mb,p,4) == TYPE_int
+ /* from-scale == to-scale, i.e., no scale change */
+ && getVarValue(mb, getArg(p,1)) == getVarValue(mb,
getArg(p,4)) ){
k = getArg(p,0);
coerce[k].pc= i;
coerce[k].totype= TYPE_hge;
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list