Update of /cvsroot/monetdb/pathfinder/modules/pftijah
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv28611

Modified Files:
      Tag: Nov2009
        pftijah.mx serialize_pftijah.mx 
Log Message:
Backported:
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2009/10/08 - hrode: pftijah.mx serialize_pftijah.mx
  several small fixes for fragmented indexing
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2009/10/13 - hrode: tjc/tjc_main.c
  initialization of default value for inexout param was missing
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2009/10/14 - hrode: pftijah.mx Tests/colltest2.stable.err
          Tests/createcoll0.milS Tests/createcoll0.stable.out
          Tests/createcoll1.milS Tests/createcoll1.stable.out
          Tests/createcoll1_frag.milS Tests/createcoll1_frag.stable.out
          Tests/load.stable.out Tests/load_bug2831472.milS
          Tests/load_bug2831472.stable.out Tests/loadthesis.milS
          Tests/loadthesis.stable.out Tests/procs.stable.out
          Tests/sigs.stable.out Tests/test_lms_or.stable.out
  - introduce fragmented indexing on XQuery level
  - fixed bugs on MIL level function for fragemented indexing
  - adapted the test cases

  what still misses is the querying on the fragmented index,
  but the default for indexing is currently set to create only
  one single index, which allows querying to work as before
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2009/10/14 - stmane: pftijah.mx

  found by icc:
  removed set but unused variables
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2009/10/21 - jflokstra: pftijah.mx
  - fix for ftiName MIL variable usage when pftijah mil functions are not called
    from pftijah generated MIL scripts but from Pathfinder generated scripts.
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2009/10/21 - jflokstra: pftijah.mx
  - 2 more fixes to make ftcontains work
    1) fix self inflicted pathfinder variable name problem
    2) fix usage of ftindex (:~ ftiName + "0")
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2009/10/22 - jflokstra: pftijah.mx
  - fix problem with pf:add-doc() on non tijah database.

  - mark infinitely waiting ws_create(0) call with tj_tracers.
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2009/10/26 - hrode: tjc/tjc_milprint.c
  try to fix compilation problem
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2009/10/27 - stmane: tjc/tjc_milprint.c

  back-porting
  "
  2009/10/26 - hrode: pathfinder/modules/pftijah/tjc/tjc_milprint.c,1.22
  try to fix compilation problem
  "
  from the development trunk to the Nov2009 release candidate branch
  to have the changes tested with nightly Candidate testing
  (lacking resources, we currently don't have Current testing
   in addition to Stable & Candidate testing)
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2009/11/06 - hrode: pftijah.mx
  avoid working set caching when the pf/tijah indexer serializes a document
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2009/11/06 - hrode: pftijah.mx
  remove accidentally checked-in debugging output.
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



