Update of /cvsroot/monetdb/pathfinder/compiler/algebra/prop
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv8417/algebra/prop
Modified Files:
prop_key.c
Log Message:
-- Fixed bug in key property inference
(The inference is used for both unique and original column names and
bitwise operations thus are bound to fail.)
Thanks Tom for noting.
Index: prop_key.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/prop/prop_key.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- prop_key.c 13 Dec 2007 13:08:17 -0000 1.35
+++ prop_key.c 13 Dec 2007 16:56:45 -0000 1.36
@@ -515,22 +515,18 @@
case la_rowrank:
case la_rank:
- {
- PFalg_att_t cols = 0;
- unsigned int i;
-
/* key columns are propagated */
copy (n->prop->keys, L(n)->prop->keys);
- for (i = 0; i < PFord_count (n->sem.sort.sortby); i++)
- cols |= PFord_order_col_at (n->sem.sort.sortby, i);
-
- for (i = 0; i < PFarray_last (L(n)->prop->keys); i++)
- if (cols & *(PFalg_att_t *) PFarray_at (L(n)->prop->keys, i)) {
+ /* propagate the result column as key
+ if one of the sort criteria is already a key */
+ for (unsigned int i = 0; i < PFord_count (n->sem.sort.sortby); i++)
+ if (key_worker (L(n)->prop->keys,
+ PFord_order_col_at (n->sem.sort.sortby, i))) {
union_ (n->prop->keys, n->sem.sort.res);
break;
}
- } break;
+ break;
case la_rowid:
/* key columns are propagated */
-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins