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

Modified Files:
      Tag: XQuery_0-24
        builtins.c core2alg.brg 
Log Message:
-- Solve conceptual error:
   In case we have mode unordered or call function distinct-values()
   we cannot represent arbitrary positions by a constant as this removes
   the iteration boundaries for nested expressions (-- the minor orderings
   mix with the major orderings).

   Instead of attach we use the rowid operator.


U core2alg.brg
Index: core2alg.brg
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/core2alg.brg,v
retrieving revision 1.71
retrieving revision 1.71.2.1
diff -u -d -r1.71 -r1.71.2.1
--- core2alg.brg        21 May 2008 11:03:43 -0000      1.71
+++ core2alg.brg        2 Jun 2008 09:56:21 -0000       1.71.2.1
@@ -287,8 +287,6 @@
 /** mnemonic algebra constructors */
 #include "logical_mnemonic.h"
 
-#define RANK_DUMMY 42
-
 struct map_rel_info_t {
     PFla_op_t   *map;   /* map relation */
     unsigned int count; /* attribute counter of the map relation */
@@ -2834,12 +2832,8 @@
 
     res_rec_param = rec_param (
                         rec_arg (
-                            attach (seed,
-                                    att_pos,
-                                    lit_int (RANK_DUMMY)),
-                            attach (res_body,
-                                    att_pos,
-                                    lit_int (RANK_DUMMY)),
+                            rowid (seed, att_pos),
+                            rowid (res_body, att_pos),
                             base
                         ),
                         nil ());
@@ -3087,7 +3081,7 @@
                    .frag = p.frag };
     else
         return (struct  PFla_pair_t) {
-                   .rel = attach (step, att_pos, lit_nat (RANK_DUMMY)),
+                   .rel = rowid (step, att_pos),
                    .frag = p.frag };
 }
 

U builtins.c
Index: builtins.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/builtins.c,v
retrieving revision 1.95.2.1
retrieving revision 1.95.2.2
diff -u -d -r1.95.2.1 -r1.95.2.2
--- builtins.c  27 May 2008 15:58:52 -0000      1.95.2.1
+++ builtins.c  2 Jun 2008 09:56:20 -0000       1.95.2.2
@@ -50,8 +50,6 @@
 #include "logical.h"
 #include "logical_mnemonic.h"
 
-#define RANK_DUMMY 42
-
 /**
  * Assign correct row numbers in case we need the real values.
  */
@@ -2959,12 +2957,12 @@
     (void) loop; (void) ordering;
 
     return (struct PFla_pair_t) {
-                  .rel = attach (
+                  .rel = rowid (
                              distinct (
                                  project (args[0].rel,
                                       proj (att_iter, att_iter),
                                       proj (att_item, att_item))),
-                             att_pos, lit_nat (RANK_DUMMY)),
+                             att_pos),
                   .frag = args[0].frag };
 }
 
@@ -3221,11 +3219,11 @@
      * project away pos column
      */
     return (struct PFla_pair_t) {
-        .rel  = attach (
+        .rel  = rowid (
                     project (args[0].rel,
                              proj (att_iter, att_iter),
                              proj (att_item, att_item)),
-                    att_pos, lit_nat (RANK_DUMMY)),
+                    att_pos),
         .frag = args[0].frag };
 }
 
@@ -3323,7 +3321,7 @@
             .frag = PFla_set_union (args[0].frag, args[1].frag) };
     else
         return (struct  PFla_pair_t) {
-            .rel = attach (distinct, att_pos, lit_nat (RANK_DUMMY)),
+            .rel = rowid (distinct, att_pos),
             .frag = PFla_set_union (args[0].frag, args[1].frag) };
 }
 
@@ -3359,7 +3357,7 @@
             .frag = PFla_set_union (args[0].frag, args[1].frag) };
     else
         return (struct  PFla_pair_t) {
-            .rel = attach (distinct, att_pos, lit_nat (RANK_DUMMY)),
+            .rel = rowid (distinct, att_pos),
             .frag = PFla_set_union (args[0].frag, args[1].frag) };
 }
 
@@ -3398,7 +3396,7 @@
             .frag = args[0].frag };
     else
         return (struct  PFla_pair_t) {
-            .rel = attach (difference, att_pos, lit_nat (RANK_DUMMY)),
+            .rel = rowid (difference, att_pos),
             /* result nodes can only originate from first argument */
             .frag = args[0].frag };
 }
@@ -3792,7 +3790,7 @@
             .frag = args[1].frag };
     else
         return (struct PFla_pair_t) {
-            .rel = attach (distinct (op), att_pos, lit_nat (RANK_DUMMY)),
+            .rel = rowid (distinct (op), att_pos),
             .frag = args[1].frag };
 }
 
@@ -3954,7 +3952,7 @@
             .frag = args[0].frag };
     else
         return (struct  PFla_pair_t) {
-            .rel = attach (distinct, att_pos, lit_nat (RANK_DUMMY)),
+            .rel = rowid (distinct, att_pos),
             .frag = args[0].frag };
 }
 


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins

Reply via email to