Update of /cvsroot/monetdb/pathfinder/compiler/algebra
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv22198/compiler/algebra
Modified Files:
builtins.c
Log Message:
propagated changes of Monday Feb 16 2009 - Tuesday Feb 17 2009
from the Feb2009 branch to the development trunk
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2009/02/16 - tsheyar: compiler/algebra/builtins.c,1.114.2.3
-- Replace step operators by step_join operators.
-- Make function fn:boolean aware of the situation that an input
of type untypedAtomic is also promotable to boolean.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
U builtins.c
Index: builtins.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/builtins.c,v
retrieving revision 1.116
retrieving revision 1.117
diff -u -d -r1.116 -r1.117
--- builtins.c 9 Feb 2009 08:29:47 -0000 1.116
+++ builtins.c 17 Feb 2009 00:53:52 -0000 1.117
@@ -420,14 +420,17 @@
self_attr_spec.qname = PFqname (PFns_wild, NULL);
attributes = attach (
- PFla_step_simple (
- PFla_set_to_la (args[0].frag),
- project (args[0].rel,
- proj (col_iter, col_iter),
- proj (col_item, col_item)),
- self_attr_spec,
- col_iter, col_item, col_item),
- col_pos, lit_int(1));
+ project (
+ PFla_step_join_simple (
+ PFla_set_to_la (args[0].frag),
+ project (args[0].rel,
+ proj (col_iter, col_iter),
+ proj (col_item, col_item)),
+ self_attr_spec,
+ col_item, col_res),
+ proj (col_iter, col_iter),
+ proj (col_item, col_res)),
+ col_pos, lit_int(1));
return (struct PFla_pair_t) {
.rel = attributes,
@@ -453,14 +456,17 @@
self_elem_spec.qname = PFqname (PFns_wild, NULL);
elements = attach (
- PFla_step_simple (
- PFla_set_to_la (args[0].frag),
- project (args[0].rel,
- proj (col_iter, col_iter),
- proj (col_item, col_item)),
- self_elem_spec,
- col_iter, col_item, col_item),
- col_pos, lit_int(1));
+ project (
+ PFla_step_join_simple (
+ PFla_set_to_la (args[0].frag),
+ project (args[0].rel,
+ proj (col_iter, col_iter),
+ proj (col_item, col_item)),
+ self_elem_spec,
+ col_item, col_res),
+ proj (col_iter, col_iter),
+ proj (col_item, col_res)),
+ col_pos, lit_int(1));
return (struct PFla_pair_t) {
.rel = elements,
@@ -4153,13 +4159,17 @@
/* do an ancestor-or-self::node() step
with exact position values */
node_scj = rownum (
- PFla_step_simple (
- PFla_set_to_la (args[0].frag),
- project (args[0].rel,
- proj (col_iter, col_iter),
- proj (col_item, col_item)),
- anc_node_spec,
- col_iter, col_item, col_item),
+ distinct (
+ project (
+ PFla_step_join_simple (
+ PFla_set_to_la (args[0].frag),
+ project (args[0].rel,
+ proj (col_iter, col_iter),
+ proj (col_item, col_item)),
+ anc_node_spec,
+ col_item, col_res),
+ proj (col_iter, col_iter),
+ proj (col_item, col_res))),
col_pos, sortby (col_item), col_iter);
/* select the first ancestor */
@@ -4201,9 +4211,10 @@
PFla_op_t **side_effects,
struct PFla_pair_t *args)
{
- (void) loop; (void) ordering; (void) side_effects;
-
- return args[0];
+ if (PFprop_type_of (args[0].rel, col_item) != aat_bln)
+ return PFbui_fn_boolean_item (loop, ordering, side_effects, args);
+ else
+ return args[0];
}
/**
@@ -4230,21 +4241,22 @@
PFla_op_t **side_effects,
struct PFla_pair_t *args)
{
- (void) ordering; (void) side_effects;
-
- return (struct PFla_pair_t) {
- .rel = disjunion (
- args[0].rel,
- attach (
+ if (PFprop_type_of (args[0].rel, col_item) != aat_bln)
+ return PFbui_fn_boolean_item (loop, ordering, side_effects, args);
+ else
+ return (struct PFla_pair_t) {
+ .rel = disjunion (
+ args[0].rel,
attach (
- difference (
- loop,
- project (
- args[0].rel,
- proj (col_iter, col_iter))),
- col_pos, lit_nat (1)),
- col_item, lit_bln (false))),
- .frag = PFla_empty_set () };
+ attach (
+ difference (
+ loop,
+ project (
+ args[0].rel,
+ proj (col_iter, col_iter))),
+ col_pos, lit_nat (1)),
+ col_item, lit_bln (false))),
+ .frag = PFla_empty_set () };
}
/**
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins