Update of /cvsroot/monetdb/pathfinder/compiler/algebra/opt
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv5909/algebra/opt
Modified Files:
Tag: XQuery_0-24
opt_const.c
Log Message:
-- Disable more incorrect aggregate rewrites (for type testing aggregates):
It is incorrect to rewrite a grouped aggregate into an ungrouped one
without taking the cardinality (and thus the loop relation) into account.
Out of nowhere (no row) something (a row) pops up...
U opt_const.c
Index: opt_const.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/opt/opt_const.c,v
retrieving revision 1.32.2.1
retrieving revision 1.32.2.2
diff -u -d -r1.32.2.1 -r1.32.2.2
--- opt_const.c 2 Jun 2008 16:32:42 -0000 1.32.2.1
+++ opt_const.c 5 Jun 2008 21:11:51 -0000 1.32.2.2
@@ -835,17 +835,24 @@
PFprop_const_left (p->prop, p->sem.aggr.att)) {
PFla_op_t *op, *ret;
+#if 0 /* We are not allowed to create an unpartitioned aggregate
+ as an empty loop relation might result in a single line
+ result otherwise. */
+
if (PFprop_const_left (p->prop, p->sem.aggr.part)) {
op = lit_tbl (attlist (p->sem.aggr.part),
tuple (PFprop_const_val_left (
p->prop,
p->sem.aggr.part)));
} else {
+#endif
op = distinct (
project (L(p),
proj (p->sem.aggr.part,
p->sem.aggr.part)));
+#if 0
}
+#endif
ret = add_attach (op, p->sem.aggr.att,
PFprop_const_val_left (
@@ -854,6 +861,10 @@
*p = *ret;
SEEN(p) = true;
}
+#if 0 /* We are not allowed to create an unpartitioned aggregate
+ as an empty loop relation might result in a single line
+ result otherwise. */
+
else if (PFprop_const_left (p->prop, p->sem.aggr.att)) {
PFla_op_t *ret = lit_tbl (attlist (p->sem.aggr.att),
tuple (PFprop_const_val_left (
@@ -863,6 +874,7 @@
SEEN(p) = true;
}
/* fall through */
+#endif
case la_seqty1:
/* introduce attach if necessary */
if (PFprop_const_left (p->prop, p->sem.aggr.att)) {
@@ -871,6 +883,10 @@
p->sem.aggr.att));
}
+#if 0 /* We are not allowed to create an unpartitioned aggregate
+ as an empty loop relation might result in a single line
+ result otherwise. */
+
/* if partitiong attribute is constant remove it
and attach it after the operator */
if (p->sem.aggr.part &&
@@ -893,6 +909,7 @@
*p = *ret;
SEEN(p) = true;
}
+#endif
break;
case la_cond_err:
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins