Update of /cvsroot/monetdb/pathfinder/compiler/algebra/map
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv19380/algebra/map
Modified Files:
map_unq_names.c
Log Message:
-- Fixed the mapping of recursion arguments in the unique column name inference.
U map_unq_names.c
Index: map_unq_names.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/map/map_unq_names.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- map_unq_names.c 3 Apr 2008 11:03:19 -0000 1.32
+++ map_unq_names.c 3 Apr 2008 12:39:29 -0000 1.33
@@ -797,17 +797,22 @@
case la_rec_arg:
/* The results of the left (seed) and the right (recursion) argument
- have different result schemas. Thus we introduce a mapping
- projection that transforms the recursion schema into the seed
- (and base) schema. */
+ have different result schemas. Thus we introduce mapping
+ projections that transform the seed and the recursion schema into
+ the base schema. */
{
PFla_op_t *base = NULL;
- PFalg_proj_t *projlist = PFmalloc (p->schema.count *
- sizeof (PFalg_proj_t));
+ PFalg_proj_t *seed_projlist = PFmalloc (p->schema.count *
+ sizeof (PFalg_proj_t));
+ PFalg_proj_t *rec_projlist = PFmalloc (p->schema.count *
+ sizeof (PFalg_proj_t));
- for (unsigned int i = 0; i < p->schema.count; i++)
- projlist[i] = proj (UNAME(p, p->schema.items[i].name),
- UNAME(R(p), p->schema.items[i].name));
+ for (unsigned int i = 0; i < p->schema.count; i++) {
+ seed_projlist[i] = proj (UNAME(p, p->schema.items[i].name),
+ UNAME(L(p), p->schema.items[i].name));
+ rec_projlist[i] = proj (UNAME(p, p->schema.items[i].name),
+ UNAME(R(p), p->schema.items[i].name));
+ }
/* In case the recursion base is not referenced anymore
we do not need to include the recursion argument. */
@@ -819,10 +824,12 @@
}
if (base)
- res = rec_arg (U(L(p)),
+ res = rec_arg (PFla_project_ (U(L(p)),
+ p->schema.count,
+ seed_projlist),
PFla_project_ (U(R(p)),
p->schema.count,
- projlist),
+ rec_projlist),
base);
else
return;
-------------------------------------------------------------------------
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