Update of /cvsroot/monetdb/pathfinder/compiler/algebra
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv12720/compiler/algebra

Modified Files:
        physical.c 
Log Message:
Physical level implementation for the error operator.


Index: physical.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/physical.c,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -d -r1.44 -r1.45
--- physical.c  6 Dec 2007 08:42:14 -0000       1.44
+++ physical.c  11 Dec 2007 14:25:55 -0000      1.45
@@ -3244,6 +3244,33 @@
 }
 
 /**
+ * Constructor for error
+ */
+PFpa_op_t * PFpa_error (const PFpa_op_t *n)
+{
+    PFpa_op_t *ret = wire1 (pa_error, n);
+
+    assert (n);
+
+    /* allocate memory for the result schema */
+    ret->schema.count = n->schema.count;
+    ret->schema.items
+        = PFmalloc (ret->schema.count * sizeof (*(ret->schema.items)));
+
+    /* copy schema from n  */
+    for (unsigned int i = 0; i < n->schema.count; i++)
+            ret->schema.items[i] = n->schema.items[i];
+
+    /* ordering stays the same */
+    for (unsigned int i = 0; i < PFord_set_count (n->orderings); i++)
+        PFord_set_add (ret->orderings, PFord_set_at (n->orderings, i));
+    /* costs */
+    ret->cost = DEFAULT_COST + n->cost;
+
+    return ret;
+}
+
+/**
  * Constructor for conditional error
  */
 PFpa_op_t * PFpa_cond_err (const PFpa_op_t *n, const PFpa_op_t *err,


-------------------------------------------------------------------------
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://sourceforge.net/services/buy/index.php
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins

Reply via email to