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

Modified Files:
      Tag: XQuery_0-24
        algebra.c builtins.c logical.c physical.c 
Log Message:
pf:docname implementation


U physical.c
Index: physical.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/physical.c,v
retrieving revision 1.69.2.2
retrieving revision 1.69.2.3
diff -u -d -r1.69.2.2 -r1.69.2.3
--- physical.c  30 May 2008 14:13:46 -0000      1.69.2.2
+++ physical.c  12 Jun 2008 12:39:10 -0000      1.69.2.3
@@ -1725,6 +1725,15 @@
             res_type = aat_str;
             break;
 
+        case alg_fun_pf_docname:
+            assert(refs.count == 1);
+
+            /* make sure atts are of the correct type */
+            assert(n->schema.items[ix[0]].type & aat_node);
+
+            res_type = aat_str;
+            break;
+
         case alg_fun_upd_delete:
             assert(refs.count == 1);
             /* make sure that the attributes is a node */

U algebra.c
Index: algebra.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/algebra.c,v
retrieving revision 1.84.2.2
retrieving revision 1.84.2.3
diff -u -d -r1.84.2.2 -r1.84.2.3
--- algebra.c   31 May 2008 22:00:02 -0000      1.84.2.2
+++ algebra.c   12 Jun 2008 12:38:55 -0000      1.84.2.3
@@ -1070,7 +1070,6 @@
         case alg_fun_call_pf_documents_str:      return "pf:documents_str";
         case alg_fun_call_pf_documents_str_unsafe: 
                                                return 
"pf:documents_str_unsafe";
-        case alg_fun_call_pf_docname:            return "pf:docname";
         case alg_fun_call_pf_collections:        return "pf:collections";
         case alg_fun_call_pf_collections_unsafe: return 
"pf:collections_unsafe";
         case alg_fun_call_pf_collection:         return "pf:collection";
@@ -1127,6 +1126,7 @@
         case alg_fun_pf_add_doc_str_int:  return "pf:add-doc";
         case alg_fun_pf_del_doc:          return "pf:del-doc";
         case alg_fun_pf_nid:              return "pf:nid";
+        case alg_fun_pf_docname:          return "pf:docname";
         case alg_fun_upd_rename:          return "upd:rename";
         case alg_fun_upd_delete:          return "upd:delete";
         case alg_fun_upd_insert_into_as_first:  return "upd:insertIntoAsFirst";

U logical.c
Index: logical.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/logical.c,v
retrieving revision 1.98.2.3
retrieving revision 1.98.2.4
diff -u -d -r1.98.2.3 -r1.98.2.4
--- logical.c   2 Jun 2008 15:19:48 -0000       1.98.2.3
+++ logical.c   12 Jun 2008 12:39:01 -0000      1.98.2.4
@@ -1591,6 +1591,15 @@
             res_type = aat_str;
             break;
 
+        case alg_fun_pf_docname:
+            assert(refs.count == 1);
+
+            /* make sure atts are of the correct type */
+            assert(n->schema.items[ix[0]].type & aat_node);
+
+            res_type = aat_str;
+            break;
+
         case alg_fun_upd_delete:
             assert(refs.count == 1);
 

U builtins.c
Index: builtins.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/builtins.c,v
retrieving revision 1.95.2.3
retrieving revision 1.95.2.4
diff -u -d -r1.95.2.3 -r1.95.2.4
--- builtins.c  3 Jun 2008 11:53:35 -0000       1.95.2.3
+++ builtins.c  12 Jun 2008 12:38:56 -0000      1.95.2.4
@@ -4709,11 +4709,17 @@
 PFbui_pf_docname (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 = NULL,
-        .frag = NULL };
+        .rel = project (fun_1to1 (args[0].rel,
+                                  alg_fun_pf_docname,
+                                  att_res,
+                                  attlist (att_item)),
+                        proj (att_iter, att_iter),
+                        proj (att_pos, att_pos),
+                        proj (att_item, att_res)),
+        .frag = args[0].frag };
 }
 
 /**


-------------------------------------------------------------------------
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