Update of /cvsroot/monetdb/pathfinder/compiler/algebra/prop
In directory sc8-pr-cvs16:/tmp/cvs-serv16084
Modified Files:
prop_ocol.c
Log Message:
During the rewriting of the schema, be careful if attributes are present in the
subsequent nodes.
Index: prop_ocol.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/prop/prop_ocol.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- prop_ocol.c 7 May 2007 10:17:21 -0000 1.20
+++ prop_ocol.c 10 May 2007 13:22:18 -0000 1.21
@@ -73,6 +73,24 @@
}
/**
+ * Return the type of @a attr in the list of ocol columns
+ */
+PFalg_type_t
+PFprop_type (const PFla_op_t *n, PFalg_att_t attr)
+{
+ assert (n);
+ for (unsigned int i = 0; i < n->schema.count; i++)
+ if (attr == n->schema.items[i].name)
+ return n->schema.items[i].type;
+
+ /* you should never get there */
+ PFoops (OOPS_FATAL,
+ "Type of %u not found in schema", attr);
+
+ return aat_int; /* satisfy picky compilers */
+}
+
+/**
* worker for ocol property inference;
* Copies schema using size as array size
*/
@@ -543,8 +561,9 @@
.type = aat_nat };
ocol_at (n, 2)
= (PFalg_schm_item_t) { .name = n->sem.merge_adjacent.item_res,
- .type = aat_node };
- break;
+ .type = (PFprop_type(R(n),
n->sem.merge_adjacent.item_res) & aat_anode)?
+ aat_node : aat_pnode};
+ break;
case la_roots:
ocols (n) = copy_ocols (ocols (L(n)), ocols_count (L(n)));
-------------------------------------------------------------------------
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