Index: serialize_pftijah.mx
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/modules/pftijah/serialize_pftijah.mx,v
retrieving revision 1.80
retrieving revision 1.80.2.1
diff -u -d -r1.80 -r1.80.2.1
--- serialize_pftijah.mx        25 Sep 2009 07:31:13 -0000      1.80
+++ serialize_pftijah.mx        11 Nov 2009 15:07:22 -0000      1.80.2.1
@@ -238,6 +238,7 @@
        struct {
                int ntags;      /* number of tags at this level */
                int subpath;    /* index of subpath in printbuffer */
+               int subpathno;  /* index of subpath in printbuffer */
                int prev_frame; /* previous level frame, -1 for bottom */
        } level;
        struct {
@@ -248,11 +249,13 @@
 
 /* The main structure managing the Inex path stack and printbuffer */
 typedef struct InexPathGenBase {
-       BAT*            b_pre_path;     /* [oid,str] bat wher path is stored*/
+       BAT*            b_pre_path;     /* [oid,str] bat where path is stored*/
+       BAT*            b_pre_pathno;   /* [oid,str] bat where path sibling 
numbers are stored*/
        int             top;            /* index of the top of the stack */
        int             max;            /* maximum possible size of stack */
        IpgFrame*       stack;          /* the physical stack */
        char*           pathbuff;       /* the path printing buffer */
+       char*           pathnobuff;     /* the path printing buffer */
 } IpgBase;
 
 #define IPG_INIT_STACKSZ       256
@@ -260,18 +263,20 @@
 #define IPG_INIT_PATHSZ                8192
 
 
-static IpgBase* ipg_init(BAT* b) {
+static IpgBase* ipg_init(BAT* b_path, BAT* b_no) {
 
        IpgBase* res;
        if ( !(res = (IpgBase*)GDKmalloc( sizeof(IpgBase) )) )
                return NULL;
-       res->b_pre_path = b;
+       res->b_pre_path = b_path;
+       res->b_pre_pathno = b_no;
        res->top = 0;
        res->max = IPG_INIT_STACKSZ;
        res->stack = (IpgFrame*)GDKmalloc( res->max * sizeof(IpgFrame) );
        if ( !res->stack )
                return NULL;
        res->pathbuff = (char*)GDKmalloc( IPG_INIT_PATHSZ );
+       res->pathnobuff = (char*)GDKmalloc( IPG_INIT_PATHSZ );
        if (0) stream_printf(GDKout,"-IPG[ipg_init() called.]\n");
        return res;
 }
@@ -283,10 +288,12 @@
        base->stack[base->top].level.ntags      = 0;
        base->stack[base->top].level.prev_frame = -1;
        if ( 1 /* Henning: use docnames in path */ )
-               sprintf(base->pathbuff,"fn:doc(\"%s\")",doc);
-       else
                sprintf(base->pathbuff,"%s","");
+       else
+               sprintf(base->pathbuff,"fn:doc(\"%s\")",doc);
+       sprintf(base->pathnobuff,"%s","");
        base->stack[base->top].level.subpath = strlen(base->pathbuff);
+       base->stack[base->top].level.subpathno = strlen(base->pathnobuff);
        return 1;
 }
 
@@ -328,15 +335,30 @@
        int newtop = ipg_frame_alloc(base);
        base->stack[newtop].level.ntags = 0;
        base->stack[newtop].level.prev_frame = base->top;
+        
+       /* Henning */
+       if (1) {
+               if (strcmp(tag,"collection") != 0 && strcmp(tag,"docs") != 0) {
+                       
sprintf(&base->pathbuff[base->stack[base->top].level.subpath],"/%s",tag);
+                       
sprintf(&base->pathnobuff[base->stack[base->top].level.subpathno],".%d",found->tag.cnt);
+                }
+       } else {
+               
sprintf(&base->pathbuff[base->stack[base->top].level.subpath],"/%s",tag);
+               
sprintf(&base->pathnobuff[base->stack[base->top].level.subpathno],".%d",found->tag.cnt);
+       }
 
-       
sprintf(&base->pathbuff[base->stack[base->top].level.subpath],"/%s[%d]",tag,found->tag.cnt);
        base->stack[newtop].level.subpath = strlen(base->pathbuff);
+       base->stack[newtop].level.subpathno = strlen(base->pathnobuff);
 
        base->top = newtop;
 
        if ( !BUNins(base->b_pre_path, &o,(str)base->pathbuff, 0)) {
                GDKerror("error writing recursive tagbat");
                return -1;
+       } 
+       if ( !BUNins(base->b_pre_pathno, &o,(str)base->pathnobuff, 0)) {
+               GDKerror("error writing recursive tagbat");
+               return -1;
        }
 
        if (0) stream_printf(GDKout,"-IPG[tijah(" OIDFMT "@0) = 
%s]\n",o,base->pathbuff);
@@ -354,6 +376,7 @@
 static int ipg_destroy(IpgBase* base) {
        GDKfree(base->stack);
        GDKfree(base->pathbuff);
+       GDKfree(base->pathnobuff);
        GDKfree(base);
        if (0) stream_printf(GDKout,"-IPG[ipg_destroy() called.]\n");
        return 1;
@@ -400,7 +423,10 @@
        BAT* b_collSize;        /* Tijah PRE-size BAT */
        dbat dbat_collSize;     /* Direct access struct for b_collSize */
        /* INCOMPLETE< SHOULD BE FRAGMENTED */
+#ifdef USE_INEX_PATH
        BAT* b_collPath;        /* Tijah PRE-INEX-PATH BAT */
+       BAT* b_collPathNo;      /* Tijah PRE-INEX-PATH (sibling numbers in 
path) BAT */
+#endif
        /* */
        BAT* b_collPfPre;       /* Tijah PRE-PF BAT for Pathinder link */
        /* */
@@ -855,6 +881,7 @@
        if ( !(res->b_collSize    = getBAT(tjCtx_BAT,"size")) ) return NULL;
 #ifdef USE_INEX_PATH
        if ( !(res->b_collPath    = getBAT(tjCtx_BAT,"path")) ) return NULL;
+       if ( !(res->b_collPathNo    = getBAT(tjCtx_BAT,"pathno")) ) return NULL;
 #endif
        if ( (res->tijahPre = getPreSize(res)) == oid_nil )
             return NULL;;
@@ -980,7 +1007,7 @@
        if ( ! (res->hm_globalTerm->H->hash && res->hm_globalTag->H->hash) )
           stream_printf(GDKout,"# WARNING: MISSING HASH ON TAG/TERM 
DICTIONARY\n");
 #ifdef USE_INEX_PATH
-       if ( !(res->ipg = ipg_init(res->b_collPath)) )
+       if ( !(res->ipg = ipg_init(res->b_collPath, res->b_collPathNo)) )
                return NULL;
 #endif
        return res;

Index: pftijah.mx
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/modules/pftijah/pftijah.mx,v
retrieving revision 1.238
retrieving revision 1.238.2.1
diff -u -d -r1.238 -r1.238.2.1
--- pftijah.mx  25 Sep 2009 07:22:33 -0000      1.238
+++ pftijah.mx  11 Nov 2009 15:07:22 -0000      1.238.2.1
@@ -161,6 +161,15 @@
 the join algorithm comes down to a repeated slice and insert operation.
 "
 
+.COMMAND splitbat( BAT[void,oid] pre_tid, BAT[oid,any] pre_split)
+               : BAT[void,bat] = CMDsplitbat;
+"PARAMETERS:
+BAT[void,oid] - pre_tid: original BAT that should get split according to
+BAT[oid,any] - pre_split: OIDs in split bat
+DESCRIPTION:
+the operation does a kdiff and semijoin at the same time returning the kdiff 
as result 0 and the semijoin as result 1.
+"
[...1130 lines suppressed...]
+       BATsetcount(res, 2);
+       res->batDirty = TRUE;
+       BATkey(res, TRUE);
+       BATkey(BATmirror(res), TRUE);
+        res->hsorted = GDK_SORTED;
+        res->tsorted = FALSE;
+        res->H->nonil = 1;
+        res->T->nonil = 0;
+       
+       *result = res;
+       return GDK_SUCCEED;
+}
+
+
+
+
+
 @= init_result
 {
        REGISTER BUN _p = BUNlast(bn);


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins

Reply via email to