Update of /cvsroot/monetdb/pathfinder/compiler/algebra
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv7263/compiler/algebra
Modified Files:
algebra_cse.c builtins.c logical.c
Log Message:
* Some minor (mostly aesthetic) changes on the la_error operator implementation.
Index: algebra_cse.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/algebra_cse.c,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -d -r1.62 -r1.63
--- algebra_cse.c 13 Dec 2007 13:08:14 -0000 1.62
+++ algebra_cse.c 17 Dec 2007 14:15:20 -0000 1.63
@@ -435,6 +435,8 @@
case la_fragment:
case la_frag_union:
case la_empty_frag:
+ case la_error:
+ /* no extra semantic content to check for these operators */
return true;
break;
@@ -458,10 +460,7 @@
case la_frag_extract:
return (a->sem.col_ref.pos == b->sem.col_ref.pos);
break;
-
- case la_error:
- return false;
- break;
+
case la_cond_err:
return (a->sem.err.att == b->sem.err.att
&& a->sem.err.str == b->sem.err.str);
Index: logical.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/logical.c,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -d -r1.71 -r1.72
--- logical.c 13 Dec 2007 13:08:15 -0000 1.71
+++ logical.c 17 Dec 2007 14:15:20 -0000 1.72
@@ -110,6 +110,7 @@
return ret;
}
+
/**
* Create an algebra operator node with one child.
* Similar to #la_op_leaf(), but additionally wires one child.
@@ -126,6 +127,7 @@
return ret;
}
+
/**
* Create an algebra operator node with two children.
* Similar to #la_op_wire1(), but additionally wires another child.
@@ -399,6 +401,7 @@
return ret;
}
+
/**
* Constructor for an empty table. Use this constructor (in
* preference over a literal table with no tuples) to trigger
@@ -430,10 +433,6 @@
}
-
-
-
-
/**
* Construct an algebra node representing a referenced table,
* given a (external) name, a (internal) schema, a list of the
@@ -449,24 +448,17 @@
* schema) of key attributes
*/
PFla_op_t *
-PFla_ref_tbl_ (const char* name,
- PFalg_schema_t schema,
- PFarray_t* tatts,
+PFla_ref_tbl_ (const char* name, PFalg_schema_t schema, PFarray_t* tatts,
PFarray_t* keys)
{
PFla_op_t *ret; /* return value we are building */
assert(name);
- /**************************************************************/
/* instantiate the new algebra operator node */
- /**************************************************************/
ret = la_op_leaf (la_ref_tbl);
- /**************************************************************/
/* set its schema */
- /**************************************************************/
-
/* deep copy the schema parameter*/
ret->schema.items
= PFmalloc (schema.count * sizeof (*(ret->schema.items)));
@@ -475,11 +467,7 @@
}
ret->schema.count = schema.count;
-
- /**************************************************************/
/* set its semantical infos */
- /**************************************************************/
-
/* deep copy the name of the referenced table*/
ret->sem.ref_tbl.name = PFstrdup(name);
@@ -491,24 +479,15 @@
char* copiedValue = PFstrdup(value);
*(char**) PFarray_add (ret->sem.ref_tbl.tatts) = copiedValue;
}
-
/* (it's save to) shallow copy the list of key-attribute-names */
ret->sem.ref_tbl.keys = PFarray_copy(keys);
-
- /**************************************************************/
/* return the new algebra operator node */
- /**************************************************************/
return ret;
}
-
-
-
-
-
/**
* ColumnAttach: Attach a column to a table.
*
@@ -520,8 +499,7 @@
* @parma value Value for the new column.
*/
PFla_op_t *
-PFla_attach (const PFla_op_t *n,
- PFalg_att_t res, PFalg_atom_t value)
+PFla_attach (const PFla_op_t *n, PFalg_att_t res, PFalg_atom_t value)
{
PFla_op_t *ret = la_op_wire1 (la_attach, n);
@@ -584,6 +562,8 @@
return ret;
}
+
+
/**
* Cross product (Cartesian product) between two algebra expressions.
* Arguments @a n1 and @a n2 may have equally named attributes.
@@ -699,6 +679,7 @@
return ret;
}
+
/**
* Equi-join between two operator nodes.
*
@@ -789,6 +770,7 @@
return ret;
}
+
/**
* Semi-join between two operator nodes.
*
@@ -846,6 +828,7 @@
return ret;
}
+
/**
* Theta-join between two operator nodes.
*
@@ -910,6 +893,7 @@
return ret;
}
+
/**
* Theta-join between two operator nodes.
* Special internal variant used during thetajoin optimization.
@@ -919,8 +903,7 @@
* of @a data).
*/
PFla_op_t *
-PFla_thetajoin_opt_internal (const PFla_op_t *n1,
- const PFla_op_t *n2,
+PFla_thetajoin_opt_internal (const PFla_op_t *n1, const PFla_op_t *n2,
PFarray_t *data)
{
PFla_op_t *ret;
@@ -3455,6 +3438,7 @@
return ret;
}
+
/**
* Construct for an error message.
*
@@ -3481,6 +3465,7 @@
return ret;
}
+
/**
* Constructor for a conditional error message.
*
Index: builtins.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/builtins.c,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -d -r1.66 -r1.67
--- builtins.c 10 Dec 2007 15:09:59 -0000 1.66
+++ builtins.c 17 Dec 2007 14:15:20 -0000 1.67
@@ -634,11 +634,12 @@
struct PFla_pair_t
PFbui_fn_error (const PFla_op_t *loop, bool ordering, struct PFla_pair_t *args)
{
- (void) loop; (void) ordering; (void) args;
+ (void) loop; (void) ordering;
return (struct PFla_pair_t) {
.rel = error( project (args[0].rel,
proj (att_iter, att_iter),
+ proj (att_pos, att_pos),
proj (att_item, att_item))),
.frag = PFla_empty_set ()};
}
-------------------------------------------------------------------------
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