Update of /cvsroot/monetdb/pathfinder/compiler/algebra/opt
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv14603/algebra/opt
Modified Files:
opt_reqval.c
Log Message:
-- Extended the required value property to also infer
whether columns are only used in predicates.
-- Added rewrite that turns fn:number into the relaxed variant
that ignores NaN values---values that cannot be cast---based
on the observation if fn:number is applied on predicates only.
U opt_reqval.c
Index: opt_reqval.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/opt/opt_reqval.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- opt_reqval.c 3 Apr 2008 11:03:24 -0000 1.15
+++ opt_reqval.c 7 Apr 2008 11:06:48 -0000 1.16
@@ -129,7 +129,15 @@
if (p->kind == la_rowrank &&
!PFprop_req_value_col (p->prop, p->sem.sort.res))
*p = *PFla_rank (L(p), p->sem.sort.res, p->sem.sort.sortby);
-
+
+ /* if the resulting value of fn:number is only used in a predicate
+ we can use the lax variant that ignores NaN values */
+ if (p->kind == la_fun_1to1 &&
+ p->sem.fun_1to1.kind == alg_fun_fn_number &&
+ PFprop_req_filter_col (p->prop, p->sem.fun_1to1.res))
+ /* Note: the debug printing does not show this difference */
+ p->sem.fun_1to1.kind = alg_fun_fn_number_lax;
+
/* infer properties for children */
for (unsigned int i = 0; i < PFLA_OP_MAXCHILD && p->child[i]; i++)
opt_reqvals (p->child[i]);
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Register now and save $200. Hurry, offer ends at 11:59 p.m.,
Monday, April 7! Use priority code J8TLD2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins