Update of /cvsroot/monetdb/pathfinder/compiler/algebra
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv4951/compiler/algebra
Modified Files:
Tag: M5XQ
builtins.c
Log Message:
propagated changes of Wednesday May 20 2009
from the development trunk to the M5XQ branch
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2009/05/20 - sjoerd: compiler/algebra/builtins.c,1.124
propagated changes of Wednesday May 20 2009
from the May2009 branch to the development trunk
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2009/05/20 - tsheyar: compiler/algebra/builtins.c,1.122.2.2
-- Make the error message for missing documents more informative:
Include the document name in the error message.
-- Adjust new error messages in the testweb.
-- Adjust stable output (for tests with a modified inter-document order).
-- Fix/Extend a cross product rewrite (for unreferenced inputs).
-- Simplify the 'missing document' error message in the algebra
for constant document names (which is the default).
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
U builtins.c
Index: builtins.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/builtins.c,v
retrieving revision 1.121.2.2
retrieving revision 1.121.2.3
diff -u -d -r1.121.2.2 -r1.121.2.3
--- builtins.c 19 May 2009 14:35:32 -0000 1.121.2.2
+++ builtins.c 20 May 2009 16:28:04 -0000 1.121.2.3
@@ -5536,26 +5536,49 @@
PFla_op_t **side_effects,
struct PFla_pair_t *args)
{
- (void) loop; (void) ordering; (void) side_effects;
+ (void) loop; (void) ordering;
PFla_op_t *doc = doc_tbl (args[0].rel, col_res, col_item, alg_dt_doc);
+ /* Check if all documents are available and trigger an error otherwise. */
+
+ /* check for the existence of the document ... */
+ PFla_op_t *error = project (
+ select_ (
+ not (
+ fun_1to1 (
+ args[0].rel,
+ alg_fun_fn_doc_available,
+ col_res,
+ collist (col_item)),
+ col_item2,
+ col_res),
+ col_item2),
+ proj (col_item, col_item));
+
+ /* ... stitch together a meaningful error message ... */
+ error = fun_1to1 (
+ fun_1to1 (
+ attach (
+ attach (
+ error,
+ col_item2,
+ lit_str ("err:FODC0002, Error retrieving resource"
+ " (no such document \"")),
+ col_item3,
+ lit_str ("\").")),
+ alg_fun_fn_concat,
+ col_res,
+ collist (col_item2, col_item)),
+ alg_fun_fn_concat,
+ col_res1,
+ collist (col_res, col_item3));
+
+ /* ... and add an error check to the list of side effects */
*side_effects = error (
*side_effects,
- attach (
- select_ (
- not (
- fun_1to1 (
- args[0].rel,
- alg_fun_fn_doc_available,
- col_res,
- collist (col_item)),
- col_item2,
- col_res),
- col_item2),
- col_item3,
- lit_str ("err:FODC0005: Invalid argument to
fn:doc")),
- col_item3);
+ error,
+ col_res1);
return (struct PFla_pair_t) {
.rel = project (roots (doc),
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables
unlimited royalty-free distribution of the report engine
for externally facing server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins