Re: [Monetdb-developers] [Monetdb-pf-checkins] pathfinder/compiler/algebra physical.c, XQuery_0-22, 1.55, 1.55.2.1
On Wed, Feb 20, 2008 at 03:05:25PM +0000, Jan Rittinger wrote:
Update of /cvsroot/monetdb/pathfinder/compiler/algebra In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv15240/algebra
Modified Files: Tag: XQuery_0-22 physical.c Log Message: -- Testing (XMach-1/q8) correctly complains about the wrong input order.
kintersect seems to respect the order of the right operand instead of the order of the left one.
AFAIK, kintersect does not guarantee any order at all! (Just recalling from the back of my head; did not check the code, again...) By default, it will scan the left input and look-up into the right input, thus "by coincedence" maintain the order of the left input. However, in case it "thinks" that scanning the right and looking up into the left is more efficient (e.g., in case the is already a hash index on the left head, or the left head is a dense OID column, allowing positional lookup), it might switch the scanning the right and looking-up into the left. We call this "operational optimization" ... In case pathfinder indeed relies on any particular order-preserving kintersect, we should carefully double-check the above, and if necessary consider adding an explicit "left_kintersect" (and/or "right_kintersect") primitive analogously to the left*join and ord_*select primitives ... Stefan
Index: physical.c =================================================================== RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/physical.c,v retrieving revision 1.55 retrieving revision 1.55.2.1 diff -u -d -r1.55 -r1.55.2.1 --- physical.c 31 Jan 2008 21:43:33 -0000 1.55 +++ physical.c 20 Feb 2008 15:05:22 -0000 1.55.2.1 @@ -718,9 +718,10 @@ /* ---- SemiJoin: orderings ---- */
/* - * We preserve any ordering of the left operand. + * kintersect (the MIL implementation) preserves the + * ordering of the right operand. */ - ret->orderings = PFord_unique (n1->orderings); + ret->orderings = PFord_unique (n2->orderings);
/* ---- SemiJoin: costs ---- */
-- | Dr. Stefan Manegold | mailto:Stefan.Manegold@cwi.nl | | CWI, P.O.Box 94079 | http://www.cwi.nl/~manegold/ | | 1090 GB Amsterdam | Tel.: +31 (20) 592-4212 | | The Netherlands | Fax : +31 (20) 592-4312 |
participants (1)
-
Stefan Manegold