Update of /cvsroot/monetdb/pathfinder/modules/pftijah
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv32645/modules/pftijah

Modified Files:
        pftijah.mx serialize_pftijah.mx 
Log Message:
propagated changes of Wednesday Jun 06 2007 - Tuesday Jun 12 2007
from the XQuery_0-18 branch to the development trunk


Index: serialize_pftijah.mx
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/modules/pftijah/serialize_pftijah.mx,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -d -r1.49 -r1.50
--- serialize_pftijah.mx        1 Jun 2007 15:35:00 -0000       1.49
+++ serialize_pftijah.mx        12 Jun 2007 17:35:58 -0000      1.50
@@ -43,7 +43,6 @@
 @c
 #include <pf_config.h>
 
-
 /* #define TJ_TRACE 1 */
 
 /*******************************************
@@ -681,6 +680,16 @@
        /* BATkey(BATmirror(tjctx->b_globalTag), TRUE); */
        BATkey(BATmirror(tjctx->b_collPre), FALSE);
        BATkey(BATmirror(tjctx->b_collSize), FALSE);
+       PROPDEBUG {
+               BATpropcheck(tjctx->b_globalTerm,BATPROPS_ALL);
+               BATpropcheck(tjctx->b_globalTag,BATPROPS_ALL);
+               BATpropcheck(tjctx->b_docName,BATPROPS_ALL);
+               BATpropcheck(tjctx->b_docFirstPre,BATPROPS_ALL);
+               BATpropcheck(tjctx->b_collParam,BATPROPS_ALL);
+               BATpropcheck(tjctx->b_collPre,BATPROPS_ALL);
+               BATpropcheck(tjctx->b_collSize,BATPROPS_ALL);
+               BATpropcheck(tjctx->b_collPfPre,BATPROPS_ALL);
+       }
        BBPunfix(BBPcacheid(tjctx->b_globalTerm));
        BBPunfix(BBPcacheid(tjctx->b_globalTag));
        BBPunfix(BBPcacheid(tjctx->b_docName));

Index: pftijah.mx
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/modules/pftijah/pftijah.mx,v
retrieving revision 1.136
retrieving revision 1.137
diff -u -d -r1.136 -r1.137
--- pftijah.mx  11 Jun 2007 14:57:18 -0000      1.136
+++ pftijah.mx  12 Jun 2007 17:35:58 -0000      1.137
@@ -1164,6 +1164,20 @@
 #
 #
 
+PROC tj_is_indexed(str collName) : bit :=
+{
+    if (view_bbp_name().reverse().exist("tj_pfc_fti_dep")) {
+       if ( bat("tj_pfc_fti_dep_star").count() > 0 ) {
+           # eg. all collections are indexed
+            return TRUE;
+       } else {
+           return bat("tj_pfc_fti_dep").reverse().exist(collName);
+       }
+    } else {
+        return FALSE;
+    }
+}
+
 PROC tj_play_doc_tape(BAT[void,BAT] ws,
                       BAT[void,oid] item, 
                       BAT[void,int] kind, 
@@ -1219,10 +1233,8 @@
     }
 }
 
-
 const virtRoot := [EMAIL PROTECTED];
 
-
 ##
 # Compute ancestor-descendant relation. 
 #
@@ -3140,13 +3152,13 @@
 
 PROC _buildIRindex(str ftiName, BAT[str,bat] collBat) : void :=
 {
-       var offset := oid(int(_tj_get_parameter(collBat, "_last_finalizedPre")) 
+ 1);
+       var offset := oid(lng(_tj_get_parameter(collBat, "_last_finalizedPre")) 
+ 1);
         var fragments := collBat.find("_fragments");
        var frag_offset := int(find_lower(fragments.reverse(), offset));
        var frag_last := fragments.count();
        
        var pre_tid := bat("tj_" + ftiName + "_tid" + str(frag_offset));
-       var tids := pre_tid.slice(int(offset) - int(pre_tid.seqbase()), 
pre_tid.count() - 1);
+       var tids := pre_tid.slice(lng(offset) - lng(pre_tid.seqbase()), 
lng(pre_tid.count() - 1));
        tids.access(BAT_WRITE);
        frag_offset :+= 1;
        while (frag_offset <= frag_last)
@@ -3154,6 +3166,7 @@
                tids.append(bat("tj_" + ftiName + "_tid" + str(frag_offset)));
                frag_offset :+= 1;
        }
+       tids.access(BAT_READ);
         
        # incremental index merge
        if (view_bbp_name().reverse().exist("tj_" + ftiName + "_TermIndex")) 
@@ -3458,6 +3471,7 @@
         return GDK_SUCCEED;
 
 static int bat_oid_sort_chck(BAT* b) {
+       /* incomplete, the head should also be key */
        if ( !b->hsorted ) {
            GDKerror("bat_oid_sort_chck: BAT should be head sorted.\n");
            return 0;
@@ -3719,7 +3733,7 @@
         return GDK_SUCCEED;
 }
 
-int CMDoffsetindex ( BAT** result, BAT* tid, int* res_size )
+int CMDoffsetindex ( BAT** result, BAT* tid, int* res_size)
 {
        char *name = "TJoffsetindex";
        BAT *res = NULL;
@@ -3732,6 +3746,7 @@
        BATcheck(tid, name);
        if (!(BATtordered(tid) & 1))
        {
+               /* BUG#1732596 this test currently fails on Itanium */
                GDKerror("%s: index-bat must be ordered on tail.\n", name);
                return GDK_FAIL;
        }


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins

Reply via email to