Re: [Monetdb-developers] [Monetdb-pf-checkins] pathfinder/compiler/include logical.h, 1.25, 1.26 logical_mnemonic.h, 1.14, 1.15
Hi Jan, Can you explain a little bit more about this? Or is there a Wiki page that explains it? I'm rather curious about what you mean by "duplicate generating path step operator" Maurice. Jan Rittinger wrote:
Update of /cvsroot/monetdb/pathfinder/compiler/include In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv28492/include
Modified Files: logical.h logical_mnemonic.h Log Message: -- Introduced a new duplicate generating path step operator. This operator is introduced in the proxy detection phase and replaces the following pattern by a new dup_scjoin operator:
|X| __/ \__ / \ (pi) | | | scjoin (pi) / | | (pi) | \__ __/ \ / #
The new operator keeps all the columns of its right argument -- the left argument refers to the fragment information -- and adds a new column (stored in the semantical field scjoin.item_res) based on the context column (stored in the semantical field scjoin.item). Because the result may change the cardinality all the other columns are mapped based on the input context nodes.
Index: logical_mnemonic.h =================================================================== RCS file: /cvsroot/monetdb/pathfinder/compiler/include/logical_mnemonic.h,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- logical_mnemonic.h 27 Sep 2006 12:03:51 -0000 1.14 +++ logical_mnemonic.h 13 Nov 2006 09:58:40 -0000 1.15 @@ -134,6 +134,7 @@
/** staircase join */ #define scjoin(a,b,c,d,e,f,g) PFla_scjoin ((a),(b),(c),(d),(e),(f),(g)) +#define dup_scjoin(a,b,c,d,e,f) PFla_dup_scjoin ((a),(b),(c),(d),(e),(f))
/** document table */ #define doc_tbl(a,b,c,d) PFla_doc_tbl((a),(b),(c),(d))
Index: logical.h =================================================================== RCS file: /cvsroot/monetdb/pathfinder/compiler/include/logical.h,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- logical.h 31 Oct 2006 09:32:45 -0000 1.25 +++ logical.h 13 Nov 2006 09:58:40 -0000 1.26 @@ -87,8 +87,9 @@ iteration (Pathfinder extension) */ , la_all = 44 /**< test if all items in an iteration are true */ , la_scjoin = 50 /**< staircase join */ - , la_doc_tbl = 51 /**< document relation (is also a fragment) */ - , la_doc_access = 52 /**< document access necessary for pf:string-value */ + , la_dup_scjoin = 51 /**< staircase join */ + , la_doc_tbl = 52 /**< document relation (is also a fragment) */ + , la_doc_access = 53 /**< document access necessary for pf:string-value */ , la_element = 60 /**< element-constructing operator */ , la_element_tag = 61 /**< part of the element-constructing operator; connecting element tag and content; @@ -604,6 +605,16 @@ PFalg_att_t iter, PFalg_att_t item, PFalg_att_t item_res);
+/** + * Staircase join without duplicates between two relations. + * Each such join corresponds to the evaluation of an XPath + * location step. + */ +PFla_op_t * PFla_dup_scjoin (const PFla_op_t *doc, const PFla_op_t *n, + PFalg_axis_t axis, PFty_t seqty, + PFalg_att_t item, + PFalg_att_t item_res); + /*********** node construction functionality *************/
/*
------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Monetdb-pf-checkins mailing list Monetdb-pf-checkins@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins
-- ---------------------------------------------------------------------- Dr.Ir. M. van Keulen - Assistant Professor, Data Management Technology Univ. of Twente, Dept of EEMCS, POBox 217, 7500 AE Enschede, Netherlands Email: m.vankeulen@utwente.nl, Phone: +31 534893688, Fax: +31 534892927 Room: ZI 3039, WWW: http://www.cs.utwente.nl/~keulen
Hi Maurice, this operator is only a shortcut of the pattern sketched below. It basically evaluates the path step for all context nodes separately. (By ignoring the iter information we thus may introduce duplicates.) The resulting schema of the path step operator contains all the columns of the 'context relation' plus an additional column (from the document relation) storing the result of the path step operator (and thus is a real join without duplicate removal). (If you want to see that operator in the generated plans you however have to stop after introduction of proxy nodes parameter '}' of option '-o'.) Cheers, Jan On 11/13/2006 02:23 PM, Maurice van Keulen wrote with possible deletions:
Hi Jan,
Can you explain a little bit more about this? Or is there a Wiki page that explains it? I'm rather curious about what you mean by "duplicate generating path step operator" Maurice.
Jan Rittinger wrote:
Update of /cvsroot/monetdb/pathfinder/compiler/include In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv28492/include
Modified Files: logical.h logical_mnemonic.h Log Message: -- Introduced a new duplicate generating path step operator. This operator is introduced in the proxy detection phase and replaces the following pattern by a new dup_scjoin operator:
|X| __/ \__ / \ (pi) | | | scjoin (pi) / | | (pi) | \__ __/ \ / #
The new operator keeps all the columns of its right argument -- the left argument refers to the fragment information -- and adds a new column (stored in the semantical field scjoin.item_res) based on the context column (stored in the semantical field scjoin.item). Because the result may change the cardinality all the other columns are mapped based on the input context nodes.
-- Jan Rittinger Database Systems Technische Universität München (Germany) http://www-db.in.tum.de/~rittinge/
participants (2)
-
Jan Rittinger
-
Maurice van Keulen