Update of /cvsroot/monetdb/pathfinder/compiler/algebra/opt
In directory sc8-pr-cvs16:/tmp/cvs-serv1655/algebra/opt
Modified Files:
opt_complex.c
Log Message:
-- Split up a conjunctive selection into two adjacent selections.
Index: opt_complex.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/opt/opt_complex.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- opt_complex.c 2 Apr 2007 20:14:54 -0000 1.20
+++ opt_complex.c 27 Apr 2007 11:53:04 -0000 1.21
@@ -768,6 +768,25 @@
}
} break;
+ /* to get rid of the operator 'and' and to split up
+ different conditions we can introduce additional
+ select operators above comparisons whose required
+ value is true. */
+ case la_bool_and:
+ if (PFprop_reqval (p->prop, p->sem.binary.res) &&
+ PFprop_reqval_val (p->prop, p->sem.binary.res) &&
+ PFprop_set (p->prop)) {
+ *p = *PFla_attach (
+ PFla_select (
+ PFla_select (
+ L(p),
+ p->sem.binary.att1),
+ p->sem.binary.att2),
+ p->sem.binary.res,
+ PFalg_lit_bln (true));
+ }
+ break;
+
case la_scjoin:
if (R(p)->kind == la_project &&
RL(p)->kind == la_scjoin) {
@@ -816,6 +835,7 @@
PFprop_infer_dom (root);
PFprop_infer_set (root);
PFprop_infer_unq_names (root);
+ PFprop_infer_reqval (root);
/* Optimize algebra tree */
opt_complex (root);
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins